カテゴリ 重要度 ステータス 解決状況 登録日時 最終更新
その他重要 (本体)認証済み未処理2015-03-09 19:432021-02-04 03:58
 
テスターFirewave担当者 ソースsegas24.cpp
バージョン0.159発生バージョン修正バージョン
修正コミットプルリク
フラグ
セット sspirtfc
セット詳細
sspirtfc - スクランブルスピリッツ (海外版, フロッピー, FD1094 317-0058-02c)
 
概 要AddressSanitizer: heap-use-after-freeエラー。
詳 細
==31638==ERROR: AddressSanitizer: heap-use-after-free on address 0x7f396e2ba200 at pc 0x000003c89caa bp 0x7fff2c158b70 sp 0x7fff2c158b68
READ of size 1 at 0x7f396e2ba200 thread T0
    #0 0x3c89ca9 in segas24_state::fdc_w(address_space&, unsigned int, unsigned short, unsigned short) /home/notroot/trunk/src/mame/drivers/segas24.c:441:5
    #1 0x80b4dad in delegate_base<void, address_space&, unsigned int, unsigned short, unsigned short, _noparam, _noparam, _noparam, _noparam, _noparam, _noparam, _noparam, _noparam>::operator()(address_space&, unsigned int, unsigned short, unsigned short) const /home/notroot/trunk/src/lib/util/delegate.h:653:88
    #2 0x80b4dad in handler_entry_write::write16(address_space&, unsigned int, unsigned short, unsigned short) const /home/notroot/trunk/src/emu/memory.c:421
    #3 0x80b4dad in address_space_specific<unsigned short, (endianness_t)1, true>::write_native(unsigned int, unsigned short, unsigned short) /home/notroot/trunk/src/emu/memory.c:1121
    #4 0x80b436b in void address_space_specific<unsigned short, (endianness_t)1, true>::write_direct<unsigned short, true>(unsigned int, unsigned short, unsigned short) /home/notroot/trunk/src/emu/memory.c:1286:11
    #5 0x80b436b in address_space_specific<unsigned short, (endianness_t)1, true>::write_word(unsigned int, unsigned short, unsigned short) /home/notroot/trunk/src/emu/memory.c:1428
    #6 0x67afafc in m68000_base_device::m68000_write_byte(unsigned int, unsigned char) /home/notroot/trunk/src/emu/cpu/m68000/m68kcpu.c:1300:2
    #7 0x68cc5a8 in delegate_base<void, unsigned int, unsigned char, _noparam, _noparam, _noparam, _noparam, _noparam, _noparam, _noparam, _noparam, _noparam, _noparam>::operator()(unsigned int, unsigned char) const /home/notroot/trunk/src/lib/util/delegate.h:651:64
    #8 0x68cc5a8 in m68ki_write_8_fc(m68000_base_device*, unsigned int, unsigned int, unsigned int) /home/notroot/trunk/src/emu/cpu/m68000/m68kcpu.h:827
    #9 0x68cc5a8 in m68000_base_device_ops::m68k_op_move_8_di_d(m68000_base_device*) /home/notroot/trunk/obj/sdl64d/emu/cpu/m68000/m68kops.c:17072
    #10 0x67dace6 in m68000_base_device::cpu_execute() /home/notroot/trunk/src/emu/cpu/m68000/m68kcpu.c:861:5
    #11 0x67c48ff in m68000_base_device::execute_run() /home/notroot/trunk/src/emu/cpu/m68000/m68kcpu.c:2493:2
    #12 0x67c48ff in non-virtual thunk to m68000_base_device::execute_run() /home/notroot/trunk/src/emu/cpu/m68000/m68kcpu.c:2494
    #13 0x813206a in device_execute_interface::run() /home/notroot/trunk/src/emu/diexec.h:191:15
    #14 0x813206a in device_scheduler::timeslice() /home/notroot/trunk/src/emu/schedule.c:476
    #15 0x804fe48 in running_machine::run(bool) /home/notroot/trunk/src/emu/machine.c:397:5
    #16 0x8047ee6 in machine_manager::execute() /home/notroot/trunk/src/emu/mame.c:222:11
    #17 0x7e79dbc in cli_frontend::execute(int, char**) /home/notroot/trunk/src/emu/clifront.c:220:15
    #18 0x575d9bb in main /home/notroot/trunk/src/osd/sdl/sdlmain.c:322:9
    #19 0x7f397bb00ec4 in __libc_start_main /build/buildd/eglibc-2.19/csu/libc-start.c:287
    #20 0x116cdfc in _start (/home/notroot/trunk/mame64d+0x116cdfc)

0x7f396e2ba200 is located 14848 bytes inside of 131072-byte region [0x7f396e2b6800,0x7f396e2d6800)
freed by thread T0 here:
    #0 0x114f50b in free /home/ben/development/llvm/3.5/final/llvm.src/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:30:3
    #1 0x8b42548 in osd_free(void*) /home/notroot/trunk/src/osd/modules/lib/osdlib_unix.c:103:2
    #2 0x841a766 in free_file_line(void*, char const*, int, bool) /home/notroot/trunk/src/lib/util/corealloc.c:178:2
    #3 0x8120404 in operator delete[](void*) /home/notroot/trunk/src/lib/util/corealloc.h:66:87
    #4 0x8120404 in dynamic_array<unsigned char>::reset() /home/notroot/trunk/src/lib/util/coretmpl.h:93
    #5 0x8120404 in dynamic_array<unsigned char>::~dynamic_array() /home/notroot/trunk/src/lib/util/coretmpl.h:78
    #6 0x8120404 in read_rom_data(romload_private*, rom_entry const*, rom_entry const*) /home/notroot/trunk/src/emu/romload.c:870
    #7 0x8120404 in process_rom_entries(romload_private*, char const*, rom_entry const*, rom_entry const*, device_t*, bool) /home/notroot/trunk/src/emu/romload.c:992
    #8 0x8124fb0 in process_region_list(romload_private*) /home/notroot/trunk/src/emu/romload.c:1498:5
    #9 0x8124fb0 in rom_init(running_machine&) /home/notroot/trunk/src/emu/romload.c:1565
    #10 0x804c2e0 in running_machine::start() /home/notroot/trunk/src/emu/machine.c:255: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 0x7f397bb00ec4 in __libc_start_main /build/buildd/eglibc-2.19/csu/libc-start.c:287

previously 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 0x8b42538 in osd_malloc_array(unsigned long) /home/notroot/trunk/src/osd/modules/lib/osdlib_unix.c:89:9
    #2 0x8419fca in malloc_file_line(unsigned long, char const*, int, bool, bool, bool) /home/notroot/trunk/src/lib/util/corealloc.c:112:25
    #3 0x811e5cc in operator new[](unsigned long, char const*, int) /home/notroot/trunk/src/lib/util/corealloc.h:72:125
    #4 0x811e5cc in dynamic_array<unsigned char>::expand_internal(int) /home/notroot/trunk/src/lib/util/coretmpl.h:115
    #5 0x811e5cc in dynamic_array<unsigned char>::dynamic_array(int, int) /home/notroot/trunk/src/lib/util/coretmpl.h:77
    #6 0x811e5cc in read_rom_data(romload_private*, rom_entry const*, rom_entry const*) /home/notroot/trunk/src/emu/romload.c:795
    #7 0x811e5cc in process_rom_entries(romload_private*, char const*, rom_entry const*, rom_entry const*, device_t*, bool) /home/notroot/trunk/src/emu/romload.c:992
    #8 0x8124fb0 in process_region_list(romload_private*) /home/notroot/trunk/src/emu/romload.c:1498:5
    #9 0x8124fb0 in rom_init(running_machine&) /home/notroot/trunk/src/emu/romload.c:1565
    #10 0x804c2e0 in running_machine::start() /home/notroot/trunk/src/emu/machine.c:255: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 0x7f397bb00ec4 in __libc_start_main /build/buildd/eglibc-2.19/csu/libc-start.c:287

SUMMARY: AddressSanitizer: heap-use-after-free /home/notroot/trunk/src/mame/drivers/segas24.c:441 segas24_state::fdc_w(address_space&, unsigned int, unsigned short, unsigned short)
Shadow bytes around the buggy address:
  0x0fe7adc4f3f0: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
  0x0fe7adc4f400: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
  0x0fe7adc4f410: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
  0x0fe7adc4f420: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
  0x0fe7adc4f430: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
=>0x0fe7adc4f440:[fd]fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
  0x0fe7adc4f450: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
  0x0fe7adc4f460: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
  0x0fe7adc4f470: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
  0x0fe7adc4f480: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
  0x0fe7adc4f490: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
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
再現手順 
追加情報 
 
添付ファイル