Viewing Issue Advanced Details
ID Category [?] Severity [?] Reproducibility Date Submitted Last Update
05892 Misc. Minor Always Mar 24, 2015, 10:34 May 5, 2016, 09:20
Tester Firewave View Status Public Platform SDLMAME
Assigned To Resolution Won't fix OS Linux
Status [?] Closed Driver
Version 0.159 Fixed in Version Build Debug
Summary 05892: ThreadSanitizer: data race between screen_device::update_partial() and rendersw.inc with -mt
Description coco.c: coco

==================
WARNING: ThreadSanitizer: data race (pid=14238)
  Write of size 4 at 0x7f2744d14500 by main thread:
    #0 mc6847_base_device::screen_update(screen_device&, bitmap_rgb32&, rectangle const&) /home/notroot/trunk/src/emu/video/mc6847.c:831:4 (mess64d+0x000003a348ce)
    #1 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:653:78 (mess64d+0x000004069dd1)
    #2 screen_device::update_partial(int) /home/notroot/trunk/src/emu/screen.c:625 (mess64d+0x000004069dd1)
    #3 video_manager::finish_screen_updates() /home/notroot/trunk/src/emu/video.c:654:3 (mess64d+0x0000040ca83c)
    #4 video_manager::frame_update(bool) /home/notroot/trunk/src/emu/video.c:207:27 (mess64d+0x0000040ca257)
    #5 screen_device::vblank_begin() /home/notroot/trunk/src/emu/screen.c:822:3 (mess64d+0x000004069676)
    #6 screen_device::device_timer(emu_timer&, unsigned int, int, void*) /home/notroot/trunk/src/emu/screen.c:404:4 (mess64d+0x00000406946d)
    #7 device_t::timer_expired(emu_timer&, unsigned int, int, void*) /home/notroot/trunk/src/emu/device.h:191:83 (mess64d+0x000004063d2c)
    #8 device_scheduler::execute_timers() /home/notroot/trunk/src/emu/schedule.c:900 (mess64d+0x000004063d2c)
    #9 device_scheduler::timeslice() /home/notroot/trunk/src/emu/schedule.c:515:2 (mess64d+0x000004061974)
    #10 running_machine::run(bool) /home/notroot/trunk/src/emu/machine.c:397:5 (mess64d+0x000003fc7618)
    #11 device_t::start() /home/notroot/trunk/src/emu/device.c:409:2 (mess64d+0x000003ed7fa6)
    #12 running_machine::start_all_devices() /home/notroot/trunk/src/emu/machine.c:1105:6 (mess64d+0x000003fc6d42)
    #13 device_mixer_interface::interface_pre_start() /home/notroot/trunk/src/emu/disound.c:406:2 (mess64d+0x000003eef607)
    #14 device_t::start() /home/notroot/trunk/src/emu/device.c:403:3 (mess64d+0x000003ed7f60)
    #15 running_machine::start_all_devices() /home/notroot/trunk/src/emu/machine.c:1105:6 (mess64d+0x000003fc6d42)
    #16 coco_state::device_start() /home/notroot/trunk/src/mess/machine/coco.c:121:2 (mess64d+0x000002429577)
    #17 coco12_state::device_start() /home/notroot/trunk/src/mess/machine/coco12.c:17:2 (mess64d+0x00000242dab9)
    #18 device_t::start() /home/notroot/trunk/src/emu/device.c:409:2 (mess64d+0x000003ed7fa6)
    #19 running_machine::start_all_devices() /home/notroot/trunk/src/emu/machine.c:1105:6 (mess64d+0x000003fc6d42)
    #20 running_machine::start() /home/notroot/trunk/src/emu/machine.c:287:2 (mess64d+0x000003fc5594)
    #21 running_machine::run(bool) /home/notroot/trunk/src/emu/machine.c:351:3 (mess64d+0x000003fc73d9)
    #22 machine_manager::execute() /home/notroot/trunk/src/emu/mame.c:222:11 (mess64d+0x000003fc2092)
    #23 cli_frontend::execute(int, char**) /home/notroot/trunk/src/emu/clifront.c:220:15 (mess64d+0x000003ec4d90)
    #24 main /home/notroot/trunk/src/osd/sdl/sdlmain.c:290:9 (mess64d+0x00000272caa0)

  Previous read of size 4 at 0x7f2744d14500 by thread T10 (mutexes: write M956):
    #0 software_renderer<unsigned int, 0, 0, 0, 16, 8, 0, false, false>::get_texel_rgb32(render_texinfo const&, int, int) /home/notroot/trunk/src/emu/rendersw.inc:290:11 (mess64d+0x00000275f979)
    #1 software_renderer<unsigned int, 0, 0, 0, 16, 8, 0, false, false>::draw_quad_rgb32(render_primitive const&, unsigned int*, unsigned int, software_renderer<unsigned int, 0, 0, 0, 16, 8, 0, false, false>::quad_setup_data&) /home/notroot/trunk/src/emu/rendersw.inc:1108 (mess64d+0x00000275f979)
    #2 software_renderer<unsigned int, 0, 0, 0, 16, 8, 0, false, false>::setup_and_draw_textured_quad(render_primitive const&, unsigned int*, int, int, unsigned int) /home/notroot/trunk/src/emu/rendersw.inc:1886:5 (mess64d+0x00000275c10d)
    #3 software_renderer<unsigned int, 0, 0, 0, 16, 8, 0, false, false>::draw_primitives(render_primitive_list const&, void*, unsigned int, unsigned int, unsigned int) /home/notroot/trunk/src/emu/rendersw.inc:1936:7 (mess64d+0x000002741e7a)
    #4 sdl_info::draw(int) /home/notroot/trunk/src/osd/modules/render/drawsdl.c:743:5 (mess64d+0x0000027410cc)
    #5 sdl_window_info::draw_video_contents_wt(void*, int) /home/notroot/trunk/src/osd/sdl/window.c:1373:4 (mess64d+0x000002738220)
    #6 worker_thread_process(osd_work_queue*, work_thread_info*) /home/notroot/trunk/src/osd/modules/sync/work_osd.c:744:21 (mess64d+0x00000460960b)
    #7 worker_thread_entry(void*) /home/notroot/trunk/src/osd/modules/sync/work_osd.c:668:4 (mess64d+0x000004608f7b)

  Location is heap block of size 311167 at 0x7f2744d14000 allocated by main thread:
    #0 malloc /home/development/llvm/3.6.0/final/llvm.src/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:495:5 (mess64d+0x00000121ecdd)
    #1 osd_malloc_array(unsigned long) /home/notroot/trunk/src/osd/modules/lib/osdlib_unix.c:89:9 (mess64d+0x000004607709)
    #2 malloc_file_line(unsigned long, char const*, int, bool, bool, bool) /home/notroot/trunk/src/lib/util/corealloc.c:112:25 (mess64d+0x00000420e0aa)
    #3 operator new[](unsigned long) /home/notroot/trunk/src/lib/util/corealloc.h:64:97 (mess64d+0x0000041ef18a)
    #4 bitmap_t::allocate(int, int, int, int) /home/notroot/trunk/src/lib/util/bitmap.c:151 (mess64d+0x0000041ef18a)
    #5 screen_device::register_screen_bitmap(bitmap_t&) /home/notroot/trunk/src/emu/screen.c:803:2 (mess64d+0x000004067994)
    #6 screen_device::device_start() /home/notroot/trunk/src/emu/screen.c:294:3 (mess64d+0x000004066651)
    #7 device_t::start() /home/notroot/trunk/src/emu/device.c:409:2 (mess64d+0x000003ed7fa6)
    #8 running_machine::start_all_devices() /home/notroot/trunk/src/emu/machine.c:1105:6 (mess64d+0x000003fc6d42)
    #9 coco_state::device_start() /home/notroot/trunk/src/mess/machine/coco.c:121:2 (mess64d+0x000002429577)
    #10 coco12_state::device_start() /home/notroot/trunk/src/mess/machine/coco12.c:17:2 (mess64d+0x00000242dab9)
    #11 device_t::start() /home/notroot/trunk/src/emu/device.c:409:2 (mess64d+0x000003ed7fa6)
    #12 running_machine::start_all_devices() /home/notroot/trunk/src/emu/machine.c:1105:6 (mess64d+0x000003fc6d42)
    #13 running_machine::start() /home/notroot/trunk/src/emu/machine.c:287:2 (mess64d+0x000003fc5594)
    #14 running_machine::run(bool) /home/notroot/trunk/src/emu/machine.c:351:3 (mess64d+0x000003fc73d9)
    #15 machine_manager::execute() /home/notroot/trunk/src/emu/mame.c:222:11 (mess64d+0x000003fc2092)
    #16 cli_frontend::execute(int, char**) /home/notroot/trunk/src/emu/clifront.c:220:15 (mess64d+0x000003ec4d90)
    #17 main /home/notroot/trunk/src/osd/sdl/sdlmain.c:290:9 (mess64d+0x00000272caa0)

  Mutex M956 (0x7d0c00006e70) created at:
    #0 pthread_mutex_init /home/development/llvm/3.6.0/final/llvm.src/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:1082:3 (mess64d+0x000001223fc0)
    #1 osd_lock_alloc() /home/notroot/trunk/src/osd/modules/sync/sync_tc.c:118:2 (mess64d+0x0000046079e0)
    #2 render_primitive_list::render_primitive_list() /home/notroot/trunk/src/emu/render.c:230:11 (mess64d+0x00000401f090)
    #3 render_target::render_target(render_manager&, char const*, unsigned int) /home/notroot/trunk/src/emu/render.c:913:16 (mess64d+0x000004023831)
    #4 render_manager::target_alloc(char const*, unsigned int) /home/notroot/trunk/src/emu/render.c:2451:31 (mess64d+0x00000402df84)
    #5 sdl_window_info::window_init() /home/notroot/trunk/src/osd/sdl/window.c:737:13 (mess64d+0x0000027372d0)
    #6 sdl_osd_interface::video_init() /home/notroot/trunk/src/osd/sdl/video.c:116:7 (mess64d+0x000002732edd)
    #7 osd_common_t::init_subsystems() /home/notroot/trunk/src/osd/modules/lib/osdobj_common.c:513:7 (mess64d+0x00000273b0d3)
    #8 sdl_osd_interface::init(running_machine&) /home/notroot/trunk/src/osd/sdl/sdlmain.c:611:2 (mess64d+0x00000272d64c)
    #9 running_machine::start() /home/notroot/trunk/src/emu/machine.c:231:2 (mess64d+0x000003fc4e04)
    #10 running_machine::run(bool) /home/notroot/trunk/src/emu/machine.c:351:3 (mess64d+0x000003fc73d9)
    #11 machine_manager::execute() /home/notroot/trunk/src/emu/mame.c:222:11 (mess64d+0x000003fc2092)
    #12 cli_frontend::execute(int, char**) /home/notroot/trunk/src/emu/clifront.c:220:15 (mess64d+0x000003ec4d90)
    #13 main /home/notroot/trunk/src/osd/sdl/sdlmain.c:290:9 (mess64d+0x00000272caa0)

  Thread T10 (tid=14250, running) created by main thread at:
    #0 pthread_create /home/development/llvm/3.6.0/final/llvm.src/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:896:3 (mess64d+0x000001222b91)
    #1 osd_thread_create(void* (*)(void*), void*) /home/notroot/trunk/src/osd/modules/sync/sync_tc.c:320:7 (mess64d+0x000004607efd)
    #2 osd_work_queue_alloc(int) /home/notroot/trunk/src/osd/modules/sync/work_osd.c:241:20 (mess64d+0x000004608d5a)
    #3 sdl_osd_interface::window_init() /home/notroot/trunk/src/osd/sdl/window.c:218:16 (mess64d+0x000002734b99)
    #4 sdl_osd_interface::video_init() /home/notroot/trunk/src/osd/sdl/video.c:103:7 (mess64d+0x000002732b6f)
    #5 osd_common_t::init_subsystems() /home/notroot/trunk/src/osd/modules/lib/osdobj_common.c:513:7 (mess64d+0x00000273b0d3)
    #6 sdl_osd_interface::init(running_machine&) /home/notroot/trunk/src/osd/sdl/sdlmain.c:611:2 (mess64d+0x00000272d64c)
    #7 running_machine::start() /home/notroot/trunk/src/emu/machine.c:231:2 (mess64d+0x000003fc4e04)
    #8 running_machine::run(bool) /home/notroot/trunk/src/emu/machine.c:351:3 (mess64d+0x000003fc73d9)
    #9 machine_manager::execute() /home/notroot/trunk/src/emu/mame.c:222:11 (mess64d+0x000003fc2092)
    #10 cli_frontend::execute(int, char**) /home/notroot/trunk/src/emu/clifront.c:220:15 (mess64d+0x000003ec4d90)
    #11 main /home/notroot/trunk/src/osd/sdl/sdlmain.c:290:9 (mess64d+0x00000272caa0)

SUMMARY: ThreadSanitizer: data race /home/notroot/trunk/src/emu/video/mc6847.c:831 mc6847_base_device::screen_update(screen_device&, bitmap_rgb32&, rectangle const&)
==================
==================
WARNING: ThreadSanitizer: data race (pid=14238)
  Write of size 4 at 0x7f2744d1bd00 by main thread:
    #0 mc6847_base_device::screen_update(screen_device&, bitmap_rgb32&, rectangle const&) /home/notroot/trunk/src/emu/video/mc6847.c:840:4 (mess64d+0x000003a34b6e)
    #1 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:653:78 (mess64d+0x000004069dd1)
    #2 screen_device::update_partial(int) /home/notroot/trunk/src/emu/screen.c:625 (mess64d+0x000004069dd1)
    #3 video_manager::finish_screen_updates() /home/notroot/trunk/src/emu/video.c:654:3 (mess64d+0x0000040ca83c)
    #4 video_manager::frame_update(bool) /home/notroot/trunk/src/emu/video.c:207:27 (mess64d+0x0000040ca257)
    #5 screen_device::vblank_begin() /home/notroot/trunk/src/emu/screen.c:822:3 (mess64d+0x000004069676)
    #6 screen_device::device_timer(emu_timer&, unsigned int, int, void*) /home/notroot/trunk/src/emu/screen.c:404:4 (mess64d+0x00000406946d)
    #7 device_t::timer_expired(emu_timer&, unsigned int, int, void*) /home/notroot/trunk/src/emu/device.h:191:83 (mess64d+0x000004063d2c)
    #8 device_scheduler::execute_timers() /home/notroot/trunk/src/emu/schedule.c:900 (mess64d+0x000004063d2c)
    #9 device_scheduler::timeslice() /home/notroot/trunk/src/emu/schedule.c:515:2 (mess64d+0x000004061974)
    #10 running_machine::run(bool) /home/notroot/trunk/src/emu/machine.c:397:5 (mess64d+0x000003fc7618)
    #11 device_t::start() /home/notroot/trunk/src/emu/device.c:409:2 (mess64d+0x000003ed7fa6)
    #12 running_machine::start_all_devices() /home/notroot/trunk/src/emu/machine.c:1105:6 (mess64d+0x000003fc6d42)
    #13 device_mixer_interface::interface_pre_start() /home/notroot/trunk/src/emu/disound.c:406:2 (mess64d+0x000003eef607)
    #14 device_t::start() /home/notroot/trunk/src/emu/device.c:403:3 (mess64d+0x000003ed7f60)
    #15 running_machine::start_all_devices() /home/notroot/trunk/src/emu/machine.c:1105:6 (mess64d+0x000003fc6d42)
    #16 coco_state::device_start() /home/notroot/trunk/src/mess/machine/coco.c:121:2 (mess64d+0x000002429577)
    #17 coco12_state::device_start() /home/notroot/trunk/src/mess/machine/coco12.c:17:2 (mess64d+0x00000242dab9)
    #18 device_t::start() /home/notroot/trunk/src/emu/device.c:409:2 (mess64d+0x000003ed7fa6)
    #19 running_machine::start_all_devices() /home/notroot/trunk/src/emu/machine.c:1105:6 (mess64d+0x000003fc6d42)
    #20 running_machine::start() /home/notroot/trunk/src/emu/machine.c:287:2 (mess64d+0x000003fc5594)
    #21 running_machine::run(bool) /home/notroot/trunk/src/emu/machine.c:351:3 (mess64d+0x000003fc73d9)
    #22 machine_manager::execute() /home/notroot/trunk/src/emu/mame.c:222:11 (mess64d+0x000003fc2092)
    #23 cli_frontend::execute(int, char**) /home/notroot/trunk/src/emu/clifront.c:220:15 (mess64d+0x000003ec4d90)
    #24 main /home/notroot/trunk/src/osd/sdl/sdlmain.c:290:9 (mess64d+0x00000272caa0)

  Previous read of size 4 at 0x7f2744d1bd00 by thread T10 (mutexes: write M956):
    #0 software_renderer<unsigned int, 0, 0, 0, 16, 8, 0, false, false>::get_texel_rgb32(render_texinfo const&, int, int) /home/notroot/trunk/src/emu/rendersw.inc:290:11 (mess64d+0x00000275f979)
    #1 software_renderer<unsigned int, 0, 0, 0, 16, 8, 0, false, false>::draw_quad_rgb32(render_primitive const&, unsigned int*, unsigned int, software_renderer<unsigned int, 0, 0, 0, 16, 8, 0, false, false>::quad_setup_data&) /home/notroot/trunk/src/emu/rendersw.inc:1108 (mess64d+0x00000275f979)
    #2 software_renderer<unsigned int, 0, 0, 0, 16, 8, 0, false, false>::setup_and_draw_textured_quad(render_primitive const&, unsigned int*, int, int, unsigned int) /home/notroot/trunk/src/emu/rendersw.inc:1886:5 (mess64d+0x00000275c10d)
    #3 software_renderer<unsigned int, 0, 0, 0, 16, 8, 0, false, false>::draw_primitives(render_primitive_list const&, void*, unsigned int, unsigned int, unsigned int) /home/notroot/trunk/src/emu/rendersw.inc:1936:7 (mess64d+0x000002741e7a)
    #4 sdl_info::draw(int) /home/notroot/trunk/src/osd/modules/render/drawsdl.c:743:5 (mess64d+0x0000027410cc)
    #5 sdl_window_info::draw_video_contents_wt(void*, int) /home/notroot/trunk/src/osd/sdl/window.c:1373:4 (mess64d+0x000002738220)
    #6 worker_thread_process(osd_work_queue*, work_thread_info*) /home/notroot/trunk/src/osd/modules/sync/work_osd.c:744:21 (mess64d+0x00000460960b)
    #7 worker_thread_entry(void*) /home/notroot/trunk/src/osd/modules/sync/work_osd.c:668:4 (mess64d+0x000004608f7b)

  Location is heap block of size 311167 at 0x7f2744d14000 allocated by main thread:
    #0 malloc /home/development/llvm/3.6.0/final/llvm.src/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:495:5 (mess64d+0x00000121ecdd)
    #1 osd_malloc_array(unsigned long) /home/notroot/trunk/src/osd/modules/lib/osdlib_unix.c:89:9 (mess64d+0x000004607709)
    #2 malloc_file_line(unsigned long, char const*, int, bool, bool, bool) /home/notroot/trunk/src/lib/util/corealloc.c:112:25 (mess64d+0x00000420e0aa)
    #3 operator new[](unsigned long) /home/notroot/trunk/src/lib/util/corealloc.h:64:97 (mess64d+0x0000041ef18a)
    #4 bitmap_t::allocate(int, int, int, int) /home/notroot/trunk/src/lib/util/bitmap.c:151 (mess64d+0x0000041ef18a)
    #5 screen_device::register_screen_bitmap(bitmap_t&) /home/notroot/trunk/src/emu/screen.c:803:2 (mess64d+0x000004067994)
    #6 screen_device::device_start() /home/notroot/trunk/src/emu/screen.c:294:3 (mess64d+0x000004066651)
    #7 device_t::start() /home/notroot/trunk/src/emu/device.c:409:2 (mess64d+0x000003ed7fa6)
    #8 running_machine::start_all_devices() /home/notroot/trunk/src/emu/machine.c:1105:6 (mess64d+0x000003fc6d42)
    #9 coco_state::device_start() /home/notroot/trunk/src/mess/machine/coco.c:121:2 (mess64d+0x000002429577)
    #10 coco12_state::device_start() /home/notroot/trunk/src/mess/machine/coco12.c:17:2 (mess64d+0x00000242dab9)
    #11 device_t::start() /home/notroot/trunk/src/emu/device.c:409:2 (mess64d+0x000003ed7fa6)
    #12 running_machine::start_all_devices() /home/notroot/trunk/src/emu/machine.c:1105:6 (mess64d+0x000003fc6d42)
    #13 running_machine::start() /home/notroot/trunk/src/emu/machine.c:287:2 (mess64d+0x000003fc5594)
    #14 running_machine::run(bool) /home/notroot/trunk/src/emu/machine.c:351:3 (mess64d+0x000003fc73d9)
    #15 machine_manager::execute() /home/notroot/trunk/src/emu/mame.c:222:11 (mess64d+0x000003fc2092)
    #16 cli_frontend::execute(int, char**) /home/notroot/trunk/src/emu/clifront.c:220:15 (mess64d+0x000003ec4d90)
    #17 main /home/notroot/trunk/src/osd/sdl/sdlmain.c:290:9 (mess64d+0x00000272caa0)

  Mutex M956 (0x7d0c00006e70) created at:
    #0 pthread_mutex_init /home/development/llvm/3.6.0/final/llvm.src/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:1082:3 (mess64d+0x000001223fc0)
    #1 osd_lock_alloc() /home/notroot/trunk/src/osd/modules/sync/sync_tc.c:118:2 (mess64d+0x0000046079e0)
    #2 render_primitive_list::render_primitive_list() /home/notroot/trunk/src/emu/render.c:230:11 (mess64d+0x00000401f090)
    #3 render_target::render_target(render_manager&, char const*, unsigned int) /home/notroot/trunk/src/emu/render.c:913:16 (mess64d+0x000004023831)
    #4 render_manager::target_alloc(char const*, unsigned int) /home/notroot/trunk/src/emu/render.c:2451:31 (mess64d+0x00000402df84)
    #5 sdl_window_info::window_init() /home/notroot/trunk/src/osd/sdl/window.c:737:13 (mess64d+0x0000027372d0)
    #6 sdl_osd_interface::video_init() /home/notroot/trunk/src/osd/sdl/video.c:116:7 (mess64d+0x000002732edd)
    #7 osd_common_t::init_subsystems() /home/notroot/trunk/src/osd/modules/lib/osdobj_common.c:513:7 (mess64d+0x00000273b0d3)
    #8 sdl_osd_interface::init(running_machine&) /home/notroot/trunk/src/osd/sdl/sdlmain.c:611:2 (mess64d+0x00000272d64c)
    #9 running_machine::start() /home/notroot/trunk/src/emu/machine.c:231:2 (mess64d+0x000003fc4e04)
    #10 running_machine::run(bool) /home/notroot/trunk/src/emu/machine.c:351:3 (mess64d+0x000003fc73d9)
    #11 machine_manager::execute() /home/notroot/trunk/src/emu/mame.c:222:11 (mess64d+0x000003fc2092)
    #12 cli_frontend::execute(int, char**) /home/notroot/trunk/src/emu/clifront.c:220:15 (mess64d+0x000003ec4d90)
    #13 main /home/notroot/trunk/src/osd/sdl/sdlmain.c:290:9 (mess64d+0x00000272caa0)

  Thread T10 (tid=14250, running) created by main thread at:
    #0 pthread_create /home/development/llvm/3.6.0/final/llvm.src/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:896:3 (mess64d+0x000001222b91)
    #1 osd_thread_create(void* (*)(void*), void*) /home/notroot/trunk/src/osd/modules/sync/sync_tc.c:320:7 (mess64d+0x000004607efd)
    #2 osd_work_queue_alloc(int) /home/notroot/trunk/src/osd/modules/sync/work_osd.c:241:20 (mess64d+0x000004608d5a)
    #3 sdl_osd_interface::window_init() /home/notroot/trunk/src/osd/sdl/window.c:218:16 (mess64d+0x000002734b99)
    #4 sdl_osd_interface::video_init() /home/notroot/trunk/src/osd/sdl/video.c:103:7 (mess64d+0x000002732b6f)
    #5 osd_common_t::init_subsystems() /home/notroot/trunk/src/osd/modules/lib/osdobj_common.c:513:7 (mess64d+0x00000273b0d3)
    #6 sdl_osd_interface::init(running_machine&) /home/notroot/trunk/src/osd/sdl/sdlmain.c:611:2 (mess64d+0x00000272d64c)
    #7 running_machine::start() /home/notroot/trunk/src/emu/machine.c:231:2 (mess64d+0x000003fc4e04)
    #8 running_machine::run(bool) /home/notroot/trunk/src/emu/machine.c:351:3 (mess64d+0x000003fc73d9)
    #9 machine_manager::execute() /home/notroot/trunk/src/emu/mame.c:222:11 (mess64d+0x000003fc2092)
    #10 cli_frontend::execute(int, char**) /home/notroot/trunk/src/emu/clifront.c:220:15 (mess64d+0x000003ec4d90)
    #11 main /home/notroot/trunk/src/osd/sdl/sdlmain.c:290:9 (mess64d+0x00000272caa0)

