Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix a compiler warning in _xxsubinterpretermodule.c#103245

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Yhg1s merged 1 commit intopython:mainfromYhg1s:xxsubinterp-warning
Apr 4, 2023

Conversation

@Yhg1s
Copy link
Member

Fix a (correct) warning about potential uses of uninitialized memory in _xxsubinterpreter. Unlike newly allocated PyObject structs or global structs, stack-allocated structs are not initialised, and a few places in the code expect the _sharedexception struct data to be NULL when not set.

_xxsubinterpreter. Unlike newly allocated PyObject structs or globalstructs, stack-allocated structs are not initialised, and a few places inthe code expect the _sharedexception struct data to be either NULL orinitialised.
Copy link
Member

@ericsnowcurrentlyericsnowcurrently left a comment

Choose a reason for hiding this comment

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

LGTM

@Yhg1sYhg1s merged commit89e6a34 intopython:mainApr 4, 2023
@Yhg1sYhg1s deleted the xxsubinterp-warning branchApril 4, 2023 14:53
@gaogaotiantian
Copy link
Member

In my opinion, the fix in#103048 is slightly better. Function wise they are equivalent as of now, butno_exception has better semantics. Also, in the future ifstruct _sharedexception is changed(this is a local use data structure), one less line of code to worry about. If we only want to zero initialize the struct,_sharedexception exc = {0}; can also save the trouble to modify it in the future in case the struct is changed.

erlend-aasland reacted with thumbs up emoji

gaogaotiantian pushed a commit to gaogaotiantian/cpython that referenced this pull requestApr 8, 2023
Fix a (correct) warning about potential uses of uninitialized memory in_xxsubinterpreter. Unlike newly allocated PyObject structs or globalstructs, stack-allocated structs are not initialised, and a few places inthe code expect the _sharedexception struct data to be either NULL orinitialised.
warsaw pushed a commit to warsaw/cpython that referenced this pull requestApr 11, 2023
Fix a (correct) warning about potential uses of uninitialized memory in_xxsubinterpreter. Unlike newly allocated PyObject structs or globalstructs, stack-allocated structs are not initialised, and a few places inthe code expect the _sharedexception struct data to be either NULL orinitialised.
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@ericsnowcurrentlyericsnowcurrentlyericsnowcurrently approved these changes

@erlend-aaslanderlend-aaslanderlend-aasland approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

5 participants

@Yhg1s@gaogaotiantian@ericsnowcurrently@erlend-aasland@bedevere-bot

[8]ページ先頭

©2009-2025 Movatter.jp