Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 417823 - dev-lang/swig-2.0.7 segfaults when generating python code for media-libs/lcms-1.19
Summary: dev-lang/swig-2.0.7 segfaults when generating python code for media-libs/lcms...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Scheme Project
URL: https://sourceforge.net/tracker/?func...
Whiteboard:
Keywords:
Depends on:
Blocks: 417751
  Show dependency tree
 
Reported: 2012-05-27 17:58 UTC by Cyprien Nicolas (fulax)
Modified: 2012-07-12 19:22 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
media-libs/lcms-1.19 build.log (lcms-1.19:20120527-140113.log,2.50 KB, text/plain)
2012-05-27 17:58 UTC, Cyprien Nicolas (fulax)
Details
Upstream fix (swig-2.0.7_bug-417823.patch,4.43 KB, patch)
2012-07-12 16:36 UTC, Cyprien Nicolas (fulax)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Cyprien Nicolas (fulax) 2012-05-27 17:58:04 UTC
Created attachment 313307 [details]
media-libs/lcms-1.19 build.log

Not yet in tree swig-2.0.7, not adding printing@ in CC.
Reported Upstream, see $URL

lambda ~ # cd /var/tmp/portage/media-libs/lcms-1.19/work/lcms-1.19/python

lambda python # swig -v -Wall -I../include -python -shadow -c++ -o lcms_wrap.cxx lcms.i
Language subdirectory: python
Search paths:
   ./
   ../include/
   ./swig_lib/python/
   /usr/share/swig/2.0.7/python/
   ./swig_lib/
   /usr/share/swig/2.0.7/
Preprocessing...
Starting language-specific parse...
Processing types...
C++ analysis...
Generating wrappers...
Segmentation fault

lambda python # gdb swig
GNU gdb (Gentoo 7.3.1 p2) 7.3.1
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu".
For bug reporting instructions, please see:
<http://bugs.gentoo.org/>...
Reading symbols from /usr/bin/swig...Reading symbols from /usr/lib/debug/usr/bin/swig.debug...done.
done.
(gdb) r -Wall -I../include -python -shadow -c++ -o lcms_wrap.cxx lcms.i
Starting program: /usr/bin/swig -Wall -I../include -python -shadow -c++ -o lcms_wrap.cxx lcms.i

Program received signal SIGSEGV, Segmentation fault.
0xb7d92cd7 in __strstr_ia32 () from /lib/libc.so.6
(gdb) bt
#0  0xb7d92cd7 in __strstr_ia32 () from /lib/libc.so.6
#1  0x08155de5 in Swig_scopename_last (s=0x0) at Swig/misc.c:872
#2  0x0815a04e in Swig_name_str (n=0x8615a00) at Swig/naming.c:1667
#3  0x0815a19a in Swig_name_decl (n=0x8615a00) at Swig/naming.c:1714
#4  0x080ca064 in Language::destructorDeclaration(void*) ()
#5  0x080cd101 in Dispatcher::emit_one(void*) ()
#6  0x080cd41c in Language::emit_one(void*) ()
#7  0x080ccbaa in Dispatcher::emit_children(void*) ()
#8  0x080c868b in Language::extendDirective(void*) ()
#9  0x080cd1cd in Dispatcher::emit_one(void*) ()
#10 0x080cd41c in Language::emit_one(void*) ()
#11 0x080ccbaa in Dispatcher::emit_children(void*) ()
#12 0x080ce529 in Language::classHandler(void*) ()
#13 0x0811dcdb in PYTHON::classHandler(void*) ()
#14 0x080ceadd in Language::classDeclaration(void*) ()
#15 0x080cd09b in Dispatcher::emit_one(void*) ()
#16 0x080cd41c in Language::emit_one(void*) ()
#17 0x080ccbaa in Dispatcher::emit_children(void*) ()
#18 0x080c8708 in Language::includeDirective(void*) ()
#19 0x080cd351 in Dispatcher::emit_one(void*) ()
#20 0x080cd41c in Language::emit_one(void*) ()
#21 0x080ccbaa in Dispatcher::emit_children(void*) ()
#22 0x0810e930 in PYTHON::top(void*) ()
#23 0x080d6f2f in SWIG_main(int, char**, Language*) ()
#24 0x0813b384 in main ()
Comment 1 Cyprien Nicolas (fulax) 2012-05-28 11:00:48 UTC
Upstream said:

You can avoid it easily by declaring the destructor correctly or if you
forgot the return type in the declaration of a method, add it in. Deleting
the appropriate line will also work - note that it is currently being
ignored!

This seg fault is fixed in trunk for swig-2.0.8, rev 13128.


Patch backported to swig-2.0.7-r1 in the lisp overlay.

The lcms-1.19 build.log now shows:
lcms.i:196: Warning 521: Illegal destructor name COLORW::~COLORB(). Ignored.
Comment 2 Cyprien Nicolas (fulax) 2012-07-12 16:34:55 UTC
Reopening as swig-2.0.7 is now in tree and stable lcms-1.19 won't build for ~arch people.

A fix is available in the lisp overlay :
http://git.overlays.gentoo.org/gitweb/?p=proj/lisp.git;a=commit;h=76ecbb30433d06622c0def9f6e61d2a7b8764e17
Comment 3 Cyprien Nicolas (fulax) 2012-07-12 16:36:20 UTC
Created attachment 318008 [details, diff]
Upstream fix

Extracted from rev 14128

http://swig.svn.sourceforge.net/viewvc/swig?view=revision&revision=13128
Comment 4 Tim Harder gentoo-dev 2012-07-12 19:22:17 UTC
Fixed in CVS.