Skip to content

[3.10] bpo-46913: Fix test_ctypes, test_hashlib, test_faulthandler on UBSan #31675

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

Merged
merged 4 commits into from
Mar 4, 2022
Merged

[3.10] bpo-46913: Fix test_ctypes, test_hashlib, test_faulthandler on UBSan #31675

merged 4 commits into from
Mar 4, 2022

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Mar 3, 2022

https://bugs.python.org/issue46913

vstinner added 4 commits March 4, 2022 00:42
Disable undefined behavior sanitizer (UBSAN) on
faulthandler_sigfpe().

(cherry picked from commit 4173d67)
Disable undefined behavior sanitizer (UBSan) on
faulthandler._read_null().

(cherry picked from commit 65b92cc)
If Python is built with UBSan, test_hashlib skips tests on the _sha3
extension which currently has undefined behaviors.

This change allows to run test_hashlib to check for new UBSan regression,
but the known _sha3 undefined behavior must be fixed.

(cherry picked from commit 6d0d7d2)
If Python is built with UBSan, test_ctypes now skips test_shorts().
This change allows to run test_ctypes to check for new UBSan regression,
but the known test_shorts() undefined behavior must be fixed.

(cherry picked from commit ad1b044)
@vstinner vstinner requested a review from tiran as a code owner March 3, 2022 23:46
@vstinner vstinner added the needs backport to 3.9 only security fixes label Mar 3, 2022
@vstinner vstinner merged commit 7b5b429 into python:3.10 Mar 4, 2022
@miss-islington
Copy link
Contributor

Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.9.
🐍🍒⛏🤖

@vstinner vstinner deleted the ubsan310 branch March 4, 2022 00:12
@miss-islington
Copy link
Contributor

Sorry, @vstinner, I could not cleanly backport this to 3.9 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker 7b5b429adab4fe0fe81858fe3831f06adc2e2141 3.9

@bedevere-bot
Copy link

GH-31676 is a backport of this pull request to the 3.9 branch.

vstinner added a commit that referenced this pull request Mar 4, 2022
…H-31675) (GH-31676)

* bpo-46913: Fix test_faulthandler.test_sigfpe() on UBSAN (GH-31662)

Disable undefined behavior sanitizer (UBSAN) on
faulthandler_sigfpe().

(cherry picked from commit 4173d67)

* bpo-46913: Fix test_faulthandler.test_read_null() on UBSan (GH31672)

Disable undefined behavior sanitizer (UBSan) on
faulthandler._read_null().

(cherry picked from commit 65b92cc)

* bpo-46913: test_hashlib skips _sha3 tests on UBSan (GH-31673)

If Python is built with UBSan, test_hashlib skips tests on the _sha3
extension which currently has undefined behaviors.

This change allows to run test_hashlib to check for new UBSan regression,
but the known _sha3 undefined behavior must be fixed.

(cherry picked from commit 6d0d7d2)

* bpo-46913: Skip test_ctypes.test_shorts() on UBSan (GH-31674)

If Python is built with UBSan, test_ctypes now skips test_shorts().
This change allows to run test_ctypes to check for new UBSan regression,
but the known test_shorts() undefined behavior must be fixed.

(cherry picked from commit ad1b044)
(cherry picked from commit 7b5b429)
hello-adam pushed a commit to hello-adam/cpython that referenced this pull request Jun 2, 2022
…ythonGH-31675) (pythonGH-31676)

* bpo-46913: Fix test_faulthandler.test_sigfpe() on UBSAN (pythonGH-31662)

Disable undefined behavior sanitizer (UBSAN) on
faulthandler_sigfpe().

(cherry picked from commit 4173d67)

* bpo-46913: Fix test_faulthandler.test_read_null() on UBSan (GH31672)

Disable undefined behavior sanitizer (UBSan) on
faulthandler._read_null().

(cherry picked from commit 65b92cc)

* bpo-46913: test_hashlib skips _sha3 tests on UBSan (pythonGH-31673)

If Python is built with UBSan, test_hashlib skips tests on the _sha3
extension which currently has undefined behaviors.

This change allows to run test_hashlib to check for new UBSan regression,
but the known _sha3 undefined behavior must be fixed.

(cherry picked from commit 6d0d7d2)

* bpo-46913: Skip test_ctypes.test_shorts() on UBSan (pythonGH-31674)

If Python is built with UBSan, test_ctypes now skips test_shorts().
This change allows to run test_ctypes to check for new UBSan regression,
but the known test_shorts() undefined behavior must be fixed.

(cherry picked from commit ad1b044)
(cherry picked from commit 7b5b429)
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

Successfully merging this pull request may close these issues.

4 participants