You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hello,
I learn a lot from you project,
When I write a multi-thread program and test.
I use tsan to check data race, reports error:
0x7b0c00000328
==================
WARNING: ThreadSanitizer: data race (pid=48322)
Read of size 8 at 0x7b0c00000318 by thread T1:
#0 sref mman.c:91 (a.out:x86_64+0x100002c47)
#1 thr main.c:16 (a.out:x86_64+0x100002655)
old_count: 2
Previous atomic write of size 8 at 0x7b0c00000318 by main thread:
#0 sref mman.c:91 (a.out:x86_64+0x100002c95)
#1 main main.c:31 (a.out:x86_64+0x1000027a6)
old_count: 2
Location is heap block of size 48 at 0x7b0c00000300 allocated by main thread:
#0 malloc <null>:188732607 (libclang_rt.tsan_osx_dynamic.dylib:x86_64h+0x55a7c)
#1 smalloc_impl mman.c:163 (a.out:x86_64+0x10000349d)
#2 smalloc mman.c:212 (a.out:x86_64+0x100003341)
#3 main main.c:26 (a.out:x86_64+0x1000026ed)
Thread T1 (tid=486984, running) created by main thread at:
#0 pthread_create <null>:188732607 (libclang_rt.tsan_osx_dynamic.dylib:x86_64h+0x3155f)
#1 main main.c:30 (a.out:x86_64+0x100002794)
hello,
I learn a lot from you project,
When I write a multi-thread program and test.
I use tsan to check data race, reports error:
there is a simple demo just for test:
I check the code, found maybe the non-sync access for
count
,libcsptr/src/mman.c
Lines 43 to 52 in ac73451
But in think it not a real issue ,unless in x64. I got a way to avoid from abort of
tsan
, is it just make it happier?also commit :
983932
The text was updated successfully, but these errors were encountered: