-
Couldn't load subscription status.
- Fork 5.2k
Closed
Labels
Description
This chunk of code
runtime/src/coreclr/vm/i386/cgenx86.cpp
Lines 973 to 980 in 1e322fd
| *p++ = 0x68; | |
| *(INT32 *)p = arg; | |
| p += 4; | |
| // push arg2 | |
| *p++ = 0x68; | |
| *(INT32 *)p = arg2; | |
| p += 4; |
definitely have undefined behavior because there are misaligned INT32 memory writes. This issue may also occur in other places in this file.
Clang with
-fsanitize=undefined can catch this: https://godbolt.org/z/EeEzvfWsjCopilot