[PATCH] [ASan] Don't die with internal ASan error on large buffer overflows
Alexey Samsonov
samsonov at google.com
Fri Oct 11 06:02:46 PDT 2013
================
Comment at: lib/asan/asan_allocator2.cc:222
@@ +221,3 @@
+bool AsanChunkView::IsValid() {
+ return chunk_ != 0 && chunk_->chunk_state != CHUNK_AVAILABLE;
+}
----------------
Timur Iskhodzhanov wrote:
> Please add a comment explaining why
> chunk_state != AVAILABLE
> is required for a valid chunk.
>
> I assume that the description of an available chunk is never supposed to be printed?
Done
================
Comment at: lib/asan/lit_tests/TestCases/heap-overflow-large.cc:19
@@ +18,3 @@
+ // CHECK: #0 0x{{.*}} in main {{.*}}heap-overflow-large.cc:[[@LINE-2]]
+ // CHECK: SUMMARY: AddressSanitizer: {{(heap-buffer-overflow|SEGV)}}
+ delete[] x;
----------------
Timur Iskhodzhanov wrote:
> What's printed as the description of the accessed memory?
> Is there some user-friendly line like "sorry, the info is not available"? If yes - please add a CHECK line for that. If no - please add.
Done
http://llvm-reviews.chandlerc.com/D1893
More information about the llvm-commits
mailing list