This is the mail archive of the
mailing list for the GCC project.
-fprofile-generate and -pthread possible race condition with indirect calls
- From: Joao Rafael <jprafael at student dot dei dot uc dot pt>
- To: gcc-help at gcc dot gnu dot org
- Date: Wed, 5 Dec 2012 20:58:02 +0000
- Subject: -fprofile-generate and -pthread possible race condition with indirect calls
When compiling my multi-threaded (pthreads) application with
-fprofile-generate and then -fprofile-use I consistently get errors
error: corrupted value profile: ic profile counter (305466 out of
303958) inconsistent with basic-block count (303958)
(t here is a pointer to a base virtual class with the () operator.)
Similar errors occur with the modulo operator.
Lowering the number of concurrent threads down to 1 gets me no errors.
Unfortunately legal constraints don't allow me to disclosure the
source code and I was unable to reproduce it with other simpler code.
I was hopping that profile generation worked out the box with threaded
applications but it seems that it might not be the case. (Or am i