Viewing Issue Advanced Details
ID Category [?] Severity [?] Reproducibility Date Submitted Last Update
06824 Misc. Minor Always Jan 4, 2018, 00:17 Apr 2, 2024, 13:06
Tester Firewave View Status Public Platform
Assigned To mizapf Resolution Fixed OS
Status [?] Resolved Driver
Version 0.193 Fixed in Version Build
Fixed in Git Commit c5b1b04 Github Pull Request #
Summary MESS-specific 06824: runtime error: downcast error with bus::ti99::gromport::*
Description
../../../../../src/devices/bus/ti99/gromport/gromport.cpp:283:15: runtime error: downcast of address 0x00003d295480 which does not point to an object of type 'bus::ti99::gromport::gromport_device'
0x00003d295480: note: object is of type 'empty_state'
 00 00 00 00  30 5b 5e 21 00 00 00 00  70 c2 72 3b 00 00 00 00  a0 54 29 3d 00 00 00 00  08 00 00 00
              ^~~~~~~~~~~~~~~~~~~~~~~
              vptr for 'empty_state'
../../../../../src/devices/bus/ti99/gromport/cartridges.cpp:393:16: runtime error: downcast of address 0x00003d295480 which does not point to an object of type 'bus::ti99::gromport::cartridge_connector_device'
0x00003d295480: note: object is of type 'empty_state'
 00 00 00 00  30 5b 5e 21 00 00 00 00  70 c2 72 3b 00 00 00 00  a0 54 29 3d 00 00 00 00  08 00 00 00
              ^~~~~~~~~~~~~~~~~~~~~~~
              vptr for 'empty_state'
Steps To Reproduce Happens during -listxml
Additional Information
Github Commit
Flags
Regression Version
Affected Sets / Systems
Attached Files
 
Relationships
There are no relationship linked to this issue.
Notes
7
User avatar
No.20745
Firewave
Senior Tester
Nov 5, 2022, 09:41
0.249 on Linux reports the following during -listxml:
../../../../../src/devices/bus/ti99/gromport/gromport.cpp:288:15: runtime error: downcast of address 0x619000840d80 which does not point to an object of type 'bus::ti99::gromport::gromport_device'
0x619000840d80: note: object is of type 'empty_state'
 00 00 00 00  f8 97 04 fe c8 7f 00 00  40 0a 01 0f c9 7f 00 00  00 00 00 00 00 00 00 00  00 00 00 00
              ^~~~~~~~~~~~~~~~~~~~~~~
              vptr for 'empty_state'
    #0 0x7fc8e67f1162 in bus::ti99::gromport::cartridge_connector_device::device_config_complete() /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/devices/bus/ti99/gromport/gromport.cpp:288:15
    #1 0x7fc8f19f0e38 in device_t::config_complete() /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/emu/device.cpp:310:2
    #2 0x7fc8f0b4bae2 in (anonymous namespace)::output_devices(std::ostream&, emu_options&, std::set<emu::detail::device_type_impl_base const*, (anonymous namespace)::device_type_compare, std::allocator<emu::detail::device_type_impl_base const*> > const*)::$_4::operator()(emu::detail::device_type_impl_base const&) const /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/frontend/mame/infoxml.cpp:909:14
    #3 0x7fc8f0b48af3 in output_devices /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/frontend/mame/infoxml.cpp:924:52
    #4 0x7fc8f0b48af3 in info_xml_creator::output(std::ostream&, std::function<bool (char const*, bool&)> const&, bool) /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/frontend/mame/infoxml.cpp:564:3
    #5 0x7fc8f0b450e1 in info_xml_creator::output(std::ostream&, 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/infoxml.cpp:378:3
    #6 0x7fc8f174ee7b in cli_frontend::listxml(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:367:10
    #7 0x7fc8f174c8ec in cli_frontend::execute_commands(std::basic_string_view<char, std::char_traits<char> >) /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/frontend/mame/clifront.cpp:1775:3
    #8 0x7fc8f1749aa3 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:248:3
    #9 0x7fc8f174db6f 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
    #10 0x7fc8f0397a8f 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
    #11 0x7fc8f85790fb in main /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/osd/sdl/sdlmain.cpp:191:9
    #12 0x7fc8ab2b9209 in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16
    #13 0x7fc8ab2b92bb in __libc_start_main csu/../csu/libc-start.c:389:3
    #14 0x7fc8d1f09120 in _start (/mnt/s/GitHub/mame/mame+0x24d60120) (BuildId: 7b7aeda5846ab501)

SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ../../../../../src/devices/bus/ti99/gromport/gromport.cpp:288:15 in

../../../../../src/devices/bus/ti99/gromport/cartridges.cpp:457:16: runtime error: downcast of address 0x619000840d80 which does not point to an object of type 'bus::ti99::gromport::cartridge_connector_device'
0x619000840d80: note: object is of type 'empty_state'
 00 00 00 00  f8 97 04 fe c8 7f 00 00  40 0a 01 0f c9 7f 00 00  00 00 00 00 00 00 00 00  00 00 00 00
              ^~~~~~~~~~~~~~~~~~~~~~~
              vptr for 'empty_state'
    #0 0x7fc8e6809422 in bus::ti99::gromport::ti99_cartridge_device::device_config_complete() /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/devices/bus/ti99/gromport/cartridges.cpp:457:16
    #1 0x7fc8f19f0e38 in device_t::config_complete() /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/emu/device.cpp:310:2
    #2 0x7fc8f0b4bae2 in (anonymous namespace)::output_devices(std::ostream&, emu_options&, std::set<emu::detail::device_type_impl_base const*, (anonymous namespace)::device_type_compare, std::allocator<emu::detail::device_type_impl_base const*> > const*)::$_4::operator()(emu::detail::device_type_impl_base const&) const /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/frontend/mame/infoxml.cpp:909:14
    #3 0x7fc8f0b48af3 in output_devices /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/frontend/mame/infoxml.cpp:924:52
    #4 0x7fc8f0b48af3 in info_xml_creator::output(std::ostream&, std::function<bool (char const*, bool&)> const&, bool) /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/frontend/mame/infoxml.cpp:564:3
    #5 0x7fc8f0b450e1 in info_xml_creator::output(std::ostream&, 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/infoxml.cpp:378:3
    #6 0x7fc8f174ee7b in cli_frontend::listxml(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:367:10
    #7 0x7fc8f174c8ec in cli_frontend::execute_commands(std::basic_string_view<char, std::char_traits<char> >) /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/frontend/mame/clifront.cpp:1775:3
    #8 0x7fc8f1749aa3 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:248:3
    #9 0x7fc8f174db6f 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
    #10 0x7fc8f0397a8f 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
    #11 0x7fc8f85790fb in main /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/osd/sdl/sdlmain.cpp:191:9
    #12 0x7fc8ab2b9209 in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16
    #13 0x7fc8ab2b92bb in __libc_start_main csu/../csu/libc-start.c:389:3
    #14 0x7fc8d1f09120 in _start (/mnt/s/GitHub/mame/mame+0x24d60120) (BuildId: 7b7aeda5846ab501)

SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ../../../../../src/devices/bus/ti99/gromport/cartridges.cpp:457:16 in

../../../../../src/devices/bus/ti99/peb/cc_fdc.cpp:608:12: runtime error: downcast of address 0x619000840d80 which does not point to an object of type 'bus::ti99::peb::corcomp_fdc_device'
0x619000840d80: note: object is of type 'empty_state'
 00 00 00 00  f8 97 04 fe c8 7f 00 00  40 0a 01 0f c9 7f 00 00  00 00 00 00 00 00 00 00  00 00 00 00
              ^~~~~~~~~~~~~~~~~~~~~~~
              vptr for 'empty_state'
    #0 0x7fc8e6954212 in bus::ti99::peb::ccfdc_dec_pal_device::device_config_complete() /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/devices/bus/ti99/peb/cc_fdc.cpp:608:12
    #1 0x7fc8f19f0e38 in device_t::config_complete() /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/emu/device.cpp:310:2
    #2 0x7fc8f0b4bae2 in (anonymous namespace)::output_devices(std::ostream&, emu_options&, std::set<emu::detail::device_type_impl_base const*, (anonymous namespace)::device_type_compare, std::allocator<emu::detail::device_type_impl_base const*> > const*)::$_4::operator()(emu::detail::device_type_impl_base const&) const /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/frontend/mame/infoxml.cpp:909:14
    #3 0x7fc8f0b48af3 in output_devices /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/frontend/mame/infoxml.cpp:924:52
    #4 0x7fc8f0b48af3 in info_xml_creator::output(std::ostream&, std::function<bool (char const*, bool&)> const&, bool) /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/frontend/mame/infoxml.cpp:564:3
    #5 0x7fc8f0b450e1 in info_xml_creator::output(std::ostream&, 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/infoxml.cpp:378:3
    #6 0x7fc8f174ee7b in cli_frontend::listxml(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:367:10
    #7 0x7fc8f174c8ec in cli_frontend::execute_commands(std::basic_string_view<char, std::char_traits<char> >) /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/frontend/mame/clifront.cpp:1775:3
    #8 0x7fc8f1749aa3 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:248:3
    #9 0x7fc8f174db6f 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
    #10 0x7fc8f0397a8f 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
    #11 0x7fc8f85790fb in main /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/osd/sdl/sdlmain.cpp:191:9
    #12 0x7fc8ab2b9209 in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16
    #13 0x7fc8ab2b92bb in __libc_start_main csu/../csu/libc-start.c:389:3
    #14 0x7fc8d1f09120 in _start (/mnt/s/GitHub/mame/mame+0x24d60120) (BuildId: 7b7aeda5846ab501)

SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ../../../../../src/devices/bus/ti99/peb/cc_fdc.cpp:608:12 in

../../../../../src/devices/bus/ti99/peb/cc_fdc.cpp:710:12: runtime error: downcast of address 0x619000840d80 which does not point to an object of type 'bus::ti99::peb::corcomp_fdc_device'
0x619000840d80: note: object is of type 'empty_state'
 00 00 00 00  f8 97 04 fe c8 7f 00 00  40 0a 01 0f c9 7f 00 00  00 00 00 00 00 00 00 00  00 00 00 00
              ^~~~~~~~~~~~~~~~~~~~~~~
              vptr for 'empty_state'
    #0 0x7fc8e695631c in bus::ti99::peb::ccdcc_palu1_device::device_config_complete() /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/devices/bus/ti99/peb/cc_fdc.cpp:710:12
    #1 0x7fc8f19f0e38 in device_t::config_complete() /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/emu/device.cpp:310:2
    #2 0x7fc8f0b4bae2 in (anonymous namespace)::output_devices(std::ostream&, emu_options&, std::set<emu::detail::device_type_impl_base const*, (anonymous namespace)::device_type_compare, std::allocator<emu::detail::device_type_impl_base const*> > const*)::$_4::operator()(emu::detail::device_type_impl_base const&) const /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/frontend/mame/infoxml.cpp:909:14
    #3 0x7fc8f0b48af3 in output_devices /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/frontend/mame/infoxml.cpp:924:52
    #4 0x7fc8f0b48af3 in info_xml_creator::output(std::ostream&, std::function<bool (char const*, bool&)> const&, bool) /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/frontend/mame/infoxml.cpp:564:3
    #5 0x7fc8f0b450e1 in info_xml_creator::output(std::ostream&, 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/infoxml.cpp:378:3
    #6 0x7fc8f174ee7b in cli_frontend::listxml(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:367:10
    #7 0x7fc8f174c8ec in cli_frontend::execute_commands(std::basic_string_view<char, std::char_traits<char> >) /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/frontend/mame/clifront.cpp:1775:3
    #8 0x7fc8f1749aa3 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:248:3
    #9 0x7fc8f174db6f 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
    #10 0x7fc8f0397a8f 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
    #11 0x7fc8f85790fb in main /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/osd/sdl/sdlmain.cpp:191:9
    #12 0x7fc8ab2b9209 in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16
    #13 0x7fc8ab2b92bb in __libc_start_main csu/../csu/libc-start.c:389:3
    #14 0x7fc8d1f09120 in _start (/mnt/s/GitHub/mame/mame+0x24d60120) (BuildId: 7b7aeda5846ab501)

SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ../../../../../src/devices/bus/ti99/peb/cc_fdc.cpp:710:12 in

