-
Notifications
You must be signed in to change notification settings - Fork 344
Description
Encryption may generate functions that cause Python to crash with a memory access violation (0xc0000005) after 1024 or 2048 calls.
The exe is generated from source code containing about 5000 functions, and this has occurred 4 times in about 200 encryptions. (In other words, a problematic function is generated with low probability, and if we generate it again with the same py file, it will not occur.)
The function that causes the problem appears to change randomly each time it is generated.
The command at the time of generation is as follows
- pyarmor pack -s main.spec -x "--restrict=101 --exclude .venv" main.py
The above command generates a single exe file, but the problem also occurs when the exe file is disassembled back into a .py file and executed
I tried to find out as much as possible about one of the files where the problem occurred.
It seemed that the error occurred at the moment of calling a particular encrypted function from a particular encrypted function in another file. I replaced one of the two files with an unencrypted one and the problem no longer occurs.
However, I have not been able to get any detailed results because of the encryption.
Is there any possible known or resolved cause?
I will add more if I find out anything else.
C:\Users\Admin>pyarmor info
INFO PyArmor Version 6.8.0
INFO Python 3.8.9
ERROR [Errno 2] No such file or directory: '.pyarmor_config'
OS: Windows 10 x64