Skip to content

Commit 2a08924

Browse files
[3.14] gh-134693: Fix [-Wmaybe-uninitialized] warning in _remote_debugging_module.c (GH-134694) (#134726)
gh-134693: Fix `[-Wmaybe-uninitialized]` warning in `_remote_debugging_module.c` (GH-134694) (cherry picked from commit 806107d) Co-authored-by: sobolevn <[email protected]>
1 parent aded785 commit 2a08924

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

Modules/_remote_debugging_module.c

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2054,6 +2054,14 @@ parse_async_frame_object(
20542054

20552055
*previous_frame = GET_MEMBER(uintptr_t, frame, unwinder->debug_offsets.interpreter_frame.previous);
20562056

2057+
*code_object = GET_MEMBER(uintptr_t, frame, unwinder->debug_offsets.interpreter_frame.executable);
2058+
// Strip tag bits for consistent comparison
2059+
*code_object &= ~Py_TAG_BITS;
2060+
assert(code_object != NULL);
2061+
if ((void*)*code_object == NULL) {
2062+
return 0;
2063+
}
2064+
20572065
if (GET_MEMBER(char, frame, unwinder->debug_offsets.interpreter_frame.owner) == FRAME_OWNED_BY_CSTACK ||
20582066
GET_MEMBER(char, frame, unwinder->debug_offsets.interpreter_frame.owner) == FRAME_OWNED_BY_INTERPRETER) {
20592067
return 0; // C frame
@@ -2067,15 +2075,6 @@ parse_async_frame_object(
20672075
return -1;
20682076
}
20692077

2070-
*code_object = GET_MEMBER(uintptr_t, frame, unwinder->debug_offsets.interpreter_frame.executable);
2071-
// Strip tag bits for consistent comparison
2072-
*code_object &= ~Py_TAG_BITS;
2073-
2074-
assert(code_object != NULL);
2075-
if ((void*)*code_object == NULL) {
2076-
return 0;
2077-
}
2078-
20792078
uintptr_t instruction_pointer = GET_MEMBER(uintptr_t, frame, unwinder->debug_offsets.interpreter_frame.instr_ptr);
20802079

20812080
// Get tlbc_index for free threading builds

0 commit comments

Comments
 (0)