https://github.com/python/cpython/commit/77bf4ba732a8736910bd6b7ec5a58b8ee833c95f
commit: 77bf4ba732a8736910bd6b7ec5a58b8ee833c95f
branch: main
author: stratakis <[email protected]>
committer: vstinner <[email protected]>
date: 2026-01-22T18:06:36+01:00
summary:

gh-142779: Initialize reserved field for proper padding (#142780)

The jitdump specification specifies a reserved field for padding.

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

files:
M Python/perf_jit_trampoline.c

diff --git a/Python/perf_jit_trampoline.c b/Python/perf_jit_trampoline.c
index 0ffa906d85cc6b..f51ab1b47a04f1 100644
--- a/Python/perf_jit_trampoline.c
+++ b/Python/perf_jit_trampoline.c
@@ -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

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]

Reply via email to