Commit d07d049
committed
fix(ci): MachO test buffer overflow + ClockTick on MSVC
Two failures surfaced when the previously-unpushed history reached the
mirror CI for the first time:
- Tests/Std/MachO.c: test_mh1_tab_end_addition sized its scaffold buffer
u8 b[0x200] (512) but the layout's BUF reaches 544 (stroff 512 +
strsize + slack), so b[stroff] and the trailing MemCopy ran one region
past the array -- a UBSan/ASan out-of-bounds. Enlarge to 0x300.
- ClockTick(): the GNU statement-expression + inline-asm form does not
compile under real MSVC (cl.exe). Add an _MSC_VER (non-clang) branch
using the __rdtsc() / _ReadStatusReg intrinsic; clang-cl keeps the GNU
path.1 parent 6bb5f90 commit d07d049
2 files changed
Lines changed: 11 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
46 | 55 | | |
47 | 56 | | |
48 | 57 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
822 | 822 | | |
823 | 823 | | |
824 | 824 | | |
825 | | - | |
| 825 | + | |
826 | 826 | | |
827 | 827 | | |
828 | 828 | | |
| |||
0 commit comments