Skip to content

segfaults on mapper 218 #851

Description

@zlago

Describe the bug

writing to mirrors of CIRAM under mapper 218 likely causes buffer overruns

i do know for sure that it can causes segfaults

To Reproduce

  1. download the zip file from here https://forums.nesdev.org/viewtopic.php?p=310352&sid=e8a48549fa39a2f30f4f6115b17de183#p310352
  2. extract
  3. run the ROM in FCEUX
  4. segmentation fault (core dumped)

Expected behavior
FCEUX does not close

Screenshots
If applicable, add screenshots to help explain your problem.

  • OS and Version: arch linux (last updated a month ago)
  • Version of FCEUX: master branch, QT

Additional context
have a stack trace at the time of segfault, it might help

#0  0x0000555555658605 in GetCHRAddress (A=21845) at /home/sylvie/util/fceux/src/ppu.cpp:477
#1  0x0000555555661302 in FCEUX_PPU_Loop (skip=0) at /home/sylvie/util/fceux/src/ppu.cpp:2218
#2  0x000055555566095c in FCEUPPU_Loop (skip=0) at /home/sylvie/util/fceux/src/ppu.cpp:1774
#3  0x0000555555627080 in FCEUI_Emulate (pXBuf=0x7fffc77fd098, SoundBuf=0x7fffc77fd0a0, SoundBufSize=0x7fffc77fd090, skip=0) at /home/sylvie/util/fceux/src/fceu.cpp:845
#4  0x0000555555871c7e in DoFun (frameskip=0, periodic_saves=0) at /home/sylvie/util/fceux/src/drivers/Qt/fceuWrapper.cpp:1363
#5  0x0000555555872120 in fceuWrapperUpdate () at /home/sylvie/util/fceux/src/drivers/Qt/fceuWrapper.cpp:1528
#6  0x000055555573c59a in emulatorThread_t::run (this=0x555556907dd0) at /home/sylvie/util/fceux/src/drivers/Qt/ConsoleWindow.cpp:5113
#7  0x00007ffff19784fb in ??? () at /usr/lib/libQt6Core.so.6
#8  0x00007ffff0e97f42 in ??? () at /usr/lib/libc.so.6
#9  0x00007ffff0f1efac in ??? () at /usr/lib/libc.so.6

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions