public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug bootstrap/54719] New: Bootstrap stuck in stage1 with message "checking for compiler with PCH support"
@ 2012-09-26 13:52 dodji at gcc dot gnu.org
  2012-09-26 14:25 ` [Bug bootstrap/54719] " dehao at google dot com
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: dodji at gcc dot gnu.org @ 2012-09-26 13:52 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 54719
           Summary: Bootstrap stuck in stage1 with message "checking for
                    compiler with PCH support"
    Classification: Unclassified
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: bootstrap
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: dodji@gcc.gnu.org


Bootstrap fails when running with MALLOC_CHECK_=3. The
configure (actually config.log) of stage 1 in
x86_64-unknown-linux-gnu/libstdc++-v3 says:

    configure:15104: checking for compiler with PCH support

And it gets stuck there for ever.

It seems like the PCH support is broken somehow.  To reproduce:

$ cat conftest.h:

-------->8<------
extern int foo();
-------->8<------

$ cat conftest.cc:

-------->8<------
#include "conftest.h"
-------->8<------

$ export MALLOC_CHECK_=3
$ cc1plus -quiet conftest.h --output-pch=conftest.h.gch
$ cc1plus -quiet conftest.cc

The last command hangs for ever.

gdb says:

Program received signal SIGSEGV, Segmentation fault.
0x000000306e07a30a in mem2chunk_check () from /lib64/libc.so.6
Missing separate debuginfos, use: debuginfo-install glibc-2.15-56.fc17.x86_64
gmp-5.0.2-6.fc17.x86_64 libgcc-4.7.0-5.fc17.x86_64 libmpc-0.9-2.fc17.2.x86_64
libstdc++-4.7.0-5.fc17.x86_64 mpfr-3.1.0-2.fc17.x86_64
(gdb) bt
#0  0x000000306e07a30a in mem2chunk_check () from /lib64/libc.so.6
#1  0x000000306e07e276 in free_check () from /lib64/libc.so.6
#2  0x0000000001238d31 in location_adhoc_data_fini (set=0x1000176000)
    at /home/dodji/devel/git/gcc/bootstrap/libcpp/line-map.c:164
#3  0x0000000000bcc803 in toplev_main (argc=4, argv=0x7fffffffe398)
    at /home/dodji/devel/git/gcc/bootstrap/gcc/toplev.c:1949
#4  0x000000000120b348 in main (argc=4, argv=0x7fffffffe398)
    at /home/dodji/devel/git/gcc/bootstrap/gcc/main.c:36
(gdb) 

The issues is that after loading the pch file, toplev_main invokes
location_adhoc_data_fini which tries to free stuff in the
location_adhoc_data_map member of the instance of line_maps.  But
these pointers have been 're-set' by the loading the pch file, in
c_common_write_pch, AFAIU.  And that triggers a sigsev, and then the
process hangs.

If that data is to be saved to disk as part of the PCH, why isn't it
allocated in GCC memory?

The other issue I don't quite understand is, why is the process
hanging instead of just exiting after the sigsev?


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug bootstrap/54719] Bootstrap stuck in stage1 with message "checking for compiler with PCH support"
  2012-09-26 13:52 [Bug bootstrap/54719] New: Bootstrap stuck in stage1 with message "checking for compiler with PCH support" dodji at gcc dot gnu.org
@ 2012-09-26 14:25 ` dehao at google dot com
  2012-09-26 14:42 ` dodji at seketeli dot org
  2012-09-27  0:37 ` hp at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: dehao at google dot com @ 2012-09-26 14:25 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #1 from Dehao Chen <dehao at google dot com> 2012-09-26 14:25:25 UTC ---
Hi, Dodji,

Could you help verify if this problem is solved by
http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=191706 ? If yes, then it
should be a duplicate of http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54645

Thanks,
Dehao


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug bootstrap/54719] Bootstrap stuck in stage1 with message "checking for compiler with PCH support"
  2012-09-26 13:52 [Bug bootstrap/54719] New: Bootstrap stuck in stage1 with message "checking for compiler with PCH support" dodji at gcc dot gnu.org
  2012-09-26 14:25 ` [Bug bootstrap/54719] " dehao at google dot com
@ 2012-09-26 14:42 ` dodji at seketeli dot org
  2012-09-27  0:37 ` hp at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: dodji at seketeli dot org @ 2012-09-26 14:42 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #2 from dodji at seketeli dot org <dodji at seketeli dot org> 2012-09-26 14:41:43 UTC ---
"dehao at google dot com" <gcc-bugzilla@gcc.gnu.org> a écrit:

> Could you help verify if this problem is solved by
>
> http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=191706 ? If yes, then it
>
> should be a duplicate of http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54645

Yes it is fixed now.  Sorry for not realizing that earlier.

Thank you.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug bootstrap/54719] Bootstrap stuck in stage1 with message "checking for compiler with PCH support"
  2012-09-26 13:52 [Bug bootstrap/54719] New: Bootstrap stuck in stage1 with message "checking for compiler with PCH support" dodji at gcc dot gnu.org
  2012-09-26 14:25 ` [Bug bootstrap/54719] " dehao at google dot com
  2012-09-26 14:42 ` dodji at seketeli dot org
@ 2012-09-27  0:37 ` hp at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: hp at gcc dot gnu.org @ 2012-09-27  0:37 UTC (permalink / raw)
  To: gcc-bugs


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

Hans-Peter Nilsson <hp at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
                 CC|                            |hp at gcc dot gnu.org
         Resolution|                            |FIXED

--- Comment #3 from Hans-Peter Nilsson <hp at gcc dot gnu.org> 2012-09-27 00:36:43 UTC ---
Closing, as reporter confirmed the issue being fixed.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-09-27  0:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-26 13:52 [Bug bootstrap/54719] New: Bootstrap stuck in stage1 with message "checking for compiler with PCH support" dodji at gcc dot gnu.org
2012-09-26 14:25 ` [Bug bootstrap/54719] " dehao at google dot com
2012-09-26 14:42 ` dodji at seketeli dot org
2012-09-27  0:37 ` hp at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).