Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sanitizer report incorrect usage of bool accross threads #33

Open
mwestphal opened this issue Mar 23, 2024 · 0 comments
Open

Sanitizer report incorrect usage of bool accross threads #33

mwestphal opened this issue Mar 23, 2024 · 0 comments

Comments

@mwestphal
Copy link
Contributor

Sanitizer reports incorrect usage of a the quit bool accross threads, which seems to be a correct positive afaics.

I tried adding atomic to the quit bool but then dmon refuse to compile.

==================
150: WARNING: ThreadSanitizer: data race (pid=7868)
150:   Write of size 1 at 0x55aff3fd05f0 by main thread:
150:     #0 dmon_deinit /__w/f3d/f3d/source/external/dmon/dmon.h:1150:16 (f3d+0x172842) (BuildId: 2788a4d430378bd83bc4b94da37bf9dff66918f4)
150:     #1 F3DStarter::~F3DStarter() /__w/f3d/f3d/source/application/F3DStarter.cxx:196:3 (f3d+0x1738f7) (BuildId: 2788a4d430378bd83bc4b94da37bf9dff66918f4)
150:     #2 main /__w/f3d/f3d/source/application/main.cxx:14:3 (f3d+0x17e7fa) (BuildId: 2788a4d430378bd83bc4b94da37bf9dff66918f4)
150: 
150:   Previous read of size 1 at 0x55aff3fd05f0 by thread T1:
150:     #0 _dmon_thread(void*) /__w/f3d/f3d/source/external/dmon/dmon.h:1055:19 (f3d+0x171231) (BuildId: 2788a4d430378bd83bc4b94da37bf9dff66918f4)
150: 
150:   Location is global '_dmon' of size 840 at 0x55aff3fd02b0 (f3d+0x15c25f0)
150: 
150:   Thread T1 (tid=7872, running) created by main thread at:
150:     #0 pthread_create <null> (f3d+0x64e4d) (BuildId: 2788a4d430378bd83bc4b94da37bf9dff66918f4)
150:     #1 dmon_init /__w/f3d/f3d/source/external/dmon/dmon.h:1137:13 (f3d+0x1736e4) (BuildId: 2788a4d430378bd83bc4b94da37bf9dff66918f4)
150:     #2 F3DStarter::F3DStarter() /__w/f3d/f3d/source/application/F3DStarter.cxx:189:3 (f3d+0x1736e4)
150:     #3 main /__w/f3d/f3d/source/application/main.cxx:12:16 (f3d+0x17e7e1) (BuildId: 2788a4d430378bd83bc4b94da37bf9dff66918f4)
150: 
150: SUMMARY: ThreadSanitizer: data race /__w/f3d/f3d/source/external/dmon/dmon.h:1150:16 in dmon_deinit
150: ==================
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant