Re: [hatari-devel] ASAN issues with tests

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Hi,

This issue is real.

"screen-end" VDI test segfaults on CI MAC builds, which do not use ASAN:
------------------------------------------------
/private/var/folders/tn/f_9sf1xx5t14qm_6f83q3b840000gn/T/cirrus-ci-build/tests/mem_end/run_test.sh: line 30: 10800 Segmentation fault: 11 HOME="$testdir" $hatari --log-level fatal --sound off --bios-intercept on --fast-forward on --run-vbls 500 --frameskips 0 --tos none --screenshot-dir "$testdir" "$@" "$prg" > "$testdir/out.txt" 2>&1
Running hatari FAILED. Status=139. Hatari output:
Screen dump saved to: /var/folders/tn/f_9sf1xx5t14qm_6f83q3b840000gn/T/tmp.QwrOEVMg/grab0001.png
<end of output>
------------------------------------------------

See: https://cirrus-ci.com/task/5653629708271616


	- Eero

On 29.7.2022 17.33, Nicolas Pomarède wrote:
Le 29/07/2022 à 16:20, Nicolas Pomarède a écrit :
And for the -vdi tests, I see this :
==29173==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x7f5c0aa73840 at pc 0x0000006e5611 bp 0x7fffd2b6b690 sp 0x7fffd2b6b688
READ of size 4 at 0x7f5c0aa73840 thread T0
    #0 0x6e5610 in Screen_BitplaneToChunky32 /home/npomarede/src/hatari.git/src/screenConvert.c:205     #1 0x6e93c9 in ScreenConv_BitplaneLineTo32bpp /home/npomarede/src/hatari.git/src/screenConvert.c:342     #2 0x6e93c9 in ScreenConv_BitplaneTo32bppNoZoom /home/npomarede/src/hatari.git/src/screenConvert.c:453     #3 0x6e93c9 in Screen_ConvertWithoutZoom /home/npomarede/src/hatari.git/src/screenConvert.c:680     #4 0x6e93c9 in Screen_GenConvert /home/npomarede/src/hatari.git/src/screenConvert.c:1146     #5 0x6ea727 in Screen_GenDraw /home/npomarede/src/hatari.git/src/screenConvert.c:1166     #6 0x7142bd in Video_DrawScreen /home/npomarede/src/hatari.git/src/video.c:4399     #7 0x7142bd in Video_InterruptHandler_VBL /home/npomarede/src/hatari.git/src/video.c:4577
....
0x7f5c0aa73840 is located 0 bytes to the right of 4251712-byte region [0x7f5c0a665800,0x7f5c0aa73840)
allocated by thread T0 here:
     #0 0x7f5c0d6b8757 in calloc (/lib64/libasan.so.8+0xb8757)
    #1 0x8575e0 in memory_init /home/npomarede/src/hatari.git/src/cpu/memory.c:1676     #2 0x6fa846 in TOS_InitImage /home/npomarede/src/hatari.git/src/tos.c:1135
     #3 0x6c33b1 in Reset_ST /home/npomarede/src/hatari.git/src/reset.c:61
     #4 0x5c6528 in Main_Init /home/npomarede/src/hatari.git/src/main.c:757
     #5 0x5c6528 in main /home/npomarede/src/hatari.git/src/main.c:951
....
I'm not familiar with Screen_BitplaneToChunky32(), can't tell if it's a false positive due to the various casts used to convert screen.



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/