You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: ASAN-surfaced bugs (closes#125, #127)
Six commits, each independently reviewable, addressing every issue
the sanitizers job uncovered after PR #121 wired it up:
- table68k + branch_condition_table leaked across dlopen/dlclose
cycles (closes#125; symmetric m68k_done / GPUDone wired into
JaguarDone, with free_table68k() in readcpu.c so ownership stays
inside the module that allocates).
- test_hle_bios.c was missing a final p_retro_unload_game() so
JaguarDone() never ran for the PAL load -> the leak fix above
didn't appear to take effect until that test was corrected.
- 1-byte global-buffer-overflow read past tomRam8 in five
tom_render_*_scanline() functions (closes#127); new
tom_clamp_line_buffer_width() helper used in all five.
- Rotate-by-zero UB in 6 ROR sites and rotate-by-32 UB in 3 RORQ
sites across src/tom/gpu.c and src/jerry/dsp.c, fixed via the
standard portable `(x >> r) | (x << ((-r) & 31))` idiom plus
masking `r` to 0x1F when sourced from *_convert_zero[].
clang-tidy curated check list updated:
- bugprone-incorrect-roundings (USEC_TO_*_CYCLES macro pattern)
- bugprone-multi-level-implicit-pointer-conversion (dlsym idiom)
- clang-analyzer-optin.performance.Padding (UAE struct layouts)
CI: 30/30 green including the previously-advisory sanitizer job.
Candidate to flip continue-on-error: true -> false on that job
in a follow-up.
0 commit comments