Bug 171940 - Compiler goes into infinite loop when compiling Boost::Spirit programs
Compiler goes into infinite loop when compiling Boost::Spirit programs
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: gcc (Show other bugs)
3.0
x86_64 Linux
medium Severity high
: ---
: ---
Assigned To: Jakub Jelinek
:
Depends On:
Blocks: 168424
  Show dependency treegraph
 
Reported: 2005-10-27 18:56 EDT by Tony Kay
Modified: 2007-11-30 17:07 EST (History)
1 user (show)

See Also:
Fixed In Version: RHBA-2006-0147
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-03-15 10:30:10 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
The pre-processed source (1.79 MB, text/plain)
2005-10-28 12:59 EDT, Tony Kay
no flags Details
gcc32-pr18300.patch (5.38 KB, patch)
2005-11-11 06:00 EST, Jakub Jelinek
no flags Details | Diff


External Trackers
Tracker ID Priority Status Summary Last Updated
GNU Compiler Collection 18300 None None None Never

  None (edit)
Description Tony Kay 2005-10-27 18:56:54 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.12) Gecko/20050915 MultiZilla/1.7.9.0a

Description of problem:
Certain rule constructions done with Boost::spirit (www.boost.org) cause g++ 3.2.3 to go into an infinite loop.

Simple example (requires nothing more than boost libraries):

#include <boost/spirit.hpp>
#include <boost/bind.hpp>

using namespace boost::spirit;
using boost::bind;

void init_imap_append()
{
   rule<> imap_append, imap_mailbox, imap_flag_list, imap_date_time,
          imap_literal;

   imap_append
      =    as_lower_d["append"] 
        >> ' ' >> imap_mailbox 
        >> !(  ' ' >> imap_flag_list) 
        >> !(  ' ' >> imap_date_time) 
        >> ' ' >> imap_literal
      ;
}


Version-Release number of selected component (if applicable):
3.2.3

How reproducible:
Always

Steps to Reproduce:
1. Enter the program shown in description
2. Compile with "g++ sample.cc"

  

Actual Results:  Compiler goes into infinite loop

Expected Results:  compile

Additional info:

I have gentoo with gcc 3.3.6, and Fedora core 4 with gcc 4.0.1. They compile this code just fine.
Comment 1 Jakub Jelinek 2005-10-28 08:19:03 EDT
Please preprocess that (g++ -E sample.cc -o sample.ii) and attach it here.
As boost is not included in RHEL3, that's the only way to make sure we are
looking at exactly the same source.

Anyway, I guess this is a dup of #164421, though need the preprocessed source
to verify.
Comment 2 Tony Kay 2005-10-28 12:59:49 EDT
Created attachment 120507 [details]
The pre-processed source
Comment 3 Jakub Jelinek 2005-11-11 06:00:14 EST
Created attachment 120928 [details]
gcc32-pr18300.patch

I have verified this is a dup of #164421, pasting here the fix as well.
Comment 10 Red Hat Bugzilla 2006-03-15 10:30:10 EST
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2006-0147.html

Note You need to log in before you can comment on or make changes to this bug.