FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-142543: Mark tracer functions as Py_NO_INLINE by Fidget-Spinner · Pull Request #142846 · python/cpython · GitHub

/ cpython Public
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .c  (1) .rst  (1) All 2 file types selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix a stack overflow on Clang JIT build configurations with full LTO.
8 changes: 5 additions & 3 deletions Python/optimizer.c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,8 @@ is_terminator(const _PyUOpInstruction *uop)

/* Returns 1 on success (added to trace), 0 on trace end.
*/
int
// gh-142543: inlining this function causes stack overflows
Py_NO_INLINE int
_PyJit_translate_single_bytecode_to_trace(
PyThreadState *tstate,
_PyInterpreterFrame *frame,
Expand Down Expand Up @@ -994,7 +995,8 @@ _PyJit_translate_single_bytecode_to_trace(
}

// Returns 0 for do not enter tracing, 1 on enter tracing.
int
// gh-142543: inlining this function causes stack overflows
Py_NO_INLINE int
_PyJit_TryInitializeTracing(
PyThreadState *tstate, _PyInterpreterFrame *frame, _Py_CODEUNIT *curr_instr,
_Py_CODEUNIT *start_instr, _Py_CODEUNIT *close_loop_instr, int curr_stackdepth, int chain_depth,
Expand Down Expand Up @@ -1066,7 +1068,7 @@ _PyJit_TryInitializeTracing(
return 1;
}

void
Py_NO_INLINE void
_PyJit_FinalizeTracing(PyThreadState *tstate)
{
_PyThreadStateImpl *_tstate = (_PyThreadStateImpl *)tstate;
Expand Down
Loading

Back | FazBrowse Home | New Git URL