SUMMARY: ThreadSanitizer: data race /home/notroot/trunk/src/emu/video/mc6847.c:840 mc6847_base_device::screen_update(screen_device&, bitmap_rgb32&, rectangle const&)
==================
==================
WARNING: ThreadSanitizer: data race (pid=14238)
  Write of size 8 at 0x7f2744d1bd80 by main thread:
    #0 void mc6847_friend_device::character_map::emit_character<1>(unsigned char, unsigned char const*, int, unsigned int*, int, unsigned int const*) /home/notroot/trunk/src/emu/video/mc6847.h:169:7 (mess64d+0x000003a3802e)
    #1 unsigned int mc6847_friend_device::emit_mc6847_samples<1>(unsigned char, unsigned char const*, int, unsigned int*, unsigned int const*, device_delegate<unsigned char (unsigned char, int)>, int, int) /home/notroot/trunk/src/emu/video/mc6847.h:461 (mess64d+0x000003a3802e)
    #2 mc6847_base_device::screen_update(screen_device&, bitmap_rgb32&, rectangle const&) /home/notroot/trunk/src/emu/video/mc6847.c:854:14 (mess64d+0x000003a34ecd)
    #3 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:653:78 (mess64d+0x000004069dd1)
    #4 screen_device::update_partial(int) /home/notroot/trunk/src/emu/screen.c:625 (mess64d+0x000004069dd1)
    #5 video_manager::finish_screen_updates() /home/notroot/trunk/src/emu/video.c:654:3 (mess64d+0x0000040ca83c)
    #6 video_manager::frame_update(bool) /home/notroot/trunk/src/emu/video.c:207:27 (mess64d+0x0000040ca257)
    #7 screen_device::vblank_begin() /home/notroot/trunk/src/emu/screen.c:822:3 (mess64d+0x000004069676)
    #8 screen_device::device_timer(emu_timer&, unsigned int, int, void*) /home/notroot/trunk/src/emu/screen.c:404:4 (mess64d+0x00000406946d)
    #9 device_t::timer_expired(emu_timer&, unsigned int, int, void*) /home/notroot/trunk/src/emu/device.h:191:83 (mess64d+0x000004063d2c)
    #10 device_scheduler::execute_timers() /home/notroot/trunk/src/emu/schedule.c:900 (mess64d+0x000004063d2c)
    #11 device_scheduler::timeslice() /home/notroot/trunk/src/emu/schedule.c:515:2 (mess64d+0x000004061974)
    #12 running_machine::run(bool) /home/notroot/trunk/src/emu/machine.c:397:5 (mess64d+0x000003fc7618)
    #13 device_t::start() /home/notroot/trunk/src/emu/device.c:409:2 (mess64d+0x000003ed7fa6)
    #14 running_machine::start_all_devices() /home/notroot/trunk/src/emu/machine.c:1105:6 (mess64d+0x000003fc6d42)
    #15 device_mixer_interface::interface_pre_start() /home/notroot/trunk/src/emu/disound.c:406:2 (mess64d+0x000003eef607)
    #16 device_t::start() /home/notroot/trunk/src/emu/device.c:403:3 (mess64d+0x000003ed7f60)
    #17 running_machine::start_all_devices() /home/notroot/trunk/src/emu/machine.c:1105:6 (mess64d+0x000003fc6d42)
    #18 coco_state::device_start() /home/notroot/trunk/src/mess/machine/coco.c:121:2 (mess64d+0x000002429577)
    #19 coco12_state::device_start() /home/notroot/trunk/src/mess/machine/coco12.c:17:2 (mess64d+0x00000242dab9)
    #20 device_t::start() /home/notroot/trunk/src/emu/device.c:409:2 (mess64d+0x000003ed7fa6)
    #21 running_machine::start_all_devices() /home/notroot/trunk/src/emu/machine.c:1105:6 (mess64d+0x000003fc6d42)
    #22 running_machine::start() /home/notroot/trunk/src/emu/machine.c:287:2 (mess64d+0x000003fc5594)
    #23 running_machine::run(bool) /home/notroot/trunk/src/emu/machine.c:351:3 (mess64d+0x000003fc73d9)
    #24 machine_manager::execute() /home/notroot/trunk/src/emu/mame.c:222:11 (mess64d+0x000003fc2092)
    #25 cli_frontend::execute(int, char**) /home/notroot/trunk/src/emu/clifront.c:220:15 (mess64d+0x000003ec4d90)
    #26 main /home/notroot/trunk/src/osd/sdl/sdlmain.c:290:9 (mess64d+0x00000272caa0)

  Previous read of size 4 at 0x7f2744d1bd80 by thread T10 (mutexes: write M956):
    #0 software_renderer<unsigned int, 0, 0, 0, 16, 8, 0, false, false>::get_texel_rgb32(render_texinfo const&, int, int) /home/notroot/trunk/src/emu/rendersw.inc:290:11 (mess64d+0x00000275f979)
    #1 software_renderer<unsigned int, 0, 0, 0, 16, 8, 0, false, false>::draw_quad_rgb32(render_primitive const&, unsigned int*, unsigned int, software_renderer<unsigned int, 0, 0, 0, 16, 8, 0, false, false>::quad_setup_data&) /home/notroot/trunk/src/emu/rendersw.inc:1108 (mess64d+0x00000275f979)
    #2 software_renderer<unsigned int, 0, 0, 0, 16, 8, 0, false, false>::setup_and_draw_textured_quad(render_primitive const&, unsigned int*, int, int, unsigned int) /home/notroot/trunk/src/emu/rendersw.inc:1886:5 (mess64d+0x00000275c10d)
    #3 software_renderer<unsigned int, 0, 0, 0, 16, 8, 0, false, false>::draw_primitives(render_primitive_list const&, void*, unsigned int, unsigned int, unsigned int) /home/notroot/trunk/src/emu/rendersw.inc:1936:7 (mess64d+0x000002741e7a)
    #4 sdl_info::draw(int) /home/notroot/trunk/src/osd/modules/render/drawsdl.c:743:5 (mess64d+0x0000027410cc)
    #5 sdl_window_info::draw_video_contents_wt(void*, int) /home/notroot/trunk/src/osd/sdl/window.c:1373:4 (mess64d+0x000002738220)
    #6 worker_thread_process(osd_work_queue*, work_thread_info*) /home/notroot/trunk/src/osd/modules/sync/work_osd.c:744:21 (mess64d+0x00000460960b)
    #7 worker_thread_entry(void*) /home/notroot/trunk/src/osd/modules/sync/work_osd.c:668:4 (mess64d+0x000004608f7b)

  Location is heap block of size 311167 at 0x7f2744d14000 allocated by main thread:
    #0 malloc /home/development/llvm/3.6.0/final/llvm.src/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:495:5 (mess64d+0x00000121ecdd)
    #1 osd_malloc_array(unsigned long) /home/notroot/trunk/src/osd/modules/lib/osdlib_unix.c:89:9 (mess64d+0x000004607709)
    #2 malloc_file_line(unsigned long, char const*, int, bool, bool, bool) /home/notroot/trunk/src/lib/util/corealloc.c:112:25 (mess64d+0x00000420e0aa)
    #3 operator new[](unsigned long) /home/notroot/trunk/src/lib/util/corealloc.h:64:97 (mess64d+0x0000041ef18a)
    #4 bitmap_t::allocate(int, int, int, int) /home/notroot/trunk/src/lib/util/bitmap.c:151 (mess64d+0x0000041ef18a)
    #5 screen_device::register_screen_bitmap(bitmap_t&) /home/notroot/trunk/src/emu/screen.c:803:2 (mess64d+0x000004067994)
    #6 screen_device::device_start() /home/notroot/trunk/src/emu/screen.c:294:3 (mess64d+0x000004066651)
    #7 device_t::start() /home/notroot/trunk/src/emu/device.c:409:2 (mess64d+0x000003ed7fa6)
    #8 running_machine::start_all_devices() /home/notroot/trunk/src/emu/machine.c:1105:6 (mess64d+0x000003fc6d42)
    #9 coco_state::device_start() /home/notroot/trunk/src/mess/machine/coco.c:121:2 (mess64d+0x000002429577)
    #10 coco12_state::device_start() /home/notroot/trunk/src/mess/machine/coco12.c:17:2 (mess64d+0x00000242dab9)
    #11 device_t::start() /home/notroot/trunk/src/emu/device.c:409:2 (mess64d+0x000003ed7fa6)
    #12 running_machine::start_all_devices() /home/notroot/trunk/src/emu/machine.c:1105:6 (mess64d+0x000003fc6d42)
    #13 running_machine::start() /home/notroot/trunk/src/emu/machine.c:287:2 (mess64d+0x000003fc5594)
    #14 running_machine::run(bool) /home/notroot/trunk/src/emu/machine.c:351:3 (mess64d+0x000003fc73d9)
    #15 machine_manager::execute() /home/notroot/trunk/src/emu/mame.c:222:11 (mess64d+0x000003fc2092)
    #16 cli_frontend::execute(int, char**) /home/notroot/trunk/src/emu/clifront.c:220:15 (mess64d+0x000003ec4d90)
    #17 main /home/notroot/trunk/src/osd/sdl/sdlmain.c:290:9 (mess64d+0x00000272caa0)

  Mutex M956 (0x7d0c00006e70) created at:
    #0 pthread_mutex_init /home/development/llvm/3.6.0/final/llvm.src/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:1082:3 (mess64d+0x000001223fc0)
    #1 osd_lock_alloc() /home/notroot/trunk/src/osd/modules/sync/sync_tc.c:118:2 (mess64d+0x0000046079e0)
    #2 render_primitive_list::render_primitive_list() /home/notroot/trunk/src/emu/render.c:230:11 (mess64d+0x00000401f090)
    #3 render_target::render_target(render_manager&, char const*, unsigned int) /home/notroot/trunk/src/emu/render.c:913:16 (mess64d+0x000004023831)
    #4 render_manager::target_alloc(char const*, unsigned int) /home/notroot/trunk/src/emu/render.c:2451:31 (mess64d+0x00000402df84)
    #5 sdl_window_info::window_init() /home/notroot/trunk/src/osd/sdl/window.c:737:13 (mess64d+0x0000027372d0)
    #6 sdl_osd_interface::video_init() /home/notroot/trunk/src/osd/sdl/video.c:116:7 (mess64d+0x000002732edd)
    #7 osd_common_t::init_subsystems() /home/notroot/trunk/src/osd/modules/lib/osdobj_common.c:513:7 (mess64d+0x00000273b0d3)
    #8 sdl_osd_interface::init(running_machine&) /home/notroot/trunk/src/osd/sdl/sdlmain.c:611:2 (mess64d+0x00000272d64c)
    #9 running_machine::start() /home/notroot/trunk/src/emu/machine.c:231:2 (mess64d+0x000003fc4e04)
    #10 running_machine::run(bool) /home/notroot/trunk/src/emu/machine.c:351:3 (mess64d+0x000003fc73d9)
    #11 machine_manager::execute() /home/notroot/trunk/src/emu/mame.c:222:11 (mess64d+0x000003fc2092)
    #12 cli_frontend::execute(int, char**) /home/notroot/trunk/src/emu/clifront.c:220:15 (mess64d+0x000003ec4d90)
    #13 main /home/notroot/trunk/src/osd/sdl/sdlmain.c:290:9 (mess64d+0x00000272caa0)

  Thread T10 (tid=14250, running) created by main thread at:
    #0 pthread_create /home/development/llvm/3.6.0/final/llvm.src/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:896:3 (mess64d+0x000001222b91)
    #1 osd_thread_create(void* (*)(void*), void*) /home/notroot/trunk/src/osd/modules/sync/sync_tc.c:320:7 (mess64d+0x000004607efd)
    #2 osd_work_queue_alloc(int) /home/notroot/trunk/src/osd/modules/sync/work_osd.c:241:20 (mess64d+0x000004608d5a)
    #3 sdl_osd_interface::window_init() /home/notroot/trunk/src/osd/sdl/window.c:218:16 (mess64d+0x000002734b99)
    #4 sdl_osd_interface::video_init() /home/notroot/trunk/src/osd/sdl/video.c:103:7 (mess64d+0x000002732b6f)
    #5 osd_common_t::init_subsystems() /home/notroot/trunk/src/osd/modules/lib/osdobj_common.c:513:7 (mess64d+0x00000273b0d3)
    #6 sdl_osd_interface::init(running_machine&) /home/notroot/trunk/src/osd/sdl/sdlmain.c:611:2 (mess64d+0x00000272d64c)
    #7 running_machine::start() /home/notroot/trunk/src/emu/machine.c:231:2 (mess64d+0x000003fc4e04)
    #8 running_machine::run(bool) /home/notroot/trunk/src/emu/machine.c:351:3 (mess64d+0x000003fc73d9)
    #9 machine_manager::execute() /home/notroot/trunk/src/emu/mame.c:222:11 (mess64d+0x000003fc2092)
    #10 cli_frontend::execute(int, char**) /home/notroot/trunk/src/emu/clifront.c:220:15 (mess64d+0x000003ec4d90)
    #11 main /home/notroot/trunk/src/osd/sdl/sdlmain.c:290:9 (mess64d+0x00000272caa0)

