Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gunbird 2 asan crash #228

Closed
tmaul opened this issue Jan 9, 2020 · 2 comments
Closed

gunbird 2 asan crash #228

tmaul opened this issue Jan 9, 2020 · 2 comments
Labels
bug Something isn't working emulation Related to emulation

Comments

@tmaul
Copy link
Member

tmaul commented Jan 9, 2020

when running gunbird2 asan reports the following after crashing:

==20828==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x7fa5f4e03cc0 at pc 0x557c73014a17 bp 0x7ffcb29e4490 sp 0x7ffcb29e4480
WRITE of size 4 at 0x7fa5f4e03cc0 thread T0
#0 0x557c73014a16 in draw_blendy_tile src/burn/drv/psikyo/psikyosh_render.cpp:77
#1 0x557c7301ac92 in psikyosh_drawgfxzoom src/burn/drv/psikyo/psikyosh_render.cpp:317
#2 0x557c7301ac92 in draw_sprites src/burn/drv/psikyo/psikyosh_render.cpp:458
#3 0x557c7301ac92 in PsikyoshDraw() src/burn/drv/psikyo/psikyosh_render.cpp:652
#4 0x557c73952a73 in DrvFrame src/burn/drv/psikyo/d_psikyosh.cpp:842
#5 0x557c734240b2 in Frame src/intf/video/sdl/vid_sdl2.cpp:230
#6 0x557c732789a8 in VidDoFrame src/intf/video/vid_interface.cpp:406
#7 0x557c734193d6 in RunFrame src/burner/sdl/run.cpp:157
#8 0x557c734199a9 in RunFrame src/burner/sdl/run.cpp:137
#9 0x557c734199a9 in RunGetNextSound src/burner/sdl/run.cpp:213
#10 0x557c73410952 in SDLSoundCheck src/intf/audio/sdl/aud_sdl.cpp:102
#11 0x557c7341a622 in RunIdle() src/burner/sdl/run.cpp:247
#12 0x557c7341a622 in RunMessageLoop() src/burner/sdl/run.cpp:393
#13 0x557c73419278 in DoGame(int) src/burner/sdl/main.cpp:198
#14 0x557c71cc0ec6 in main src/burner/sdl/main.cpp:361
#15 0x7fa61965fb96 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)
#16 0x557c71cc6099 in _start (/home/kevin/FBNeo/fbneo+0x3d90099)

I replaced all the calls to PUTPIXEL and PUTPIXEL_PRIO with PUTPIXEL_CLIP and PUTPIXEL_PRIO_CLIP and the crash goes away so it does indicate a clipping issue.

@tmaul tmaul added bug Something isn't working emulation Related to emulation labels Jan 9, 2020
@barbudreadmon
Copy link
Collaborator

I confirm, this one is happening quite late in the attract mode (1:07) which explains why i never detected it when running my script to test asan on every fbneo games (the longer i ran games was 30 or 40 seconds iirc)

@tmaul
Copy link
Member Author

tmaul commented Jan 10, 2020

Im struggling to spot where it's going out of bounds but I will have time to try some stuff tomorrow to see if I can track it down, assuming I don't get beaten to it :)

@tmaul tmaul closed this as completed Jan 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working emulation Related to emulation
Projects
None yet
Development

No branches or pull requests

2 participants