http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46811

           Summary: Compiler lock with no error message while compiling
                    boost::condition with bad parameters
           Product: gcc
           Version: 4.5.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: pedro...@yahoo.com


Created attachment 22644
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22644
This version of the program locks the compiler

I'm not sure if this is a gcc problem or boost problem. This problem happens
while compiling a simple application that uses boost::condition. In fact I made
a mistake and exchanged the 2nd and 3rd parameters of the condition.timed_wait
function. Instead of a compiler error, the compiler will do nothing for a long
time and then it will start printing the same string over and over again, this
is an extract of my console after a ctrl-C:

oost::lambda::plus_action>, boost::tuples::tuple<const
boost::posix_time::ptime,
boost::lambda::lambda_functor<boost::lambda::lambda_functor_base<boost::lambda::arithmetic_action<boost::lambda::plus_action>,
boost::tuples::tuple<const boost::posix_time::ptime,
boost::lambda::lambda_functor<boost::lambda::lambda_functor_base<boost::lambda::arithmetic_action<boost::lambda::plus_action>,
boost::tuples::tuple<const boost::posix_time::ptime,
boost::lambda::lambda_functor<boost::lambda::lambda_functor_base<boost::lambda::arithmetic_action<boost::lambda::plus_action>,
boost::tuples::tuple<const boost::posix_time::ptime,
boost::lambda::lambda_functor<boost::lambda::lambda_functor_base<boost::lambda::arithmetic_action<boost::lambda::plus_action>,
boost::tuples::tuple<const boost::posix_ti^C

It will stay like this for a very long time. If I compile the same program but
with the timed_wait parameters in the good order then it compiles instantly.

I saw this first at work using a Fedora 12 and boost 1.41. My PC at work is not
very fast so the wait was very long. I lost about 1 hour trying to compile with
no error message until I realized my mistake.
Now I'm at home using a Fedora 14 and boost 1.44 and I have the same behaviour.
But with a AMD Phenom(tm) II X6 1090T Processor the timing is much shorter, two
initial minutes of nothing, followed by 10 minutes of printing the same strings
over and over and then it stops with no error message.

My configuration:
gcc-4.5.1-4.fc14.x86_64
boost-1.44.0-1.fc14.x86_64
Linux ********* 2.6.35.6-48.fc14.x86_64 #1 SMP Fri Oct 22 15:36:08 UTC 2010
x86_64 x86_64 x86_64 GNU/Linux

To reproduce it just try to compile the gcc-lock.cpp file in attach.
Exchanging the 2nd and 3rd parameters of the timed_wait function will fix the
problem and it will compile instantly.

Reply via email to