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: Avoid calling functions from incompatible pointer types in memoryobject.c by chrstphrchvz · Pull Request #112863 · python/cpython

Conversation

@chrstphrchvz

@chrstphrchvz chrstphrchvz commented Dec 8, 2023 •
edited by bedevere-app Bot
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor
  • 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
chrstphrchvz added 19 commits December 8, 2023 01:34
@chrstphrchvz
Make memory_clear() compatible with inquiry
239cc5d
@chrstphrchvz
Make memory_traverse() compatible with traverseproc
3c376a5
@chrstphrchvz
Make memory_dealloc() compatible with destructor
4b194a8
@chrstphrchvz
Make memory_repr() compatible with reprfunc
52c4537
@chrstphrchvz
Make memory_hash() compatible with hashfunc
92f48e6
@chrstphrchvz
Make memoryiter_next() compatible with iternextfunc
60b15fb
@chrstphrchvz
Make memoryiter_traverse() compatible with traverseproc
b0a78b0
@chrstphrchvz
Make memoryiter_dealloc() compatible with destructor
1662664
@chrstphrchvz
Make several functions compatible with getter
384357a
@chrstphrchvz
Make a few functions compatible with getter
09c83f8
@chrstphrchvz
Make memory_item() compatible with ssizeargfunc
bafeb88
@chrstphrchvz
Make memory_subscript() compatible with binaryfunc
d4f704a
@chrstphrchvz
Make memory_length() compatible with lenfunc
deaa83d
@chrstphrchvz
Make memory_ass_sub() compatible with objobjargproc
b7fd5e0
@chrstphrchvz
Make memory_releasebuf() compatible with releasebufferproc
538ad83
@chrstphrchvz
Make memory_getbuf() compatible with getbufferproc
df53cd0
@chrstphrchvz
Make mbuf_clear() compatible with inquiry
aeb1630
@chrstphrchvz
Make mbuf_traverse() compatible with traverseproc
ae90d75
@chrstphrchvz
Make mbuf_dealloc() compatible with destructor
0f26620
@bedevere-app bedevere-app Bot added the awaiting review label Dec 8, 2023
@bedevere-app bedevere-app Bot mentioned this pull request Dec 8, 2023
UBSan: Calling a function through pointer to incorrect function type is undefined behavior #111178
Closed
@encukou encukou added the skip news label Dec 11, 2023
encukou
encukou approved these changes Dec 11, 2023
View reviewed changes

@encukou encukou left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for helping to avoid UB.

Sorry, something went wrong.

Uh oh!

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

All reactions
@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting review labels Dec 11, 2023
@encukou
encukou merged commit f4fe65e into python:main Dec 11, 2023
@bedevere-app bedevere-app Bot removed the awaiting merge label Dec 11, 2023
arhadthedev added a commit to arhadthedev/cpython that referenced this pull request Dec 11, 2023
@arhadthedev
index on main: f4fe65e pythongh-111178: Avoid calling functions from …
364cf92
…incompatible pointer types in memoryobject.c (pythonGH-112863)
arhadthedev added a commit to arhadthedev/cpython that referenced this pull request Dec 11, 2023
@arhadthedev
WIP on main: f4fe65e pythongh-111178: Avoid calling functions from in…
1a351a5
…compatible pointer types in memoryobject.c (pythonGH-112863)
@chrstphrchvz
chrstphrchvz deleted the patch-111178-memoryobject branch December 12, 2023 11:03
aisk pushed a commit to aisk/cpython that referenced this pull request Feb 11, 2024
@chrstphrchvz @aisk
pythongh-111178: Avoid calling functions from incompatible pointer ty…
a9eb2c2
…pes in memoryobject.c (pythonGH-112863)

* Make memory_clear() compatible with inquiry
* Make memory_traverse() compatible with traverseproc
* Make memory_dealloc() compatible with destructor
* Make memory_repr() compatible with reprfunc
* Make memory_hash() compatible with hashfunc
* Make memoryiter_next() compatible with iternextfunc
* Make memoryiter_traverse() compatible with traverseproc
* Make memoryiter_dealloc() compatible with destructor
* Make several functions compatible with getter
* Make a few functions compatible with getter
* Make memory_item() compatible with ssizeargfunc
* Make memory_subscript() compatible with binaryfunc
* Make memory_length() compatible with lenfunc
* Make memory_ass_sub() compatible with objobjargproc
* Make memory_releasebuf() compatible with releasebufferproc
* Make memory_getbuf() compatible with getbufferproc
* Make mbuf_clear() compatible with inquiry
* Make mbuf_traverse() compatible with traverseproc
* Make mbuf_dealloc() compatible with destructor
Glyphack pushed a commit to Glyphack/cpython that referenced this pull request Sep 2, 2024
@chrstphrchvz @Glyphack
pythongh-111178: Avoid calling functions from incompatible pointer ty…
d4a572f
…pes in memoryobject.c (pythonGH-112863)

* Make memory_clear() compatible with inquiry
* Make memory_traverse() compatible with traverseproc
* Make memory_dealloc() compatible with destructor
* Make memory_repr() compatible with reprfunc
* Make memory_hash() compatible with hashfunc
* Make memoryiter_next() compatible with iternextfunc
* Make memoryiter_traverse() compatible with traverseproc
* Make memoryiter_dealloc() compatible with destructor
* Make several functions compatible with getter
* Make a few functions compatible with getter
* Make memory_item() compatible with ssizeargfunc
* Make memory_subscript() compatible with binaryfunc
* Make memory_length() compatible with lenfunc
* Make memory_ass_sub() compatible with objobjargproc
* Make memory_releasebuf() compatible with releasebufferproc
* Make memory_getbuf() compatible with getbufferproc
* Make mbuf_clear() compatible with inquiry
* Make mbuf_traverse() compatible with traverseproc
* Make mbuf_dealloc() compatible with destructor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@encukou encukou encukou approved these changes

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

@chrstphrchvz @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.