Skip to content

Commit 28a09f6

Browse files
authored
Fix asan.test_asyncify_longjmp (#20740)
This test started failing after the compiler-rt upgrade because we started depending on the `getrlimit` syscall, and this test builds in `-sSTRICT` mode which disables `ALLOW_UNIMPLEMENTED_SYSCALLS` which means stub syscalls are not included.
1 parent da8fe5f commit 28a09f6

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

.circleci/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -520,6 +520,7 @@ jobs:
520520
asan.test_cubescript
521521
asan.test_wasm_worker_hello
522522
asan.test_externref_emjs_dynlink
523+
asan.test_asyncify_longjmp
523524
lsan.test_stdio_locking
524525
lsan.test_dlfcn_basic
525526
lsan.test_pthread_create"

system/lib/compiler-rt/lib/asan/asan_rtl.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,9 @@ static void AsanInitInternal() {
447447

448448
ReplaceSystemMalloc();
449449

450+
#if !SANITIZER_EMSCRIPTEN
450451
DisableCoreDumperIfNecessary();
452+
#endif
451453

452454
InitializeShadowMemory();
453455

system/lib/compiler-rt/lib/sanitizer_common/sanitizer_posix_libcdep.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ bool DontDumpShadowMemory(uptr addr, uptr length) {
8383
#endif // MADV_DONTDUMP
8484
}
8585

86+
#if !SANITIZER_EMSCRIPTEN
8687
static rlim_t getlim(int res) {
8788
rlimit rlim;
8889
CHECK_EQ(0, getrlimit(res, &rlim));
@@ -127,6 +128,7 @@ void SetAddressSpaceUnlimited() {
127128
setlim(RLIMIT_AS, RLIM_INFINITY);
128129
CHECK(AddressSpaceIsUnlimited());
129130
}
131+
#endif
130132

131133
void Abort() {
132134
#if !SANITIZER_GO

0 commit comments

Comments
 (0)