GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — Clang PGO profiles can be overwritten when PIDs are reused · Issue #160380 · python/cpython Open Labels buildThe build process and cross-buildThe build process and cross-buildtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error DescriptionBug reportCPython's Clang PGO profiles are named I have not observed lost profiles in a real-world build. This is a defense-in-depth proposal. In The clanker wrote a reproduction: The overwrite behavior can be reproduced with Clang/LLVM 18 on Linux using the program below. It enters Reduced reproduction#include <stdio.h> #include <stdlib.h> #include <unistd.h> int __llvm_profile_write_file(void); int main(int argc, char **argv) { int remaining = atoi(argv[1]); if (remaining > 0) { char next[32]; snprintf(next, sizeof(next), "%d", remaining - 1); if (__llvm_profile_write_file() != 0) return 2; unsetenv("__LLVM_PROFILE_RT_INIT_ONCE"); execl(argv[0], argv[0], next, (char *)0); return 3; } return 0; } Save this as clang-18 -fprofile-instr-generate profile.c -o profile mkdir profiles-pid profiles-merge LLVM_PROFILE_FILE='profiles-pid/code-%p.profraw' ./profile 4 LLVM_PROFILE_FILE='profiles-merge/code-%128m.profraw' ./profile 4 llvm-profdata-18 merge profiles-pid/*.profraw -o pid.profdata llvm-profdata-18 merge profiles-merge/*.profraw -o merged.profdata llvm-profdata-18 show --counts --all-functions pid.profdata llvm-profdata-18 show --counts --all-functions merged.profdata The CPython versions tested on:CPython main branch Operating systems tested on:Linux Activity
MetadataMetadataAssigneesLabelsbuildThe build process and cross-buildThe build process and cross-buildtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error ProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |