Viewing Issue Advanced Details
ID Category [?] Severity [?] Reproducibility Date Submitted Last Update
05874 Misc. Critical (emulator) Always Mar 9, 2015, 16:05 Sep 29, 2019, 21:04
Tester Firewave View Status Public Platform MAME (Self-compiled)
Assigned To Kale Resolution Fixed OS
Status [?] Resolved Driver
Version 0.159 Fixed in Version 0.197 Build Debug
Fixed in Git Commit Github Pull Request #
Summary 05874: stcc, stcca, stccb: AddressSanitizer: heap-buffer-overflow
Description
==311==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x7f7ec4721b10 at pc 0x000003ac6897 bp 0x7fffb715ef90 sp 0x7fffb715ef88
WRITE of size 4 at 0x7f7ec4721b10 thread T0
    #0 0x3ac6896 in geo_polygon_data(geo_state*, unsigned int, unsigned int*) /home/notroot/trunk/src/mame/video/model2.c:2249:3
    #1 0x3ac6896 in geo_process_command(geo_state*, unsigned int, unsigned int*) /home/notroot/trunk/src/mame/video/model2.c:2647
    #2 0x3ac6896 in geo_parse(model2_state*) /home/notroot/trunk/src/mame/video/model2.c:2688
    #3 0x3ac6896 in model2_state::screen_update_model2(screen_device&, bitmap_rgb32&, rectangle const&) /home/notroot/trunk/src/mame/video/model2.c:2740
    #4 0x813ffb0 in delegate_base<unsigned int, screen_device&, bitmap_rgb32&, rectangle const&, _noparam, _noparam, _noparam, _noparam, _noparam, _noparam, _noparam, _noparam, _noparam>::operator()(screen_device&, bitmap_rgb32&, rectangle const&) const /home/notroot/trunk/src/lib/util/delegate.h:652:76
    #5 0x813ffb0 in screen_device::update_partial(int) /home/notroot/trunk/src/emu/screen.c:625
    #6 0x81d8f52 in video_manager::finish_screen_updates() /home/notroot/trunk/src/emu/video.c:649:3
    #7 0x81d853f in video_manager::frame_update(bool) /home/notroot/trunk/src/emu/video.c:202:27
    #8 0x813f80c in screen_device::vblank_end() /home/notroot/trunk/src/emu/screen.c:856:3
    #9 0x813f036 in screen_device::device_timer(emu_timer&, unsigned int, int, void*) /home/notroot/trunk/src/emu/screen.c:409:4
    #10 0x8136b63 in device_t::timer_expired(emu_timer&, unsigned int, int, void*) /home/notroot/trunk/src/emu/device.h:191:83
    #11 0x8136b63 in device_scheduler::execute_timers() /home/notroot/trunk/src/emu/schedule.c:902
    #12 0x813263b in device_scheduler::timeslice() /home/notroot/trunk/src/emu/schedule.c:517:2
    #13 0x804fe48 in running_machine::run(bool) /home/notroot/trunk/src/emu/machine.c:397:5
    #14 0x8047ee6 in machine_manager::execute() /home/notroot/trunk/src/emu/mame.c:222:11
    #15 0x7e79dbc in cli_frontend::execute(int, char**) /home/notroot/trunk/src/emu/clifront.c:220:15
    #16 0x575d9bb in main /home/notroot/trunk/src/osd/sdl/sdlmain.c:322:9
    #17 0x7f7ee9302ec4 in __libc_start_main /build/buildd/eglibc-2.19/csu/libc-start.c:287
    #18 0x116cdfc in _start (/home/notroot/trunk/mame64d+0x116cdfc)

0x7f7ec4721b10 is located 0 bytes to the right of 262928-byte region [0x7f7ec46e1800,0x7f7ec4721b10)
allocated by thread T0 here:
    #0 0x114f78b in __interceptor_malloc /home/ben/development/llvm/3.5/final/llvm.src/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:40:3
    #1 0x8b42528 in osd_malloc(unsigned long) /home/notroot/trunk/src/osd/modules/lib/osdlib_unix.c:75:9
    #2 0x8419fd1 in malloc_file_line(unsigned long, char const*, int, bool, bool, bool) /home/notroot/trunk/src/lib/util/corealloc.c:112:50
    #3 0x3ac32ea in operator new(unsigned long, char const*, int, zeromem_t const&) /home/notroot/trunk/src/lib/util/corealloc.h:77:142
    #4 0x3ac32ea in geo_init(running_machine&, unsigned int*) /home/notroot/trunk/src/mame/video/model2.c:1309
    #5 0x3ac32ea in model2_state::video_start_model2() /home/notroot/trunk/src/mame/video/model2.c:2715
    #6 0x7f23cf5 in delegate_base<void, _noparam, _noparam, _noparam, _noparam, _noparam, _noparam, _noparam, _noparam, _noparam, _noparam, _noparam, _noparam>::operator()() const /home/notroot/trunk/src/lib/util/delegate.h:649:42
    #7 0x7f23cf5 in driver_device::device_start() /home/notroot/trunk/src/emu/driver.c:229
    #8 0x7e970fc in device_t::start() /home/notroot/trunk/src/emu/device.c:409:2
    #9 0x804f33a in running_machine::start_all_devices() /home/notroot/trunk/src/emu/machine.c:1105:6
    #10 0x804ca64 in running_machine::start() /home/notroot/trunk/src/emu/machine.c:287:2
    #11 0x804fb73 in running_machine::run(bool) /home/notroot/trunk/src/emu/machine.c:351:3
    #12 0x8047ee6 in machine_manager::execute() /home/notroot/trunk/src/emu/mame.c:222:11
    #13 0x7e79dbc in cli_frontend::execute(int, char**) /home/notroot/trunk/src/emu/clifront.c:220:15
    #14 0x575d9bb in main /home/notroot/trunk/src/osd/sdl/sdlmain.c:322:9
    #15 0x7f7ee9302ec4 in __libc_start_main /build/buildd/eglibc-2.19/csu/libc-start.c:287

SUMMARY: AddressSanitizer: heap-buffer-overflow /home/notroot/trunk/src/mame/video/model2.c:2249 geo_polygon_data(geo_state*, unsigned int, unsigned int*)
Shadow bytes around the buggy address:
  0x0ff0588dc310: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0ff0588dc320: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0ff0588dc330: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0ff0588dc340: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0ff0588dc350: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x0ff0588dc360: 00 00[fa]fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0ff0588dc370: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0ff0588dc380: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0ff0588dc390: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0ff0588dc3a0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0ff0588dc3b0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
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
  Heap right redzone:      fb
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  Stack partial redzone:   f4
  Stack after return:      f5
  Stack use after scope:   f8
  Global redzone:          f9
  Global init order:       f6
  Poisoned by user:        f7
  Container overflow:      fc
  ASan internal:           fe
Steps To Reproduce
Additional Information
Github Commit
Flags
Regression Version
Affected Sets / Systems stcc, stcca, stccb
Attached Files
 
Relationships
There are no relationship linked to this issue.
Notes
0
There are no notes attached to this issue.