SUMMARY: ThreadSanitizer: data race /home/notroot/trunk/src/emu/video/mc6847.h:169 void mc6847_friend_device::character_map::emit_character<1>(unsigned char, unsigned char const*, int, unsigned int*, int, unsigned int const*)
==================
==================
WARNING: ThreadSanitizer: data race (pid=14238)
  Write of size 8 at 0x7f2744d1bd90 by main thread:
    #0 void mc6847_friend_device::character_map::emit_character<1>(unsigned char, unsigned char const*, int, unsigned int*, int, unsigned int const*) /home/notroot/trunk/src/emu/video/mc6847.h:169:7 (mess64d+0x000003a38079)
    #1 unsigned int mc6847_friend_device::emit_mc6847_samples<1>(unsigned char, unsigned char const*, int, unsigned int*, unsigned int const*, device_delegate<unsigned char (unsigned char, int)>, int, int) /home/notroot/trunk/src/emu/video/mc6847.h:461 (mess64d+0x000003a38079)
    #2 mc6847_base_device::screen_update(screen_device&, bitmap_rgb32&, rectangle const&) /home/notroot/trunk/src/emu/video/mc6847.c:854:14 (mess64d+0x000003a34ecd)
    #3 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:653:78 (mess64d+0x000004069dd1)
    #4 screen_device::update_partial(int) /home/notroot/trunk/src/emu/screen.c:625 (mess64d+0x000004069dd1)
    #5 video_manager::finish_screen_updates() /home/notroot/trunk/src/emu/video.c:654:3 (mess64d+0x0000040ca83c)
    #6 video_manager::frame_update(bool) /home/notroot/trunk/src/emu/video.c:207:27 (mess64d+0x0000040ca257)
    #7 screen_device::vblank_begin() /home/notroot/trunk/src/emu/screen.c:822:3 (mess64d+0x000004069676)
    #8 screen_device::device_timer(emu_timer&, unsigned int, int, void*) /home/notroot/trunk/src/emu/screen.c:404:4 (mess64d+0x00000406946d)
    #9 device_t::timer_expired(emu_timer&, unsigned int, int, void*) /home/notroot/trunk/src/emu/device.h:191:83 (mess64d+0x000004063d2c)
    #10 device_scheduler::execute_timers() /home/notroot/trunk/src/emu/schedule.c:900 (mess64d+0x000004063d2c)
    #11 device_scheduler::timeslice() /home/notroot/trunk/src/emu/schedule.c:515:2 (mess64d+0x000004061974)
    #12 running_machine::run(bool) /home/notroot/trunk/src/emu/machine.c:397:5 (mess64d+0x000003fc7618)
    #13 device_t::start() /home/notroot/trunk/src/emu/device.c:409:2 (mess64d+0x000003ed7fa6)
    #14 running_machine::start_all_devices() /home/notroot/trunk/src/emu/machine.c:1105:6 (mess64d+0x000003fc6d42)
    #15 device_mixer_interface::interface_pre_start() /home/notroot/trunk/src/emu/disound.c:406:2 (mess64d+0x000003eef607)
    #16 device_t::start() /home/notroot/trunk/src/emu/device.c:403:3 (mess64d+0x000003ed7f60)
    #17 running_machine::start_all_devices() /home/notroot/trunk/src/emu/machine.c:1105:6 (mess64d+0x000003fc6d42)
    #18 coco_state::device_start() /home/notroot/trunk/src/mess/machine/coco.c:121:2 (mess64d+0x000002429577)
    #19 coco12_state::device_start() /home/notroot/trunk/src/mess/machine/coco12.c:17:2 (mess64d+0x00000242dab9)
    #20 device_t::start() /home/notroot/trunk/src/emu/device.c:409:2 (mess64d+0x000003ed7fa6)
    #21 running_machine::start_all_devices() /home/notroot/trunk/src/emu/machine.c:1105:6 (mess64d+0x000003fc6d42)
    #22 running_machine::start() /home/notroot/trunk/src/emu/machine.c:287:2 (mess64d+0x000003fc5594)
    #23 running_machine::run(bool) /home/notroot/trunk/src/emu/machine.c:351:3 (mess64d+0x000003fc73d9)
    #24 machine_manager::execute() /home/notroot/trunk/src/emu/mame.c:222:11 (mess64d+0x000003fc2092)
    #25 cli_frontend::execute(int, char**) /home/notroot/trunk/src/emu/clifront.c:220:15 (mess64d+0x000003ec4d90)
    #26 main /home/notroot/trunk/src/osd/sdl/sdlmain.c:290:9 (mess64d+0x00000272caa0)

  Previous read of size 4 at 0x7f2744d1bd90 by thread T10 (mutexes: write M956):
    #0 software_renderer<unsigned int, 0, 0, 0, 16, 8, 0, false, false>::get_texel_rgb32(render_texinfo const&, int, int) /home/notroot/trunk/src/emu/rendersw.inc:290:11 (mess64d+0x00000275f979)
    #1 software_renderer<unsigned int, 0, 0, 0, 16, 8, 0, false, false>::draw_quad_rgb32(render_primitive const&, unsigned int*, unsigned int, software_renderer<unsigned int, 0, 0, 0, 16, 8, 0, false, false>::quad_setup_data&) /home/notroot/trunk/src/emu/rendersw.inc:1108 (mess64d+0x00000275f979)
    #2 software_renderer<unsigned int, 0, 0, 0, 16, 8, 0, false, false>::setup_and_draw_textured_quad(render_primitive const&, unsigned int*, int, int, unsigned int) /home/notroot/trunk/src/emu/rendersw.inc:1886:5 (mess64d+0x00000275c10d)
    #3 software_renderer<unsigned int, 0, 0, 0, 16, 8, 0, false, false>::draw_primitives(render_primitive_list const&, void*, unsigned int, unsigned int, unsigned int) /home/notroot/trunk/src/emu/rendersw.inc:1936:7 (mess64d+0x000002741e7a)
    #4 sdl_info::draw(int) /home/notroot/trunk/src/osd/modules/render/drawsdl.c:743:5 (mess64d+0x0000027410cc)
    #5 sdl_window_info::draw_video_contents_wt(void*, int) /home/notroot/trunk/src/osd/sdl/window.c:1373:4 (mess64d+0x000002738220)
    #6 worker_thread_process(osd_work_queue*, work_thread_info*) /home/notroot/trunk/src/osd/modules/sync/work_osd.c:744:21 (mess64d+0x00000460960b)
    #7 worker_thread_entry(void*) /home/notroot/trunk/src/osd/modules/sync/work_osd.c:668:4 (mess64d+0x000004608f7b)

  Location is heap block of size 311167 at 0x7f2744d14000 allocated by main thread:
    #0 malloc /home/development/llvm/3.6.0/final/llvm.src/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:495:5 (mess64d+0x00000121ecdd)
    #1 osd_malloc_array(unsigned long) /home/notroot/trunk/src/osd/modules/lib/osdlib_unix.c:89:9 (mess64d+0x000004607709)
    #2 malloc_file_line(unsigned long, char const*, int, bool, bool, bool) /home/notroot/trunk/src/lib/util/corealloc.c:112:25 (mess64d+0x00000420e0aa)
    #3 operator new[](unsigned long) /home/notroot/trunk/src/lib/util/corealloc.h:64:97 (mess64d+0x0000041ef18a)
    #4 bitmap_t::allocate(int, int, int, int) /home/notroot/trunk/src/lib/util/bitmap.c:151 (mess64d+0x0000041ef18a)
    #5 screen_device::register_screen_bitmap(bitmap_t&) /home/notroot/trunk/src/emu/screen.c:803:2 (mess64d+0x000004067994)
    #6 screen_device::device_start() /home/notroot/trunk/src/emu/screen.c:294:3 (mess64d+0x000004066651)
    #7 device_t::start() /home/notroot/trunk/src/emu/device.c:409:2 (mess64d+0x000003ed7fa6)
    #8 running_machine::start_all_devices() /home/notroot/trunk/src/emu/machine.c:1105:6 (mess64d+0x000003fc6d42)
    #9 coco_state::device_start() /home/notroot/trunk/src/mess/machine/coco.c:121:2 (mess64d+0x000002429577)
    #10 coco12_state::device_start() /home/notroot/trunk/src/mess/machine/coco12.c:17:2 (mess64d+0x00000242dab9)
    #11 device_t::start() /home/notroot/trunk/src/emu/device.c:409:2 (mess64d+0x000003ed7fa6)
    #12 running_machine::start_all_devices() /home/notroot/trunk/src/emu/machine.c:1105:6 (mess64d+0x000003fc6d42)
    #13 running_machine::start() /home/notroot/trunk/src/emu/machine.c:287:2 (mess64d+0x000003fc5594)
    #14 running_machine::run(bool) /home/notroot/trunk/src/emu/machine.c:351:3 (mess64d+0x000003fc73d9)
    #15 machine_manager::execute() /home/notroot/trunk/src/emu/mame.c:222:11 (mess64d+0x000003fc2092)
    #16 cli_frontend::execute(int, char**) /home/notroot/trunk/src/emu/clifront.c:220:15 (mess64d+0x000003ec4d90)
    #17 main /home/notroot/trunk/src/osd/sdl/sdlmain.c:290:9 (mess64d+0x00000272caa0)

  Mutex M956 (0x7d0c00006e70) created at:
    #0 pthread_mutex_init /home/development/llvm/3.6.0/final/llvm.src/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:1082:3 (mess64d+0x000001223fc0)
    #1 osd_lock_alloc() /home/notroot/trunk/src/osd/modules/sync/sync_tc.c:118:2 (mess64d+0x0000046079e0)
    #2 render_primitive_list::render_primitive_list() /home/notroot/trunk/src/emu/render.c:230:11 (mess64d+0x00000401f090)
    #3 render_target::render_target(render_manager&, char const*, unsigned int) /home/notroot/trunk/src/emu/render.c:913:16 (mess64d+0x000004023831)
    #4 render_manager::target_alloc(char const*, unsigned int) /home/notroot/trunk/src/emu/render.c:2451:31 (mess64d+0x00000402df84)
    #5 sdl_window_info::window_init() /home/notroot/trunk/src/osd/sdl/window.c:737:13 (mess64d+0x0000027372d0)
    #6 sdl_osd_interface::video_init() /home/notroot/trunk/src/osd/sdl/video.c:116:7 (mess64d+0x000002732edd)
    #7 osd_common_t::init_subsystems() /home/notroot/trunk/src/osd/modules/lib/osdobj_common.c:513:7 (mess64d+0x00000273b0d3)
    #8 sdl_osd_interface::init(running_machine&) /home/notroot/trunk/src/osd/sdl/sdlmain.c:611:2 (mess64d+0x00000272d64c)
    #9 running_machine::start() /home/notroot/trunk/src/emu/machine.c:231:2 (mess64d+0x000003fc4e04)
    #10 running_machine::run(bool) /home/notroot/trunk/src/emu/machine.c:351:3 (mess64d+0x000003fc73d9)
    #11 machine_manager::execute() /home/notroot/trunk/src/emu/mame.c:222:11 (mess64d+0x000003fc2092)
    #12 cli_frontend::execute(int, char**) /home/notroot/trunk/src/emu/clifront.c:220:15 (mess64d+0x000003ec4d90)
    #13 main /home/notroot/trunk/src/osd/sdl/sdlmain.c:290:9 (mess64d+0x00000272caa0)

  Thread T10 (tid=14250, running) created by main thread at:
    #0 pthread_create /home/development/llvm/3.6.0/final/llvm.src/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:896:3 (mess64d+0x000001222b91)
    #1 osd_thread_create(void* (*)(void*), void*) /home/notroot/trunk/src/osd/modules/sync/sync_tc.c:320:7 (mess64d+0x000004607efd)
    #2 osd_work_queue_alloc(int) /home/notroot/trunk/src/osd/modules/sync/work_osd.c:241:20 (mess64d+0x000004608d5a)
    #3 sdl_osd_interface::window_init() /home/notroot/trunk/src/osd/sdl/window.c:218:16 (mess64d+0x000002734b99)
    #4 sdl_osd_interface::video_init() /home/notroot/trunk/src/osd/sdl/video.c:103:7 (mess64d+0x000002732b6f)
    #5 osd_common_t::init_subsystems() /home/notroot/trunk/src/osd/modules/lib/osdobj_common.c:513:7 (mess64d+0x00000273b0d3)
    #6 sdl_osd_interface::init(running_machine&) /home/notroot/trunk/src/osd/sdl/sdlmain.c:611:2 (mess64d+0x00000272d64c)
    #7 running_machine::start() /home/notroot/trunk/src/emu/machine.c:231:2 (mess64d+0x000003fc4e04)
    #8 running_machine::run(bool) /home/notroot/trunk/src/emu/machine.c:351:3 (mess64d+0x000003fc73d9)
    #9 machine_manager::execute() /home/notroot/trunk/src/emu/mame.c:222:11 (mess64d+0x000003fc2092)
    #10 cli_frontend::execute(int, char**) /home/notroot/trunk/src/emu/clifront.c:220:15 (mess64d+0x000003ec4d90)
    #11 main /home/notroot/trunk/src/osd/sdl/sdlmain.c:290:9 (mess64d+0x00000272caa0)

