Viewing Issue Advanced Details
ID Category [?] Severity [?] Reproducibility Date Submitted Last Update
08528 Misc. Critical (emulator) Always Dec 2, 2022, 00:06 Dec 2, 2022, 14:40
Tester Firewave View Status Public Platform MAME (Self-compiled)
Assigned To Resolution Open OS Linux (64-bit)
Status [?] Driver
Version 0.250 Fixed in Version Build 64-bit
Fixed in Git Commit Github Pull Request #
Summary 08528: ace2200 : AddressSanitizer: heap-buffer-overflow with mcms2 in slot
Description
==14927==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x61800002ac20 at pc 0x7f9fc492e95f bp 0x7fffeb803530 sp 0x7fffeb803528
READ of size 8 at 0x61800002ac20 thread T0
    #0 0x7f9fc492e95e in operator mcms_device * /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/emu/devfind.h:471:42
    #1 0x7f9fc492e95e in a2bus_mcms1_device::get_engine() /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/devices/bus/a2bus/a2mcms.cpp:123:9
    #2 0x7f9fc492eed9 in a2bus_mcms2_device::device_reset() /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/devices/bus/a2bus/a2mcms.cpp:166:22
    #3 0x7f9fd2823b0f in device_t::reset() /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/emu/device.cpp:348:2
    #4 0x7f9fd2823e85 in device_t::reset() /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/emu/device.cpp:352:9
    #5 0x7f9fd2823e85 in device_t::reset() /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/emu/device.cpp:352:9
    #6 0x7f9fd9233474 in running_machine::reset_all_devices() /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/emu/machine.cpp:1040:16
    #7 0x7f9fd9239849 in operator() /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/lib/util/delegate.h:765:11
    #8 0x7f9fd9239849 in running_machine::call_notifiers(machine_notification) /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/emu/machine.cpp:849:3
    #9 0x7f9fd9232ee8 in running_machine::soft_reset(int) /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/emu/machine.cpp:956:2
    #10 0x7f9fd9234f7f in running_machine::run(bool) /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/emu/machine.cpp:309:3
    #11 0x7f9fd10fb8ff in mame_machine_manager::execute() /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/frontend/mame/mame.cpp:290:19
    #12 0x7f9fd24b4b16 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
    #13 0x7f9fd24b865f 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
    #14 0x7f9fd11006df 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
    #15 0x7f9fd952ad9b in main /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/osd/sdl/sdlmain.cpp:191:9
    #16 0x7f9f8bcc7189 in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16
    #17 0x7f9f8bcc7244 in __libc_start_main csu/../csu/libc-start.c:381:3
    #18 0x7f9fb2bcd540 in _start (/mnt/s/GitHub/mame/mame+0x25023540) (BuildId: 76865a226e2d969a)

