@@ -3574,36 +3574,5 @@ def test_get_stats_disabled_raises(self):
35743574 client_socket .sendall (b"done" )
35753575
35763576
3577- @requires_remote_subprocess_debugging ()
3578- @unittest .skipUnless (sys .platform == "linux" , "requires /proc/self/mem" )
3579- @unittest .skipIf (
3580- not PROCESS_VM_READV_SUPPORTED ,
3581- "Run on Linux with process_vm_readv support" ,
3582- )
3583- class TestInvalidDebugOffsets (RemoteInspectionTestBase ):
3584- @skip_if_not_supported
3585- @unittest .skipUnless (
3586- os .environ .get ("PYTHON_REMOTE_DEBUG_UBSAN_PROBE" ) == "1" ,
3587- "with UBSan probe" ,
3588- )
3589- def test_ubsan_probe_misaligned_interpreter_state_id_offset (self ):
3590- poison_code = textwrap .dedent (
3591- """\
3592- interpreter_state_offset = 8 + 8 + 8 + 3 * 8
3593- interpreter_id_offset = interpreter_state_offset + 8
3594- fd = os.open(f"/proc/{pid}/mem", os.O_WRONLY)
3595- os.lseek(fd, addr + interpreter_id_offset, 0)
3596- os.write(fd, struct.pack("<Q", 1))
3597- os.close(fd)
3598- """
3599- )
3600-
3601- with self ._poisoned_debug_offsets_process (poison_code ) as (_ , info ):
3602- with self .assertRaisesRegex (RuntimeError , "Invalid debug offsets" ):
3603- unwinder = RemoteUnwinder (info ["pid" ], debug = True )
3604- stack_trace = unwinder .get_stack_trace ()
3605- self .assertTrue (stack_trace )
3606-
3607-
36083577if __name__ == "__main__" :
36093578 unittest .main ()
0 commit comments