SUMMARY: ThreadSanitizer: data race /home/notroot/trunk/src/emu/video/mc6847.h:169 void mc6847_friend_device::character_map::emit_character<1>(unsigned char, unsigned char const*, int, unsigned int*, int, unsigned int const*)
==================
==================
WARNING: ThreadSanitizer: data race (pid=14238)
  Write of size 4 at 0x7f2744d1c180 by main thread:
    #0 mc6847_base_device::screen_update(screen_device&, bitmap_rgb32&, rectangle const&) /home/notroot/trunk/src/emu/video/mc6847.c:871:5 (mess64d+0x000003a34fd7)
    #1 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:653:78 (mess64d+0x000004069dd1)
    #2 screen_device::update_partial(int) /home/notroot/trunk/src/emu/screen.c:625 (mess64d+0x000004069dd1)
    #3 video_manager::finish_screen_updates() /home/notroot/trunk/src/emu/video.c:654:3 (mess64d+0x0000040ca83c)
    #4 video_manager::frame_update(bool) /home/notroot/trunk/src/emu/video.c:207:27 (mess64d+0x0000040ca257)
    #5 screen_device::vblank_begin() /home/notroot/trunk/src/emu/screen.c:822:3 (mess64d+0x000004069676)
    #6 screen_device::device_timer(emu_timer&, unsigned int, int, void*) /home/notroot/trunk/src/emu/screen.c:404:4 (mess64d+0x00000406946d)
    #7 device_t::timer_expired(emu_timer&, unsigned int, int, void*) /home/notroot/trunk/src/emu/device.h:191:83 (mess64d+0x000004063d2c)
    #8 device_scheduler::execute_timers() /home/notroot/trunk/src/emu/schedule.c:900 (mess64d+0x000004063d2c)
    #9 device_scheduler::timeslice() /home/notroot/trunk/src/emu/schedule.c:515:2 (mess64d+0x000004061974)
    #10 running_machine::run(bool) /home/notroot/trunk/src/emu/machine.c:397:5 (mess64d+0x000003fc7618)
    #11 device_t::start() /home/notroot/trunk/src/emu/device.c:409:2 (mess64d+0x000003ed7fa6)
    #12 running_machine::start_all_devices() /home/notroot/trunk/src/emu/machine.c:1105:6 (mess64d+0x000003fc6d42)
    #13 device_mixer_interface::interface_pre_start() /home/notroot/trunk/src/emu/disound.c:406:2 (mess64d+0x000003eef607)
    #14 device_t::start() /home/notroot/trunk/src/emu/device.c:403:3 (mess64d+0x000003ed7f60)
    #15 running_machine::start_all_devices() /home/notroot/trunk/src/emu/machine.c:1105:6 (mess64d+0x000003fc6d42)
    #16 coco_state::device_start() /home/notroot/trunk/src/mess/machine/coco.c:121:2 (mess64d+0x000002429577)
    #17 coco12_state::device_start() /home/notroot/trunk/src/mess/machine/coco12.c:17:2 (mess64d+0x00000242dab9)
    #18 device_t::start() /home/notroot/trunk/src/emu/device.c:409:2 (mess64d+0x000003ed7fa6)
    #19 running_machine::start_all_devices() /home/notroot/trunk/src/emu/machine.c:1105:6 (mess64d+0x000003fc6d42)
    #20 running_machine::start() /home/notroot/trunk/src/emu/machine.c:287:2 (mess64d+0x000003fc5594)
    #21 running_machine::run(bool) /home/notroot/trunk/src/emu/machine.c:351:3 (mess64d+0x000003fc73d9)
    #22 machine_manager::execute() /home/notroot/trunk/src/emu/mame.c:222:11 (mess64d+0x000003fc2092)
    #23 cli_frontend::execute(int, char**) /home/notroot/trunk/src/emu/clifront.c:220:15 (mess64d+0x000003ec4d90)
    #24 main /home/notroot/trunk/src/osd/sdl/sdlmain.c:290:9 (mess64d+0x00000272caa0)

  Previous read of size 4 at 0x7f2744d1c180 by thread T10 (mutexes: write M956):
    #0 software_renderer<unsigned int, 0, 0, 0, 16, 8, 0, false, false>::get_texel_rgb32(render_texinfo const&, int, int) /home/notroot/trunk/src/emu/rendersw.inc:290:11 (mess64d+0x00000275f979)
    #1 software_renderer<unsigned int, 0, 0, 0, 16, 8, 0, false, false>::draw_quad_rgb32(render_primitive const&, unsigned int*, unsigned int, software_renderer<unsigned int, 0, 0, 0, 16, 8, 0, false, false>::quad_setup_data&) /home/notroot/trunk/src/emu/rendersw.inc:1108 (mess64d+0x00000275f979)
    #2 software_renderer<unsigned int, 0, 0, 0, 16, 8, 0, false, false>::setup_and_draw_textured_quad(render_primitive const&, unsigned int*, int, int, unsigned int) /home/notroot/trunk/src/emu/rendersw.inc:1886:5 (mess64d+0x00000275c10d)
    #3 software_renderer<unsigned int, 0, 0, 0, 16, 8, 0, false, false>::draw_primitives(render_primitive_list const&, void*, unsigned int, unsigned int, unsigned int) /home/notroot/trunk/src/emu/rendersw.inc:1936:7 (mess64d+0x000002741e7a)
    #4 sdl_info::draw(int) /home/notroot/trunk/src/osd/modules/render/drawsdl.c:743:5 (mess64d+0x0000027410cc)
    #5 sdl_window_info::draw_video_contents_wt(void*, int) /home/notroot/trunk/src/osd/sdl/window.c:1373:4 (mess64d+0x000002738220)
    #6 worker_thread_process(osd_work_queue*, work_thread_info*) /home/notroot/trunk/src/osd/modules/sync/work_osd.c:744:21 (mess64d+0x00000460960b)
    #7 worker_thread_entry(void*) /home/notroot/trunk/src/osd/modules/sync/work_osd.c:668:4 (mess64d+0x000004608f7b)

  Location is heap block of size 311167 at 0x7f2744d14000 allocated by main thread:
    #0 malloc /home/development/llvm/3.6.0/final/llvm.src/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:495:5 (mess64d+0x00000121ecdd)
    #1 osd_malloc_array(unsigned long) /home/notroot/trunk/src/osd/modules/lib/osdlib_unix.c:89:9 (mess64d+0x000004607709)
    #2 malloc_file_line(unsigned long, char const*, int, bool, bool, bool) /home/notroot/trunk/src/lib/util/corealloc.c:112:25 (mess64d+0x00000420e0aa)
    #3 operator new[](unsigned long) /home/notroot/trunk/src/lib/util/corealloc.h:64:97 (mess64d+0x0000041ef18a)
    #4 bitmap_t::allocate(int, int, int, int) /home/notroot/trunk/src/lib/util/bitmap.c:151 (mess64d+0x0000041ef18a)
    #5 screen_device::register_screen_bitmap(bitmap_t&) /home/notroot/trunk/src/emu/screen.c:803:2 (mess64d+0x000004067994)
    #6 screen_device::device_start() /home/notroot/trunk/src/emu/screen.c:294:3 (mess64d+0x000004066651)
    #7 device_t::start() /home/notroot/trunk/src/emu/device.c:409:2 (mess64d+0x000003ed7fa6)
    #8 running_machine::start_all_devices() /home/notroot/trunk/src/emu/machine.c:1105:6 (mess64d+0x000003fc6d42)
    #9 coco_state::device_start() /home/notroot/trunk/src/mess/machine/coco.c:121:2 (mess64d+0x000002429577)
    #10 coco12_state::device_start() /home/notroot/trunk/src/mess/machine/coco12.c:17:2 (mess64d+0x00000242dab9)
    #11 device_t::start() /home/notroot/trunk/src/emu/device.c:409:2 (mess64d+0x000003ed7fa6)
    #12 running_machine::start_all_devices() /home/notroot/trunk/src/emu/machine.c:1105:6 (mess64d+0x000003fc6d42)
    #13 running_machine::start() /home/notroot/trunk/src/emu/machine.c:287:2 (mess64d+0x000003fc5594)
    #14 running_machine::run(bool) /home/notroot/trunk/src/emu/machine.c:351:3 (mess64d+0x000003fc73d9)
    #15 machine_manager::execute() /home/notroot/trunk/src/emu/mame.c:222:11 (mess64d+0x000003fc2092)
    #16 cli_frontend::execute(int, char**) /home/notroot/trunk/src/emu/clifront.c:220:15 (mess64d+0x000003ec4d90)
    #17 main /home/notroot/trunk/src/osd/sdl/sdlmain.c:290:9 (mess64d+0x00000272caa0)

  Mutex M956 (0x7d0c00006e70) created at:
    #0 pthread_mutex_init /home/development/llvm/3.6.0/final/llvm.src/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:1082:3 (mess64d+0x000001223fc0)
    #1 osd_lock_alloc() /home/notroot/trunk/src/osd/modules/sync/sync_tc.c:118:2 (mess64d+0x0000046079e0)
    #2 render_primitive_list::render_primitive_list() /home/notroot/trunk/src/emu/render.c:230:11 (mess64d+0x00000401f090)
    #3 render_target::render_target(render_manager&, char const*, unsigned int) /home/notroot/trunk/src/emu/render.c:913:16 (mess64d+0x000004023831)
    #4 render_manager::target_alloc(char const*, unsigned int) /home/notroot/trunk/src/emu/render.c:2451:31 (mess64d+0x00000402df84)
    #5 sdl_window_info::window_init() /home/notroot/trunk/src/osd/sdl/window.c:737:13 (mess64d+0x0000027372d0)
    #6 sdl_osd_interface::video_init() /home/notroot/trunk/src/osd/sdl/video.c:116:7 (mess64d+0x000002732edd)
    #7 osd_common_t::init_subsystems() /home/notroot/trunk/src/osd/modules/lib/osdobj_common.c:513:7 (mess64d+0x00000273b0d3)
    #8 sdl_osd_interface::init(running_machine&) /home/notroot/trunk/src/osd/sdl/sdlmain.c:611:2 (mess64d+0x00000272d64c)
    #9 running_machine::start() /home/notroot/trunk/src/emu/machine.c:231:2 (mess64d+0x000003fc4e04)
    #10 running_machine::run(bool) /home/notroot/trunk/src/emu/machine.c:351:3 (mess64d+0x000003fc73d9)
    #11 machine_manager::execute() /home/notroot/trunk/src/emu/mame.c:222:11 (mess64d+0x000003fc2092)
    #12 cli_frontend::execute(int, char**) /home/notroot/trunk/src/emu/clifront.c:220:15 (mess64d+0x000003ec4d90)
    #13 main /home/notroot/trunk/src/osd/sdl/sdlmain.c:290:9 (mess64d+0x00000272caa0)

  Thread T10 (tid=14250, running) created by main thread at:
    #0 pthread_create /home/development/llvm/3.6.0/final/llvm.src/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:896:3 (mess64d+0x000001222b91)
    #1 osd_thread_create(void* (*)(void*), void*) /home/notroot/trunk/src/osd/modules/sync/sync_tc.c:320:7 (mess64d+0x000004607efd)
    #2 osd_work_queue_alloc(int) /home/notroot/trunk/src/osd/modules/sync/work_osd.c:241:20 (mess64d+0x000004608d5a)
    #3 sdl_osd_interface::window_init() /home/notroot/trunk/src/osd/sdl/window.c:218:16 (mess64d+0x000002734b99)
    #4 sdl_osd_interface::video_init() /home/notroot/trunk/src/osd/sdl/video.c:103:7 (mess64d+0x000002732b6f)
    #5 osd_common_t::init_subsystems() /home/notroot/trunk/src/osd/modules/lib/osdobj_common.c:513:7 (mess64d+0x00000273b0d3)
    #6 sdl_osd_interface::init(running_machine&) /home/notroot/trunk/src/osd/sdl/sdlmain.c:611:2 (mess64d+0x00000272d64c)
    #7 running_machine::start() /home/notroot/trunk/src/emu/machine.c:231:2 (mess64d+0x000003fc4e04)
    #8 running_machine::run(bool) /home/notroot/trunk/src/emu/machine.c:351:3 (mess64d+0x000003fc73d9)
    #9 machine_manager::execute() /home/notroot/trunk/src/emu/mame.c:222:11 (mess64d+0x000003fc2092)
    #10 cli_frontend::execute(int, char**) /home/notroot/trunk/src/emu/clifront.c:220:15 (mess64d+0x000003ec4d90)
    #11 main /home/notroot/trunk/src/osd/sdl/sdlmain.c:290:9 (mess64d+0x00000272caa0)

