This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: unicodeobject.c doesn't compile when defined EXPERIMENTAL_ISOLATED_SUBINTERPRETERS, variable "interned" not found
Type: compile error Stage:
Components: Subinterpreters Versions: Python 3.10
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: eric.snow, kumaraditya, moytrage, vstinner
Priority: normal Keywords:

Created on 2022-02-23 06:12 by moytrage, last changed 2022-04-11 14:59 by admin.

Files
File name Uploaded Description Edit
unicodeobject.c moytrage, 2022-02-23 06:12
Messages (3)
msg413774 - (view) Author: Artyom Polkovnikov (moytrage) Date: 2022-02-23 06:12
1) Downloaded https://www.python.org/ftp/python/3.10.2/Python-3.10.2.tar.xz

2) Compiled under MSVC 2019 with define EXPERIMENTAL_ISOLATED_SUBINTERPRETERS

3) Got compilation error of file Objects/unicodeobject.c at line 15931, about undefined variable "interned", it is function _PyUnicode_ClearInterned(), uncompilable code is "if (interned == NULL) {".


This happens because when EXPERIMENTAL_ISOLATED_SUBINTERPRETERS is defined then INTERNED_STRINGS is undefined hence global variable "static PyObject *interned = NULL;" is not created, and _PyUnicode_ClearInterned() uses this global variable "interned".

For reference attaching my version of "unicodeobject.c" which has compilation error at line 15931.
msg414429 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2022-03-03 11:26
This build flag is experimental and unsupported. If you care, you should target Python 3.11 which is currently under development.
msg414431 - (view) Author: Kumar Aditya (kumaraditya) * (Python triager) Date: 2022-03-03 11:29
@vstinner it is broken on main branch also.
History
Date User Action Args
2022-04-11 14:59:56adminsetgithub: 90988
2022-03-03 11:29:31kumaradityasetnosy: + kumaraditya
messages: + msg414431
2022-03-03 11:26:57vstinnersetmessages: + msg414429
2022-03-03 10:52:03kumaradityasetnosy: + vstinner, eric.snow
2022-02-23 06:12:09moytragecreate