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 — bpo-29524: Add Objects/call.c file by vstinner · Pull Request #12 · python/cpython

Conversation

@vstinner

@vstinner vstinner commented Feb 11, 2017 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Member
  • Move all functions to call objects in a new Objects/call.c file.
  • Rename fast_function() to _PyFunction_FastCallKeywords().
  • Copy null_error() from Objects/abstract.c
  • Inline type_error() in call.c to not have to copy it, it was only called once.
  • Export _PyEval_EvalCodeWithName() since it is now called from call.c.

http://bugs.python.org/issue29524

Sorry, something went wrong.

Uh oh!

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

All reactions
@vstinner
bpo-29524: Add Objects/call.c file
1739bb7
* Move all functions to call objects in a new Objects/call.c file.
* Rename fast_function() to _PyFunction_FastCallKeywords().
* Copy null_error() from Objects/abstract.c
* Inline type_error() in call.c to not have to copy it, it was only
  called once.
* Export _PyEval_EvalCodeWithName() since it is now called
  from call.c.
@the-knights-who-say-ni the-knights-who-say-ni added the CLA signed label Feb 11, 2017
@vstinner vstinner added the performance Performance or resource usage label Feb 11, 2017
methane
methane requested changes Feb 11, 2017
View reviewed changes
Comment thread Python/ceval.c
inlines the most primitive frame setup code from
PyEval_EvalCodeEx(), which vastly reduces the checks that must be
done before evaluating the frame.
*/

@methane methane Feb 11, 2017

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.

This comment block should be moved to function_code_fastcall().

Sorry, something went wrong.

Uh oh!

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

All reactions
@vstinner

vstinner commented Feb 11, 2017 via email

Copy link
Copy Markdown
Member Author
Oh in fact it was a deliberate choice to remove the comment. Python 3.7 now has a wide range of "fast call" functions which are designed for best performance. Do you think that it's worth it to keep the comment?
All reactions

Sorry, something went wrong.

Uh oh!

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

methane
methane approved these changes Feb 12, 2017
View reviewed changes

@methane methane 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.

I just checked all code is moved as-is.
I agree the comment block is not so important.

Sorry, something went wrong.

Uh oh!

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

All reactions
@vstinner

vstinner commented Feb 12, 2017 via email

Copy link
Copy Markdown
Member Author
Thank you for the review.
All reactions

Sorry, something went wrong.

Uh oh!

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

@vstinner
vstinner merged commit c22bfaa into python:master Feb 12, 2017
@vstinner
vstinner deleted the call_file branch June 15, 2017 23:02
@jdemeyer jdemeyer mentioned this pull request Jun 25, 2018
Add Include/call.h file #7909
Closed
@jdemeyer

jdemeyer commented Jun 25, 2018

Copy link
Copy Markdown
Contributor

Follow-up at #7909

All reactions

Sorry, something went wrong.

Uh oh!

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