SUMMARY: ThreadSanitizer: data race /home/notroot/trunk/src/emu/video/mc6847.c:871 mc6847_base_device::screen_update(screen_device&, bitmap_rgb32&, rectangle const&)
==================
==================
WARNING: ThreadSanitizer: data race (pid=14238)
  Write of size 4 at 0x7f2744d57d00 by main thread:
    #0 mc6847_base_device::screen_update(screen_device&, bitmap_rgb32&, rectangle const&) /home/notroot/trunk/src/emu/video/mc6847.c:883:5 (mess64d+0x000003a35511)
    #1 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:653:78 (mess64d+0x000004069dd1)
    #2 screen_device::update_partial(int) /home/notroot/trunk/src/emu/screen.c:625 (mess64d+0x000004069dd1)
    #3 video_manager::finish_screen_updates() /home/notroot/trunk/src/emu/video.c:654:3 (mess64d+0x0000040ca83c)
    #4 video_manager::frame_update(bool) /home/notroot/trunk/src/emu/video.c:207:27 (mess64d+0x0000040ca257)
    #5 screen_device::vblank_begin() /home/notroot/trunk/src/emu/screen.c:822:3 (mess64d+0x000004069676)
    #6 screen_device::device_timer(emu_timer&, unsigned int, int, void*) /home/notroot/trunk/src/emu/screen.c:404:4 (mess64d+0x00000406946d)
    #7 device_t::timer_expired(emu_timer&, unsigned int, int, void*) /home/notroot/trunk/src/emu/device.h:191:83 (mess64d+0x000004063d2c)
    #8 device_scheduler::execute_timers() /home/notroot/trunk/src/emu/schedule.c:900 (mess64d+0x000004063d2c)
    #9 device_scheduler::timeslice() /home/notroot/trunk/src/emu/schedule.c:515:2 (mess64d+0x000004061974)
    #10 running_machine::run(bool) /home/notroot/trunk/src/emu/machine.c:397:5 (mess64d+0x000003fc7618)
    #11 device_t::start() /home/notroot/trunk/src/emu/device.c:409:2 (mess64d+0x000003ed7fa6)
    #12 running_machine::start_all_devices() /home/notroot/trunk/src/emu/machine.c:1105:6 (mess64d+0x000003fc6d42)
    #13 device_mixer_interface::interface_pre_start() /home/notroot/trunk/src/emu/disound.c:406:2 (mess64d+0x000003eef607)
    #14 device_t::start() /home/notroot/trunk/src/emu/device.c:403:3 (mess64d+0x000003ed7f60)
    #15 running_machine::start_all_devices() /home/notroot/trunk/src/emu/machine.c:1105:6 (mess64d+0x000003fc6d42)
    #16 coco_state::device_start() /home/notroot/trunk/src/mess/machine/coco.c:121:2 (mess64d+0x000002429577)
    #17 coco12_state::device_start() /home/notroot/trunk/src/mess/machine/coco12.c:17:2 (mess64d+0x00000242dab9)
    #18 device_t::start() /home/notroot/trunk/src/emu/device.c:409:2 (mess64d+0x000003ed7fa6)
    #19 running_machine::start_all_devices() /home/notroot/trunk/src/emu/machine.c:1105:6 (mess64d+0x000003fc6d42)
    #20 running_machine::start() /home/notroot/trunk/src/emu/machine.c:287:2 (mess64d+0x000003fc5594)
    #21 running_machine::run(bool) /home/notroot/trunk/src/emu/machine.c:351:3 (mess64d+0x000003fc73d9)
    #22 machine_manager::execute() /home/notroot/trunk/src/emu/mame.c:222:11 (mess64d+0x000003fc2092)
    #23 cli_frontend::execute(int, char**) /home/notroot/trunk/src/emu/clifront.c:220:15 (mess64d+0x000003ec4d90)
    #24 main /home/notroot/trunk/src/osd/sdl/sdlmain.c:290:9 (mess64d+0x00000272caa0)

  Previous read of size 4 at 0x7f2744d57d00 by thread T10 (mutexes: write M956):
    #0 software_renderer<unsigned int, 0, 0, 0, 16, 8, 0, false, false>::get_texel_rgb32(render_texinfo const&, int, int) /home/notroot/trunk/src/emu/rendersw.inc:290:11 (mess64d+0x00000275f979)
    #1 software_renderer<unsigned int, 0, 0, 0, 16, 8, 0, false, false>::draw_quad_rgb32(render_primitive const&, unsigned int*, unsigned int, software_renderer<unsigned int, 0, 0, 0, 16, 8, 0, false, false>::quad_setup_data&) /home/notroot/trunk/src/emu/rendersw.inc:1108 (mess64d+0x00000275f979)
    #2 software_renderer<unsigned int, 0, 0, 0, 16, 8, 0, false, false>::setup_and_draw_textured_quad(render_primitive const&, unsigned int*, int, int, unsigned int) /home/notroot/trunk/src/emu/rendersw.inc:1886:5 (mess64d+0x00000275c10d)
    #3 software_renderer<unsigned int, 0, 0, 0, 16, 8, 0, false, false>::draw_primitives(render_primitive_list const&, void*, unsigned int, unsigned int, unsigned int) /home/notroot/trunk/src/emu/rendersw.inc:1936:7 (mess64d+0x000002741e7a)
    #4 sdl_info::draw(int) /home/notroot/trunk/src/osd/modules/render/drawsdl.c:743:5 (mess64d+0x0000027410cc)
    #5 sdl_window_info::draw_video_contents_wt(void*, int) /home/notroot/trunk/src/osd/sdl/window.c:1373:4 (mess64d+0x000002738220)
    #6 worker_thread_process(osd_work_queue*, work_thread_info*) /home/notroot/trunk/src/osd/modules/sync/work_osd.c:744:21 (mess64d+0x00000460960b)
    #7 worker_thread_entry(void*) /home/notroot/trunk/src/osd/modules/sync/work_osd.c:668:4 (mess64d+0x000004608f7b)

  Location is heap block of size 311167 at 0x7f2744d14000 allocated by main thread:
    #0 malloc /home/development/llvm/3.6.0/final/llvm.src/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:495:5 (mess64d+0x00000121ecdd)
    #1 osd_malloc_array(unsigned long) /home/notroot/trunk/src/osd/modules/lib/osdlib_unix.c:89:9 (mess64d+0x000004607709)
    #2 malloc_file_line(unsigned long, char const*, int, bool, bool, bool) /home/notroot/trunk/src/lib/util/corealloc.c:112:25 (mess64d+0x00000420e0aa)
    #3 operator new[](unsigned long) /home/notroot/trunk/src/lib/util/corealloc.h:64:97 (mess64d+0x0000041ef18a)
    #4 bitmap_t::allocate(int, int, int, int) /home/notroot/trunk/src/lib/util/bitmap.c:151 (mess64d+0x0000041ef18a)
    #5 screen_device::register_screen_bitmap(bitmap_t&) /home/notroot/trunk/src/emu/screen.c:803:2 (mess64d+0x000004067994)
    #6 screen_device::device_start() /home/notroot/trunk/src/emu/screen.c:294:3 (mess64d+0x000004066651)
    #7 device_t::start() /home/notroot/trunk/src/emu/device.c:409:2 (mess64d+0x000003ed7fa6)
    #8 running_machine::start_all_devices() /home/notroot/trunk/src/emu/machine.c:1105:6 (mess64d+0x000003fc6d42)
    #9 coco_state::device_start() /home/notroot/trunk/src/mess/machine/coco.c:121:2 (mess64d+0x000002429577)
    #10 coco12_state::device_start() /home/notroot/trunk/src/mess/machine/coco12.c:17:2 (mess64d+0x00000242dab9)
    #11 device_t::start() /home/notroot/trunk/src/emu/device.c:409:2 (mess64d+0x000003ed7fa6)
    #12 running_machine::start_all_devices() /home/notroot/trunk/src/emu/machine.c:1105:6 (mess64d+0x000003fc6d42)
    #13 running_machine::start() /home/notroot/trunk/src/emu/machine.c:287:2 (mess64d+0x000003fc5594)
    #14 running_machine::run(bool) /home/notroot/trunk/src/emu/machine.c:351:3 (mess64d+0x000003fc73d9)
    #15 machine_manager::execute() /home/notroot/trunk/src/emu/mame.c:222:11 (mess64d+0x000003fc2092)
    #16 cli_frontend::execute(int, char**) /home/notroot/trunk/src/emu/clifront.c:220:15 (mess64d+0x000003ec4d90)
    #17 main /home/notroot/trunk/src/osd/sdl/sdlmain.c:290:9 (mess64d+0x00000272caa0)

  Mutex M956 (0x7d0c00006e70) created at:
    #0 pthread_mutex_init /home/development/llvm/3.6.0/final/llvm.src/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:1082:3 (mess64d+0x000001223fc0)
    #1 osd_lock_alloc() /home/notroot/trunk/src/osd/modules/sync/sync_tc.c:118:2 (mess64d+0x0000046079e0)
    #2 render_primitive_list::render_primitive_list() /home/notroot/trunk/src/emu/render.c:230:11 (mess64d+0x00000401f090)
    #3 render_target::render_target(render_manager&, char const*, unsigned int) /home/notroot/trunk/src/emu/render.c:913:16 (mess64d+0x000004023831)
    #4 render_manager::target_alloc(char const*, unsigned int) /home/notroot/trunk/src/emu/render.c:2451:31 (mess64d+0x00000402df84)
    #5 sdl_window_info::window_init() /home/notroot/trunk/src/osd/sdl/window.c:737:13 (mess64d+0x0000027372d0)
    #6 sdl_osd_interface::video_init() /home/notroot/trunk/src/osd/sdl/video.c:116:7 (mess64d+0x000002732edd)
    #7 osd_common_t::init_subsystems() /home/notroot/trunk/src/osd/modules/lib/osdobj_common.c:513:7 (mess64d+0x00000273b0d3)
    #8 sdl_osd_interface::init(running_machine&) /home/notroot/trunk/src/osd/sdl/sdlmain.c:611:2 (mess64d+0x00000272d64c)
    #9 running_machine::start() /home/notroot/trunk/src/emu/machine.c:231:2 (mess64d+0x000003fc4e04)
    #10 running_machine::run(bool) /home/notroot/trunk/src/emu/machine.c:351:3 (mess64d+0x000003fc73d9)
    #11 machine_manager::execute() /home/notroot/trunk/src/emu/mame.c:222:11 (mess64d+0x000003fc2092)
    #12 cli_frontend::execute(int, char**) /home/notroot/trunk/src/emu/clifront.c:220:15 (mess64d+0x000003ec4d90)
    #13 main /home/notroot/trunk/src/osd/sdl/sdlmain.c:290:9 (mess64d+0x00000272caa0)

  Thread T10 (tid=14250, running) created by main thread at:
    #0 pthread_create /home/development/llvm/3.6.0/final/llvm.src/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:896:3 (mess64d+0x000001222b91)
    #1 osd_thread_create(void* (*)(void*), void*) /home/notroot/trunk/src/osd/modules/sync/sync_tc.c:320:7 (mess64d+0x000004607efd)
    #2 osd_work_queue_alloc(int) /home/notroot/trunk/src/osd/modules/sync/work_osd.c:241:20 (mess64d+0x000004608d5a)
    #3 sdl_osd_interface::window_init() /home/notroot/trunk/src/osd/sdl/window.c:218:16 (mess64d+0x000002734b99)
    #4 sdl_osd_interface::video_init() /home/notroot/trunk/src/osd/sdl/video.c:103:7 (mess64d+0x000002732b6f)
    #5 osd_common_t::init_subsystems() /home/notroot/trunk/src/osd/modules/lib/osdobj_common.c:513:7 (mess64d+0x00000273b0d3)
    #6 sdl_osd_interface::init(running_machine&) /home/notroot/trunk/src/osd/sdl/sdlmain.c:611:2 (mess64d+0x00000272d64c)
    #7 running_machine::start() /home/notroot/trunk/src/emu/machine.c:231:2 (mess64d+0x000003fc4e04)
    #8 running_machine::run(bool) /home/notroot/trunk/src/emu/machine.c:351:3 (mess64d+0x000003fc73d9)
    #9 machine_manager::execute() /home/notroot/trunk/src/emu/mame.c:222:11 (mess64d+0x000003fc2092)
    #10 cli_frontend::execute(int, char**) /home/notroot/trunk/src/emu/clifront.c:220:15 (mess64d+0x000003ec4d90)
    #11 main /home/notroot/trunk/src/osd/sdl/sdlmain.c:290:9 (mess64d+0x00000272caa0)

SUMMARY: ThreadSanitizer: data race /home/notroot/trunk/src/emu/video/mc6847.c:883 mc6847_base_device::screen_update(screen_device&, bitmap_rgb32&, rectangle const&)
==================
Steps To Reproduce
Additional Information
Flags
Regression Version
Affected Sets / Systems
Attached Files
 
