diff --git a/compiler-rt/test/dfsan/interceptors.c b/compiler-rt/test/dfsan/mmap_at_init.c rename from compiler-rt/test/dfsan/interceptors.c rename to compiler-rt/test/dfsan/mmap_at_init.c --- a/compiler-rt/test/dfsan/interceptors.c +++ b/compiler-rt/test/dfsan/mmap_at_init.c @@ -6,9 +6,7 @@ // // Tests that calling mmap() during during dfsan initialization works. -#include #include -#include #include #include @@ -23,7 +21,9 @@ Size = (Size + PageSize - 1) & ~(PageSize - 1); // Round up to PageSize. void *Ret = mmap(NULL, Size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); - assert(Ret != MAP_FAILED); + // Use assert may cause link errors that require -Wl,-z,notext. + // Do not know the root cause yet. + if (Ret == MAP_FAILED) exit(-1); return Ret; }