0x61800002ac20 is located 32 bytes to the right of 896-byte region [0x61800002a880,0x61800002ac00)
allocated by thread T0 here:
    #0 0x7f9fb2c8b1dd in operator new(unsigned long) (/mnt/s/GitHub/mame/mame+0x250e11dd) (BuildId: 76865a226e2d969a)
    #1 0x7f9fc48a53d7 in std::__detail::_MakeUniq<a2bus_ace2x00_slot1_device>::__single_object std::make_unique<a2bus_ace2x00_slot1_device, machine_config const&, char const*&, device_t*&, unsigned int&>(machine_config const&, char const*&, device_t*&, unsigned int&) /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/unique_ptr.h:1065:30
    #2 0x7f9fc48a52b0 in std::unique_ptr<device_t, std::default_delete<device_t> > emu::detail::device_type_impl_base::create_device<a2bus_ace2x00_slot1_device>(emu::detail::device_type_impl_base const&, machine_config const&, char const*, device_t*, unsigned int) /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/emu/device.h:204:10
    #3 0x7f9fd924c05b in create /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/emu/device.h:281:10
    #4 0x7f9fd924c05b in machine_config::device_add(char const*, emu::detail::device_type_impl_base const&, unsigned int) /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/emu/mconfig.cpp:201:26
    #5 0x7f9fb373757d in device_add<const emu::detail::device_type_impl<a2bus_ace2x00_slot1_device> &> /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/emu/mconfig.h:187:10
    #6 0x7f9fb373757d in a2bus_ace2x00_slot1_device& emu::detail::device_type_impl<a2bus_ace2x00_slot1_device>::operator()<unsigned int const&>(machine_config&, char const*, unsigned int const&) const /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/emu/device.ipp:36:46
    #7 0x7f9fb36f6b40 in ace2200 /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/mame/apple/apple2e.cpp:5445:2
    #8 0x7f9fb36f6b40 in operator() /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/mame/apple/apple2e.cpp:5969:1
    #9 0x7f9fb36f6b40 in $_52::__invoke(machine_config&, device_t&) /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/mame/apple/apple2e.cpp:5969:1
    #10 0x7f9fd29ce871 in driver_device::device_add_mconfig(machine_config&) /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/emu/driver.cpp:180:2
    #11 0x7f9fd2820e74 in device_t::add_machine_configuration(machine_config&) /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/emu/device.cpp:226:2
    #12 0x7f9fd924dce7 in machine_config::add_device(std::unique_ptr<device_t, std::default_delete<device_t> >&&, device_t*) /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/emu/mconfig.cpp:324:18
    #13 0x7f9fd18d7978 in auto machine_config::device_add<emu::detail::device_type_impl_base const&, int>(char const*, emu::detail::device_type_impl_base const&, int&&) /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/emu/mconfig.h:196:3
    #14 0x7f9fd924aa4a in machine_config::machine_config(game_driver const&, emu_options&) /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/emu/mconfig.cpp:51:2
    #15 0x7f9fd10fb804 in mame_machine_manager::execute() /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/frontend/mame/mame.cpp:282:18
    #16 0x7f9fd24b4b16 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
    #17 0x7f9fd24b865f 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
    #18 0x7f9fd11006df 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
    #19 0x7f9fd952ad9b in main /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/osd/sdl/sdlmain.cpp:191:9
    #20 0x7f9f8bcc7189 in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16

SUMMARY: AddressSanitizer: heap-buffer-overflow /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/emu/devfind.h:471:42 in operator mcms_device *
Shadow bytes around the buggy address:
  0x0c307fffd530: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c307fffd540: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c307fffd550: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c307fffd560: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c307fffd570: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x0c307fffd580: fa fa fa fa[fa]fa fa fa fa fa fa fa fa fa fa fa
  0x0c307fffd590: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c307fffd5a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c307fffd5b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c307fffd5c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c307fffd5d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:           00
  Partially addressable: 01 02 03 04 05 06 07 
  Heap left redzone:       fa
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  Stack after return:      f5
  Stack use after scope:   f8
  Global redzone:          f9
  Global init order:       f6
  Poisoned by user:        f7
  Container overflow:      fc
  Array cookie:            ac
  Intra object redzone:    bb
  ASan internal:           fe
  Left alloca redzone:     ca
  Right alloca redzone:    cb

