Skip to content

[3.13] gh-157142: Fix linking _freeze_module with built-in test modules (GH-157143) - #157150

Merged
gpshead merged 1 commit into
python:3.13from
miss-islington:backport-c8da735-3.13
Sep 8, 2026
Merged

[3.13] gh-157142: Fix linking _freeze_module with built-in test modules (GH-157143)#157150
gpshead merged 1 commit into
python:3.13from
miss-islington:backport-c8da735-3.13

Conversation

@miss-islington

@miss-islington miss-islington commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Programs/_freeze_module is linked with Modules/getpath_noop.o rather than
Modules/getpath.o, and getpath_noop.c only defined _PyConfig_InitPathConfig().
With MODULE_BUILDTYPE=static (the default on wasm), _testinternalcapi.o is
part of LIBRARY_OBJS_OMIT_FROZEN and its get_getpath_codeobject() left
_Py_Get_Getpath_CodeObject() as an undefined reference. Define a stub for it.
(cherry picked from commit c8da735)

Co-authored-by: Gregory P. Smith 68491+gpshead@users.noreply.github.com

pythonGH-157143)

Programs/_freeze_module is linked with Modules/getpath_noop.o rather than
Modules/getpath.o, and getpath_noop.c only defined _PyConfig_InitPathConfig().
With MODULE_BUILDTYPE=static (the default on wasm), _testinternalcapi.o is
part of LIBRARY_OBJS_OMIT_FROZEN and its get_getpath_codeobject() left
_Py_Get_Getpath_CodeObject() as an undefined reference. Define a stub for it.
(cherry picked from commit c8da735)

Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com>
@gpshead
gpshead enabled auto-merge (squash) September 8, 2026 01:42
@gpshead
gpshead merged commit 91245cb into python:3.13 Sep 8, 2026
44 checks passed
@miss-islington
miss-islington deleted the backport-c8da735-3.13 branch September 8, 2026 01:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants