[3.14] gh-135755: Make Py_MAX_SCRIPT_PATH_SIZE private (GH-138350) (#138356)
Some checks are pending
Tests / (push) Blocked by required conditions
Tests / Windows MSI (push) Blocked by required conditions
Tests / Change detection (push) Waiting to run
Tests / Docs (push) Blocked by required conditions
Tests / Check if the ABI has changed (push) Blocked by required conditions
Tests / Check if Autoconf files are up to date (push) Blocked by required conditions
Tests / Check if generated files are up to date (push) Blocked by required conditions
Tests / Ubuntu SSL tests with OpenSSL (push) Blocked by required conditions
Tests / Android (aarch64) (push) Blocked by required conditions
Tests / Android (x86_64) (push) Blocked by required conditions
Tests / WASI (push) Blocked by required conditions
Tests / Hypothesis tests on Ubuntu (push) Blocked by required conditions
Tests / Address sanitizer (push) Blocked by required conditions
Tests / Sanitizers (push) Blocked by required conditions
Tests / Cross build Linux (push) Blocked by required conditions
Tests / CIFuzz (push) Blocked by required conditions
Tests / All required checks pass (push) Blocked by required conditions
Lint / lint (push) Waiting to run

Co-authored-by: Victor Stinner <vstinner@python.org>
This commit is contained in:
Miss Islington (bot) 2025-09-16 14:49:35 +02:00 committed by GitHub
parent 7f293a615d
commit c0d490d9c4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 4 additions and 4 deletions

View file

@ -28,10 +28,10 @@ typedef int (*Py_tracefunc)(PyObject *, PyFrameObject *, int, PyObject *);
#define PyTrace_OPCODE 7 #define PyTrace_OPCODE 7
/* Remote debugger support */ /* Remote debugger support */
#define Py_MAX_SCRIPT_PATH_SIZE 512 #define _Py_MAX_SCRIPT_PATH_SIZE 512
typedef struct { typedef struct {
int32_t debugger_pending_call; int32_t debugger_pending_call;
char debugger_script_path[Py_MAX_SCRIPT_PATH_SIZE]; char debugger_script_path[_Py_MAX_SCRIPT_PATH_SIZE];
} _PyRemoteDebuggerSupport; } _PyRemoteDebuggerSupport;
typedef struct _err_stackitem { typedef struct _err_stackitem {

View file

@ -368,7 +368,7 @@ typedef struct _Py_DebugOffsets {
.remote_debugging_enabled = offsetof(PyInterpreterState, config.remote_debug), \ .remote_debugging_enabled = offsetof(PyInterpreterState, config.remote_debug), \
.debugger_pending_call = offsetof(_PyRemoteDebuggerSupport, debugger_pending_call), \ .debugger_pending_call = offsetof(_PyRemoteDebuggerSupport, debugger_pending_call), \
.debugger_script_path = offsetof(_PyRemoteDebuggerSupport, debugger_script_path), \ .debugger_script_path = offsetof(_PyRemoteDebuggerSupport, debugger_script_path), \
.debugger_script_path_size = Py_MAX_SCRIPT_PATH_SIZE, \ .debugger_script_path_size = _Py_MAX_SCRIPT_PATH_SIZE, \
}, \ }, \
} }

View file

@ -686,7 +686,7 @@ reset_remotedebug_data(PyThreadState *tstate)
{ {
tstate->remote_debugger_support.debugger_pending_call = 0; tstate->remote_debugger_support.debugger_pending_call = 0;
memset(tstate->remote_debugger_support.debugger_script_path, 0, memset(tstate->remote_debugger_support.debugger_script_path, 0,
Py_MAX_SCRIPT_PATH_SIZE); _Py_MAX_SCRIPT_PATH_SIZE);
} }