paulmon added a commit to paulmon/cpython that referenced this pull request Jan 10, 2019
@paulmon
Merge pull request python#12 from paulmon/win32-arm-nanoserver
f01f3c6
Windows arm32 - fix failing tests or skip
emmatyping referenced this pull request in emmatyping/cpython Mar 16, 2020
@emmatyping
Reword isinstance/subclass checks (#12)
3da2797
@pablogsal pablogsal mentioned this pull request Jun 12, 2020
bpo-40958: Avoid buffer overflow in the parser when indexing the current line #20842
Closed
@shihai1991 shihai1991 mentioned this pull request Jun 23, 2020
bpo-1635741: Enable unicode_release_interned() without insure or valgrind. #21087
Closed
isidentical referenced this pull request in isidentical/cpython Jun 29, 2021
@ammaraskar @isidentical
Handle lines with multi-byte unicode characters properly (#12)
dbc9efb
* Handle lines with multi-byte unicode characters properly

* Use Py_XDECREF instead of Py_DECREF

Co-authored-by: Batuhan Taskaya <[email protected]>

Co-authored-by: Batuhan Taskaya <[email protected]>
@larryhastings larryhastings mentioned this pull request Jun 7, 2022
The Great Argument Clinic Conversion Derby Meta-Issue #64386
Closed
@itachaaa itachaaa mentioned this pull request Aug 22, 2022
Python 3.10 hang at exit in drop_gil() (due to resource warning at exit?) #91414
Closed
@mdboom mdboom mentioned this pull request Aug 25, 2022
Assert and incorrect error message when loading source file containing invalid UTF-8 #96268
Closed
@mdboom mdboom mentioned this pull request Nov 22, 2022
Type punning (and strict aliasing) issue in Py_CLEAR() and Py_SETREF() macros: Python --enable-pystats is miscompiled #99701
Closed
@ziegenbalg ziegenbalg mentioned this pull request Nov 30, 2022
double free in io.TextIOWrapper #72573
Closed
jaraco pushed a commit that referenced this pull request Dec 2, 2022
@Mariatta
Don't cd if we are in CPython directory (GH-12)
2c58f9b
@gvanrossum gvanrossum mentioned this pull request Aug 22, 2023
heap-use-after-free in _PyFunction_LookupByVersion #108253
Closed
@LinanV LinanV mentioned this pull request Oct 23, 2023
Objects/typeobject.c: No such file or directory. #111203
Closed
@stasos24 stasos24 mentioned this pull request Oct 24, 2023
Modules/cjkcodecs/_codecs_iso2022.c - read out of bounds #101180
Closed
@williamhu020 williamhu020 mentioned this pull request Nov 5, 2023
Use the API C of 'Py-NewInterpreterFromConfig' to exit unexpectedly in multiple threads. #111751
Closed
@kcatss kcatss mentioned this pull request Nov 15, 2023
Use-after-free in unregister() of atexit module #112127
Closed
@kcatss kcatss mentioned this pull request Jan 14, 2024
crash in long_vectorcall in longobject.c #114050
Closed
@kcatss kcatss mentioned this pull request Feb 12, 2024
Segmentation Fault in pthread_getcpuclockid function in time module #115378
Closed
@kcatss kcatss mentioned this pull request Feb 20, 2024
Use After Free at _heapreplace_max #115706
Closed
@aisk aisk mentioned this pull request Jun 10, 2024
gh-115649: Copy the filename into main interpreter before intern in import.c #120315
Merged
@ngoldbaum ngoldbaum mentioned this pull request Sep 23, 2024
Crash running PyO3 tests with --test-threads=1000 #124375
Closed
kumaraditya303 pushed a commit that referenced this pull request Oct 14, 2024
@Eclips4
gh-125472: Revert "gh-124958: fix asyncio.TaskGroup and _PyFuture ref…
e99650b
…cycles (#12… (#125476)

Revert "gh-124958: fix asyncio.TaskGroup and _PyFuture refcycles (#124959)"

This reverts commit d5dbbf4.
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Oct 14, 2024
@Eclips4 @miss-islington
pythongh-125472: Revert "pythongh-124958: fix asyncio.TaskGroup and _…
874bfad
…PyFuture refcycles (pythonGH-12… (pythonGH-125476)

Revert "pythongh-124958: fix asyncio.TaskGroup and _PyFuture refcycles (pythonGH-124959)"

This reverts commit d5dbbf4.
(cherry picked from commit e99650b)

Co-authored-by: Kirill Podoprigora <[email protected]>
1st1 pushed a commit that referenced this pull request Oct 14, 2024
@graingert
gh-124958: Revert "gh-125472: Revert "gh-124958: fix asyncio.TaskGrou…
0b28ea4
…p and _PyFuture refcycles ... (#125486)

* Revert "gh-125472: Revert "gh-124958: fix asyncio.TaskGroup and _PyFuture refcycles (#12… (#125476)"

This reverts commit e99650b.

* fix incompatability with gh-124392
@Dean6767 Dean6767 mentioned this pull request Feb 10, 2025
🚨 Segmentation Fault in Python 3.10.12 when using OpenSSL (libcrypto.so.3) #129974
Closed
This was referenced Feb 11, 2025
segmentfault when pip installing setuptools #129992
Closed
segmentfault when pip installing setuptools #129993
Closed
@DominiquePACCO DominiquePACCO mentioned this pull request Jun 3, 2025
PdfWriter add_page adds (re)writes old page instead of new #135062
Closed
dg-pb pushed a commit to dg-pb/cpython that referenced this pull request Oct 21, 2025
@pablogsal
Merge pull request python#12 from DinoV/lazy_mt
cdec6a6
@efimov-mikhail efimov-mikhail mentioned this pull request Nov 5, 2025
memory leak in threading stack size #141044
Open
Eclips4 added a commit to Eclips4/cpython that referenced this pull request Nov 16, 2025
@Eclips4
Make Rust extensions work on macOS (python#12)
3dc0283
@sergey-miryanov sergey-miryanov mentioned this pull request Dec 18, 2025
Observed memory leak in ssl library: Python 3.14 GC issue #142516
Closed
@Qanux Qanux mentioned this pull request Feb 11, 2026
heap-buffer-overflow in functools.partial.__repr__() #144475
Closed
@ngoldbaum ngoldbaum mentioned this pull request Mar 6, 2026
Remove deprecated and undocumented function ctypes.SetPointerType #133866
Closed
SonicField added a commit to SonicField/cpython that referenced this pull request Apr 24, 2026
@SonicField
docs: pythia python#104 + python#105 amendments to Tier 8 spec + CLAU…
e8a83df
…DE.md

Bundle of two theologian-authored doc amendments per supervisor
dispositions:

CLAUDE.md (+2L) — Pre-Edit WT Integrity 'undiagnosed-recurring'
honest framing per pythia python#105 (3) + supervisor 02:13:12Z + theologian
02:13:54Z. Acknowledges 5+ prior incidents closed at SYMPTOM layer
without root-cause attribution; this 4-step discipline codifies
reactive HALT, not automated detection. Detection still depends on
agent noticing mid-edit. Recurrence-prevention claim does not exceed
what text mechanizes; automated detection feasibility (file-watcher /
git-hook) is fixup PIR territory and remains open.

docs/tier8-class-b-cport-migrate-arm-spec.md (+93/-20) — pythia python#104
amendments per theologian 01:38:08Z + supervisor 01:38:26Z + 01:37:05Z:
  §1.1 container-shape transferability caveat (vector-pilot ≠ hash/
       stack/allocator-shape pattern transferability)
  §5 python#11 NEW: bridge-count-delta acceptance (each pilot must NET-
       SUBTRACT bridges OR honestly add with W45 fixture coverage)
  §5 python#12 NEW: Phase B FORCING-FUNCTION (Tier 8 SECOND-PILOT block_map_
       Step A BLOCKED until exception_table_ Phase B commit lands)

Bundle scope: doc-only, no §3.5 BUILD MODE (no builder*.{cpp,h,c}
touched). Atomic per supervisor 02:13:12Z + 01:38:26Z dispositions.

Push 28 advances the Tier 8 Phase A resume deadline tracker per
theologian 02:13:54Z + supervisor 02:13:12Z (push 28 OR session-end
whichever first). If Alex disposition + fixup PIR not received by
deadline, theologian amends Phase 3 closure summary fa8dfef to
remove Tier 8 pilot citation + re-opens pythia python#103 escape question.
SonicField added a commit to SonicField/cpython that referenced this pull request Apr 24, 2026
@SonicField
Tier 8 Pilot Phase B: delete C++ shims + rewire callers (§5 python#5)
6acfbf6
Per Tier 8 spec §5 python#5 + theologian 04:48:17Z + supervisor 04:48:47Z.
Completes the exception_table_ pilot started in Phase A (6945b96)
by deleting the transient C++ compatibility layer.

DELETED:
  HIRBuilder::parseExceptionTable shim (builder.cpp:1243-1245 area
    + builder.h decl)
  HIRBuilder::findExceptionHandler shim (builder.cpp:1247-1258 area
    + builder.h decl)

REWIRED:
  builder.cpp:1197 (translate setup) → inline call
    hir_builder_state_parse_exception_table_c(&state_, this)
  builder.cpp:2865 (emit_call_method_exception_handler_inline_c) →
    inline call hir_builder_state_find_exception_handler_c +
    phx_exception_table_at conversion preserves caller-contract

HIRBuilder no longer has any accessor methods for exception_table_phx;
all access via bridges (parse_exception_table_c +
find_exception_handler_c + phx_exception_table_at). §5 python#5 acceptance
criterion fully satisfied. ZERO new bridges (uses existing C bodies
+ inline phx_exception_table_at helper).

Numstat (vs HEAD f33bde6):
  Python/jit/hir/builder.cpp +22 -27  (-5 NET)
  Python/jit/hir/builder.h   +5  -10  (-5 NET)
TOTAL: NET -10L, bridge-count delta 0, fixture delta 0.

Per Tier 8 spec §5 python#11 acceptance: ZERO bridge additions ✓.
Per Tier 8 spec §5 python#12 forcing-function: this commit IS the Phase B
landing; block_map_ Phase A Step A NOW UNBLOCKED for next session.

EXPANDED PRE-COMMIT GATE per supervisor 01:17:23Z (testkeeper
04:57:42Z):
  Stage 1 compile: BUILD_EXIT=0
  Stage 2 §3.5 BUILD MODE: 4/4 PASS, post-restore clean, staged
    content INTACT (§3.5 fix b83f084 VINDICATED — cpp/h mtimes
    identical pre/post all 3 stages)
  Stage 3 per-bench gate: GEO 1.26x, all 4 floor criteria PASS
    (worst single-bench gen_simple 0.70x > 0.5x absolute floor)

Phase 3 + Tier 8 (Phase A + B) cumulative: +257 + 37 - 10 = +284L.
exception_table_ pilot COMPLETE — first Class B container fully
migrated to pure-C with no C++-side accessor residue.

Authorization: theologian 04:48:17Z cross-check + supervisor
04:48:47Z Step B GO + librarian 04:51:37Z broader sister-script
audit CLEAN.
SonicField added a commit to SonicField/cpython that referenced this pull request Apr 24, 2026
@SonicField
gate_phoenix: extend wiring fixture to n>=294 (block_map_n294_chain)
154997b
Closes pythia python#119 (a) PhxBlockMap hash-clustering coverage gap deferred
from Phase A push 39 (theologian 11:20:24Z + supervisor 11:20:43Z DEFER:
separate from Phase B for clean revert boundary; sequence-isolated per
shepard 11:11:59Z).

Gap: the previous block_map_resize_chain (10 if-return arms,
~25 block_starts) trips PhxBlockMap_resize at insert python#12 but does not
exercise the 5 sequential resizes (16->32->64->128->256->512) that
re._parser:Tokenizer.__next at 294 blocks drives in production
(D2 measurement 2026-04-24).

Fix: add block_map_n294_chain — 110-arm if-return chain (~330 block_starts)
generated via exec to keep the source compact. force_compile must succeed
across n=0/54/109/200 (3 in-range hits + 1 default-arm miss); proves
Knuth multiplicative h=key*2654435761u clusters acceptably at production-
scale BCOffset density.

NO production code change. Pure test/fixture extension. Pre-commit
discipline satisfied via testkeeper bash -n syntax lint + diff-scope
confirmation (testkeeper 11:33:43Z): no C/C++ source touched, Phase B
binary 4145fe3 remains current.

Auth chain: theologian patch-shape APPROVE 11:33:03Z; testkeeper pre-
commit lint PASS 11:33:43Z.
This was referenced Jul 18, 2026
free threading: struct iter_unpack is not memory safe #154013
Closed
use-after-free: functools partial #154189
Closed
@chongwick chongwick mentioned this pull request Aug 19, 2026
segv in ceval #156074
Closed
@gabyfle gabyfle mentioned this pull request Sep 1, 2026
[3.13] gh-132396: Resolve 'redefinition of unused name' errors in Lib/test/ (GH-132397) #132699
Merged
This was referenced Sep 11, 2026
Heap-buffer-overflow in the hz incremental decoder on a trailing ~ #157325
Closed
mmap.mmap.__setitem__ crashes when concurrently resized #157335
Closed
Heap UAF in io.TextIOWrapper read path via reentrant detach() #157363
Open
@hosu3das20s05s hosu3das20s05s mentioned this pull request Sep 24, 2026
AddressSanitizer: global-buffer-overflow Modules/_decimal/_decimal.c:798:37 in signaldict_richcompare #158063
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@methane methane methane approved these changes

Uh oh!

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

Assignees

No one assigned

Labels

performance Performance or resource usage

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

@vstinner @jdemeyer @methane @the-knights-who-say-ni
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.