Bug 402341 - drd/tests/tsan_thread_wrappers_pthread.h:369: suspicious code ?
Summary: drd/tests/tsan_thread_wrappers_pthread.h:369: suspicious code ?
Status: RESOLVED FIXED
Alias: None
Product: valgrind
Classification: Developer tools
Component: drd (other bugs)
Version First Reported In: 3.15 SVN
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Bart Van Assche
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-12-19 12:22 UTC by dcb314
Modified: 2018-12-20 08:14 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description dcb314 2018-12-19 12:22:57 UTC
SUMMARY

rd/tests/tsan_thread_wrappers_pthread.h:371]: (warning) Identical condition 'my_thread->wpvpv_', second condition is always false

Source code is

    if (my_thread->wpvpv_)
      return my_thread->wpvpv_(my_thread->arg_);
    if (my_thread->wpvpv_)
      my_thread->wvpv_(my_thread->arg_);


STEPS TO REPRODUCE
1. 
2. 
3. 

OBSERVED RESULT


EXPECTED RESULT


SOFTWARE/OS VERSIONS
Windows: 
MacOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 Bart Van Assche 2018-12-20 02:40:04 UTC
Thank you for your report. Please verify whether commit 5b4029b8cc8f ("drd/tests/tsan_thread_wrappers_pthread.h: Fix MyThread::ThreadBody()") fixes this bug.
Comment 2 dcb314 2018-12-20 08:14:35 UTC
In latest version, warning from static analyser no longer exists.

It looks fixed to me.