mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-10-29 05:40:23 -04:00
No description
pthread_create(&t->id, NULL, internal_thread_func, t) already
assigns the t->id parameter during the thread construction.
There shouldn't be need to redo this again.
If the system is configured with the thread sanitizer, with meson:
'meson -Db_sanitize=thread', it's apparent that the unnecessary
assignment only causes potential trouble:
08:06:11 MAKE_CHECK='1' /home/test/pulse/pulseaudio/build/src/tests/once-test
Running suite(s): Once
0%: Checks: 1, Failures: 0, Errors: 1
../src/tests/once-test.c:119:E:once:once_test:0: (after this point) Early exit with return value 66
WARNING: ThreadSanitizer: data race (pid=102975)
Read of size 8 at 0x7b0c000012c0 by main thread:
#0 pa_thread_join ../src/pulsecore/thread-posix.c:143 (libpulsecommon-13.99.so+0x8aca4)
#1 once_test ../src/tests/once-test.c:105 (once-test+0x2b13)
#2 srunner_run <null> (once-test+0x58e5)
#3 __libc_start_main <null> (libc.so.6+0x270b2)
Previous write of size 8 at 0x7b0c000012c0 by thread T61:
#0 internal_thread_func ../src/pulsecore/thread-posix.c:76 (libpulsecommon-13.99.so+0x8a715)
#1 <null> <null> (libtsan.so.0+0x2d1af)
Location is heap block of size 40 at 0x7b0c000012c0 allocated by main thread:
#0 calloc <null> (libtsan.so.0+0x305ca)
#1 pa_xmalloc0 ../src/pulse/xmalloc.c:74 (libpulse.so.0+0x6355b)
#2 _pa_xnew0_internal ../src/pulse/xmalloc.h:75 (libpulsecommon-13.99.so+0x8a267)
#3 pa_thread_new ../src/pulsecore/thread-posix.c:92 (libpulsecommon-13.99.so+0x8a828)
#4 once_test ../src/tests/once-test.c:102 (once-test+0x2a98)
#5 srunner_run <null> (once-test+0x58e5)
#6 __libc_start_main <null> (libc.so.6+0x270b2)
Thread T61 'once' (tid=110679, finished) created by main thread at:
#0 pthread_create <null> (libtsan.so.0+0x5ea99)
#1 pa_thread_new ../src/pulsecore/thread-posix.c:97 (libpulsecommon-13.99.so+0x8a8aa)
#2 once_test ../src/tests/once-test.c:102 (once-test+0x2a98)
#3 srunner_run <null> (once-test+0x58e5)
#4 __libc_start_main <null> (libc.so.6+0x270b2)
SUMMARY: ThreadSanitizer: data race ../src/pulsecore/thread-posix.c:143 in pa_thread_join
ThreadSanitizer: reported 1 warnings
Fix this warning by removing the unnecessary assignment.
Signed-off-by: Eero Nurkkala <eero.nurkkala@offcode.fi>
|
||
|---|---|---|
| .gitlab/issue_templates | ||
| coverity | ||
| doc | ||
| doxygen | ||
| m4 | ||
| man | ||
| po | ||
| scripts | ||
| shell-completion | ||
| src | ||
| vala | ||
| .gitignore | ||
| .gitlab-ci.yml | ||
| .mailmap | ||
| autogen.sh | ||
| bootstrap.sh | ||
| CODE_OF_CONDUCT.md | ||
| configure.ac | ||
| git-version-gen | ||
| GPL | ||
| LGPL | ||
| libpulse-mainloop-glib.pc.in | ||
| libpulse-simple.pc.in | ||
| libpulse.pc.in | ||
| LICENSE | ||
| Makefile.am | ||
| meson.build | ||
| meson_options.txt | ||
| NEWS | ||
| orc.mak | ||
| PROTOCOL | ||
| pulseaudio-text.svg | ||
| pulseaudio.supp | ||
| pulseaudio.svg | ||
| PulseAudioConfig.cmake.in | ||
| PulseAudioConfigVersion.cmake.in | ||
| README | ||
| todo | ||
PULSEAUDIO SOUND SERVER
WEB SITE:
http://pulseaudio.org/
GIT:
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
GitLab:
https://gitlab.freedesktop.org/pulseaudio/pulseaudio
MAILING LIST:
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss
GIT COMMITS MAILING LIST:
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-commits
TRAC/BUGZILLA TICKET CHANGES MAILING LIST:
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-bugs
IRC:
#pulseaudio on irc.freenode.org
FRESHMEAT:
http://freshmeat.net/projects/pulseaudio/
OHLOH:
http://www.ohloh.net/projects/4038
AUTHORS:
Several
HACKING:
In order to run pulseaudio from the build dir __OPTIMIZE__ should be
disabled (look at src/pulsecore/core-util.h::pa_run_from_build_tree()),
this can be done by passing "CFLAGS=-O0" to the configure script:
./autogen.sh
CFLAGS="-ggdb3 -O0" LDFLAGS="-ggdb3" ./configure
make
./src/pulseaudio -n -F src/default.pa -p $(pwd)/src/
SPELLING:
PulseAudio