Skip to content

Commit

Permalink
Change reporting of load/store (read/write) errors from "unknown" to …
Browse files Browse the repository at this point in the history
…something slightly more clear. (NFC)

This is a follow up to cl/557880060.

PiperOrigin-RevId: 563554467
Change-Id: I84a9107190f0d1664cef54d0c972468beab45851
  • Loading branch information
kda authored and copybara-github committed Sep 7, 2023
1 parent 0ff2705 commit 6f14c73
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tcmalloc/segv_handler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ static void PrintStackTraceFromSignalHandler(void* context) {
constexpr const char* WriteFlagToString(WriteFlag write_flag) {
switch (write_flag) {
case WriteFlag::Unknown:
return "(unknown)";
return "(read or write: indeterminate)";
case WriteFlag::Read:
return "(read)";
case WriteFlag::Write:
Expand Down
6 changes: 3 additions & 3 deletions tcmalloc/testing/memory_errors_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ TEST_P(ReadWriteTcMallocTest, UnderflowDetected) {
#if !defined(__riscv)
write_test ? "\\(write\\)" : "\\(read\\)",
#else
"\\(unknown\\)",
"\\(read or write: indeterminate\\)";
#endif
" occurs in thread [0-9]+ at");
EXPECT_DEATH(RepeatUnderflow(), expected_output);
Expand Down Expand Up @@ -205,7 +205,7 @@ TEST_P(ReadWriteTcMallocTest, OverflowDetected) {
#if !defined(__riscv)
write_test ? "\\(write\\)" : "\\(read\\)",
#else
"\\(unknown\\)",
"\\(read or write: indeterminate\\)";
#endif
" occurs in thread [0-9]+ at");
EXPECT_DEATH(RepeatOverflow(), expected_output);
Expand All @@ -231,7 +231,7 @@ TEST_P(ReadWriteTcMallocTest, UseAfterFreeDetected) {
#if !defined(__riscv)
write_test ? "\\(write\\)" : "\\(read\\)",
#else
"\\(unknown\\)",
"\\(read or write: indeterminate\\)";
#endif
" occurs in thread [0-9]+ at");
EXPECT_DEATH(RepeatUseAfterFree(), expected_output);
Expand Down

0 comments on commit 6f14c73

Please sign in to comment.