[cfe-dev] clang segfault - CXTypes.cpp:134

Gregory Szorc gregory.szorc at gmail.com
Tue Jan 15 21:49:49 PST 2013


Could you please try reproducing this with Clang 3.2 or the latest SVN
version (http://clang.llvm.org/get_started.html)?

On 1/15/2013 6:06 PM, Andrew Hankins wrote:
> Hi all,
>
> Using libclang with the python bindings to parse some header files and
> hopefully generate the equivalent Python ctypes definition for the
> structures requested.
> After parse as I'm walking through the tree I am hitting a segfault in
> CXIndex.cpp:134 from struct2ctype.py:87
> Looks like in CXTypes.cpp getCursorTU(C) returns null and freaks out
> on the next line where its dereferenced - Every valid cursor should
> have a valid TU right?
> I've attach two files that can be used to reproduce the issue. Invoke
> with the following command
>
> python2.7 struct2ctypes.py -d . StructName
>
> I've had some mixed results reproducing the issue. With library I
> built from head I hit the issue having only parsed the single file but
> library shipped with ubuntu I need to place the file in a directory
> structure with plenty of other files.
>
> My machine details
>  - Linux 3.2.0-24-generic #39-Ubuntu SMP Mon May 21 16:52:17 UTC 2012
> x86_64 x86_64 x86_64 GNU/Linux
>  - Python 2.7.3 (default, Aug  1 2012, 05:14:39)
>  - clang version 3.0
>
> Happy to work further on this - just need some direction
>
> Cheers,
> Andrew
>
>
> _______________________________________________
> 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/20130115/7d2ff9d0/attachment.html>


More information about the cfe-dev mailing list