gcc-python-plugin icon indicating copy to clipboard operation
gcc-python-plugin copied to clipboard

segfault

Open bukzor opened this issue 11 years ago • 8 comments

full stack trace here:

http://paste.pound-python.org/show/2m3CI1LolgD4GGPOWhvU/

It seems like there might be a refcount issue.

bukzor avatar May 22 '14 01:05 bukzor

Here's another. It looks similar to me.

http://paste.pound-python.org/show/axLWqRetbRnRklvXMdSi/

If you care to try to repro, i'm compiling this: https://github.com/bukzor/MySQLdb1

Using

$ echo $CC
/home/buck/trees/theirs/gcc-python-plugin/gcc-with-cpychecker --maxtrans=100000 --dump-json -wrapper gdb,--args

$ python setup.py build
(gdb) r
<segfault>

bukzor avatar May 22 '14 02:05 bukzor

Ah this is python2.7-dbg on ubuntu trusty.

bukzor avatar May 22 '14 02:05 bukzor

Notes to self: The first trace is happening during garbage-collection, whilst traversing a dict; the second one isn't during GC.

The first trace is in GC, specifically whilst visiting a value with key 'kind' (of a type that the pretty-printer treated as "unknown").

The 2nd trace is whilst looking up an entry within an OrderedDict, with key some gcc.VarDecl.

davidmalcolm avatar May 22 '14 13:05 davidmalcolm

You mentioned on IRC that this happens only about 20% of the time.

Out of interest, which version of gcc?

davidmalcolm avatar May 22 '14 13:05 davidmalcolm

Another: http://paste.pound-python.org/show/phqG6VimY5oaQhI12gY4/

It seems like there's a dict whose refcount is underflowing?

bukzor avatar May 22 '14 16:05 bukzor

$ gcc --version
gcc (Ubuntu 4.8.2-19ubuntu1) 4.8.2
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

bukzor avatar May 22 '14 16:05 bukzor

Another http://paste.pound-python.org/show/se2RAMtH9iKmQtLXlFAp/

bukzor avatar May 22 '14 17:05 bukzor

Here's another trace. http://paste.pound-python.org/show/5PXM8LoESmbBOyRQ8BSO/

bukzor avatar May 27 '14 16:05 bukzor