-
Notifications
You must be signed in to change notification settings - Fork 484
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
Fix segemation errror for ARM64/ Apple siliion #541
Conversation
Please note, that the segmentation error doesn't occur if the system/platform failes to load the
ImportError will be raised at: pycryptodome/lib/Crypto/Math/Numbers.py Line 36 in 5dace63
However if the pycryptodome/lib/Crypto/Math/_IntegerGMP.py Line 162 in 5dace63
A new instance of Integer is created or used by the Also lastly. for reference here is what
|
Could someone from pycryptodome please review this ASAP? I don't mean to be pushy, but (in my understanding) pycryptodome is now broken for all Mac OS users running Python 3.9, which affects our project. Thanks a lot, and keep up the great work! |
On Mac OS M1 (ARM processor), when the GMP library is available, pycryptodome crashes with a segmentation fault during the generation of the RSA keys. Upstream issue: Legrandin/pycryptodome#506 Upstream fix: Legrandin/pycryptodome#541 Close #473.
On Mac OS M1 (ARM processor), when the GMP library is available, pycryptodome crashes with a segmentation fault during the generation of the RSA keys. Upstream issue: Legrandin/pycryptodome#506 Upstream fix: Legrandin/pycryptodome#541 Close #473.
On Mac OS M1 (ARM processor), when the GMP library is available, pycryptodome crashes with a segmentation fault during the generation of the RSA keys. Upstream issue: Legrandin/pycryptodome#506 Upstream fix: Legrandin/pycryptodome#541 Close #473.
On Mac OS M1 (ARM processor), when the GMP library is available, pycryptodome crashes with a segmentation fault during the generation of the RSA keys. Upstream issue: Legrandin/pycryptodome#506 Upstream fix: Legrandin/pycryptodome#541 Close #473.
On Mac OS M1 (ARM processor), when the GMP library is available, pycryptodome crashes with a segmentation fault during the generation of the RSA keys. Upstream issue: Legrandin/pycryptodome#506 Upstream fix: Legrandin/pycryptodome#541 Close #473.
Is this fix really needed on all ARM64 platforms, or only on the M1 (one of the several types of ARM64)? |
@Legrandin No certainly it's only needed when for ARM and drawin/MAC. And actualy @regisb have had the same rationale, where he added a new condition to check for the OS running, i.e. |
Thanks for this PR. |
Thanks again for your work @Legrandin! |
Relevant issues are
Description of work:
Solve segmentation error which might occur on apple silicon when using GMP,
the work around was to raise a new exception in Numbers module, if ARM64 is detected as the platform,
so that Numbers would export IntegerCustom or IntegerNative instead of IntegerGMP.