Skip to content

Commit 0ed497a

Browse files
authored
gh-149953: Fix null pointer dereference order in code_objects.c (#149956)
Move check before
1 parent 18281db commit 0ed497a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Modules/_remote_debugging/code_objects.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ parse_code_object(RemoteUnwinderObject *unwinder,
432432

433433
#ifdef Py_GIL_DISABLED
434434
// Handle thread-local bytecode (TLBC) in free threading builds
435-
if (ctx->tlbc_index == 0 || unwinder->debug_offsets.code_object.co_tlbc == 0 || unwinder == NULL) {
435+
if (ctx->tlbc_index == 0 || unwinder == NULL || unwinder->debug_offsets.code_object.co_tlbc == 0) {
436436
// No TLBC or no unwinder - use main bytecode directly
437437
addrq = (uint16_t *)ip - (uint16_t *)meta->addr_code_adaptive;
438438
goto done_tlbc;

0 commit comments

Comments
 (0)