Skip to content

Commit

Permalink
Disable BasicFunctionUsedUnusedTwoRuntimes in Apple ASAN (#1351)
Browse files Browse the repository at this point in the history
Summary:

ASAN has a big minimum native stack gap, which causes this test to crash
on mac under ASAN due to the use of `std::async.`
Disable this test under ASAN on Mac.

Differential Revision: D54917788
  • Loading branch information
avp authored and facebook-github-bot committed Mar 14, 2024
1 parent cdd307e commit 7be237d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions unittests/VMRuntime/CodeCoverageProfilerTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include "hermes/VM/Profiler/CodeCoverageProfiler.h"

#include "llvh/ADT/StringRef.h"
#include "llvh/Support/Compiler.h"
#include "llvh/Support/raw_ostream.h"

#include <algorithm>
Expand Down Expand Up @@ -116,6 +117,10 @@ TEST_F(CodeCoverageProfilerTest, BasicFunctionUsedUnused) {

// Right now, this just tests that we can simultaneously run two code coverage
// profilers.
// Disabled for Apple ASAN builds because it causes a native stack overflow
// as a result of the large minimum stack gap.
// Consider enabling it again with larger stack for std::async.
#if !(LLVM_ADDRESS_SANITIZER_BUILD && defined(__APPLE__))
TEST_F(CodeCoverageProfilerTest, BasicFunctionUsedUnusedTwoRuntimes) {
auto runtime2 = newRuntime();
GCScope scope{*runtime2};
Expand Down Expand Up @@ -159,6 +164,7 @@ TEST_F(CodeCoverageProfilerTest, BasicFunctionUsedUnusedTwoRuntimes) {
EXPECT_FALSE(isFuncExecuted(rt, executedFuncInfos, funcUnused));
}
}
#endif

TEST_F(CodeCoverageProfilerTest, FunctionsFromMultipleModules) {
hbc::CompileFlags flags;
Expand Down

0 comments on commit 7be237d

Please sign in to comment.