Re: [cgkit-user] segfault help?
Brought to you by:
mbaas
|
From: Alejandro A. M. <fe...@gm...> - 2012-03-29 06:37:26
|
Hello Matthias,
> Let's check an exception from another file. I suppose the following
> lines also produce a segfault, right?
>
> >>> from cgkit._core import mat3
> >>> mat3()[4]
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> IndexError: index out of range
This one produces segfault.
> What about this one:
>
> >>> from cgkit._core import pnoise
> >>> pnoise(0,0,0,0)
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> ValueError: period must not be zero
And this one too.
> Now can you also run the following snippet to check with what flags
> extension modules will get build:
>
> >>> from distutils.sysconfig import get_config_vars
> >>> get_config_vars("OPT")
> ['-DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
> -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic
> -D_GNU_SOURCE -fPIC']
Here are my results:
>>> from distutils.sysconfig import get_config_vars
>>> get_config_vars("OPT")
['-DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes']
> >>> get_config_vars("CFLAGS")
> ['-fno-strict-aliasing -DNDEBUG -O2 -g -pipe -Wall
> -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
> --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC']
>>> get_config_vars("CFLAGS")
['-fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall
-Wstrict-prototypes']
> >>> get_config_vars("LDFLAGS")
> ['']
>>> get_config_vars("LDFLAGS")
['-Wl,-Bsymbolic-functions']
> >>> get_config_vars("LINKFORSHARED")
> ['-Xlinker -export-dynamic']
>>> get_config_vars("LINKFORSHARED")
['-Xlinker -export-dynamic -Wl,-O1 -Wl,-Bsymbolic-functions']
> I think only the first one (OPT) is relevant, but while you are at it
> you could check the other ones, too. I'm hoping that in your case the
> "-fexceptions" option is missing as this might then explain what's going on.
It seems you are right, and there's no "-fexceptions" in my options.
I guess the next step is to add that option an recompile cgkit... but I
have no idea how to do that. What do I have to do now?
Thanks,
Alejandro.
|