-
Notifications
You must be signed in to change notification settings - Fork 301
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
[BUG] continue dont work in while loop with enable-bcc
#2023
Comments
I'll check it |
I can't reproduce this issue. What I test is using this script def generator():
counter = 0
while 1:
print(f"Counter: {counter}")
counter+=1
if counter > 100: return "success"
for i in range(5):
if 1:
try: pass
except: pass
else:
try: pass
except: pass
print("CONTINUE")
continue
result = generator()
print(f"Result: {result}") And test is with
It works fine, print
|
I did it on windows. I have tried clang 9.0 and clang latest version and the result is the same "Result: None". Can you tell me what other programs might have been involved at the time of obfuscation? |
I thought it was a windows problem. No, I installed a clean ubuntu 24 and pyarmor failed again. The script is the same, the line parameters are the same as yours. Tried different versions of pyarmor - same thing. |
I want to specify that I use pro license without ci/cd. Maybe on version 9 with "pro" license pyarmor-8 is used regardless of the library version |
It's fine in Darwin.x86_64. Reproduced it in Ubuntu. I'll check it. |
This bug has been fixed in latest version v9.0.7 |
thanks! |
I have simplified my code to the limit to make it clear. In this code, after continue the function terminates for some unknown reason (exactly if you use --enable-bcc) if you just run the script it will return "success"
If you remove the loop - everything works with pyarmor --enable-bcc.
If you remove one try block - everything works with pyarmor --enable-bcc
If you remove one else block - everything works with pyarmor --enable-bcc.
This particular code construction does not work. I really want to use bcc, but I'm afraid that the same problem may occur on other code sections of a large project.
p.s. I understand that continue is not needed at the end, in the original code it is triggered by a condition and if the condition is not triggered, the other code works.
pyarmor line: pyarmor generate "test.py" --enable-bcc --output "build"
pyarmor version 9.0.6 (pro)
python version 3.9.13
The text was updated successfully, but these errors were encountered: