Skip to content

Commit 12653e1

Browse files
committed
enable_unmalloced_free_check
1 parent f5ce2a7 commit 12653e1

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

compiler-rt/lib/asan/asan_allocator.cpp

+2-4
Original file line numberDiff line numberDiff line change
@@ -797,10 +797,8 @@ struct Allocator {
797797
void ReportInvalidFree(void *ptr, u8 chunk_state, BufferedStackTrace *stack) {
798798
if (chunk_state == CHUNK_QUARANTINE)
799799
ReportDoubleFree((uptr)ptr, stack);
800-
else {
801-
if (common_flags()->enable_unmalloced_free_check)
802-
ReportFreeNotMalloced((uptr)ptr, stack);
803-
}
800+
else
801+
ReportFreeNotMalloced((uptr)ptr, stack);
804802
}
805803

806804
void CommitBack(AsanThreadLocalMallocStorage *ms, BufferedStackTrace *stack) {

compiler-rt/lib/sanitizer_common/sanitizer_flags.inc

-3
Original file line numberDiff line numberDiff line change
@@ -269,9 +269,6 @@ COMMON_FLAG(bool, detect_write_exec, false,
269269
COMMON_FLAG(bool, test_only_emulate_no_memorymap, false,
270270
"TEST ONLY fail to read memory mappings to emulate sanitized "
271271
"\"init\"")
272-
COMMON_FLAG(bool, enable_unmalloced_free_check, !SANITIZER_AIX,
273-
"if true, FreeNotMalloced error will be reported. Only disable "
274-
"this error detecting on AIX by default for now.")
275272
// With static linking, dladdr((void*)pthread_join) or similar will return the
276273
// path to the main program. This flag will replace dlopen(<main program,...>
277274
// with dlopen(NULL,...), which is the correct way to get a handle to the main

0 commit comments

Comments
 (0)