Skip to content

[Crash] The script generated by --enable-rft may be crashed in a few platforms #2306

@jondy

Description

@jondy

Enviroments:

  • linux.armv7
  • Python 3.12
  • Pyarmor 9.2.3 with Pro License

Inputs:

  • test.py
import sys
print('this platform is', sys.platform)

Reproduced steps:

$ pyarmor gen --enable-rft test.py
$ python dist/test.py
# Output: Segmentation fault (core dumped)

Solutions:

  1. Disable builtins refactor and enable simple import refactor by this way
$ pyarmor cfg rft_simple_import=1 rft_enables="import function class global local"
$ pyarmor gen --enable-rft test.py
$ python dist/test.py
# Output: this platform is arm
  1. Use Pyarmor v9 new features pyarmor build --rft
$ pyarmor init -e test.py
$ pyarmor build --rft

It will generate one reformed script to dist/test.py, then obfuscate it as before.

Please check pyarmor v9 doc
https://pyarmor.eke.org.cn

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions