This can be moved out of hwasan_linux.cpp because it can be re-used in the fuchsia port.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
@leonardchan Sorry for the late report, took us some time to get to this but - this caused a test failure on Linaro's AArch64 bots.
I've fixed this with https://reviews.llvm.org/rGbb4f7b916661d2517fb8dfadfc8629e6bed56ce4
What happened is that we now see frame 0 as a tag mismatch function and frame 1 is main. With my limited knowledge of sanitizers I think this is fine and the test is just ensuring that there is some main frame shown. So allowing it to be frame 0 or 1 is what I did.
If that's not the case let me know. If, for instance, the __hwasan_tag_mismatch functions are supposed to be hidden from the backtrace somehow.
Thanks for catching this! And sorry I didn't notice it earlier. I *think* __hwasan_tag_mismatch appearing in the backtrace might not be too important. It looks like the purpose of that test is more to check that hwasan hits those errors. @eugenis or @vitalybuka may be able to correct me on this.