[cfe-dev] clang crashing with -g

Daniel Dunbar daniel at zuster.org
Thu Oct 23 16:43:15 PDT 2008


Hi Roman,
I'd like to help with this but as Eli says I need some more information.
Could we get a stack trace and a -E processed input file (preferably in a
bugzilla)?

Thanks,
 - Daniel


On Thu, Oct 23, 2008 at 12:17 PM, Roman Divacky <rdivacky at freebsd.org>wrote:

> hi
>
> I got clang often crashing on this:
>
> #0  0x0896de5c in llvm::isa_impl<clang::TagType, clang::Type>
> (Val=@0x9234f90) at Casting.h:54
> 54        return To::classof(&Val);
> (gdb) p Val
> $1 = (const clang::Type &) @0x9234f90: {_vptr$Type = 0x8fdd9d8,
> CanonicalType = {ThePtr = 153309072}, TC = 12}
>
> the code in question is:
>
> te <typename To, typename From>
> inline bool isa_impl(const From &Val) {
>     return To::classof(&Val);
> }
>
> where clang::TagType::classof is
>
>  static bool classof(const Type *T) { return T->getTypeClass() == Tagged; }
>
> and for clang::Type the getTypeClass method is:
>
>  TypeClass getTypeClass() const { return static_cast<TypeClass>(TC); }
>
> I also dont see any place where it can crash :(
>
> also, there is a strange thing that gdb shows me that Val is clang::Type
> which has TC == 5
> but:
>
> (gdb) p Val->TC
> $2 = 12
>
> I also would like to add that removing "-g" from clang's options makes this
> crash go away
>
> can you help me?
>
> thnx!
>
> roman
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20081023/2b11c1a2/attachment.html>


More information about the cfe-dev mailing list