This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/77392] Premature optimization based on return data from thread
- From: "mednafen at sent dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 28 Aug 2016 03:59:19 +0000
- Subject: [Bug c/77392] Premature optimization based on return data from thread
- Auto-submitted: auto-generated
- References: <bug-77392-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77392
mednafen at sent dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mednafen at sent dot com
--- Comment #1 from mednafen at sent dot com ---
The return type for the thread entry point function is wrong, and the variable
whose address/pointer you're passing to pthread_join is of the wrong type,
which is probably leading to stack corruption. These are things the compiler
should have warned or errored-out about if not for the explicit void* casts.