Skip to content
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

[3.12] gh-108487: Fix crash due to incorrect assert #108508

Closed
wants to merge 625 commits into from

Conversation

gvanrossum
Copy link
Member

@gvanrossum gvanrossum commented Aug 26, 2023

The assert(method != NULL) in CALL_NO_KW_LIST_APPEND is wrong --
this condition should lead to a deoptimization, and indeed there
is a DEOPT_IF two lines later that will trigger if method == NULL.

This would crash in a devious repro scenario (first seen live
in boto3 tests) when compiled with assertions enabled.
In a production version there is no crash, so impact is limited.

(The crash also appears in main; I will prepare a separate PR.)


📚 Documentation preview 📚: https://cpython-previews--108508.org.readthedocs.build/

miss-islington and others added 30 commits July 21, 2023 22:27
…Variable (pythongh-106923) (python#106964)

pythongh-105699: Fix a Crasher Related to a Deprecated Global Variable (pythongh-106923)

There was a slight race in _Py_ClearFileSystemEncoding() (when called from _Py_SetFileSystemEncoding()), between freeing the value and setting the variable to NULL, which occasionally caused crashes when multiple isolated interpreters were used.  (Notably, I saw at least 10 different, seemingly unrelated spooky-action-at-a-distance, ways this crashed. Yay, free threading!)  We avoid the problem by only setting the global variables with the main interpreter (i.e. runtime init).
(cherry picked from commit 0ba07b2)

Co-authored-by: Eric Snow <[email protected]>
) (python#106963)

pythongh-105699: Fix an Interned Strings Crasher (pythongh-106930)

A static (process-global) str object must only have its "interned" state cleared when no longer interned in any interpreters.  They are the only ones that can be shared by interpreters so we don't have to worry about any other str objects.

We trigger clearing the state with the main interpreter, since no other interpreters may exist at that point and _PyUnicode_ClearInterned() is only called during interpreter finalization.

We do not address here the fact that a string will only be interned in the first interpreter that interns it.  In any subsequent interpreters str.state.interned is already set so _PyUnicode_InternInPlace() will skip it.  That needs to be addressed separately from fixing the crasher.
(cherry picked from commit 87e7cb0)

Co-authored-by: Eric Snow <[email protected]>
…' command (pythonGH-106972) (python#106983)

Add test for the 'destination <name> clear' command,
and the 'destination' directive in general.

Fix two bugs in 'destination <name> clear' command:

1. The text attribute of the allocator is called 'text', not '_text'
2. Return after processing the 'clear' command,
   instead of proceeding directly to the fail().
(cherry picked from commit 3372bcb)

Co-authored-by: Erlend E. Aasland <[email protected]>
…directive (pythonGH-106979) (python#106994)

(cherry picked from commit ee5c01b)

Co-authored-by: Erlend E. Aasland <[email protected]>
…GH-107007) (python#107009)

pythongh-106714: Fix test_capi to not write a coredump (pythonGH-107007)

test_capi: Fix test_no_FatalError_infinite_loop() to no longer write
a coredump, by using test.support.SuppressCrashReport.
(cherry picked from commit 4a1026d)

Co-authored-by: Victor Stinner <[email protected]>
…hon#107046)

Fix Sphinx warnings in `re` module docs (pythonGH-107044)
(cherry picked from commit 149748e)

Co-authored-by: wulmer <[email protected]>
…d COLS (pythonGH-107011) (pythonGH-107057)

LINES and COLS referred in curses.update_lines_cols() documentations are
the module variables, not the environment variables.
(cherry picked from commit 26e08df)

Co-authored-by: Serhiy Storchaka <[email protected]>
…on-mounted filesystems on Unix (pythonGH-107031) (python#107047)

(cherry picked from commit 6e5f223)

Co-authored-by: Matthieu Caneill <[email protected]>
…nGH-106854)

pythongh-106847: Add -X warn_default_encoding in sys.flags Doc (pythonGH-106854)
(cherry picked from commit fd84ac0)

Co-authored-by: qqwqqw689 <[email protected]>
Co-authored-by: Nikita Sobolev <[email protected]>
…_EVENTS (python#107069) (python#107075)

pythonGH-103082: Rename PY_MONITORING_EVENTS to _PY_MONITORING_EVENTS (python#107069)

Rename private C API constants:

* Rename PY_MONITORING_UNGROUPED_EVENTS to _PY_MONITORING_UNGROUPED_EVENTS
* Rename PY_MONITORING_EVENTS to _PY_MONITORING_EVENTS

(cherry picked from commit 0927a2b)
python#107081)

Don't let autoconf mistake MPI compilers for Intel compilers;
filter out the MPI case to prevent Intel specific options from being applied.
(cherry picked from commit 9a6b278)

Co-authored-by: Lukas van de Wiel <[email protected]>
…pythonGH-106949) (python#107060)

* [3.12] pythongh-106948: Add standard external names to nitpick_ignore (pythonGH-106949)

It includes standard C types, macros and variables like "size_t",
"LONG_MAX" and "errno", and standard environment variables like "PATH".

(cherry picked from commit f8b7fe2)

Co-authored-by: Serhiy Storchaka <[email protected]>

* Delete 2023-05-31-18-37-57.gh-issue-105156.R4El5V.rst
…pty FRAMEWORKALTINSTALLLAST (pythonGH-107035) (python#107049)

pythongh-75371: reformat Makefile.pre.in to accommodate for empty FRAMEWORKALTINSTALLLAST (pythonGH-107035)

in the case of an empty FRAMEWORKALTINSTALLLAST, this patch prevents leaving
an astray linebreak and two tabs in the resulting Makefile.

Before change:
```
.PHONY: commoninstall
commoninstall:  check-clean-src  \
		altbininstall libinstall inclinstall libainstall \
		sharedinstall altmaninstall \

```

After change (with empty FRAMEWORKALTINSTALLLAST):
```
.PHONY: commoninstall
commoninstall:  check-clean-src  \
		altbininstall libinstall inclinstall libainstall \
		sharedinstall altmaninstall
```
(cherry picked from commit 9c38206)

Co-authored-by: Moritz Neeb <[email protected]>
…ythonGH-105151) (python#107042)

Co-authored-by: Sviatoslav Sydorenko <[email protected]>
Co-authored-by: Adam Turner <[email protected]>
Co-authored-by: Hugo van Kemenade <[email protected]>

(cherry picked from commit 88d14da)
(cherry picked from commit eaa6702)
…pythonGH-106988) (python#107094)

The "New Modules" section was left in place to ensure that the anchor
link for new modules will still exist:

/whatsnew/3.12.htmlGH-new-modules
/whatsnew/3.10.htmlGH-new-modules

This means that existing links to this section don't break.
(cherry picked from commit 6dbffae)

Co-authored-by: Sebastiaan Zeeff <[email protected]>
…t for valid multipart emails when parsing header only (pythonGH-107016) (python#107111)

(cherry picked from commit c65592c)

Co-authored-by: htsedebenham <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.12 bugs and security fixes awaiting core review
Projects
None yet
Development

Successfully merging this pull request may close these issues.