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 clang-cl compilation of Modules/mmapmodule.c by chris-eibl · Pull Request #130446 · python/cpython

Conversation

@chris-eibl

@chris-eibl chris-eibl commented Feb 22, 2025 •
edited by bedevere-app Bot
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

After #129784 clang-cl fails with a compilation error for mmap__sizeof__method in Modules/mmapmodule.c:

..\Modules\mmapmodule.c(1201,25): error : incompatible function pointer types initializing 'PyCFunction' (aka 'struct _object *(*)(struct _object *, struct _object *)') with an expression of type 'PyObject *(PyObject *, void *)' (aka 's
truct _object *(struct _object *, void *)') [-Wincompatible-function-pointer-types] [e:\cpython_clang\PCbuild\pythoncore.vcxproj]

I think this is a skip-news.

  • 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
@chris-eibl
fix compilation of mmap__sizeof__method for clang-cl
4a0c16d
@bedevere-app bedevere-app Bot added the awaiting review label Feb 22, 2025
@bedevere-app bedevere-app Bot mentioned this pull request Feb 22, 2025
UBSan: Calling a function through pointer to incorrect function type is undefined behavior #111178
Closed
picnixz
picnixz reviewed Feb 22, 2025
View reviewed changes
Comment thread Modules/mmapmodule.c Resolved

Uh oh!

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

@picnixz picnixz added the skip news label Feb 22, 2025
@picnixz
Apply suggestions from code review
04e1c7b
picnixz
picnixz approved these changes Feb 22, 2025
View reviewed changes
@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting review labels Feb 22, 2025
@picnixz

picnixz commented Feb 22, 2025

Copy link
Copy Markdown
Member

@vstinner

I'd like to merge this one with title:

gh-111178: fix clang-cl compilation of `Modules/mmapmodule.c` post gh-129784 (#130446)

and commit body:

The `PyCFunction` cast on `mmap__sizeof__method` was removed but the method was not updated accordingly.
chris-eibl reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

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

vstinner
vstinner approved these changes Feb 22, 2025
View reviewed changes

@vstinner vstinner 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

Sorry, something went wrong.

Uh oh!

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

All reactions
@picnixz
picnixz merged commit 65b339c into python:main Feb 22, 2025
@bedevere-app bedevere-app Bot removed the awaiting merge label Feb 22, 2025
@picnixz

picnixz commented Feb 22, 2025 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

Thanks for the fix. I needed to fix some UBSan issues without any IDE or compiler support so it wasn't always easy :')

All reactions

Sorry, something went wrong.

Uh oh!

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

@chris-eibl
chris-eibl deleted the clang-cl_fix_for_mmapmodule.c branch February 23, 2025 07:44
@picnixz picnixz mentioned this pull request Feb 24, 2025
gh-111178: fix UBSan failures in Modules/posixmodule.c #129788
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@vstinner vstinner vstinner approved these changes
@picnixz picnixz picnixz 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.

3 participants

@chris-eibl @picnixz @vstinner
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 01402520 — 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.