]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-142779: Initialize reserved field for proper padding (#142780)
authorstratakis <cstratak@redhat.com>
Thu, 22 Jan 2026 17:06:36 +0000 (18:06 +0100)
committerGitHub <noreply@github.com>
Thu, 22 Jan 2026 17:06:36 +0000 (18:06 +0100)
The jitdump specification specifies a reserved field for padding.

Initialize it so no garbage data is embedded in the jitdump files.

Python/perf_jit_trampoline.c

index 0ffa906d85cc6bc5de526236a2c59802a6c90c32..f51ab1b47a04f1d4db213e81164c70635445c881 100644 (file)
@@ -398,6 +398,7 @@ static void perf_map_jit_write_header(int pid, FILE* out_file) {
     header.version = 1;                           // Current jitdump version
     header.size = sizeof(Header);                 // Header size for validation
     header.elf_mach_target = GetElfMachineArchitecture();  // Target architecture
+    header.reserved = 0;                          // padding reserved for future use
     header.process_id = pid;                      // Process identifier
     header.time_stamp = get_current_time_microseconds();   // Creation time
     header.flags = 0;                             // No special flags currently used