[llvm-commits] [llvm] r67844 - in /llvm/trunk/include/llvm: ADT/ilist_node.h BasicBlock.h CodeGen/MachineBasicBlock.h CodeGen/MachineFunction.h CodeGen/SelectionDAG.h Function.h

Gabor Greif ggreif at gmail.com
Fri Mar 27 11:40:01 PDT 2009


On 27 Mrz., 19:05, Dan Gohman <goh... at apple.com> wrote:
> On Mar 27, 2009, at 10:40 AM, Gabor Greif wrote:
>
> > On Mar 27, 4:29 pm, Duncan Sands <baldr... at free.fr> wrote:
> >> Author: baldrick
> >> Date: Fri Mar 27 10:29:38 2009
> >> New Revision: 67844
>
> >> URL:http://llvm.org/viewvc/llvm-project?rev=67844&view=rev
> >> Log:
> >> Reapply r66415, which was reverted in r66426 for
> >> causing a bootstrap failure.  Bootstraps here on
> >> x86-32-linux and x86-64-linux.  Requested by the
> >> author Gabor Greif who says that a bug that might
> >> have been causing the failure has since been fixed.
>
> > Thanks, Duncan! Now, let's see whether it breaks again
> > on Leopard... (with fingers firmly crossed)
>
> llvm-gcc is getting errors on Leopard currently. I haven't
> definitely confirmed the cause, but it's aborting while
> building crtbegin.o, and with some debugging I got it to
> do this:
>
>   __sputc _OSSwapInt16 _OSSwapInt32 _OSSwapInt64 __darwin_fd_isset  
> cxa_atexit_check_2cc1(73643) malloc: *** error for object 0x41301c40:  
> incorrect checksum for freed object - object was probably modified  
> after being freed.
> *** set a breakpoint in malloc_error_break to debug
>
> Setting a breakpoint in malloc_error_break stops here:


Dan, thanks for the stack trace!
Everything till
> #6  0x00c9c553 in llvm::ilist_traits<llvm::Function>::createSentinel ()
looks reasonable.

But: createSentinel should not call FunctionType::get()
and even less free() !!!

I'll have a look into the code and come back in a bit.

Cheers,

     Gabor

>
> (gdb) where
> #0  0x95ef34a9 in malloc_error_break ()
> #1  0x95eee497 in szone_error ()
> #2  0x95e1bb4e in tiny_free_list_add_ptr ()
> #3  0x95e18bda in szone_free ()
> #4  0x95e182cd in free ()
> #5  0x00cb76a3 in llvm::FunctionType::get ()
> #6  0x00c9c553 in llvm::ilist_traits<llvm::Function>::createSentinel ()
> #7  0x00c654d6 in llvm::Function::Function ()
> #8  0x0038f9b2 in TreeToLLVM::StartFunctionBody (this=0xbffff458) at  
> llvm-gcc-4.2/gcc/llvm-convert.cpp:440
> #9  0x00398b57 in TreeToLLVM::EmitFunction (this=0xbffff458) at llvm-
> gcc-4.2/gcc/llvm-convert.cpp:718
> #10 0x0036b843 in llvm_emit_code_for_current_function  
> (fndecl=0xf7f400) at llvm-gcc-4.2/gcc/llvm-backend.cpp:959
> #11 0x0008ceee in tree_rest_of_compilation (fndecl=0xbffff458) at llvm-
> gcc-4.2/gcc/tree-optimize.c:479
> #12 0x0000bad2 in c_expand_body (fndecl=0xf7f400) at llvm-gcc-4.2/gcc/
> c-decl.c:7583
> #13 0x003ed637 in cgraph_expand_function (node=0xf814d0) at llvm-
> gcc-4.2/gcc/cgraphunit.c:1336
> #14 0x003ef523 in cgraph_assemble_pending_functions () at llvm-gcc-4.2/
> gcc/cgraphunit.c:390
> #15 0x003ef1c5 in cgraph_finalize_function (decl=0xf7f400,  
> nested=false) at llvm-gcc-4.2/gcc/cgraphunit.c:539
> #16 0x0000bee1 in finish_function () at llvm-gcc-4.2/gcc/c-decl.c:7552
> #17 0x00053c94 in c_parser_declaration_or_fndef (parser=0x42014870,  
> fndef_ok=true, empty_ok=<value temporarily unavailable, due to  
> optimizations>, nested=false, start_attr_ok=true, foreach_elem=0x0) at  
> llvm-gcc-4.2/gcc/c-parser.c:1632
> #18 0x00061211 in c_parser_external_declaration (parser=0x42014870) at  
> llvm-gcc-4.2/gcc/c-parser.c:1341
> #19 0x00061b7e in c_parser_translation_unit [inlined] () at llvm-
> gcc-4.2/gcc/c-parser.c:1227
> #20 0x00061b7e in c_parse_file () at llvm-gcc-4.2/gcc/c-parser.c:8884
> #21 0x00047d14 in c_common_parse_file (set_yydebug=-1780407866) at  
> llvm-gcc-4.2/gcc/c-opts.c:1326
> #22 0x0032718a in compile_file [inlined] () at llvm-gcc-4.2/gcc/
> toplev.c:1115
> #23 0x0032718a in do_compile [inlined] () at llvm-gcc-4.2/gcc/toplev.c:
> 2269
> #24 0x0032718a in toplev_main (argc=0, argv=0xbffff864) at llvm-
> gcc-4.2/gcc/toplev.c:2301
> #25 0x00069aad in main (argc=4, argv=0xbffff864) at llvm-gcc-4.2/gcc/
> llvm-main.cpp:38
>
> createSentinel is suspicious here.
>
> Dan
>
> _______________________________________________
> llvm-commits mailing list
> llvm-comm... at cs.uiuc.eduhttp://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits




More information about the llvm-commits mailing list