Menu

#1280 swig generate guile module which cause segmentation fault.

None
closed-works-for-me
guile (10)
5
2014-03-02
2012-11-11
Anonymous
No

Swig generated wraper file caused segmentation fault.

test is a very simeple c file add.c.

#include <stdio.h>

int add_int_int(int a, int b)
{
return a + b;
}

% guile --version
guile (GNU Guile) 2.0.5-deb+1-3
Copyright (C) 2011 Free Software Foundation, Inc.

License LGPLv3+: GNU LGPL 3 or later <http://gnu.org/licenses/lgpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

And I have just build the latest 2.0.8 swig, this fault still exists.

% gdb --args guile -c '(load-extension "./add.so" "SWIG_init")'

(gdb) run
Starting program: /usr/bin/guile -c \(load-extension\ \"./add.so\"\ \"SWIG_init\"\)
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff59e0cc4 in ensure_smob_tag (swig_module=0x8953f0, tag_variable=0x7ffff5be2488,
smob_name=0x7ffff59e16cf "swig-pointer",
scheme_variable_name=0x7ffff59e16be "swig-pointer-tag") at add_wrap.c:1075
1075 if (SCM_UNBNDP(SCM_VARIABLE_REF(variable))) {

Discussion

  • William Fulton

    William Fulton - 2014-03-02
    • status: open --> closed-works-for-me
    • Group: -->
     

Log in to post a comment.

MongoDB Logo MongoDB