VanL / shedskin

Shed Skin is an experimental compiler, that can translate pure, but implicitly statically typed Python (2.4-2.6) programs into optimized C++
0 stars 1 forks source link

Segmentation fault creating a python module #129

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. create a python module with the following command:
shedskin -e payload10.py && make
2. run the generated payload10.so using the following command:
python payload10_wrapp.py 

What is the expected output? What do you see instead?
The expected output is (it can be reproduced by deleting the .so file using 
directly the py file):
inizio
post init
inizio step
prima di step
t= 0.1  k= 1000000
t= 0.1  k= 30000000  ********
dopo di step
post step

What I see instead is:
inizio
post init
inizio step
prima di step
Segmentation fault

What version of the product are you using? On what operating system?
SHED SKIN Python-to-C++ Compiler 0.7
Kubuntu 10.04.2 LTS

Please provide any additional information below.
If I generate an executable and run it:
shedskin payload10.py && make && ./payload10
I obtain the expected result (no Segfault)
t= 0.1  k= 1000000
t= 0.1  k= 30000000  ********

Original issue reported on code.google.com by Andrea.A...@gmail.com on 27 Feb 2011 at 10:51

Attachments:

GoogleCodeExporter commented 9 years ago
thanks for reporting! the problem seems to have been fixed with 0.7.1. could 
you please try this version, to see if it works for you? there is no debian 
package yet, unfortunately..

Original comment by mark.duf...@gmail.com on 27 Feb 2011 at 12:28

GoogleCodeExporter commented 9 years ago
Hum..
I've tried to alienize the rpm package but it has created a wrong package.
Now I can try to install the tgz package, but I see no remove tool and as far 
as I can see it is also not possible to use checkinstall to have a deb from it.
So, is there any chance to have the .deb package released soon?
Otherwise how can I revert the installation in case of problems?

Original comment by Andrea.A...@gmail.com on 27 Feb 2011 at 1:18

GoogleCodeExporter commented 9 years ago
I'm not sure when the .deb package will be ready. to run it without installing 
anything, you could change script/shedskin (in the tarball) to include 
something like this:

import sys
sys.path.insert(0, 'path-to-local-dir')

now when you run script/shedskin, it should import shedskin from the current 
dir.

Original comment by mark.duf...@gmail.com on 27 Feb 2011 at 1:25

GoogleCodeExporter commented 9 years ago
I managed to install the 0.7.1 version with checkinstall and I can confirm that 
the issue has been fixed with these release.
Thank you

Original comment by Andrea.A...@gmail.com on 27 Feb 2011 at 1:39

GoogleCodeExporter commented 9 years ago
interesting, I didn't know checkinstall. thanks for mentioning and testing 
against 0.7.1! :)

Original comment by mark.duf...@gmail.com on 27 Feb 2011 at 2:24

GoogleCodeExporter commented 9 years ago
Just for the sake of completness.
To generate a deb file with checkinstall, you have to:
-unpack the archive
-cd to the directory which includes setup.py
-run sudo checkinstall python setup.py install
(you have to specify the dependencies as a dot separated list)
At the end of the process the deb will be generated and installed
The .deb file generated by checkinstall however is not meant for distribution

Original comment by Andrea.A...@gmail.com on 27 Feb 2011 at 2:37

GoogleCodeExporter commented 9 years ago
nice, thanks a lot! 

Original comment by mark.duf...@gmail.com on 27 Feb 2011 at 3:45