Open DanielLee343 opened 10 months ago
Do you have the relevant errors from the log files?
For example, on memory_errors_test
, does the test die successfully, but perhaps not with the expected error?
Thanks for reply. The log files show it does not meet with expected error:
tcmalloc/testing/memory_errors_test.cc:432: Failure
Death test: { fprintf(stderr, "size=%zu\n", size); ScopedAlwaysSample always_sample; ScopedImprovedGuardedSampling scoped_improved_guarded_sampling( GetParam()); 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); MaybeResetStackTraceFilter(GetParam()); } }
Result: died but not with expected error.
Expected: contains regular expression "SIGSEGV"
Actual msg:
[ DEATH ] size=2
[ DEATH ] tcmalloc/segv_handler.cc:227] *** GWP-ASan (https://google.github.io/tcmalloc/gwp-asan.html) has detected a memory error ***
[ DEATH ] tcmalloc/segv_handler.cc:231] >>> Access at offset 0 into buffer of length 3
[ DEATH ] tcmalloc/segv_handler.cc:233] Error originates from memory allocated in thread 42 at:
[ DEATH ] tcmalloc/segv_handler.cc:101] @ 0x5555555bb500
[ DEATH ] tcmalloc/segv_handler.cc:101] @ 0x5555555a7855
...
[ DEATH ] tcmalloc/segv_handler.cc:275] Buffer overflow (write) detected in thread 42 at free:
...
[ DEATH ] tcmalloc/segv_handler.cc:286] *** Try rerunning with --config=asan to get stack trace of overflow ***
[ DEATH ] tcmalloc/segv_handler.cc:290] improved_guarded_sampling: 0
...
There's no --config=asan
option for bazel
. So I ran with -c dbg
but no difference.
I have the issue here, any update?
tcmalloc/internal/allocation_guard_test.cc:35: Failure Death test: { AllocationGuardSpinLockHolder h(&lock); } Result: died but not with expected error. Expected: contains regular expression "SIGABRT received" Actual msg:
@ckennelly Do you have any ideas? Anything will be helpful, Thanks in advance!
Hi, I was following the exact steps in the quickstart guide but
bazel test //tcmalloc/...
shows me this:I noticed the mojority of tests failed in this line
tcmalloc/testing/memory_errors_test.cc:432
, at theEXPECT_DEATH
My system environment:
Any reason for that, or hint for debug? Thanks!