../../../../../src/devices/bus/ti99/peb/cc_fdc.cpp:828:12: runtime error: downcast of address 0x619000840d80 which does not point to an object of type 'bus::ti99::peb::corcomp_fdca_device'
0x619000840d80: note: object is of type 'empty_state'
 00 00 00 00  f8 97 04 fe c8 7f 00 00  40 0a 01 0f c9 7f 00 00  00 00 00 00 00 00 00 00  00 00 00 00
              ^~~~~~~~~~~~~~~~~~~~~~~
              vptr for 'empty_state'
    #0 0x7fc8e695854c in bus::ti99::peb::ccfdc_palu6_device::device_config_complete() /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/devices/bus/ti99/peb/cc_fdc.cpp:828:12
    #1 0x7fc8f19f0e38 in device_t::config_complete() /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/emu/device.cpp:310:2
    #2 0x7fc8f0b4bae2 in (anonymous namespace)::output_devices(std::ostream&, emu_options&, std::set<emu::detail::device_type_impl_base const*, (anonymous namespace)::device_type_compare, std::allocator<emu::detail::device_type_impl_base const*> > const*)::$_4::operator()(emu::detail::device_type_impl_base const&) const /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/frontend/mame/infoxml.cpp:909:14
    #3 0x7fc8f0b48af3 in output_devices /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/frontend/mame/infoxml.cpp:924:52
    #4 0x7fc8f0b48af3 in info_xml_creator::output(std::ostream&, std::function<bool (char const*, bool&)> const&, bool) /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/frontend/mame/infoxml.cpp:564:3
    #5 0x7fc8f0b450e1 in info_xml_creator::output(std::ostream&, 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/infoxml.cpp:378:3
    #6 0x7fc8f174ee7b in cli_frontend::listxml(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:367:10
    #7 0x7fc8f174c8ec in cli_frontend::execute_commands(std::basic_string_view<char, std::char_traits<char> >) /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/frontend/mame/clifront.cpp:1775:3
    #8 0x7fc8f1749aa3 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:248:3
    #9 0x7fc8f174db6f 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
    #10 0x7fc8f0397a8f 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
    #11 0x7fc8f85790fb in main /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/osd/sdl/sdlmain.cpp:191:9
    #12 0x7fc8ab2b9209 in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16
    #13 0x7fc8ab2b92bb in __libc_start_main csu/../csu/libc-start.c:389:3
    #14 0x7fc8d1f09120 in _start (/mnt/s/GitHub/mame/mame+0x24d60120) (BuildId: 7b7aeda5846ab501)

SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ../../../../../src/devices/bus/ti99/peb/cc_fdc.cpp:828:12 in

../../../../../src/devices/bus/ti99/peb/myarcfdc.cpp:517:12: runtime error: downcast of address 0x619000840d80 which does not point to an object of type 'bus::ti99::peb::myarc_fdc_device'
0x619000840d80: note: object is of type 'empty_state'
 00 00 00 00  f8 97 04 fe c8 7f 00 00  40 0a 01 0f c9 7f 00 00  00 00 00 00 00 00 00 00  00 00 00 00
              ^~~~~~~~~~~~~~~~~~~~~~~
              vptr for 'empty_state'
    #0 0x7fc8e6972952 in bus::ti99::peb::ddcc1_pal_device::device_config_complete() /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/devices/bus/ti99/peb/myarcfdc.cpp:517:12
    #1 0x7fc8f19f0e38 in device_t::config_complete() /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/emu/device.cpp:310:2
    #2 0x7fc8f0b4bae2 in (anonymous namespace)::output_devices(std::ostream&, emu_options&, std::set<emu::detail::device_type_impl_base const*, (anonymous namespace)::device_type_compare, std::allocator<emu::detail::device_type_impl_base const*> > const*)::$_4::operator()(emu::detail::device_type_impl_base const&) const /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/frontend/mame/infoxml.cpp:909:14
    #3 0x7fc8f0b48af3 in output_devices /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/frontend/mame/infoxml.cpp:924:52
    #4 0x7fc8f0b48af3 in info_xml_creator::output(std::ostream&, std::function<bool (char const*, bool&)> const&, bool) /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/frontend/mame/infoxml.cpp:564:3
    #5 0x7fc8f0b450e1 in info_xml_creator::output(std::ostream&, 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/infoxml.cpp:378:3
    #6 0x7fc8f174ee7b in cli_frontend::listxml(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:367:10
    #7 0x7fc8f174c8ec in cli_frontend::execute_commands(std::basic_string_view<char, std::char_traits<char> >) /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/frontend/mame/clifront.cpp:1775:3
    #8 0x7fc8f1749aa3 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:248:3
    #9 0x7fc8f174db6f 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
    #10 0x7fc8f0397a8f 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
    #11 0x7fc8f85790fb in main /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/osd/sdl/sdlmain.cpp:191:9
    #12 0x7fc8ab2b9209 in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16
    #13 0x7fc8ab2b92bb in __libc_start_main csu/../csu/libc-start.c:389:3
    #14 0x7fc8d1f09120 in _start (/mnt/s/GitHub/mame/mame+0x24d60120) (BuildId: 7b7aeda5846ab501)

SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ../../../../../src/devices/bus/ti99/peb/myarcfdc.cpp:517:12 in

../../../../../src/devices/bus/ti99/peb/scsicard.cpp:695:12: runtime error: downcast of address 0x619000840d80 which does not point to an object of type 'bus::ti99::peb::whtech_scsi_card_device'
0x619000840d80: note: object is of type 'empty_state'
 00 00 00 00  f8 97 04 fe c8 7f 00 00  40 0a 01 0f c9 7f 00 00  00 00 00 00 00 00 00 00  00 00 00 00
              ^~~~~~~~~~~~~~~~~~~~~~~
              vptr for 'empty_state'
    #0 0x7fc8e69aca52 in bus::ti99::peb::whtscsi_pld_device::device_config_complete() /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/devices/bus/ti99/peb/scsicard.cpp:695:12
    #1 0x7fc8f19f0e38 in device_t::config_complete() /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/emu/device.cpp:310:2
    #2 0x7fc8f0b4bae2 in (anonymous namespace)::output_devices(std::ostream&, emu_options&, std::set<emu::detail::device_type_impl_base const*, (anonymous namespace)::device_type_compare, std::allocator<emu::detail::device_type_impl_base const*> > const*)::$_4::operator()(emu::detail::device_type_impl_base const&) const /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/frontend/mame/infoxml.cpp:909:14
    #3 0x7fc8f0b48af3 in output_devices /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/frontend/mame/infoxml.cpp:924:52
    #4 0x7fc8f0b48af3 in info_xml_creator::output(std::ostream&, std::function<bool (char const*, bool&)> const&, bool) /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/frontend/mame/infoxml.cpp:564:3
    #5 0x7fc8f0b450e1 in info_xml_creator::output(std::ostream&, 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/infoxml.cpp:378:3
    #6 0x7fc8f174ee7b in cli_frontend::listxml(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:367:10
    #7 0x7fc8f174c8ec in cli_frontend::execute_commands(std::basic_string_view<char, std::char_traits<char> >) /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/frontend/mame/clifront.cpp:1775:3
    #8 0x7fc8f1749aa3 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:248:3
    #9 0x7fc8f174db6f 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
    #10 0x7fc8f0397a8f 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
    #11 0x7fc8f85790fb in main /mnt/s/GitHub/mame/build/projects/sdl/mame/gmake-linux-clang/../../../../../src/osd/sdl/sdlmain.cpp:191:9
    #12 0x7fc8ab2b9209 in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16
    #13 0x7fc8ab2b92bb in __libc_start_main csu/../csu/libc-start.c:389:3
    #14 0x7fc8d1f09120 in _start (/mnt/s/GitHub/mame/mame+0x24d60120) (BuildId: 7b7aeda5846ab501)

SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ../../../../../src/devices/bus/ti99/peb/scsicard.cpp:695:12 in
User avatar
No.21835
mizapf
Developer
Nov 16, 2023, 23:21
Is this still happening? When I use "./mame ti99_4a -listxml", I am not getting any runtime error but a XML output. (Version 0.260)
User avatar
No.21840
AJR
Developer
Nov 18, 2023, 16:26
These appear to be errors detected by UBSAN, and will probably not occur in other builds.
User avatar
No.21841
mizapf
Developer
Nov 18, 2023, 16:55
I see. It's complaining about each occurrence of the static cast like

void contained_device::device_config_complete()
{
   ptr_containing_device = static_cast<containing_device*>(owner());
}

Is that bad code? I need a pointer to the containing object to call methods on it, so how should it be done better?
User avatar
No.21857
cuavas
Administrator
Nov 23, 2023, 03:47
Your device needs to survive -validate, -listxml, -listroms, etc. where it's instantiated in isolation. You could use a dynamic_cast instead and be prepared for nullptr in those cases.
User avatar
No.21875
mizapf
Developer
Dec 2, 2023, 18:13
OK, it does survive the -validate etc., but I'll replace the static_casts by dynamic_casts. Thanks for the tip.
User avatar
No.22032
mizapf
Developer
Mar 29, 2024, 12:22
edited on: Mar 29, 2024, 15:18
Please test the latest update, I replaced the casts now. Looks good to me.