google / tcmalloc

Apache License 2.0
4.31k stars 463 forks source link

bazel test failed, how to do with this failed? #192

Open kungf opened 1 year ago

kungf commented 1 year ago

tcmalloc/testing/memory_errors_test.cc:322: Failure Death test: { fprintf(stderr, "size=%zu\n", size); ScopedAlwaysSample always_sample; for (size_t i = 0; i < 10000; ++i) { char volatile ptr = static_cast<char>(malloc(size)); ptr = static_cast<char*>(realloc(ptr, size + 1)); ptr[size + 2] = 'A'; free(ptr); } } Result: died but not with expected error. Expected: contains regular expression "SIGSEGV" Actual msg: [ DEATH ] size=2 [ DEATH ] tcmalloc/guarded_page_allocator.cc:488] GWP-ASan (https://google.github.io/tcmalloc/gwp-asan.html) has detected a memory error [ DEATH ] tcmalloc/guarded_page_allocator.cc:492] >>> Access at offset 0 into buffer of length 3 [ DEATH ] tcmalloc/guarded_page_allocator.cc:494] Error originates from memory allocated in thread 18342 at: [ DEATH ] tcmalloc/guarded_page_allocator.cc:460] @ 0x44830b

it seems old_sa do not hanlder SIGSEGV