public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/50380] New: cc1 hangs eating 100% CPU
@ 2011-09-13  9:12 antipov at mvista dot com
  2011-09-21 20:16 ` [Bug c/50380] " mikpe at it dot uu.se
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: antipov at mvista dot com @ 2011-09-13  9:12 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 50380
           Summary: cc1 hangs eating 100% CPU
    Classification: Unclassified
           Product: gcc
           Version: 4.6.1
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: c
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: antipov@mvista.com


Created attachment 25259
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25259
Preprocessed source

When compiling an attached code with optimization levels -O2, -O3, -Os, cc1
hangs and eats 100% CPU, producing the following output:

$ [path]/cc1 -fpreprocessed drd_clientreq.i -O2
toBool toUChar toHChar toUShort toShort toUInt Ptr_to_ULong ULong_to_Ptr
sr_isError sr_Res sr_ResHI sr_Err sr_EQ VALGRIND_PRINTF
VALGRIND_PRINTF_BACKTRACE vgDrd_vc_lte vgPlain_is_plausible_ECU
vgDrd_sg_get_refcnt vgDrd_sg_bm vgDrd_IsValidDrdThreadId
vgDrd_thread_get_running_tid vgDrd_thread_get_conflict_set
vgDrd_running_thread_inside_pthread_create
vgDrd_running_thread_is_recording_loads
vgDrd_running_thread_is_recording_stores vgDrd_thread_set_stack_min
vgDrd_thread_address_on_stack vgDrd_thread_address_on_any_stack
vgDrd_thread_get_segment vgDrd_running_thread_get_segment isIRAtom LibVEX_Alloc
vgDrd_any_address_is_traced vgDrd_clientreq_init handle_client_request
Analyzing compilation unit
Performing interprocedural optimizations
 <*free_lang_data> <visibility> <early_local_cleanups> <whole-program>
<ipa-profile> <cp> <inline> <pure-const> <static-var>Assembling functions:
 handle_client_request

Backtrace obtained from attached gdb may looks like the following:

#0  get_cse_reg_info (regno=229) at ../../gcc-4.6.1/gcc/cse.c:848
#1  exp_equiv_p (for_gcse=0 '\000', validate=0, y=0x7ff759016ba0,
x=0x7ff758fe68c0) at ../../gcc-4.6.1/gcc/cse.c:2657
#2  exp_equiv_p (x=0x7ff758fe68c0, y=0x7ff759016ba0, validate=0, for_gcse=0
'\000') at ../../gcc-4.6.1/gcc/cse.c:2603
#3  0x0000000000950b21 in lookup (x=0x7ff758fe68c0, hash=<optimized out>,
mode=SImode) at ../../gcc-4.6.1/gcc/cse.c:1500
#4  0x000000000095171b in find_comparison_args (code=EQ, parg1=0x7fff0ea30d98,
parg2=0x7fff0ea30da0, pmode1=0x7fff0ea30da8, 
    pmode2=0x7fff0ea30dac) at ../../gcc-4.6.1/gcc/cse.c:3029
#5  0x000000000095210d in fold_rtx (x=0x7ff75901e288, insn=0x7ff7590186e0) at
../../gcc-4.6.1/gcc/cse.c:3399
#6  0x0000000000951aa0 in fold_rtx (x=0x7ff759016de0, insn=0x7ff7590186e0) at
../../gcc-4.6.1/gcc/cse.c:3279
#7  0x0000000000955279 in cse_insn (insn=0x7ff7590186e0) at
../../gcc-4.6.1/gcc/cse.c:4511
#8  0x000000000095868d in cse_extended_basic_block (ebb_data=read_sleb128:
Corrupted DWARF expression.
) at ../../gcc-4.6.1/gcc/cse.c:6362
#9  cse_main (f=<optimized out>, nregs=<optimized out>) at
../../gcc-4.6.1/gcc/cse.c:6539
#10 0x0000000000958cae in rest_of_handle_cse () at
../../gcc-4.6.1/gcc/cse.c:7392
#11 0x000000000066ec89 in execute_one_pass (pass=0xddd2e0) at
../../gcc-4.6.1/gcc/passes.c:1556
#12 0x000000000066ef35 in execute_pass_list (pass=0xddd2e0) at
../../gcc-4.6.1/gcc/passes.c:1611
#13 0x000000000066ef47 in execute_pass_list (pass=0xdd85e0) at
../../gcc-4.6.1/gcc/passes.c:1612
#14 0x000000000073f931 in tree_rest_of_compilation (fndecl=0x7ff75910d500) at
../../gcc-4.6.1/gcc/tree-optimize.c:422
#15 0x000000000086026f in cgraph_expand_function (node=0x7ff75910f160) at
../../gcc-4.6.1/gcc/cgraphunit.c:1576
#16 0x0000000000861eba in cgraph_expand_all_functions () at
../../gcc-4.6.1/gcc/cgraphunit.c:1635
#17 cgraph_optimize () at ../../gcc-4.6.1/gcc/cgraphunit.c:1899
#18 0x00000000008622ba in cgraph_finalize_compilation_unit () at
../../gcc-4.6.1/gcc/cgraphunit.c:1096
#19 0x0000000000482985 in c_write_global_declarations () at
../../gcc-4.6.1/gcc/c-decl.c:9871
#20 0x0000000000704af6 in compile_file () at ../../gcc-4.6.1/gcc/toplev.c:591
#21 do_compile () at ../../gcc-4.6.1/gcc/toplev.c:1900
#22 toplev_main (argc=4, argv=0x7fff0ea313e8) at
../../gcc-4.6.1/gcc/toplev.c:1963
#23 0x00000038dc42139d in __libc_start_main () from /lib64/libc.so.6
#24 0x00000000004723c5 in _start ()

The same code compiles fine with -O1 and -O0.

Compiler was configured with Sourcery CodeBench Lite 2011.03-93 for MIPS
GNU/Linux libraries
(https://sourcery.mentor.com/sgpp/lite/mips/portal/package9057/public/mips-linux-gnu/mips-2011.03-93-mips-linux-gnu.bin)
with the following options:

../gcc-4.6.1/configure --prefix=/tmp/tools --build=x86_64-pc-linux-gnu
--host=x86_64-pc-linux-gnu --target=mips-linux-gnu --enable-threads
--disable-libmudflap --disable-libssp --disable-libstdcxx-pch
--with-arch=mips32r2 --with-float=hard --enable-multilib --with-mips-plt
--with-build-sysroot=/opt/codesourcery/mips/mips-linux-gnu/libc
--with-sysroot=/opt/codesourcery/mips/mips-linux-gnu/libc --enable-languages=c
--enable-shared --disable-lto --disable-nls --disable-libgomp


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

end of thread, other threads:[~2015-02-04  5:21 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-13  9:12 [Bug c/50380] New: cc1 hangs eating 100% CPU antipov at mvista dot com
2011-09-21 20:16 ` [Bug c/50380] " mikpe at it dot uu.se
2011-09-21 23:57 ` mikpe at it dot uu.se
2011-09-22  9:32 ` mikpe at it dot uu.se
2011-09-26 11:41 ` [Bug rtl-optimization/50380] " rguenth at gcc dot gnu.org
2011-12-19 20:37 ` sandra at gcc dot gnu.org
2012-01-04  0:08 ` [Bug rtl-optimization/50380] [4.6 only] " pinskia at gcc dot gnu.org
2014-02-16 10:01 ` jackie.rosen at hushmail dot com
2015-02-04  5:21 ` aoliva 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).