You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
frameobject: undefined 32-bit left shifts in stack_swap() #161666
stack_swap() in Objects/frameobject.c shifted MASK and top as
32-bit values and converted the result to int64_t, while the value-stack
model is a 63-bit int64_t and shift = BITS_PER_BLOCK*(n-1) can reach 60.
The shifts overflow / drop bits (undefined behavior) and corrupt the stack
model used by frame_setlineno() to validate line jumps.
Objects/frameobject.c:1323:44: runtime error: shift exponent 33 is too large for 32-bit type 'int'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior Objects/frameobject.c:1323:44 in
Objects/frameobject.c:1323:62: runtime error: shift exponent 33 is too large for 32-bit type 'unsigned int'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior Objects/frameobject.c:1323:62 in
Found by Linux Verification Center (linuxtesting.org) with SVACE
CPython versions tested on:
CPython main branch
Operating systems tested on:
No response
Output from running 'python -VV' on the command line:
Activity