Relationships
There are no relationsihp linked to this issue.
Notes
5
User avatar
No.11557
AWJ
Developer
Apr 1, 2015, 03:55
Can you check if other drivers that use UPDATE_HAS_NOT_CHANGED have similar race conditions? (grep the source to see which drivers those are... there aren't many)
User avatar
No.11558
Firewave
Senior Tester
Apr 1, 2015, 11:40
I don't think that's it.

I am also getting it with wwfmania which is midtunit.c:

WARNING: ThreadSanitizer: data race (pid=9467)
  Write of size 2 at 0x7f41cca3b0ca by main thread:
    #0 midtunit_state::scanline_update(screen_device&, bitmap_ind16&, int, tms34010_display_params const*) /home/notroot/trunk/src/mame/video/midtunit.c:822:3 (mame64d+0x000003bb325d)
    #1 delegate_base<void, screen_device&, bitmap_ind16&, int, tms34010_display_params const*, _noparam, _noparam, _noparam, _noparam, _noparam, _noparam, _noparam, _noparam>::operator()(screen_device&, bitmap_ind16&, int, tms34010_display_params const*) const /home/notroot/trunk/src/lib/util/delegate.h:654:90 (mame64d+0x00000613cb9b)
    #2 tms340x0_device::tms340x0_ind16(screen_device&, bitmap_ind16&, rectangle const&) /home/notroot/trunk/src/emu/cpu/tms34010/tms34010.c:1017 (mame64d+0x00000613cb9b)
    #3 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:653:78 (mame64d+0x000006c60431)
    #4 screen_device::update_partial(int) /home/notroot/trunk/src/emu/screen.c:625 (mame64d+0x000006c60431)
    #5 tms340x0_device::scanline_callback(void*, int) /home/notroot/trunk/src/emu/cpu/tms34010/tms34010.c:932:3 (mame64d+0x00000613b976)
    #6 delegate_base<void, void*, int, _noparam, _noparam, _noparam, _noparam, _noparam, _noparam, _noparam, _noparam, _noparam, _noparam>::operator()(void*, int) const /home/notroot/trunk/src/lib/util/delegate.h:652:66 (mame64d+0x000006c5a3eb)
    #7 device_scheduler::execute_timers() /home/notroot/trunk/src/emu/schedule.c:905 (mame64d+0x000006c5a3eb)
    #8 device_scheduler::timeslice() /home/notroot/trunk/src/emu/schedule.c:515:2 (mame64d+0x000006c57fd4)
    #9 running_machine::run(bool) /home/notroot/trunk/src/emu/machine.c:397:5 (mame64d+0x000006bbdc78)
    #10 device_mixer_interface::interface_pre_start() /home/notroot/trunk/src/emu/disound.c:406:2 (mame64d+0x000006ae4607)
    #11 device_t::start() /home/notroot/trunk/src/emu/device.c:403:3 (mame64d+0x000006acd660)
    #12 running_machine::start_all_devices() /home/notroot/trunk/src/emu/machine.c:1105:6 (mame64d+0x000006bbd3a2)
    #13 device_t::start() /home/notroot/trunk/src/emu/device.c:409:2 (mame64d+0x000006acd6a6)
    #14 running_machine::start_all_devices() /home/notroot/trunk/src/emu/machine.c:1105:6 (mame64d+0x000006bbd3a2)
    #15 device_t::start() /home/notroot/trunk/src/emu/device.c:403:3 (mame64d+0x000006acd660)
    #16 running_machine::start_all_devices() /home/notroot/trunk/src/emu/machine.c:1105:6 (mame64d+0x000006bbd3a2)
    #17 device_t::start() /home/notroot/trunk/src/emu/device.c:409:2 (mame64d+0x000006acd6a6)
    #18 running_machine::start_all_devices() /home/notroot/trunk/src/emu/machine.c:1105:6 (mame64d+0x000006bbd3a2)
    #19 running_machine::start() /home/notroot/trunk/src/emu/machine.c:287:2 (mame64d+0x000006bbbbf4)
    #20 running_machine::run(bool) /home/notroot/trunk/src/emu/machine.c:351:3 (mame64d+0x000006bbda39)
    #21 machine_manager::execute() /home/notroot/trunk/src/emu/mame.c:222:11 (mame64d+0x000006bb86f2)
    #22 cli_frontend::execute(int, char**) /home/notroot/trunk/src/emu/clifront.c:220:15 (mame64d+0x000006aba550)
    #23 main /home/notroot/trunk/src/osd/sdl/sdlmain.c:290:9 (mame64d+0x0000055b0b80)

  Previous read of size 2 at 0x7f41cca3b0ca by thread T2 (mutexes: write M110):
    #0 software_renderer<unsigned int, 0, 0, 0, 16, 8, 0, false, false>::get_texel_palette16(render_texinfo const&, int, int) /home/notroot/trunk/src/emu/rendersw.inc:157:19 (mame64d+0x0000055e0d5c)
    #1 software_renderer<unsigned int, 0, 0, 0, 16, 8, 0, false, false>::draw_quad_palette16_none(render_primitive const&, unsigned int*, unsigned int, software_renderer<unsigned int, 0, 0, 0, 16, 8, 0, false, false>::quad_setup_data&) /home/notroot/trunk/src/emu/rendersw.inc:640 (mame64d+0x0000055e0d5c)
    #2 software_renderer<unsigned int, 0, 0, 0, 16, 8, 0, false, false>::setup_and_draw_textured_quad(render_primitive const&, unsigned int*, int, int, unsigned int) /home/notroot/trunk/src/emu/rendersw.inc:1868:5 (mame64d+0x0000055e01e5)
    #3 software_renderer<unsigned int, 0, 0, 0, 16, 8, 0, false, false>::draw_primitives(render_primitive_list const&, void*, unsigned int, unsigned int, unsigned int) /home/notroot/trunk/src/emu/rendersw.inc:1936:7 (mame64d+0x0000055c5f8a)
    #4 sdl_info::draw(int) /home/notroot/trunk/src/osd/modules/render/drawsdl.c:743:5 (mame64d+0x0000055c51dc)
    #5 sdl_window_info::draw_video_contents_wt(void*, int) /home/notroot/trunk/src/osd/sdl/window.c:1373:4 (mame64d+0x0000055bc3e0)
    #6 worker_thread_process(osd_work_queue*, work_thread_info*) /home/notroot/trunk/src/osd/modules/sync/work_osd.c:744:21 (mame64d+0x00000720f15b)
    #7 worker_thread_entry(void*) /home/notroot/trunk/src/osd/modules/sync/work_osd.c:668:4 (mame64d+0x00000720eacb)

  Location is heap block of size 296063 at 0x7f41cca36000 allocated by main thread:
    #0 malloc /home/development/llvm/3.6.0/final/llvm.src/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:495:5 (mame64d+0x00000283f50d)
    #1 osd_malloc_array(unsigned long) /home/notroot/trunk/src/osd/modules/lib/osdlib_unix.c:89:9 (mame64d+0x00000720d259)
    #2 malloc_file_line(unsigned long, char const*, int, bool, bool, bool) /home/notroot/trunk/src/lib/util/corealloc.c:112:25 (mame64d+0x000006e44f4a)
    #3 operator new[](unsigned long) /home/notroot/trunk/src/lib/util/corealloc.h:64:97 (mame64d+0x000006e2602a)
    #4 bitmap_t::allocate(int, int, int, int) /home/notroot/trunk/src/lib/util/bitmap.c:151 (mame64d+0x000006e2602a)
    #5 screen_device::register_screen_bitmap(bitmap_t&) /home/notroot/trunk/src/emu/screen.c:803:2 (mame64d+0x000006c5dff4)
    #6 screen_device::device_start() /home/notroot/trunk/src/emu/screen.c:294:3 (mame64d+0x000006c5cda1)
    #7 device_t::start() /home/notroot/trunk/src/emu/device.c:409:2 (mame64d+0x000006acd6a6)
    #8 running_machine::start_all_devices() /home/notroot/trunk/src/emu/machine.c:1105:6 (mame64d+0x000006bbd3a2)
    #9 device_t::start() /home/notroot/trunk/src/emu/device.c:403:3 (mame64d+0x000006acd660)
    #10 running_machine::start_all_devices() /home/notroot/trunk/src/emu/machine.c:1105:6 (mame64d+0x000006bbd3a2)
    #11 device_t::start() /home/notroot/trunk/src/emu/device.c:409:2 (mame64d+0x000006acd6a6)
    #12 running_machine::start_all_devices() /home/notroot/trunk/src/emu/machine.c:1105:6 (mame64d+0x000006bbd3a2)
    #13 running_machine::start() /home/notroot/trunk/src/emu/machine.c:287:2 (mame64d+0x000006bbbbf4)
    #14 running_machine::run(bool) /home/notroot/trunk/src/emu/machine.c:351:3 (mame64d+0x000006bbda39)
    #15 machine_manager::execute() /home/notroot/trunk/src/emu/mame.c:222:11 (mame64d+0x000006bb86f2)
    #16 cli_frontend::execute(int, char**) /home/notroot/trunk/src/emu/clifront.c:220:15 (mame64d+0x000006aba550)
    #17 main /home/notroot/trunk/src/osd/sdl/sdlmain.c:290:9 (mame64d+0x0000055b0b80)

  Mutex M110 (0x7d0c000076e0) created at:
    #0 pthread_mutex_init /home/development/llvm/3.6.0/final/llvm.src/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:1082:3 (mame64d+0x0000028447f0)
    #1 osd_lock_alloc() /home/notroot/trunk/src/osd/modules/sync/sync_tc.c:118:2 (mame64d+0x00000720d530)
    #2 render_primitive_list::render_primitive_list() /home/notroot/trunk/src/emu/render.c:230:11 (mame64d+0x000006c156f0)
    #3 render_target::render_target(render_manager&, char const*, unsigned int) /home/notroot/trunk/src/emu/render.c:913:16 (mame64d+0x000006c19e91)
    #4 render_manager::target_alloc(char const*, unsigned int) /home/notroot/trunk/src/emu/render.c:2451:31 (mame64d+0x000006c245e4)
    #5 sdl_window_info::window_init() /home/notroot/trunk/src/osd/sdl/window.c:737:13 (mame64d+0x0000055bb490)
    #6 sdl_osd_interface::video_init() /home/notroot/trunk/src/osd/sdl/video.c:116:7 (mame64d+0x0000055b709d)
    #7 osd_common_t::init_subsystems() /home/notroot/trunk/src/osd/modules/lib/osdobj_common.c:513:7 (mame64d+0x0000055bf1e3)
    #8 sdl_osd_interface::init(running_machine&) /home/notroot/trunk/src/osd/sdl/sdlmain.c:611:2 (mame64d+0x0000055b172c)
    #9 running_machine::start() /home/notroot/trunk/src/emu/machine.c:231:2 (mame64d+0x000006bbb464)
    #10 running_machine::run(bool) /home/notroot/trunk/src/emu/machine.c:351:3 (mame64d+0x000006bbda39)
    #11 machine_manager::execute() /home/notroot/trunk/src/emu/mame.c:222:11 (mame64d+0x000006bb86f2)
    #12 cli_frontend::execute(int, char**) /home/notroot/trunk/src/emu/clifront.c:220:15 (mame64d+0x000006aba550)
    #13 main /home/notroot/trunk/src/osd/sdl/sdlmain.c:290:9 (mame64d+0x0000055b0b80)

  Thread T2 (tid=9472, running) created by main thread at:
    #0 pthread_create /home/development/llvm/3.6.0/final/llvm.src/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:896:3 (mame64d+0x0000028433c1)
    #1 osd_thread_create(void* (*)(void*), void*) /home/notroot/trunk/src/osd/modules/sync/sync_tc.c:320:7 (mame64d+0x00000720da4d)
    #2 osd_work_queue_alloc(int) /home/notroot/trunk/src/osd/modules/sync/work_osd.c:241:20 (mame64d+0x00000720e8aa)
    #3 sdl_osd_interface::window_init() /home/notroot/trunk/src/osd/sdl/window.c:218:16 (mame64d+0x0000055b8d59)
    #4 sdl_osd_interface::video_init() /home/notroot/trunk/src/osd/sdl/video.c:103:7 (mame64d+0x0000055b6d2f)
    #5 osd_common_t::init_subsystems() /home/notroot/trunk/src/osd/modules/lib/osdobj_common.c:513:7 (mame64d+0x0000055bf1e3)
    #6 sdl_osd_interface::init(running_machine&) /home/notroot/trunk/src/osd/sdl/sdlmain.c:611:2 (mame64d+0x0000055b172c)
    #7 running_machine::start() /home/notroot/trunk/src/emu/machine.c:231:2 (mame64d+0x000006bbb464)
    #8 running_machine::run(bool) /home/notroot/trunk/src/emu/machine.c:351:3 (mame64d+0x000006bbda39)
    #9 machine_manager::execute() /home/notroot/trunk/src/emu/mame.c:222:11 (mame64d+0x000006bb86f2)
    #10 cli_frontend::execute(int, char**) /home/notroot/trunk/src/emu/clifront.c:220:15 (mame64d+0x000006aba550)
    #11 main /home/notroot/trunk/src/osd/sdl/sdlmain.c:290:9 (mame64d+0x0000055b0b80)

SUMMARY: ThreadSanitizer: data race /home/notroot/trunk/src/mame/video/midtunit.c:822 midtunit_state::scanline_update(screen_device&, bitmap_ind16&, int, tms34010_display_params const*)
User avatar
No.11561
Firewave
Senior Tester
Apr 1, 2015, 16:35
edited on: Apr 1, 2015, 16:36
tceptor.c: tceptor
WARNING: ThreadSanitizer: data race (pid=9431)
  Write of size 8 at 0x7f3db8956020 by main thread:
    #0 memcpy /home/development/llvm/3.6.0/final/llvm.src/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:638:3 (mame64d+0x000002840e30)
    #1 tilemap_t::scanline_draw_opaque_ind16(unsigned short*, unsigned short const*, int, unsigned char*, unsigned int) /home/notroot/trunk/src/emu/tilemap.c:150:3 (mame64d+0x000006c80e7c)
    #2 void tilemap_t::draw_instance<bitmap_ind16>(screen_device&, bitmap_ind16&, tilemap_t::blit_parameters const&, int, int) /home/notroot/trunk/src/emu/tilemap.c:1212 (mame64d+0x000006c80e7c)
    #3 void tilemap_t::draw_common<bitmap_ind16>(screen_device&, bitmap_ind16&, rectangle const&, unsigned int, unsigned char, unsigned char) /home/notroot/trunk/src/emu/tilemap.c:962:5 (mame64d+0x000006c7ad81)
    #4 tilemap_t::draw(screen_device&, bitmap_ind16&, rectangle const&, unsigned int, unsigned char, unsigned char) /home/notroot/trunk/src/emu/tilemap.c:1043:3 (mame64d+0x000006c768fb)
    #5 tceptor_state::screen_update_tceptor_2d(screen_device&, bitmap_ind16&, rectangle const&) /home/notroot/trunk/src/mame/video/tceptor.c:514:2 (mame64d+0x000003e5c0bb)
    #6 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:653:78 (mame64d+0x000006c60431)
    #7 screen_device::update_partial(int) /home/notroot/trunk/src/emu/screen.c:625 (mame64d+0x000006c60431)
    #8 video_manager::finish_screen_updates() /home/notroot/trunk/src/emu/video.c:654:3 (mame64d+0x000006cc1e3c)
    #9 video_manager::frame_update(bool) /home/notroot/trunk/src/emu/video.c:207:27 (mame64d+0x000006cc1857)
    #10 screen_device::vblank_begin() /home/notroot/trunk/src/emu/screen.c:822:3 (mame64d+0x000006c5fcd6)
    #11 screen_device::device_timer(emu_timer&, unsigned int, int, void*) /home/notroot/trunk/src/emu/screen.c:404:4 (mame64d+0x000006c5facd)
    #12 device_t::timer_expired(emu_timer&, unsigned int, int, void*) /home/notroot/trunk/src/emu/device.h:191:83 (mame64d+0x000006c5a38c)
    #13 device_scheduler::execute_timers() /home/notroot/trunk/src/emu/schedule.c:900 (mame64d+0x000006c5a38c)
    #14 device_scheduler::timeslice() /home/notroot/trunk/src/emu/schedule.c:515:2 (mame64d+0x000006c57fd4)
    #15 running_machine::run(bool) /home/notroot/trunk/src/emu/machine.c:397:5 (mame64d+0x000006bbdc78)
    #16 device_mixer_interface::interface_pre_start() /home/notroot/trunk/src/emu/disound.c:406:2 (mame64d+0x000006ae4607)
    #17 device_t::start() /home/notroot/trunk/src/emu/device.c:403:3 (mame64d+0x000006acd660)
    #18 running_machine::start_all_devices() /home/notroot/trunk/src/emu/machine.c:1105:6 (mame64d+0x000006bbd3a2)
    #19 device_mixer_interface::interface_pre_start() /home/notroot/trunk/src/emu/disound.c:406:2 (mame64d+0x000006ae4607)
    #20 device_t::start() /home/notroot/trunk/src/emu/device.c:403:3 (mame64d+0x000006acd660)
    #21 running_machine::start_all_devices() /home/notroot/trunk/src/emu/machine.c:1105:6 (mame64d+0x000006bbd3a2)
    #22 device_t::start() /home/notroot/trunk/src/emu/device.c:409:2 (mame64d+0x000006acd6a6)
    #23 running_machine::start_all_devices() /home/notroot/trunk/src/emu/machine.c:1105:6 (mame64d+0x000006bbd3a2)
    #24 running_machine::start() /home/notroot/trunk/src/emu/machine.c:287:2 (mame64d+0x000006bbbbf4)
    #25 running_machine::run(bool) /home/notroot/trunk/src/emu/machine.c:351:3 (mame64d+0x000006bbda39)
    #26 machine_manager::execute() /home/notroot/trunk/src/emu/mame.c:222:11 (mame64d+0x000006bb86f2)
    #27 cli_frontend::execute(int, char**) /home/notroot/trunk/src/emu/clifront.c:220:15 (mame64d+0x000006aba550)
    #28 main /home/notroot/trunk/src/osd/sdl/sdlmain.c:290:9 (mame64d+0x0000055b0b80)

  Previous read of size 2 at 0x7f3db8956024 by thread T2 (mutexes: write M109):
    #0 software_renderer<unsigned int, 0, 0, 0, 16, 8, 0, false, false>::get_texel_palette16(render_texinfo const&, int, int) /home/notroot/trunk/src/emu/rendersw.inc:157:19 (mame64d+0x0000055e0d5c)
    #1 software_renderer<unsigned int, 0, 0, 0, 16, 8, 0, false, false>::draw_quad_palette16_none(render_primitive const&, unsigned int*, unsigned int, software_renderer<unsigned int, 0, 0, 0, 16, 8, 0, false, false>::quad_setup_data&) /home/notroot/trunk/src/emu/rendersw.inc:640 (mame64d+0x0000055e0d5c)
    #2 software_renderer<unsigned int, 0, 0, 0, 16, 8, 0, false, false>::setup_and_draw_textured_quad(render_primitive const&, unsigned int*, int, int, unsigned int) /home/notroot/trunk/src/emu/rendersw.inc:1868:5 (mame64d+0x0000055e01e5)
    #3 software_renderer<unsigned int, 0, 0, 0, 16, 8, 0, false, false>::draw_primitives(render_primitive_list const&, void*, unsigned int, unsigned int, unsigned int) /home/notroot/trunk/src/emu/rendersw.inc:1936:7 (mame64d+0x0000055c5f8a)
    #4 sdl_info::draw(int) /home/notroot/trunk/src/osd/modules/render/drawsdl.c:743:5 (mame64d+0x0000055c51dc)
    #5 sdl_window_info::draw_video_contents_wt(void*, int) /home/notroot/trunk/src/osd/sdl/window.c:1373:4 (mame64d+0x0000055bc3e0)
    #6 worker_thread_process(osd_work_queue*, work_thread_info*) /home/notroot/trunk/src/osd/modules/sync/work_osd.c:744:21 (mame64d+0x00000720f15b)
    #7 worker_thread_entry(void*) /home/notroot/trunk/src/osd/modules/sync/work_osd.c:668:4 (mame64d+0x00000720eacb)

  Location is heap block of size 163967 at 0x7f3db8956000 allocated by main thread:
    #0 malloc /home/development/llvm/3.6.0/final/llvm.src/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:495:5 (mame64d+0x00000283f50d)
    #1 osd_malloc_array(unsigned long) /home/notroot/trunk/src/osd/modules/lib/osdlib_unix.c:89:9 (mame64d+0x00000720d259)
    #2 malloc_file_line(unsigned long, char const*, int, bool, bool, bool) /home/notroot/trunk/src/lib/util/corealloc.c:112:25 (mame64d+0x000006e44f4a)
    #3 operator new[](unsigned long) /home/notroot/trunk/src/lib/util/corealloc.h:64:97 (mame64d+0x000006e2602a)
    #4 bitmap_t::allocate(int, int, int, int) /home/notroot/trunk/src/lib/util/bitmap.c:151 (mame64d+0x000006e2602a)
    #5 screen_device::register_screen_bitmap(bitmap_t&) /home/notroot/trunk/src/emu/screen.c:803:2 (mame64d+0x000006c5dff4)
    #6 screen_device::device_start() /home/notroot/trunk/src/emu/screen.c:294:3 (mame64d+0x000006c5ccb1)
    #7 device_t::start() /home/notroot/trunk/src/emu/device.c:409:2 (mame64d+0x000006acd6a6)
    #8 running_machine::start_all_devices() /home/notroot/trunk/src/emu/machine.c:1105:6 (mame64d+0x000006bbd3a2)
    #9 device_t::start() /home/notroot/trunk/src/emu/device.c:409:2 (mame64d+0x000006acd6a6)
    #10 running_machine::start_all_devices() /home/notroot/trunk/src/emu/machine.c:1105:6 (mame64d+0x000006bbd3a2)
    #11 running_machine::start() /home/notroot/trunk/src/emu/machine.c:287:2 (mame64d+0x000006bbbbf4)
    #12 running_machine::run(bool) /home/notroot/trunk/src/emu/machine.c:351:3 (mame64d+0x000006bbda39)
    #13 machine_manager::execute() /home/notroot/trunk/src/emu/mame.c:222:11 (mame64d+0x000006bb86f2)
    #14 cli_frontend::execute(int, char**) /home/notroot/trunk/src/emu/clifront.c:220:15 (mame64d+0x000006aba550)
    #15 main /home/notroot/trunk/src/osd/sdl/sdlmain.c:290:9 (mame64d+0x0000055b0b80)

  Mutex M109 (0x7d0c000077d0) created at:
    #0 pthread_mutex_init /home/development/llvm/3.6.0/final/llvm.src/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:1082:3 (mame64d+0x0000028447f0)
    #1 osd_lock_alloc() /home/notroot/trunk/src/osd/modules/sync/sync_tc.c:118:2 (mame64d+0x00000720d530)
    #2 render_primitive_list::render_primitive_list() /home/notroot/trunk/src/emu/render.c:230:11 (mame64d+0x000006c156f0)
    #3 render_target::render_target(render_manager&, char const*, unsigned int) /home/notroot/trunk/src/emu/render.c:913:16 (mame64d+0x000006c19e82)
    #4 render_manager::target_alloc(char const*, unsigned int) /home/notroot/trunk/src/emu/render.c:2451:31 (mame64d+0x000006c245e4)
    #5 sdl_window_info::window_init() /home/notroot/trunk/src/osd/sdl/window.c:737:13 (mame64d+0x0000055bb490)
    #6 sdl_osd_interface::video_init() /home/notroot/trunk/src/osd/sdl/video.c:116:7 (mame64d+0x0000055b709d)
    #7 osd_common_t::init_subsystems() /home/notroot/trunk/src/osd/modules/lib/osdobj_common.c:513:7 (mame64d+0x0000055bf1e3)
    #8 sdl_osd_interface::init(running_machine&) /home/notroot/trunk/src/osd/sdl/sdlmain.c:611:2 (mame64d+0x0000055b172c)
    #9 running_machine::start() /home/notroot/trunk/src/emu/machine.c:231:2 (mame64d+0x000006bbb464)
    #10 running_machine::run(bool) /home/notroot/trunk/src/emu/machine.c:351:3 (mame64d+0x000006bbda39)
    #11 machine_manager::execute() /home/notroot/trunk/src/emu/mame.c:222:11 (mame64d+0x000006bb86f2)
    #12 cli_frontend::execute(int, char**) /home/notroot/trunk/src/emu/clifront.c:220:15 (mame64d+0x000006aba550)
    #13 main /home/notroot/trunk/src/osd/sdl/sdlmain.c:290:9 (mame64d+0x0000055b0b80)

  Thread T2 (tid=9436, running) created by main thread at:
    #0 pthread_create /home/development/llvm/3.6.0/final/llvm.src/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:896:3 (mame64d+0x0000028433c1)
    #1 osd_thread_create(void* (*)(void*), void*) /home/notroot/trunk/src/osd/modules/sync/sync_tc.c:320:7 (mame64d+0x00000720da4d)
    #2 osd_work_queue_alloc(int) /home/notroot/trunk/src/osd/modules/sync/work_osd.c:241:20 (mame64d+0x00000720e8aa)
    #3 sdl_osd_interface::window_init() /home/notroot/trunk/src/osd/sdl/window.c:218:16 (mame64d+0x0000055b8d59)
    #4 sdl_osd_interface::video_init() /home/notroot/trunk/src/osd/sdl/video.c:103:7 (mame64d+0x0000055b6d2f)
    #5 osd_common_t::init_subsystems() /home/notroot/trunk/src/osd/modules/lib/osdobj_common.c:513:7 (mame64d+0x0000055bf1e3)
    #6 sdl_osd_interface::init(running_machine&) /home/notroot/trunk/src/osd/sdl/sdlmain.c:611:2 (mame64d+0x0000055b172c)
    #7 running_machine::start() /home/notroot/trunk/src/emu/machine.c:231:2 (mame64d+0x000006bbb464)
    #8 running_machine::run(bool) /home/notroot/trunk/src/emu/machine.c:351:3 (mame64d+0x000006bbda39)
    #9 machine_manager::execute() /home/notroot/trunk/src/emu/mame.c:222:11 (mame64d+0x000006bb86f2)
    #10 cli_frontend::execute(int, char**) /home/notroot/trunk/src/emu/clifront.c:220:15 (mame64d+0x000006aba550)
    #11 main /home/notroot/trunk/src/osd/sdl/sdlmain.c:290:9 (mame64d+0x0000055b0b80)

SUMMARY: ThreadSanitizer: data race /home/notroot/trunk/src/emu/tilemap.c:150 tilemap_t::scanline_draw_opaque_ind16(unsigned short*, unsigned short const*, int, unsigned char*, unsigned int)

User avatar
No.11562
Firewave
Senior Tester
Apr 2, 2015, 09:22
I am seeing this basically with any set I try. It's always software_renderer<>::get_texel_palette16() on one side and screen_device::update_partial() on the other.
User avatar
No.12606
Osso
Developer
May 5, 2016, 09:20
-mt functionality has been removed.