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-137573: mark _PyOptimizer_Optimize as no inline by inventshah · Pull Request #137731 · python/cpython

Conversation

@inventshah

@inventshah inventshah commented Aug 13, 2025 •
edited by bedevere-app Bot
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor

Needs backport to 3.14.

  • Issue: Stack overflow error from recursion with 3.14.0rc1 on MacOS #137573

Sorry, something went wrong.

Uh oh!

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

All reactions
@inventshah
mark _PyOptimizer_Optimize as no inline
3d093c0
@inventshah
inventshah requested a review from markshannon as a code owner August 13, 2025 18:56
@bedevere-app bedevere-app Bot added the awaiting review label Aug 13, 2025
@bedevere-app bedevere-app Bot mentioned this pull request Aug 13, 2025
Stack overflow error from recursion with 3.14.0rc1 on MacOS #137573
Closed
@hugovk hugovk added the needs backport to 3.14 bugs and security fixes label Aug 13, 2025
hugovk
hugovk reviewed Aug 13, 2025
View reviewed changes
Comment thread Misc/NEWS.d/next/C_API/2025-08-13-13-41-04.gh-issue-137573.r6uwRf.rst Resolved

Uh oh!

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

@inventshah @hugovk
Update Misc/NEWS.d/next/C_API/2025-08-13-13-41-04.gh-issue-137573.r6u…
318c4fd
…wRf.rst

Co-authored-by: Hugo van Kemenade <[email protected]>
encukou
encukou reviewed Aug 14, 2025
View reviewed changes
Comment thread Python/optimizer.c Resolved

Uh oh!

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

encukou
encukou approved these changes Aug 14, 2025
View reviewed changes
@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting review labels Aug 14, 2025
@encukou
Add a comment for the future
6831ee7
@hugovk
hugovk enabled auto-merge (squash) August 14, 2025 07:34
@encukou
encukou disabled auto-merge August 14, 2025 07:34
@encukou
encukou enabled auto-merge (squash) August 14, 2025 07:40
@encukou
encukou merged commit c9d7065 into python:main Aug 14, 2025
@miss-islington-app

miss-islington-app Bot commented Aug 14, 2025

Copy link
Copy Markdown

Thanks @inventshah for the PR, and @encukou for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14.
🐍🍒⛏🤖

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-app bedevere-app Bot removed the awaiting merge label Aug 14, 2025
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Aug 14, 2025
@inventshah @hugovk
@encukou @miss-islington
pythonGH-137573: mark _PyOptimizer_Optimize as no inline (pythonGH-13…
082893b
…7731)

(cherry picked from commit c9d7065)

Co-authored-by: Sachin Shah <[email protected]>
Co-authored-by: Hugo van Kemenade <[email protected]>
Co-authored-by: Petr Viktorin <[email protected]>
@bedevere-app

bedevere-app Bot commented Aug 14, 2025

Copy link
Copy Markdown

GH-137751 is a backport of this pull request to the 3.14 branch.

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-app bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Aug 14, 2025
@bedevere-bot

bedevere-bot commented Aug 14, 2025

Copy link
Copy Markdown

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot AMD64 Android 3.x (tier-3) has failed when building commit c9d7065.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/1591/builds/2770) and take a look at the build logs.
  4. Check if the failure is related to this commit (c9d7065) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/#/builders/1591/builds/2770

Summary of the results of the build (if available):

Click to see traceback logs
remote: Enumerating objects: 16, done.        
remote: Counting objects:   6% (1/16)        
remote: Counting objects:  12% (2/16)        
remote: Counting objects:  18% (3/16)        
remote: Counting objects:  25% (4/16)        
remote: Counting objects:  31% (5/16)        
remote: Counting objects:  37% (6/16)        
remote: Counting objects:  43% (7/16)        
remote: Counting objects:  50% (8/16)        
remote: Counting objects:  56% (9/16)        
remote: Counting objects:  62% (10/16)        
remote: Counting objects:  68% (11/16)        
remote: Counting objects:  75% (12/16)        
remote: Counting objects:  81% (13/16)        
remote: Counting objects:  87% (14/16)        
remote: Counting objects:  93% (15/16)        
remote: Counting objects: 100% (16/16)        
remote: Counting objects: 100% (16/16), done.        
remote: Compressing objects:  11% (1/9)        
remote: Compressing objects:  22% (2/9)        
remote: Compressing objects:  33% (3/9)        
remote: Compressing objects:  44% (4/9)        
remote: Compressing objects:  55% (5/9)        
remote: Compressing objects:  66% (6/9)        
remote: Compressing objects:  77% (7/9)        
remote: Compressing objects:  88% (8/9)        
remote: Compressing objects: 100% (9/9)        
remote: Compressing objects: 100% (9/9), done.        
remote: Total 9 (delta 7), reused 1 (delta 0), pack-reused 0 (from 0)        
From https://github.com/python/cpython
 * branch                    main       -> FETCH_HEAD
Note: switching to 'c9d70651889afa89a033e8daedcb1cd60c59653a'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at c9d70651889 GH-137573: mark _PyOptimizer_Optimize as no inline (GH-137731)
Switched to and reset branch 'main'

configure: WARNING: no system libmpdec found; falling back to pure-Python version for the decimal module

In file included from ../../Include/internal/pycore_dict.h:11,
                 from ../../Objects/typeobject.c:7:
In function ‘Py_DECREF_MORTAL’,
    inlined from ‘PyStackRef_XCLOSE’ at ../../Include/internal/pycore_stackref.h:730:9,
    inlined from ‘_PyThreadState_PopCStackRef’ at ../../Include/internal/pycore_stackref.h:810:5,
    inlined from ‘vectorcall_maybe’ at ../../Objects/typeobject.c:3107:9:
../../Include/internal/pycore_object.h:481:8: warning: array subscript 0 is outside array bounds of ‘PyObject[0]’ {aka ‘struct _object[]’} [-Warray-bounds]
  481 |     if (--op->ob_refcnt == 0) {
      |        ^

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0

100  201k  100  201k    0     0   376k      0 --:--:-- --:--:-- --:--:--  376k
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0

100 43710  100 43710    0     0   103k      0 --:--:-- --:--:-- --:--:--  103k
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0

100 5095k  100 5095k    0     0  8654k      0 --:--:-- --:--:-- --:--:-- 8654k
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0

  0 1270k    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 1270k  100 1270k    0     0  2834k      0 --:--:-- --:--:-- --:--:-- 68.9M
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0

100  629k  100  629k    0     0  1509k      0 --:--:-- --:--:-- --:--:-- 1509k
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  511k  100  511k    0     0  1150k      0 --:--:-- --:--:-- --:--:-- 5744k
configure: WARNING: no system libmpdec found; falling back to pure-Python version for the decimal module

../../Python/fileutils.c:460:1: warning: unused function 'decode_current_locale' [-Wunused-function]
  460 | decode_current_locale(const char* arg, wchar_t **wstr, size_t *wlen,
      | ^~~~~~~~~~~~~~~~~~~~~
../../Python/fileutils.c:679:1: warning: unused function 'encode_current_locale' [-Wunused-function]
  679 | encode_current_locale(const wchar_t *text, char **str,
      | ^~~~~~~~~~~~~~~~~~~~~
2 warnings generated.
../../Modules/_localemodule.c:195:1: warning: unused function 'is_all_ascii' [-Wunused-function]
  195 | is_all_ascii(const char *str)
      | ^~~~~~~~~~~~
1 warning generated.
../../Modules/pwdmodule.c:69:16: warning: unused variable 'pwd_db_mutex' [-Wunused-variable]
   69 | static PyMutex pwd_db_mutex = {0};
      |                ^~~~~~~~~~~~
1 warning generated.
../../Modules/_hacl/Lib_Memzero0.c:66:6: warning: "Your platform does not support any safe implementation of memzero -- consider a pull request!" [-W#warnings]
   66 |     #warning "Your platform does not support any safe implementation of memzero -- consider a pull request!"
      |      ^
1 warning generated.

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  8784  100  8784    0     0  43254      0 --:--:-- --:--:-- --:--:-- 43485
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  2894  100  2894    0     0  14294      0 --:--:-- --:--:-- --:--:-- 14256
100  2894  100  2894    0     0  14283      0 --:--:-- --:--:-- --:--:-- 14256
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 43504  100 43504    0     0   203k      0 --:--:-- --:--:-- --:--:--  204k
All reactions

Sorry, something went wrong.

Uh oh!

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

hugovk added a commit that referenced this pull request Aug 14, 2025
@miss-islington @inventshah
@hugovk @encukou
[3.14] GH-137573: mark _PyOptimizer_Optimize as no inline (GH-137731) (…
7c0e637
…#137751)

Co-authored-by: Sachin Shah <[email protected]>
Co-authored-by: Hugo van Kemenade <[email protected]>
Co-authored-by: Petr Viktorin <[email protected]>
@inventshah inventshah mentioned this pull request Aug 14, 2025
Unrecoverable stack overflow with infinite recursion on macOS #131543
Closed
Agent-Hellboy pushed a commit to Agent-Hellboy/cpython that referenced this pull request Aug 19, 2025
@inventshah @hugovk
@encukou @Agent-Hellboy
pythonGH-137573: mark _PyOptimizer_Optimize as no inline (pythonGH-13…
1f23f50
…7731)

Co-authored-by: Hugo van Kemenade <[email protected]>
Co-authored-by: Petr Viktorin <[email protected]>
kumaraditya303 pushed a commit to miss-islington/cpython that referenced this pull request Sep 9, 2025
@miss-islington @inventshah
@hugovk @encukou @kumaraditya303
[3.14] pythonGH-137573: mark _PyOptimizer_Optimize as no inline (pyth…
d1e4fd9
…onGH-137731) (python#137751)

Co-authored-by: Sachin Shah <[email protected]>
Co-authored-by: Hugo van Kemenade <[email protected]>
Co-authored-by: Petr Viktorin <[email protected]>
This was referenced Dec 16, 2025
SIGSEGV in test_isinstance and test_json with --enable-experimental-jit=yes and --with-lto=full #142543
Closed
gh-142543: Mark tracer functions as Py_NO_INLINE #142846
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@hugovk hugovk hugovk left review comments
@encukou encukou encukou approved these changes
@markshannon markshannon Awaiting requested review from markshannon markshannon is a code owner

Uh oh!

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

Assignees

No one assigned

Labels

None yet

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.

4 participants

@inventshah @bedevere-bot @encukou @hugovk
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.