GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-111178: fix UBSan failures in `Modules/{blake2,md5,sha1,sha2,sha3}module.c` by picnixz · Pull Request #128248 · python/cpython

Conversation

@picnixz

@picnixz picnixz commented Dec 25, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Effective commits

  • fix UBSan failures in blake2module.c
  • fix UBSan failures in md5module.c
  • fix UBSan failures in sha1module.c
  • fix UBSan failures in sha2module.c
  • fix UBSan failures in sha3module.c

Cosmetics

  • suppress unused return values
  • remove redundant casts in constructors
  • suppress unused parameters in {md5,sha*,blake2}module.c
  • Issue: UBSan: Calling a function through pointer to incorrect function type is undefined behavior #111178

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
picnixz added 7 commits December 23, 2024 15:04
@picnixz
fix UBSan failures in sha3module.c
4774f0c
@picnixz
fix UBSan failures in sha2module.c
d4179e1
@picnixz
fix UBSan failures in sha1module.c
83b696b
@picnixz
fix UBSan failures in md5module.c
a0e2b2a
@picnixz
suppress unused return values
e43effb
@picnixz
remove redundant casts in constructors
ecf78f9
@picnixz
suppress unused parameters in {md5,sha*}module.c
d9452e8
@picnixz
picnixz requested a review from gpshead as a code owner December 25, 2024 09:24
@picnixz picnixz added the skip news label Dec 25, 2024
@picnixz
picnixz requested a review from tiran as a code owner December 25, 2024 09:24
@bedevere-app bedevere-app Bot mentioned this pull request Dec 25, 2024
UBSan: Calling a function through pointer to incorrect function type is undefined behavior #111178
Closed
@bedevere-app bedevere-app Bot added the awaiting review label Dec 25, 2024
picnixz added 2 commits December 25, 2024 13:01
@picnixz
fix UBSan failures for blake2module.c
61a0de8
@picnixz
suppress unused parameters in blake2module.c
568bff8
@picnixz picnixz changed the title gh-111178: fix UBSan failures in Modules/{sha1,sha2,sh3,md5}module.c gh-111178: fix UBSan failures in Modules/{blake2,md5,sha1,sha2,sha3}module.c Dec 25, 2024
picnixz added 5 commits January 14, 2025 12:01
@picnixz
Merge remote-tracking branch 'upstream/main' into fix/ubsan/sha-111178
494565a
@picnixz
reduce diff
3d85690
@picnixz
reduce diff
34e8b55
@picnixz
reduce diff
20bf303
@picnixz
Merge branch 'main' into fix/ubsan/sha-111178
e06f834
@encukou
encukou merged commit 922cfec into python:main Jan 27, 2025
@bedevere-app bedevere-app Bot removed the awaiting review label Jan 27, 2025
@encukou

encukou commented Jan 27, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

One nitpick to keep in mind for the future: C standard reserves identifiers that start with underscore and capital letter, so e.g. defining _Blake2Object_CAST is technically undefined behaviour.
(Same with _Py*, of course. It'd be nicer to not add new ones in addition to _Py.)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@picnixz
picnixz deleted the fix/ubsan/sha-111178 branch February 2, 2025 21:52
@picnixz

picnixz commented Feb 2, 2025

Copy link
Copy Markdown
Member Author

Oh... I was not aware of this. All my branches use an underscore so that the macro is really thought as being private. I can update the PRs locally as they are not yet pushed if you think it's something we should do.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This was referenced Feb 7, 2025
gh-111178: fix UBSan failures in Modules/_datetimemodule.c #129774
Merged
gh-111178: fix UBSan failures in Modules/_interp*module.c #129779
Merged
gh-111178: fix UBSan failures in Modules/_jsonmodule.c #129781
Merged
gh-111178: fix UBSan failures in Modules/_lsprof.c #129782
Merged
gh-111178: fix UBSan failures in Modules/_lzmamodule.c #129783
Merged
This was referenced Feb 7, 2025
gh-111178: fix UBSan failures in Modules/_zoneinfo.c #129798
Merged
gh-111178: fix UBSan failures in Modules/_hashopenssl.c #129802
Merged
gh-111178: fix UBSan failures in Modules/_winapi.c #129796
Merged
gh-111178: fix UBSan failures in Modules/xx*.c #129797
Merged
gh-111178: fix UBSan failures in Modules/_randommodule.c #129791
Merged
gh-111178: fix UBSan failures in Modules/_struct.c #129793
Merged
gh-111178: fix UBSan failures in Modules/_threadmodule.c #129794
Merged
gh-111178: fix UBSan failures in Modules/_pickle.c #129787
Merged
gh-111178: fix UBSan failures in Modules/_operator.c #129785
Merged
gh-111178: fix UBSan failures in Modules/_queuemodule.c #129790
Merged
gh-111178: fix UBSan failures in Modules/_collectionsmodule.c #129773
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@gpshead gpshead Awaiting requested review from gpshead gpshead is a code owner
@tiran tiran Awaiting requested review from tiran

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

skip news

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@picnixz @encukou
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.