Possibly caused by:
/mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/emu/emucore.h:295:9: runtime error: downcast of address 0x61800002a880 which does not point to an object of type 'a2bus_mcms1_device'
0x61800002a880: note: object is of type 'a2bus_ace2x00_slot1_device'
 00 00 00 00  a0 e2 c1 13 5f 7f 00 00  60 2a 16 25 5f 7f 00 00  00 18 0b 9e 5e 7f 00 00  80 e0 29 00
              ^~~~~~~~~~~~~~~~~~~~~~~
              vptr for 'a2bus_ace2x00_slot1_device'
    #0 0x7f5ef9ce9112 in downcast<a2bus_mcms1_device *, device_a2bus_card_interface> /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/emu/emucore.h:295:9
    #1 0x7f5ef9ce9112 in a2bus_mcms2_device::device_reset() /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/devices/bus/a2bus/a2mcms.cpp:165:12
    #2 0x7f5f07bddb0f in device_t::reset() /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/emu/device.cpp:348:2
    #3 0x7f5f07bdde85 in device_t::reset() /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/emu/device.cpp:352:9
    #4 0x7f5f07bdde85 in device_t::reset() /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/emu/device.cpp:352:9
    #5 0x7f5f0e5ed474 in running_machine::reset_all_devices() /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/emu/machine.cpp:1040:16
    #6 0x7f5f0e5f3849 in operator() /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/lib/util/delegate.h:765:11
    #7 0x7f5f0e5f3849 in running_machine::call_notifiers(machine_notification) /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/emu/machine.cpp:849:3
    #8 0x7f5f0e5ecee8 in running_machine::soft_reset(int) /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/emu/machine.cpp:956:2
    #9 0x7f5f0e5eef7f in running_machine::run(bool) /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/emu/machine.cpp:309:3
    #10 0x7f5f064b58ff in mame_machine_manager::execute() /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/frontend/mame/mame.cpp:290:19
    #11 0x7f5f0786eb16 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
    #12 0x7f5f0787265f 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
    #13 0x7f5f064ba6df 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
    #14 0x7f5f0e8e4d9b in main /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/osd/sdl/sdlmain.cpp:191:9
    #15 0x7f5ec1087189 in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16
    #16 0x7f5ec1087244 in __libc_start_main csu/../csu/libc-start.c:381:3
    #17 0x7f5ee7f87540 in _start (/mnt/s/GitHub/mame/mame+0x25023540) (BuildId: 76865a226e2d969a)

SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/emu/emucore.h:295:9 in
../../../../../src/devices/bus/a2bus/a2mcms.cpp:166:22: runtime error: member call on address 0x61800002a880 which does not point to an object of type 'a2bus_mcms1_device'
0x61800002a880: note: object is of type 'a2bus_ace2x00_slot1_device'
 00 00 00 00  a0 e2 c1 13 5f 7f 00 00  60 2a 16 25 5f 7f 00 00  00 18 0b 9e 5e 7f 00 00  80 e0 29 00
              ^~~~~~~~~~~~~~~~~~~~~~~
              vptr for 'a2bus_ace2x00_slot1_device'
    #0 0x7f5ef9ce90f8 in a2bus_mcms2_device::device_reset() /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/devices/bus/a2bus/a2mcms.cpp:166:22
    #1 0x7f5f07bddb0f in device_t::reset() /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/emu/device.cpp:348:2
    #2 0x7f5f07bdde85 in device_t::reset() /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/emu/device.cpp:352:9
    #3 0x7f5f07bdde85 in device_t::reset() /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/emu/device.cpp:352:9
    #4 0x7f5f0e5ed474 in running_machine::reset_all_devices() /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/emu/machine.cpp:1040:16
    #5 0x7f5f0e5f3849 in operator() /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/lib/util/delegate.h:765:11
    #6 0x7f5f0e5f3849 in running_machine::call_notifiers(machine_notification) /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/emu/machine.cpp:849:3
    #7 0x7f5f0e5ecee8 in running_machine::soft_reset(int) /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/emu/machine.cpp:956:2
    #8 0x7f5f0e5eef7f in running_machine::run(bool) /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/emu/machine.cpp:309:3
    #9 0x7f5f064b58ff in mame_machine_manager::execute() /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/frontend/mame/mame.cpp:290:19
    #10 0x7f5f0786eb16 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
    #11 0x7f5f0787265f 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
    #12 0x7f5f064ba6df 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
    #13 0x7f5f0e8e4d9b in main /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/osd/sdl/sdlmain.cpp:191:9
    #14 0x7f5ec1087189 in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16
    #15 0x7f5ec1087244 in __libc_start_main csu/../csu/libc-start.c:381:3
    #16 0x7f5ee7f87540 in _start (/mnt/s/GitHub/mame/mame+0x25023540) (BuildId: 76865a226e2d969a)

SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ../../../../../src/devices/bus/a2bus/a2mcms.cpp:166:22 in
../../../../../src/devices/bus/a2bus/a2mcms.cpp:123:9: runtime error: member access within address 0x61800002a880 which does not point to an object of type 'a2bus_mcms1_device'
0x61800002a880: note: object is of type 'a2bus_ace2x00_slot1_device'
 00 00 00 00  a0 e2 c1 13 5f 7f 00 00  60 2a 16 25 5f 7f 00 00  00 18 0b 9e 5e 7f 00 00  80 e0 29 00
              ^~~~~~~~~~~~~~~~~~~~~~~
              vptr for 'a2bus_ace2x00_slot1_device'
    #0 0x7f5ef9ce892c in a2bus_mcms1_device::get_engine() /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/devices/bus/a2bus/a2mcms.cpp:123:9
    #1 0x7f5ef9ce8ed9 in a2bus_mcms2_device::device_reset() /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/devices/bus/a2bus/a2mcms.cpp:166:22
    #2 0x7f5f07bddb0f in device_t::reset() /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/emu/device.cpp:348:2
    #3 0x7f5f07bdde85 in device_t::reset() /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/emu/device.cpp:352:9
    #4 0x7f5f07bdde85 in device_t::reset() /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/emu/device.cpp:352:9
    #5 0x7f5f0e5ed474 in running_machine::reset_all_devices() /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/emu/machine.cpp:1040:16
    #6 0x7f5f0e5f3849 in operator() /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/lib/util/delegate.h:765:11
    #7 0x7f5f0e5f3849 in running_machine::call_notifiers(machine_notification) /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/emu/machine.cpp:849:3
    #8 0x7f5f0e5ecee8 in running_machine::soft_reset(int) /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/emu/machine.cpp:956:2
    #9 0x7f5f0e5eef7f in running_machine::run(bool) /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/emu/machine.cpp:309:3
    #10 0x7f5f064b58ff in mame_machine_manager::execute() /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/frontend/mame/mame.cpp:290:19
    #11 0x7f5f0786eb16 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
    #12 0x7f5f0787265f 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
    #13 0x7f5f064ba6df 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
    #14 0x7f5f0e8e4d9b in main /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/osd/sdl/sdlmain.cpp:191:9
    #15 0x7f5ec1087189 in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16
    #16 0x7f5ec1087244 in __libc_start_main csu/../csu/libc-start.c:381:3
    #17 0x7f5ee7f87540 in _start (/mnt/s/GitHub/mame/mame+0x25023540) (BuildId: 76865a226e2d969a)

SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ../../../../../src/devices/bus/a2bus/a2mcms.cpp:123:9 in
../../../../../src/devices/bus/a2bus/a2mcms.cpp:123:9: runtime error: member call on address 0x61800002abf8 which does not point to an object of type 'object_finder_common_base<mcms_device, true>'
0x61800002abf8: note: object has invalid vptr
 00 00 00 00  00 00 00 00 00 00 00 00  b9 96 6e cc b9 96 6e cc  70 ac 02 00 80 61 00 00  00 00 00 00
              ^~~~~~~~~~~~~~~~~~~~~~~
              invalid vptr
    #0 0x7f5ef9ce8940 in a2bus_mcms1_device::get_engine() /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/devices/bus/a2bus/a2mcms.cpp:123:9
    #1 0x7f5ef9ce8ed9 in a2bus_mcms2_device::device_reset() /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/devices/bus/a2bus/a2mcms.cpp:166:22
    #2 0x7f5f07bddb0f in device_t::reset() /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/emu/device.cpp:348:2
    #3 0x7f5f07bdde85 in device_t::reset() /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/emu/device.cpp:352:9
    #4 0x7f5f07bdde85 in device_t::reset() /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/emu/device.cpp:352:9
    #5 0x7f5f0e5ed474 in running_machine::reset_all_devices() /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/emu/machine.cpp:1040:16
    #6 0x7f5f0e5f3849 in operator() /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/lib/util/delegate.h:765:11
    #7 0x7f5f0e5f3849 in running_machine::call_notifiers(machine_notification) /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/emu/machine.cpp:849:3
    #8 0x7f5f0e5ecee8 in running_machine::soft_reset(int) /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/emu/machine.cpp:956:2
    #9 0x7f5f0e5eef7f in running_machine::run(bool) /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/emu/machine.cpp:309:3
    #10 0x7f5f064b58ff in mame_machine_manager::execute() /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/frontend/mame/mame.cpp:290:19
    #11 0x7f5f0786eb16 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
    #12 0x7f5f0787265f 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
    #13 0x7f5f064ba6df 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
    #14 0x7f5f0e8e4d9b in main /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/osd/sdl/sdlmain.cpp:191:9
    #15 0x7f5ec1087189 in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16
    #16 0x7f5ec1087244 in __libc_start_main csu/../csu/libc-start.c:381:3
    #17 0x7f5ee7f87540 in _start (/mnt/s/GitHub/mame/mame+0x25023540) (BuildId: 76865a226e2d969a)

SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ../../../../../src/devices/bus/a2bus/a2mcms.cpp:123:9 in
/mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/emu/devfind.h:471:42: runtime error: member access within address 0x61800002abf8 which does not point to an object of type 'const object_finder_common_base<mcms_device, true>'
0x61800002abf8: note: object has invalid vptr
 00 00 00 00  00 00 00 00 00 00 00 00  b9 96 6e cc b9 96 6e cc  70 ac 02 00 80 61 00 00  00 00 00 00
              ^~~~~~~~~~~~~~~~~~~~~~~
              invalid vptr
    #0 0x7f5ef9ce8954 in operator mcms_device * /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/emu/devfind.h:471:42
    #1 0x7f5ef9ce8954 in a2bus_mcms1_device::get_engine() /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/devices/bus/a2bus/a2mcms.cpp:123:9
    #2 0x7f5ef9ce8ed9 in a2bus_mcms2_device::device_reset() /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/devices/bus/a2bus/a2mcms.cpp:166:22
    #3 0x7f5f07bddb0f in device_t::reset() /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/emu/device.cpp:348:2
    #4 0x7f5f07bdde85 in device_t::reset() /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/emu/device.cpp:352:9
    #5 0x7f5f07bdde85 in device_t::reset() /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/emu/device.cpp:352:9
    #6 0x7f5f0e5ed474 in running_machine::reset_all_devices() /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/emu/machine.cpp:1040:16
    #7 0x7f5f0e5f3849 in operator() /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/lib/util/delegate.h:765:11
    #8 0x7f5f0e5f3849 in running_machine::call_notifiers(machine_notification) /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/emu/machine.cpp:849:3
    #9 0x7f5f0e5ecee8 in running_machine::soft_reset(int) /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/emu/machine.cpp:956:2
    #10 0x7f5f0e5eef7f in running_machine::run(bool) /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/emu/machine.cpp:309:3
    #11 0x7f5f064b58ff in mame_machine_manager::execute() /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/frontend/mame/mame.cpp:290:19
    #12 0x7f5f0786eb16 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
    #13 0x7f5f0787265f 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
    #14 0x7f5f064ba6df 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
    #15 0x7f5f0e8e4d9b in main /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/osd/sdl/sdlmain.cpp:191:9
    #16 0x7f5ec1087189 in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16
    #17 0x7f5ec1087244 in __libc_start_main csu/../csu/libc-start.c:381:3
    #18 0x7f5ee7f87540 in _start (/mnt/s/GitHub/mame/mame+0x25023540) (BuildId: 76865a226e2d969a)

SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/emu/devfind.h:471:42 in
Steps To Reproduce ace2200 -sl2 mcms2
Additional Information
Github Commit
Flags
Regression Version
Affected Sets / Systems ace2200
Attached Files
 
Relationships
Notes
2
User avatar
No.20889
cuavas
Administrator
Dec 2, 2022, 12:37
Do you have both halves of the MCMS plugged into adjacent slots? It can’t work otherwise.
User avatar
No.20892
Firewave
Senior Tester
Dec 2, 2022, 14:40
No, obviously not as evident from the reproduction step. I didn't get around yet to dig into the issue. But Tafoid already pointed that out in the other report.

Strangely in the other case it crashes because it dereferences a NULL pointer and here it gets a wrong device type. I guess checking if something was actually found and if the device is correct and give a fatalerror otherwise does not seem unreasonable.