This is a patch to fix the bug reported here: https://llvm.org/bugs/show_bug.cgi?id=23230
Details
Details
- Reviewers
kcc glider samsonov - Commits
- rG9ebb30345915: [ASan] Fix flaky tests (see https://llvm.org/bugs/show_bug.cgi?id=23230). Patch…
rCRT238545: [ASan] Fix flaky tests (see https://llvm.org/bugs/show_bug.cgi?id=23230).
rL238545: [ASan] Fix flaky tests (see https://llvm.org/bugs/show_bug.cgi?id=23230).
Diff Detail
Diff Detail
Event Timeline
test/asan/TestCases/strtol_strict.c | ||
---|---|---|
45 | ouch. This is going to corrupt asan's heap internals and may cause other kinds of flakiness in the test. |
ouch. This is going to corrupt asan's heap internals and may cause other kinds of flakiness in the test.
I would suggest to allocate a larger buffer, write 0 to the first 8 bytes, apply __asan_poison_memory to those first 8 bytes,
and then pass pass the address to one of those 8 bytes to strtol.
This way you will get a reliable test.