Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upx 3.92 - compressing a Python pyd file generates "DLL load failed: Invalid access to memory location." #42

Closed
AraHaan opened this issue Dec 27, 2016 · 7 comments
Assignees
Milestone

Comments

@AraHaan
Copy link

AraHaan commented Dec 27, 2016

What's the problem (or question)?

Compressing a Python pyd file (both 32 and 64 bit versions for Python 3.5 and Python 3.6 Makes it unable to be imported.

What should have happened?

The import to work as if the files modules was not compressed.

Do you have an idea for a solution?

No idea for the fix.

How can we reproduce the issue?

  1. Use Cython to compile a Python Script
  2. Compress with UPX.
  3. Try to import the module.
  4. The same Error as above happens with something similar to this Traceback
Traceback (most recent call last):
  File "E:\Users\Elsword\Desktop\DecoraterBot\Async\\zipmaker\make_zip.py", line
 9, in <module>
    import py2pycx
  File "E:\Users\Elsword\Desktop\DecoraterBot\Async\zipmaker\py2pycx\__init__.py
", line 13, in <module>
    from . import _pycx_hook
  File "_pycx_hook.py", line 26, in init _pycx_hook (_pycx_hook.c:1335)
ImportError: DLL load failed: Invalid access to memory location.

Please tell us details about your environment.

  • UPX version used (upx --version): 3.92
  • Operating System and version: Windows 7 Ultimate x64 (SP1) build 6701
  • CPU architecture: amd64

Original:
http://puu.sh/t2icZ/7b96f2215c.zip

Compressed:
http://puu.sh/t2idI/8184d6af51.zip

@ml1050
Copy link
Contributor

ml1050 commented Dec 30, 2016

Does UPX 3.91 work for you?

I'm not sure how to test your pyd files. Can you give me some more information what I need to install to test them? (I will test them on linux with wine - I do not have a real windows environment).

@AraHaan
Copy link
Author

AraHaan commented Dec 30, 2016

Python 3.5.x and Python 3.6.0 for Windows. The .cp35 pyd files require python35.dll the other .cp36 pyd files require python36.dll The 1st import for the non packed ones should succeed while the packed ones should fail for some reason.

@ml1050
Copy link
Contributor

ml1050 commented Dec 31, 2016

Unfortunately python seems to require lots of DLLs which are not available under wine, so I can not test your files. But if UPX 3.91 works for you, then there is a chance, that I've already fixed this problem on the devel branch.

@markus-oberhumer
Copy link
Collaborator

We now have automated builds of the devel branch - please download the current win32 version from

https://github.com/upx/upx-automatic-builds/tree/devel-20170115-120150-ac4b51-travis/i386-w64-mingw32-gcc-4.6-release

@markus-oberhumer markus-oberhumer added this to the v3.93 milestone Jan 16, 2017
@markus-oberhumer
Copy link
Collaborator

Please try the fresh UPX 3.93 release and close this issue if fixed.

@AraHaan
Copy link
Author

AraHaan commented Jan 29, 2017

ok, I am going to try that.

@AraHaan
Copy link
Author

AraHaan commented Jan 29, 2017

Ok, latest release fixed it thanks.

@AraHaan AraHaan closed this as completed Jan 29, 2017
mkhon added a commit to mkhon/bleachbit that referenced this issue Jan 30, 2017
(see upx/upx#42).
This saves about 13M of uncompressed distribution size.
- Remove the following unused files:
	- etc\bash_completion.d
	- lib\GNU.Gettext.dll (.Net library)
	- lib\gtk2.0\include
mkhon added a commit to mkhon/bleachbit that referenced this issue Jan 30, 2017
(see upx/upx#42).
This saves about 12M of uncompressed distribution size.
- Remove the following unused files:
	- etc\bash_completion.d
	- lib\GNU.Gettext.dll (.Net library)
	- lib\gtk2.0\include
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants