MSVC can sometimes generate instructions in function prologues that asan previously didn't know the size of. This teaches asan those sizes. This isn't super useful for using ASAN with non-msvc compilers, but it does stand alone.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
| compiler-rt/lib/interception/interception_win.cpp | ||
|---|---|---|
| 533 | This is an incorrect machine code instruction; according to my disassembler, EC 8B results in: in al, dx .byte 8B which is clearly nonsense; additionally, I notice that it's a reverse of the "correct" two bytes, which says to me that someone got confused by byte to little-endian conversions. | |
| 535 | These, OTOH, are correct; however, the constants should be capitalised and the formatting should be made closer to the other cases (same below). | |
| 546 | I've not yet taken a look at these, and I need to go home; I'd appreciate if you'd just double check that these are correct (and also fix the formatting). | |
| compiler-rt/lib/interception/interception_win.cpp | ||
|---|---|---|
| 626 | ||
| 674 | ||
| 688 | ||
| 691 | Style edits (please make the same edits below) | |
| 701–702 | ||
| 703 | Please actually write out the opcode and operation (same below). | |
| 709 | (side note, I really dislike cmp DWORD PTR rather than just cmd DWORD, but no change requested because that's the existing style) | |
We can go back and do a formatting pass later, all the actual code looks correct to me though.
This is an incorrect machine code instruction; according to my disassembler, EC 8B results in:
which is clearly nonsense; additionally, I notice that it's a reverse of the "correct" two bytes, which says to me that someone got confused by byte to little-endian conversions.