[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:57:46 PDT 2009


On 27 Mrz., 19:40, Gabor Greif <ggr... at gmail.com> wrote:
> 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.

Following up myself, ilist_traits<llvm::Function>::createSentinel
in VMCore/Module.cpp *does* call FunctionType::get()!
Nevertheless it looks like a grand kludge, I should better
convert it to a "ghostly" sentinel anyway...

I guess the crash is something of a memory effect of a previous
Module creation/destruction.

Working on it.

Cheers,

    Gabor

>
> Cheers,
>
>      Gabor




More information about the llvm-commits mailing list