Viewing Issue Advanced Details
ID Category [?] Severity [?] Reproducibility Date Submitted Last Update
08499 Crash/Freeze Critical (emulator) Always Nov 4, 2022, 14:12 25 days ago
Tester Firewave View Status Public Platform MAME (Self-compiled)
Assigned To hap Resolution Fixed OS Linux (64-bit)
Status [?] Resolved Driver
Version 0.249 Fixed in Version 0.250 Build 64-bit
Fixed in Git Commit 1102543 Github Pull Request #
Summary 08499: m5p_brno: Segmentation fault
Description
==25494==ERROR: AddressSanitizer: SEGV on unknown address 0x03e800006396 (pc 0x7fa3a3ff957c bp 0x000000006396 sp 0x7fa3a09777e0 T0)
==25494==The signal is caused by a READ memory access.
    #0 0x7fa3a3ff957c in __pthread_kill_implementation nptl/./nptl/pthread_kill.c:44:76
    #1 0x7fa3a3fada01 in gsignal signal/../sysdeps/posix/raise.c:26:13
    #2 0x7fa3a5d9f3c5  (/usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0+0x13f3c5) (BuildId: 418f97e44d04d8ab9d3828e3cc45a8743439ecf7)
    #3 0x7fa3a3fada9f  (/lib/x86_64-linux-gnu/libc.so.6+0x3da9f) (BuildId: 71a7c7b97bc0b3e349a3d8640252655552082bf5)
    #4 0x7fa3d395c164 in m5_cart_slot_device::read_rom(unsigned int) /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/devices/bus/m5/slot.cpp:223
    #5 0x7fa3e0124a88 in operator() /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/lib/util/delegate.h:765:11
    #6 0x7fa3e0124a88 in std::enable_if<(((std::is_same<emu::device_delegate<unsigned char (unsigned int)>, emu::device_delegate<unsigned char (unsigned int)> >::value) || (std::is_same<emu::device_delegate<unsigned char (unsigned int)>, emu::device_delegate<unsigned short (unsigned int)> >::value)) || (std::is_same<emu::device_delegate<unsigned char (unsigned int)>, emu::device_delegate<unsigned int (unsigned int)> >::value)) || (std::is_same<emu::device_delegate<unsigned char (unsigned int)>, emu::device_delegate<unsigned long (unsigned int)> >::value), unsigned char>::type handler_entry_read_delegate<0, 0, emu::device_delegate<unsigned char (unsigned int)> >::read_impl<emu::device_delegate<unsigned char (unsigned int)> >(unsigned int, unsigned char) const /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/emu/emumem_hedp.cpp:45:9
    #7 0x7fa3e0124910 in handler_entry_read_delegate<0, 0, emu::device_delegate<unsigned char (unsigned int)> >::read(unsigned int, unsigned char) const /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/emu/emumem_hedp.cpp:70:9
    #8 0x7fa3d17ad5ee in emu::detail::handler_entry_size<0>::uX dispatch_read<0, 0, 0>(unsigned int, unsigned int, emu::detail::handler_entry_size<0>::uX, handler_entry_read<0, 0> const* const*) /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/emu/emumem.h:1570:47
    #9 0x7fa3e0ad6ee9 in handler_entry_read_dispatch<14, 0, 0>::read(unsigned int, unsigned char) const /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/emu/emumem_hedr.ipp:132:9
    #10 0x7fa3cb20e431 in emu::detail::handler_entry_size<0>::uX dispatch_read<1, 0, 0>(unsigned int, unsigned int, emu::detail::handler_entry_size<0>::uX, handler_entry_read<0, 0> const* const*) /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/emu/emumem.h:1570:47
    #11 0x7fa3cb2097b1 in read_native /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/emu/emumem.h:1737:10
    #12 0x7fa3cb2097b1 in emu::detail::memory_access_specific<1, 0, 0, (util::endianness)0>::read_byte(unsigned int) /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/emu/emumem.h:1643:66
    #13 0x7fa3d9d3c31b in z80_device::rm(unsigned short) /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/devices/cpu/z80/z80.cpp:466:18
    #14 0x7fa3d9d61890 in z80_device::op_56() /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/devices/cpu/z80/z80.cpp:3033:17
    #15 0x7fa3d9d5091d in z80_device::execute_run() /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/devices/cpu/z80/z80.cpp:3654:3
    #16 0x7fa3d9d54bff in non-virtual thunk to z80_device::execute_run() /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/devices/cpu/z80/z80.cpp
    #17 0x7fa3e58c0817 in run /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/emu/diexec.h:190:15
    #18 0x7fa3e58c0817 in device_scheduler::timeslice() /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/emu/schedule.cpp:456:14
    #19 0x7fa3e57594a7 in running_machine::run(bool) /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/emu/machine.cpp:329:17
    #20 0x7fa3e88bff7f in mame_machine_manager::execute() /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/frontend/mame/mame.cpp:290:19
    #21 0x7fa3e8ab48d6 in cli_frontend::start_execution(mame_machine_manager*, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&) /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/frontend/mame/clifront.cpp:275:22
    #22 0x7fa3e8ab841f in cli_frontend::execute(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&) /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/frontend/mame/clifront.cpp:291:3
    #23 0x7fa3e88c4d5f in emulator_info::start_frontend(emu_options&, osd_interface&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&) /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/frontend/mame/mame.cpp:454:18
    #24 0x7fa3e5a9b58b in main /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/osd/sdl/sdlmain.cpp:191:9
    #25 0x7fa3a3f99209 in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16
    #26 0x7fa3a3f992bb in __libc_start_main csu/../csu/libc-start.c:389:3
    #27 0x7fa3c3225260 in _start (/mnt/s/GitHub/mame/mame+0x1d397260) (BuildId: 603d3d1c300651feb2a8e3ac6e9cb58d3f85e77b)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV nptl/./nptl/pthread_kill.c:44:76 in __pthread_kill_implementation
Steps To Reproduce
Additional Information
Github Commit
Flags
Regression Version
Affected Sets / Systems m5p_brno
Attached Files
 
Relationships
There are no relationship linked to this issue.
Notes
4
User avatar
No.20695
Firewave
Senior Tester
Nov 4, 2022, 14:13
I did not experience any crash using the official 0.249 Windows binary.
User avatar
No.20789
Firewave
Senior Tester
27 days ago
Looks like brno_state::machine_start() is missing the initialization of m_cart_ram and m_cart as well as some save state registrations. Maybe it should just call the base function - no idea wthat the policy on that is.
User avatar
No.20794
Firewave
Senior Tester
27 days ago
I can confirm that initializing those members fixes the issue.
User avatar
No.20795
hap
Developer
26 days ago
I think it's doing it on purpose (which is bad design)
I zerofilled vars here: https://github.com/mamedev/mame/commit/1102543e35e640306aae80d8005322ab0e00111b