From 120072d58ddb46f0e02886756243174d41fce42e Mon Sep 17 00:00:00 2001 From: Chris R Date: Mon, 2 Nov 2026 19:25:21 +1100 Subject: [PATCH] Add C05 input-edge constructors and genuine V03 source drafts --- .../ARTIFACTS.json | 1161 + .../EXPORT-SUMMARY.json | 6 + .../INDEPENDENT-REVIEW.json | 24 + .../h25-c05-v03-input-constructors/README.md | 47 + .../SOURCE-ORIGIN.json | 1457 ++ .../SOURCES.json | 18 + .../h25-c05-v03-input-constructors/TASK.json | 60 + .../VALIDATION.json | 41 + .../VERIFY.json | 101 + .../derivation/c05_elf_edges_DERIVATION-v1.md | 74 + .../evidence/ACQUISITION-v2.json | 46 + .../BINARY-PACKAGE-CORRESPONDENCE-v1.json | 89 + .../BUILDINFO-CHANGES-ACQUISITION-v1.json | 46 + .../DEVELOPMENT-PACKAGE-VERSIONS-v1.json | 7 + ...DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json | 8521 +++++++ .../DEVELOPMENT-SOURCE-ACQUISITION-v1.json | 65 + .../evidence/EMBEDDED-CONFIGURATION-v1.json | 10 + ...PAD-BINARY-PUBLICATION-ACQUISITION-v1.json | 306 + .../LAUNCHPAD-EXACT-BUILD-ACQUISITION-v1.json | 44 + .../evidence/NEW-TEST-FAILURE-001.json | 10 + .../ORIGINAL-SOURCE-ACQUISITION-v1.json | 24 + .../evidence/PACKAGE-METADATA-CHECK-v1.json | 14 + .../evidence/PACKAGE-METADATA-CHECK-v2.json | 14 + .../evidence/PACKAGE-REPLAY-v1.stderr.txt | 154 + .../evidence/PACKAGE-REPLAY-v1.stdout.txt | 17 + ...BLISHER-BUILD-CHECKSUM-ASSOCIATION-v1.json | 153 + .../evidence/REPAIR-VALIDATION-v2.json | 35 + .../evidence/SOURCE-METADATA-CHECK-v1.json | 100 + .../evidence/UNIT-01-INPUT-GATE-v1.json | 23 + .../evidence/UNIT-01-SOURCE-CLOSE-v1.json | 68 + .../evidence/V03-NEW-CONTROLS-normal-v2.txt | 12 + .../V03-NEW-CONTROLS-optimized-v2.txt | 12 + .../c05_elf_edges_PASSIVE-INVENTORY-v1.json | 8224 +++++++ ...eader_edges_refined_corpus_summary_v1.json | 158 + ...05_header_edges_refined_corpus_v1_000.json | 14875 ++++++++++++ ...05_header_edges_refined_corpus_v1_001.json | 7767 +++++++ ...05_header_edges_refined_corpus_v1_002.json | 18767 ++++++++++++++++ ...05_header_edges_refined_corpus_v1_003.json | 845 + .../v03_fixture_constructor_v1.py | 230 + .../v03_integrated_constructor_v1.py | 130 + .../v03_source_refusal_observer_v1.py | 198 + .../implementation/c05_elf_edges_v1.py | 312 + .../c05_gcc_rules_derivation_v1.json | 2417 ++ .../c05_gcc_rules_sourcepins_v1.json | 816 + .../implementation/c05_gcc_rules_tests_v1.py | 257 + .../implementation/c05_gcc_rules_v1.py | 586 + .../c05_header_edges_derivation_v1.md | 67 + .../c05_header_edges_macro_source_v1.json | 13 + .../c05_header_edges_test_v1.py | 216 + .../implementation/c05_header_edges_v1.py | 525 + .../v03_fixture_constructor_v1.py | 230 + .../v03_integrated_constructor_v1.py | 130 + .../v03_source_refusal_observer_v1.py | 290 + .../exec_failure/dict_probe_fields_v1.c.txt | 456 + .../field_loader_snapshot_v1.h.txt | 495 + .../exec_failure/field_service_v1.h.txt | 423 + .../pyinit_failure/dict_probe_fields_v1.c.txt | 456 + .../field_loader_snapshot_v1.h.txt | 495 + .../pyinit_failure/field_service_v1.h.txt | 428 + .../variant_driver_v1.py.txt | 819 + .../cold_authority_v7.py.txt | 763 + .../native_tcb_controls_v1.py.txt | 97 + .../prerequisite-source/native_tcb_v1.py.txt | 202 + .../sealed_elf_profile_v2.py.txt | 1388 ++ .../inputs/root/full_driver.py.txt | 851 + .../GCC-Runtime-Library-Exception.txt | 73 + .../licenses/GPL-3.0-gcc-source.txt | 674 + .../run_controls.py | 20 + .../gcc-13-x86-64-linux-gnu-BUILD-v1.json | 1 + .../debian/rules | 100 + .../debian/rules.defs | 2366 ++ .../debian/rules2 | 3117 +++ .../gcc-base-selected/gcc/Makefile.in | 4458 ++++ .../gcc/c-family/c-cppbuiltin.cc | 2047 ++ .../gcc-base-selected/gcc/c-family/c-lex.cc | 1558 ++ .../gcc-base-selected/gcc/c-family/c-opts.cc | 1844 ++ .../gcc/c-family/c-target.def | 116 + .../gcc-base-selected/gcc/collect2.cc | 3078 +++ .../gcc-base-selected/gcc/config.gcc | 5882 +++++ .../gcc-base-selected/gcc/config/glibc-c.cc | 37 + .../gcc-base-selected/gcc/config/gnu-user.h | 159 + .../gcc/config/i386/gnu-user64.h | 97 + .../gcc/config/i386/i386-c.cc | 875 + .../gcc/config/i386/linux64.h | 39 + .../gcc/config/i386/t-linux64 | 38 + .../gcc-base-selected/gcc/config/linux.h | 215 + .../gcc-base-selected/gcc/cppdefault.cc | 141 + .../gcc-base-selected/gcc/gcc.cc | 11239 +++++++++ .../gcc-base-selected/gcc/incpath.cc | 536 + .../gcc-base-selected/libcpp/charset.cc | 3189 +++ .../gcc-base-selected/libcpp/directives.cc | 2819 +++ .../gcc-base-selected/libcpp/files.cc | 2174 ++ .../gcc-base-selected/libcpp/init.cc | 927 + .../gcc-base-selected/libcpp/lex.cc | 5660 +++++ .../gcc-base-selected/libcpp/pch.cc | 878 + ...ersions-with-C-struct-timeval-from-GN.diff | 135 + ...nversions-with-C-struct-timespec-from.diff | 148 + ..._t-timeval-timespec-C-types-in-a-sing.diff | 3919 ++++ ...ersions-with-C-time_t-from-System.OS_.diff | 67 + ...leep-from-System.OS_Primitives.Timed_.diff | 61 + ...ts-time-functions-from-GNU-libc-when-.diff | 236 + .../debian/patches/ada-749574.diff | 114 + .../debian/patches/ada-armel-libatomic.diff | 51 + .../debian/patches/ada-gcc-name.diff | 292 + .../debian/patches/ada-gnattools-cross.diff | 228 + .../debian/patches/ada-kfreebsd.diff | 70 + .../ada-lib-info-source-date-epoch.diff | 114 + .../debian/patches/ada-link-lib.diff | 158 + .../debian/patches/ada-nobiarch-check.diff | 21 + .../debian/patches/ada-perl-shebang.diff | 10 + .../debian/patches/ada-sjlj.diff | 498 + .../debian/patches/ada-verbose.diff | 40 + .../debian/patches/alpha-ieee-doc.diff | 26 + .../debian/patches/alpha-ieee.diff | 17 + .../patches/alpha-no-ev4-directive.diff | 30 + .../debian/patches/arc-stddef.diff | 29 + .../debian/patches/arm-multilib-defaults.diff | 88 + .../patches/arm-multilib-soft-cross.diff | 27 + .../patches/arm-multilib-soft-float.diff | 26 + .../debian/patches/arm-multilib-soft.diff | 25 + .../patches/arm-multilib-softfp-cross.diff | 27 + .../debian/patches/arm-multilib-softfp.diff | 27 + .../debian/patches/asan-allocator-base.diff | 23 + .../patches/bootstrap-no-unneeded-libs.diff | 30 + .../debian/patches/canonical-cpppath.diff | 34 + .../debian/patches/config-ml.diff | 52 + .../debian/patches/cross-biarch.diff | 89 + .../debian/patches/cross-fixes.diff | 57 + .../patches/cross-install-location.diff | 497 + .../patches/cross-no-locale-include.diff | 17 + .../debian/patches/cuda-float128.diff | 54 + .../debian/patches/disable-gdc-tests.diff | 17 + .../patches/dwarf5-revert-default-doc.diff | 14 + .../debian/patches/dwarf5-revert-default.diff | 24 + .../debian/patches/g++-multiarch-incdir.diff | 119 + .../gcc-arm-disable-guality-tests.diff | 44 + .../debian/patches/gcc-as-needed-gold.diff | 85 + .../debian/patches/gcc-as-needed.diff | 285 + .../debian/patches/gcc-auto-build.diff | 13 + .../patches/gcc-distro-specs-ubuntu-doc.diff | 78 + .../debian/patches/gcc-distro-specs.diff | 379 + .../patches/gcc-driver-extra-langs.diff | 22 + .../debian/patches/gcc-foffload-default.diff | 120 + .../patches/gcc-force-cross-layout.diff | 49 + .../debian/patches/gcc-gfdl-build.diff | 40 + .../debian/patches/gcc-hash-style-gnu.diff | 164 + .../debian/patches/gcc-ice-apport.diff | 39 + .../debian/patches/gcc-ice-dump.diff | 111 + .../debian/patches/gcc-multiarch.diff | 235 + .../patches/gcc-multilib-multiarch.diff | 126 + .../patches/gcc-search-prefixed-as-ld.diff | 37 + .../patches/gcc-target-include-asm.diff | 15 + .../debian/patches/gcc-textdomain.diff | 86 + .../debian/patches/gcc-verbose-lto-link.diff | 13 + .../debian/patches/gcc-vhdl.diff | 15 + .../patches/gccrs-bootstrap-mipsel.diff | 12 + .../patches/gdc-dynamic-link-phobos.diff | 17 + .../debian/patches/gdc-multiarch.diff | 17 + .../debian/patches/gdc-texinfo.diff | 53 + .../debian/patches/git-doc-updates.diff | 33 + .../debian/patches/git-updates.diff | 13366 +++++++++++ .../debian/patches/gm2-bootstrap-compare.diff | 12 + .../debian/patches/gm2-texinfo.diff | 30 + .../debian/patches/go-testsuite.diff | 19 + .../patches/hppa64-libgcov-fallback.diff | 15 + .../debian/patches/hurd-amd64.diff | 116 + .../debian/patches/hurd-changes.diff | 20 + .../debian/patches/hurd-multiarch.diff | 16 + .../patches/hurd-multilib-multiarch.diff | 23 + .../ia64-disable-selective-scheduling.diff | 16 + .../ignore-pie-specs-when-not-enabled.diff | 56 + .../patches/kfreebsd-decimal-float.diff | 32 + .../debian/patches/libasan-sparc.diff | 163 + .../debian/patches/libffi-race-condition.diff | 33 + .../patches/libffi-ro-eh_frame_sect.diff | 13 + .../debian/patches/libgo-cleanfiles.diff | 26 + .../debian/patches/libgo-hurd-hack.diff | 22 + .../patches/libgo-revert-timeout-exp.diff | 10 + .../patches/libgo-setcontext-config.diff | 19 + .../debian/patches/libgo-testsuite.diff | 66 + .../patches/libgomp-kfreebsd-testsuite.diff | 14 + .../patches/libgomp-omp_h-multilib.diff | 32 + .../debian/patches/libiberty-sha1-1.diff | 464 + .../debian/patches/libiberty-sha1-2.diff | 221 + .../patches/libitm-no-fortify-source.diff | 17 + .../debian/patches/libphobos-zlib.diff | 72 + .../debian/patches/libsanitizer-no-crypt.diff | 132 + .../debian/patches/libsanitizer-timebits.diff | 22 + .../debian/patches/libstdc++-doclink.diff | 61 + .../libstdc++-doxygen-SOURCE_DATE_EPOCH.diff | 13 + .../debian/patches/libstdc++-hurd.diff | 48 + .../debian/patches/libstdc++-man-3cxx.diff | 63 + .../patches/libstdc++-no-testsuite.diff | 12 + .../patches/libstdc++-nothumb-check.diff | 38 + .../debian/patches/libstdc++-pic.diff | 91 + .../debian/patches/libstdc++-pythondir.diff | 22 + .../patches/libstdc++-test-installed.diff | 76 + .../debian/patches/musl-ssp.diff | 21 + .../debian/patches/newlib-amdgcn-locks.diff | 303 + .../debian/patches/note-gnu-stack.diff | 125 + .../debian/patches/pr100067-revert.diff | 117 + .../debian/patches/pr104290-followup.diff | 14 + .../debian/patches/pr107475.diff | 10 + .../debian/patches/pr110934.diff | 121 + .../debian/patches/pr113030.diff | 58 + .../debian/patches/pr11897.diff | 64 + .../debian/patches/pr39491.diff | 132 + .../debian/patches/pr66368.diff | 22 + .../debian/patches/pr67590.diff | 36 + .../debian/patches/pr67899.diff | 31 + .../debian/patches/pr79724-revert.diff | 24 + .../debian/patches/pr81829.diff | 308 + .../debian/patches/pr87808.diff | 56 + .../debian/patches/pr88552.diff | 52 + .../debian/patches/pr94253.diff | 48 + .../debian/patches/pr99832-distro.diff | 46 + .../debian/patches/rename-info-files.diff | 661 + .../debian/patches/rust-enabled.diff | 23 + .../patches/skip-bootstrap-multilib.diff | 22 + .../sparc64-biarch-long-double-128.diff | 33 + .../debian/patches/sys-auxv-header.diff | 40 + .../patches/t-libunwind-elf-Wl-z-defs.diff | 13 + .../patches/testsuite-glibc-warnings.diff | 18 + .../patches/testsuite-hardening-format.diff | 304 + .../testsuite-hardening-printf-types.diff | 667 + .../patches/testsuite-hardening-updates.diff | 84 + .../debian/patches/toplevel-add-gprofng.diff | 930 + .../patches/toplevel-add-libsframe.diff | 56 + .../debian/rules.patch | 425 + .../tests/c05_elf_edges_test_v1.py | 261 + .../tests/v03_constructor_test_v1.py | 256 + .../h25-c05-v03-input-constructors/verify.py | 24 + 232 files changed, 161517 insertions(+) create mode 100644 research/h25-c05-v03-input-constructors/ARTIFACTS.json create mode 100644 research/h25-c05-v03-input-constructors/EXPORT-SUMMARY.json create mode 100644 research/h25-c05-v03-input-constructors/INDEPENDENT-REVIEW.json create mode 100644 research/h25-c05-v03-input-constructors/README.md create mode 100644 research/h25-c05-v03-input-constructors/SOURCE-ORIGIN.json create mode 100644 research/h25-c05-v03-input-constructors/SOURCES.json create mode 100644 research/h25-c05-v03-input-constructors/TASK.json create mode 100644 research/h25-c05-v03-input-constructors/VALIDATION.json create mode 100644 research/h25-c05-v03-input-constructors/VERIFY.json create mode 100644 research/h25-c05-v03-input-constructors/derivation/c05_elf_edges_DERIVATION-v1.md create mode 100644 research/h25-c05-v03-input-constructors/evidence/ACQUISITION-v2.json create mode 100644 research/h25-c05-v03-input-constructors/evidence/BINARY-PACKAGE-CORRESPONDENCE-v1.json create mode 100644 research/h25-c05-v03-input-constructors/evidence/BUILDINFO-CHANGES-ACQUISITION-v1.json create mode 100644 research/h25-c05-v03-input-constructors/evidence/DEVELOPMENT-PACKAGE-VERSIONS-v1.json create mode 100644 research/h25-c05-v03-input-constructors/evidence/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json create mode 100644 research/h25-c05-v03-input-constructors/evidence/DEVELOPMENT-SOURCE-ACQUISITION-v1.json create mode 100644 research/h25-c05-v03-input-constructors/evidence/EMBEDDED-CONFIGURATION-v1.json create mode 100644 research/h25-c05-v03-input-constructors/evidence/LAUNCHPAD-BINARY-PUBLICATION-ACQUISITION-v1.json create mode 100644 research/h25-c05-v03-input-constructors/evidence/LAUNCHPAD-EXACT-BUILD-ACQUISITION-v1.json create mode 100644 research/h25-c05-v03-input-constructors/evidence/NEW-TEST-FAILURE-001.json create mode 100644 research/h25-c05-v03-input-constructors/evidence/ORIGINAL-SOURCE-ACQUISITION-v1.json create mode 100644 research/h25-c05-v03-input-constructors/evidence/PACKAGE-METADATA-CHECK-v1.json create mode 100644 research/h25-c05-v03-input-constructors/evidence/PACKAGE-METADATA-CHECK-v2.json create mode 100644 research/h25-c05-v03-input-constructors/evidence/PACKAGE-REPLAY-v1.stderr.txt create mode 100644 research/h25-c05-v03-input-constructors/evidence/PACKAGE-REPLAY-v1.stdout.txt create mode 100644 research/h25-c05-v03-input-constructors/evidence/PUBLISHER-BUILD-CHECKSUM-ASSOCIATION-v1.json create mode 100644 research/h25-c05-v03-input-constructors/evidence/REPAIR-VALIDATION-v2.json create mode 100644 research/h25-c05-v03-input-constructors/evidence/SOURCE-METADATA-CHECK-v1.json create mode 100644 research/h25-c05-v03-input-constructors/evidence/UNIT-01-INPUT-GATE-v1.json create mode 100644 research/h25-c05-v03-input-constructors/evidence/UNIT-01-SOURCE-CLOSE-v1.json create mode 100644 research/h25-c05-v03-input-constructors/evidence/V03-NEW-CONTROLS-normal-v2.txt create mode 100644 research/h25-c05-v03-input-constructors/evidence/V03-NEW-CONTROLS-optimized-v2.txt create mode 100644 research/h25-c05-v03-input-constructors/evidence/c05_elf_edges_PASSIVE-INVENTORY-v1.json create mode 100644 research/h25-c05-v03-input-constructors/evidence/header-corpus-v2/c05_header_edges_refined_corpus_summary_v1.json create mode 100644 research/h25-c05-v03-input-constructors/evidence/header-corpus-v2/c05_header_edges_refined_corpus_v1_000.json create mode 100644 research/h25-c05-v03-input-constructors/evidence/header-corpus-v2/c05_header_edges_refined_corpus_v1_001.json create mode 100644 research/h25-c05-v03-input-constructors/evidence/header-corpus-v2/c05_header_edges_refined_corpus_v1_002.json create mode 100644 research/h25-c05-v03-input-constructors/evidence/header-corpus-v2/c05_header_edges_refined_corpus_v1_003.json create mode 100644 research/h25-c05-v03-input-constructors/evidence/pro-original/v03_fixture_constructor_v1.py create mode 100644 research/h25-c05-v03-input-constructors/evidence/pro-original/v03_integrated_constructor_v1.py create mode 100644 research/h25-c05-v03-input-constructors/evidence/pro-original/v03_source_refusal_observer_v1.py create mode 100644 research/h25-c05-v03-input-constructors/implementation/c05_elf_edges_v1.py create mode 100644 research/h25-c05-v03-input-constructors/implementation/c05_gcc_rules_derivation_v1.json create mode 100644 research/h25-c05-v03-input-constructors/implementation/c05_gcc_rules_sourcepins_v1.json create mode 100644 research/h25-c05-v03-input-constructors/implementation/c05_gcc_rules_tests_v1.py create mode 100644 research/h25-c05-v03-input-constructors/implementation/c05_gcc_rules_v1.py create mode 100644 research/h25-c05-v03-input-constructors/implementation/c05_header_edges_derivation_v1.md create mode 100644 research/h25-c05-v03-input-constructors/implementation/c05_header_edges_macro_source_v1.json create mode 100644 research/h25-c05-v03-input-constructors/implementation/c05_header_edges_test_v1.py create mode 100644 research/h25-c05-v03-input-constructors/implementation/c05_header_edges_v1.py create mode 100644 research/h25-c05-v03-input-constructors/implementation/v03_fixture_constructor_v1.py create mode 100644 research/h25-c05-v03-input-constructors/implementation/v03_integrated_constructor_v1.py create mode 100644 research/h25-c05-v03-input-constructors/implementation/v03_source_refusal_observer_v1.py create mode 100644 research/h25-c05-v03-input-constructors/inputs/areas/field-negative-variants-v1/exec_failure/dict_probe_fields_v1.c.txt create mode 100644 research/h25-c05-v03-input-constructors/inputs/areas/field-negative-variants-v1/exec_failure/field_loader_snapshot_v1.h.txt create mode 100644 research/h25-c05-v03-input-constructors/inputs/areas/field-negative-variants-v1/exec_failure/field_service_v1.h.txt create mode 100644 research/h25-c05-v03-input-constructors/inputs/areas/field-negative-variants-v1/pyinit_failure/dict_probe_fields_v1.c.txt create mode 100644 research/h25-c05-v03-input-constructors/inputs/areas/field-negative-variants-v1/pyinit_failure/field_loader_snapshot_v1.h.txt create mode 100644 research/h25-c05-v03-input-constructors/inputs/areas/field-negative-variants-v1/pyinit_failure/field_service_v1.h.txt create mode 100644 research/h25-c05-v03-input-constructors/inputs/areas/field-variant-producer-v2/variant_driver_v1.py.txt create mode 100644 research/h25-c05-v03-input-constructors/inputs/prerequisite-source/cold_authority_v7.py.txt create mode 100644 research/h25-c05-v03-input-constructors/inputs/prerequisite-source/native_tcb_controls_v1.py.txt create mode 100644 research/h25-c05-v03-input-constructors/inputs/prerequisite-source/native_tcb_v1.py.txt create mode 100644 research/h25-c05-v03-input-constructors/inputs/prerequisite-source/sealed_elf_profile_v2.py.txt create mode 100644 research/h25-c05-v03-input-constructors/inputs/root/full_driver.py.txt create mode 100644 research/h25-c05-v03-input-constructors/licenses/GCC-Runtime-Library-Exception.txt create mode 100644 research/h25-c05-v03-input-constructors/licenses/GPL-3.0-gcc-source.txt create mode 100644 research/h25-c05-v03-input-constructors/run_controls.py create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-13-x86-64-linux-gnu-BUILD-v1.json create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-13_13.3.0-6ubuntu2~24.04.1-selected/debian/rules create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-13_13.3.0-6ubuntu2~24.04.1-selected/debian/rules.defs create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-13_13.3.0-6ubuntu2~24.04.1-selected/debian/rules2 create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-base-selected/gcc/Makefile.in create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-base-selected/gcc/c-family/c-cppbuiltin.cc create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-base-selected/gcc/c-family/c-lex.cc create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-base-selected/gcc/c-family/c-opts.cc create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-base-selected/gcc/c-family/c-target.def create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-base-selected/gcc/collect2.cc create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-base-selected/gcc/config.gcc create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-base-selected/gcc/config/glibc-c.cc create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-base-selected/gcc/config/gnu-user.h create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-base-selected/gcc/config/i386/gnu-user64.h create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-base-selected/gcc/config/i386/i386-c.cc create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-base-selected/gcc/config/i386/linux64.h create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-base-selected/gcc/config/i386/t-linux64 create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-base-selected/gcc/config/linux.h create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-base-selected/gcc/cppdefault.cc create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-base-selected/gcc/gcc.cc create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-base-selected/gcc/incpath.cc create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-base-selected/libcpp/charset.cc create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-base-selected/libcpp/directives.cc create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-base-selected/libcpp/files.cc create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-base-selected/libcpp/init.cc create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-base-selected/libcpp/lex.cc create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-base-selected/libcpp/pch.cc create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/0001-Ada-remove-conversions-with-C-struct-timeval-from-GN.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/0002-Ada-remove-C-conversions-with-C-struct-timespec-from.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/0003-Ada-define-time_t-timeval-timespec-C-types-in-a-sing.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/0003-Ada-remove-conversions-with-C-time_t-from-System.OS_.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/0005-Ada-import-nanosleep-from-System.OS_Primitives.Timed_.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/0006-Ada-select-64-bits-time-functions-from-GNU-libc-when-.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/ada-749574.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/ada-armel-libatomic.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/ada-gcc-name.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/ada-gnattools-cross.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/ada-kfreebsd.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/ada-lib-info-source-date-epoch.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/ada-link-lib.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/ada-nobiarch-check.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/ada-perl-shebang.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/ada-sjlj.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/ada-verbose.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/alpha-ieee-doc.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/alpha-ieee.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/alpha-no-ev4-directive.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/arc-stddef.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/arm-multilib-defaults.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/arm-multilib-soft-cross.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/arm-multilib-soft-float.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/arm-multilib-soft.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/arm-multilib-softfp-cross.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/arm-multilib-softfp.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/asan-allocator-base.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/bootstrap-no-unneeded-libs.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/canonical-cpppath.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/config-ml.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/cross-biarch.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/cross-fixes.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/cross-install-location.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/cross-no-locale-include.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/cuda-float128.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/disable-gdc-tests.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/dwarf5-revert-default-doc.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/dwarf5-revert-default.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/g++-multiarch-incdir.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-arm-disable-guality-tests.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-as-needed-gold.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-as-needed.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-auto-build.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-distro-specs-ubuntu-doc.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-distro-specs.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-driver-extra-langs.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-foffload-default.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-force-cross-layout.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-gfdl-build.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-hash-style-gnu.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-ice-apport.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-ice-dump.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-multiarch.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-multilib-multiarch.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-search-prefixed-as-ld.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-target-include-asm.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-textdomain.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-verbose-lto-link.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-vhdl.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/gccrs-bootstrap-mipsel.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/gdc-dynamic-link-phobos.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/gdc-multiarch.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/gdc-texinfo.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/git-doc-updates.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/git-updates.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/gm2-bootstrap-compare.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/gm2-texinfo.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/go-testsuite.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/hppa64-libgcov-fallback.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/hurd-amd64.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/hurd-changes.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/hurd-multiarch.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/hurd-multilib-multiarch.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/ia64-disable-selective-scheduling.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/ignore-pie-specs-when-not-enabled.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/kfreebsd-decimal-float.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/libasan-sparc.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/libffi-race-condition.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/libffi-ro-eh_frame_sect.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/libgo-cleanfiles.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/libgo-hurd-hack.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/libgo-revert-timeout-exp.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/libgo-setcontext-config.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/libgo-testsuite.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/libgomp-kfreebsd-testsuite.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/libgomp-omp_h-multilib.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/libiberty-sha1-1.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/libiberty-sha1-2.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/libitm-no-fortify-source.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/libphobos-zlib.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/libsanitizer-no-crypt.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/libsanitizer-timebits.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/libstdc++-doclink.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/libstdc++-doxygen-SOURCE_DATE_EPOCH.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/libstdc++-hurd.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/libstdc++-man-3cxx.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/libstdc++-no-testsuite.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/libstdc++-nothumb-check.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/libstdc++-pic.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/libstdc++-pythondir.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/libstdc++-test-installed.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/musl-ssp.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/newlib-amdgcn-locks.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/note-gnu-stack.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/pr100067-revert.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/pr104290-followup.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/pr107475.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/pr110934.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/pr113030.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/pr11897.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/pr39491.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/pr66368.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/pr67590.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/pr67899.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/pr79724-revert.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/pr81829.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/pr87808.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/pr88552.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/pr94253.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/pr99832-distro.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/rename-info-files.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/rust-enabled.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/skip-bootstrap-multilib.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/sparc64-biarch-long-double-128.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/sys-auxv-header.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/t-libunwind-elf-Wl-z-defs.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/testsuite-glibc-warnings.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/testsuite-hardening-format.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/testsuite-hardening-printf-types.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/testsuite-hardening-updates.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/toplevel-add-gprofng.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/toplevel-add-libsframe.diff create mode 100644 research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/rules.patch create mode 100644 research/h25-c05-v03-input-constructors/tests/c05_elf_edges_test_v1.py create mode 100644 research/h25-c05-v03-input-constructors/tests/v03_constructor_test_v1.py create mode 100644 research/h25-c05-v03-input-constructors/verify.py diff --git a/research/h25-c05-v03-input-constructors/ARTIFACTS.json b/research/h25-c05-v03-input-constructors/ARTIFACTS.json new file mode 100644 index 0000000000..470e02cc3b --- /dev/null +++ b/research/h25-c05-v03-input-constructors/ARTIFACTS.json @@ -0,0 +1,1161 @@ +{ + "schema": "c05-v03-packet-identities-v1", + "files": [ + { + "path": "EXPORT-SUMMARY.json", + "bytes": 119, + "sha256": "42b05632be94dadb35fa7eb7ef4e7465b08688f29cb3b44057a4442d07f75c7d" + }, + { + "path": "INDEPENDENT-REVIEW.json", + "bytes": 1179, + "sha256": "84b94c41609b83f6307c553792c37ee29477a450fe3d09f2bd850318557071fd" + }, + { + "path": "README.md", + "bytes": 8583, + "sha256": "2525fe2fa69505203ad67109a87deae7bda4485e2b1501cf1711c500177b92a3" + }, + { + "path": "SOURCE-ORIGIN.json", + "bytes": 79144, + "sha256": "036fb4608874f68816ff04389fb60a311d52484e8aa5909c11cbd64913577e6c" + }, + { + "path": "SOURCES.json", + "bytes": 584, + "sha256": "911ffe8b456c49ccd19ee42c8e21b226a56dacba515e857300aa28cc1db87be7" + }, + { + "path": "TASK.json", + "bytes": 4087, + "sha256": "08aea74be05550632ec9815e6704ec4030b18d86283856d0f44deb7fd872b983" + }, + { + "path": "VALIDATION.json", + "bytes": 1961, + "sha256": "aeb4a705a0dc287c5c7157bcf3253e577f9b0b1fd67592f633c88ccc774923ea" + }, + { + "path": "VERIFY.json", + "bytes": 2579, + "sha256": "c11815f3590fc701f57b8f70caa9ce402b7ea77b9b2709344ad8100e4f3addbd" + }, + { + "path": "derivation/c05_elf_edges_DERIVATION-v1.md", + "bytes": 11592, + "sha256": "e5496023e71fc5da94022e2d25807973dffe03ed2cb5b2a03aeef85f2f2059fb" + }, + { + "path": "evidence/ACQUISITION-v2.json", + "bytes": 2563, + "sha256": "c287abe845c438ec814cd3a3a807e05df6ec8def764d399fdc1bf5a036c8325d" + }, + { + "path": "evidence/BINARY-PACKAGE-CORRESPONDENCE-v1.json", + "bytes": 3437, + "sha256": "7ade5b65ff17b1a941bc768eb81aaffb986ba6b40fea689d3408f1889032b98f" + }, + { + "path": "evidence/BUILDINFO-CHANGES-ACQUISITION-v1.json", + "bytes": 2565, + "sha256": "e88faa80dad30d0b90a35dbcefe8238b3904fdcb348b57736b2d828d41288e77" + }, + { + "path": "evidence/DEVELOPMENT-PACKAGE-VERSIONS-v1.json", + "bytes": 485, + "sha256": "3c318f3430f81f9a62da9a04d58df3b4cc47990eed3294fdb20b4bc3c297d123" + }, + { + "path": "evidence/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json", + "bytes": 284404, + "sha256": "c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f" + }, + { + "path": "evidence/DEVELOPMENT-SOURCE-ACQUISITION-v1.json", + "bytes": 3598, + "sha256": "a7daa48debe8a1ce37485d56a1beff539e4908ae31ed2c8039617b4f062e69e7" + }, + { + "path": "evidence/EMBEDDED-CONFIGURATION-v1.json", + "bytes": 1727, + "sha256": "b02f8530e592eddeac5f86a2fb3a8ea80f25ac0e8ab2945fccb64a665b18d4cc" + }, + { + "path": "evidence/LAUNCHPAD-BINARY-PUBLICATION-ACQUISITION-v1.json", + "bytes": 16581, + "sha256": "3d802d0400a15a7bab70bddd490dee46d0fef6349842c401d73f227fbd2e940a" + }, + { + "path": "evidence/LAUNCHPAD-EXACT-BUILD-ACQUISITION-v1.json", + "bytes": 2698, + "sha256": "cce05c10bb2065629b93870303777b112afd143a0f6c3fba8f3071158c81a93a" + }, + { + "path": "evidence/NEW-TEST-FAILURE-001.json", + "bytes": 570, + "sha256": "a313c5316bd91f51df993722dd1fdfb0d0d946bb27a9817724e1e9fa8e929ce0" + }, + { + "path": "evidence/ORIGINAL-SOURCE-ACQUISITION-v1.json", + "bytes": 1133, + "sha256": "b5a91a6c9703c2e4e60f8a4ffe08c460618b88e14b3289612384d42426cb7a14" + }, + { + "path": "evidence/PACKAGE-METADATA-CHECK-v1.json", + "bytes": 506, + "sha256": "1ae0a07980bf706d77fae67a90f53722069aea491f0a5c60a3aacee18fe4e9a1" + }, + { + "path": "evidence/PACKAGE-METADATA-CHECK-v2.json", + "bytes": 353, + "sha256": "2040ec37f4ea295e5a1469b012447c39b2eadfaeb3358316e2c62d7e0957ca2b" + }, + { + "path": "evidence/PACKAGE-REPLAY-v1.stderr.txt", + "bytes": 13510, + "sha256": "9b5fcf5047caae11e1b4aee91de9ec86da6216ea5b2885fa8491742700b92dfe" + }, + { + "path": "evidence/PACKAGE-REPLAY-v1.stdout.txt", + "bytes": 1729, + "sha256": "6deb78e3da0687b1cc8832f395c4b0c8be52d34e8ffca00eda0bb43a70e05d20" + }, + { + "path": "evidence/PUBLISHER-BUILD-CHECKSUM-ASSOCIATION-v1.json", + "bytes": 7161, + "sha256": "21cb1f2059830a63ae9c3a289e960ff7df15a10cb66b6ff9bfcab025ea5c2d3f" + }, + { + "path": "evidence/REPAIR-VALIDATION-v2.json", + "bytes": 14233, + "sha256": "e0b6233684cd137573a206ba3a45f41ac26e01cd85b2639ed12e34ab292719de" + }, + { + "path": "evidence/SOURCE-METADATA-CHECK-v1.json", + "bytes": 4280, + "sha256": "e34ccce299d6b30d2907ce558d5138b88d65339314382199199fb531d9138514" + }, + { + "path": "evidence/UNIT-01-INPUT-GATE-v1.json", + "bytes": 1115, + "sha256": "05fe0819df45ee94e34d0d5c5b215429564365eb8cd767e29bbca1eef02d1640" + }, + { + "path": "evidence/UNIT-01-SOURCE-CLOSE-v1.json", + "bytes": 2856, + "sha256": "4f41522472d31bb3904d24ddc0b0ac01aef63273e4f551575b6148457e23eed5" + }, + { + "path": "evidence/V03-NEW-CONTROLS-normal-v2.txt", + "bytes": 1069, + "sha256": "78bdc3e5153f3c0420508fbc98b6d630ccba4b06134d1ffa52779c7c53db7cf5" + }, + { + "path": "evidence/V03-NEW-CONTROLS-optimized-v2.txt", + "bytes": 1069, + "sha256": "fe4d4dfdbeeb56151a37f35a7679d27280872b3d93b82447814fb9095b1dc3e5" + }, + { + "path": "evidence/c05_elf_edges_PASSIVE-INVENTORY-v1.json", + "bytes": 214273, + "sha256": "5d01bc09959e4fc1d0661f1f737e91411db879288a5db23691dc3237ace5bb8d" + }, + { + "path": "evidence/header-corpus-v2/c05_header_edges_refined_corpus_summary_v1.json", + "bytes": 6075, + "sha256": "a456c3d674df1021692b693c87864b30aafa3d35c9765de98aa2c9a6307ea594" + }, + { + "path": "evidence/header-corpus-v2/c05_header_edges_refined_corpus_v1_000.json", + "bytes": 632911, + "sha256": "e6c53563da91809fdf2535644244cdb7037eaca1c52cff88a4f2c83f90d246e2" + }, + { + "path": "evidence/header-corpus-v2/c05_header_edges_refined_corpus_v1_001.json", + "bytes": 647254, + "sha256": "525731cae9328e303882b89d30ab0aff67fd41e9d9194f1d66eba80e27e80246" + }, + { + "path": "evidence/header-corpus-v2/c05_header_edges_refined_corpus_v1_002.json", + "bytes": 813956, + "sha256": "1edcdd45451d8cc628f6d7938ad1ca9d33684d7303be7f4f3d93f3c31c22992e" + }, + { + "path": "evidence/header-corpus-v2/c05_header_edges_refined_corpus_v1_003.json", + "bytes": 35404, + "sha256": "1e4efcf4d20c0b5cb85d679fafc2da6cc1a6448125dab11cf34e50c307dc9021" + }, + { + "path": "evidence/pro-original/v03_fixture_constructor_v1.py", + "bytes": 11065, + "sha256": "97737b9e09fe3103206588d383e62bc7fbef75caf944e88a5b8cbcda310a909e" + }, + { + "path": "evidence/pro-original/v03_integrated_constructor_v1.py", + "bytes": 6087, + "sha256": "5e08ff84298fe1249be5e8790ea259e6179048f4736fb7eafdb6e170b8bc1cf9" + }, + { + "path": "evidence/pro-original/v03_source_refusal_observer_v1.py", + "bytes": 9186, + "sha256": "fa0ecf7d6574bfa1a8768079b163a7621c3d3765a0e48456fb14674582cb5c46" + }, + { + "path": "implementation/c05_elf_edges_v1.py", + "bytes": 15905, + "sha256": "1ae92edd36b02a4fa2a17248cc97b555fc68e5147ceeae5540384ccc9659bb39" + }, + { + "path": "implementation/c05_gcc_rules_derivation_v1.json", + "bytes": 78960, + "sha256": "efd4f9ec5742dfb60ce05cf9ff1fcb8d05820e3f1068e57303993ff1f6916e9d" + }, + { + "path": "implementation/c05_gcc_rules_sourcepins_v1.json", + "bytes": 31581, + "sha256": "5564d0d2b47a5803c96b3767d838676e8f2427089e3b02cda1b1e62430a3c24d" + }, + { + "path": "implementation/c05_gcc_rules_tests_v1.py", + "bytes": 13844, + "sha256": "4141837fa615c9d1f703fd0083df3e4ff601a7b9af405b03a41ec0885a5b63e4" + }, + { + "path": "implementation/c05_gcc_rules_v1.py", + "bytes": 33560, + "sha256": "b3b8c5229f6e1bfca8e903aae95ad306200fbdce9ebd3b80974117613f538697" + }, + { + "path": "implementation/c05_header_edges_derivation_v1.md", + "bytes": 14992, + "sha256": "9f0cd8d3490515f8ee72fc37fb14c5b703bd3dda7588bfce00ddf6c80a225cf9" + }, + { + "path": "implementation/c05_header_edges_macro_source_v1.json", + "bytes": 643, + "sha256": "d87374f153a99c66e89307a454f804f6fc94832de7f187b4cec9ee8279368700" + }, + { + "path": "implementation/c05_header_edges_test_v1.py", + "bytes": 11098, + "sha256": "ffa888d5b04717cf437e90cde099607d7fb8a635fb07ca2f6cae2da656c1b012" + }, + { + "path": "implementation/c05_header_edges_v1.py", + "bytes": 24920, + "sha256": "1ed7daadd2845ae2ac3047c1a3475cf76acd4b988925519a88f7385362e01d71" + }, + { + "path": "implementation/v03_fixture_constructor_v1.py", + "bytes": 11065, + "sha256": "97737b9e09fe3103206588d383e62bc7fbef75caf944e88a5b8cbcda310a909e" + }, + { + "path": "implementation/v03_integrated_constructor_v1.py", + "bytes": 6087, + "sha256": "5e08ff84298fe1249be5e8790ea259e6179048f4736fb7eafdb6e170b8bc1cf9" + }, + { + "path": "implementation/v03_source_refusal_observer_v1.py", + "bytes": 14205, + "sha256": "abf25690d3bee4a9783ee504567c29f7fb47da670e0ec95f57cb5944bf57264f" + }, + { + "path": "inputs/areas/field-negative-variants-v1/exec_failure/dict_probe_fields_v1.c.txt", + "bytes": 17806, + "sha256": "e0188999d41a9ab26e8d3d5c37b18b2238b3af21b1db90895f01f7be76d50b65" + }, + { + "path": "inputs/areas/field-negative-variants-v1/exec_failure/field_loader_snapshot_v1.h.txt", + "bytes": 19495, + "sha256": "bf7ab049cea89c0a882b279e35b1383ac8f99b66aa4b9b8e1ca22eb9c24c5a8d" + }, + { + "path": "inputs/areas/field-negative-variants-v1/exec_failure/field_service_v1.h.txt", + "bytes": 17040, + "sha256": "f5066831bd812e7e88fb971ba0e7ca86dbef91fc40a1a68c17b040ce474cd880" + }, + { + "path": "inputs/areas/field-negative-variants-v1/pyinit_failure/dict_probe_fields_v1.c.txt", + "bytes": 17806, + "sha256": "e0188999d41a9ab26e8d3d5c37b18b2238b3af21b1db90895f01f7be76d50b65" + }, + { + "path": "inputs/areas/field-negative-variants-v1/pyinit_failure/field_loader_snapshot_v1.h.txt", + "bytes": 19495, + "sha256": "bf7ab049cea89c0a882b279e35b1383ac8f99b66aa4b9b8e1ca22eb9c24c5a8d" + }, + { + "path": "inputs/areas/field-negative-variants-v1/pyinit_failure/field_service_v1.h.txt", + "bytes": 17354, + "sha256": "7656cd37503986459c4133643372fec13d3e5ad5553881f0bf0343a9a3e11abd" + }, + { + "path": "inputs/areas/field-variant-producer-v2/variant_driver_v1.py.txt", + "bytes": 41337, + "sha256": "cdb1479253358508088f8aa0e1e92e6c75ffcc127e54552698598a02de061254" + }, + { + "path": "inputs/prerequisite-source/cold_authority_v7.py.txt", + "bytes": 40473, + "sha256": "2a941111bdfd91037dfcbc5552aced004809240a7e2b43bfbce39fb35798af39" + }, + { + "path": "inputs/prerequisite-source/native_tcb_controls_v1.py.txt", + "bytes": 4889, + "sha256": "63b1804caa7f89915662a1424f788c3becad13520e1f63212a338fb45aaa2c5a" + }, + { + "path": "inputs/prerequisite-source/native_tcb_v1.py.txt", + "bytes": 11353, + "sha256": "865943df5cfdbf9383362d7fb2b76c6d0fd895cf0a0e20d550a26b579606b5d7" + }, + { + "path": "inputs/prerequisite-source/sealed_elf_profile_v2.py.txt", + "bytes": 76453, + "sha256": "89ed8c777e6b72af2d6a3595037e7e92385924c6087d88010a27192633391016" + }, + { + "path": "inputs/root/full_driver.py.txt", + "bytes": 38851, + "sha256": "f5a2d33f2b4d3651f214156a0e7094c2bb516ce2d5ab7698d18c11f98f35dee0" + }, + { + "path": "licenses/GCC-Runtime-Library-Exception.txt", + "bytes": 3324, + "sha256": "9d6b43ce4d8de0c878bf16b54d8e7a10d9bd42b75178153e3af6a815bdc90f74" + }, + { + "path": "licenses/GPL-3.0-gcc-source.txt", + "bytes": 35147, + "sha256": "8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903" + }, + { + "path": "run_controls.py", + "bytes": 850, + "sha256": "68c80ce08c49d1f8497d415f13767229ecb22a888877baaf61501d9a1e7428aa" + }, + { + "path": "source-artifacts/gcc-13-x86-64-linux-gnu-BUILD-v1.json", + "bytes": 1900, + "sha256": "c776295d23a87c9efdccbd9b43b0cc79f037163b14037a37c2e8f7dcfc714379" + }, + { + "path": "source-artifacts/gcc-13_13.3.0-6ubuntu2~24.04.1-selected/debian/rules", + "bytes": 2984, + "sha256": "2e0afdc6303e407f344d2f6724be731ae84b8fd59758f172491c25348432d75a" + }, + { + "path": "source-artifacts/gcc-13_13.3.0-6ubuntu2~24.04.1-selected/debian/rules.defs", + "bytes": 70194, + "sha256": "aaf79170f51110b6b9c90d1bee022d2122401fdbbf8840d91baa3e6f13cbeb58" + }, + { + "path": "source-artifacts/gcc-13_13.3.0-6ubuntu2~24.04.1-selected/debian/rules2", + "bytes": 97853, + "sha256": "c9b1cebada609601ef1fe3bb34babccae572dccc3e86cebfad3927229d3b83ae" + }, + { + "path": "source-artifacts/gcc-base-selected/gcc/Makefile.in", + "bytes": 164044, + "sha256": "41e0fe9006909a793736b73fdd434929c913023992c33cf9b746423f78682e45" + }, + { + "path": "source-artifacts/gcc-base-selected/gcc/c-family/c-cppbuiltin.cc", + "bytes": 72427, + "sha256": "e2220b9cdc85b785faf220fd3058a46212cd3b5f7da4040dd4ca3e839bd0f1bd" + }, + { + "path": "source-artifacts/gcc-base-selected/gcc/c-family/c-lex.cc", + "bytes": 43799, + "sha256": "41ab40b6b1986771f2d3c73c6c3218dba19ddc87b57bd39d32ca8c639f42bc78" + }, + { + "path": "source-artifacts/gcc-base-selected/gcc/c-family/c-opts.cc", + "bytes": 54255, + "sha256": "41c5789fab7d536c6f16b8d4bcaa83583120eefa970c929ac24b783bd6b289ee" + }, + { + "path": "source-artifacts/gcc-base-selected/gcc/c-family/c-target.def", + "bytes": 4617, + "sha256": "3e3a24b7ef32b651781c07852d8bce61fe6587173149003c59f8c02d2684f065" + }, + { + "path": "source-artifacts/gcc-base-selected/gcc/collect2.cc", + "bytes": 86914, + "sha256": "fba4b594cc57c301ca402fc04080167a6cf4b58884b5bfd05075821dc1f29cd4" + }, + { + "path": "source-artifacts/gcc-base-selected/gcc/config/glibc-c.cc", + "bytes": 1146, + "sha256": "8feaf44e45d44cdd2d8c79c228d2d3ce45ead2a3fcf9e90f2c187a262b2865b6" + }, + { + "path": "source-artifacts/gcc-base-selected/gcc/config/gnu-user.h", + "bytes": 5894, + "sha256": "cf7ac27fe1d79dbd0e038a5d4f282eb54508ca664d7d25d1011590e728c2bdbf" + }, + { + "path": "source-artifacts/gcc-base-selected/gcc/config/i386/gnu-user64.h", + "bytes": 3256, + "sha256": "190fabbd35d1f5b526427f6a4bb3afe62a375dd605a43c7b5f550cb9c1650561" + }, + { + "path": "source-artifacts/gcc-base-selected/gcc/config/i386/i386-c.cc", + "bytes": 30487, + "sha256": "5d0d59b1f38a0f81b430ac86cfef905a19382710c55e5543607a36931b86b4bb" + }, + { + "path": "source-artifacts/gcc-base-selected/gcc/config/i386/linux64.h", + "bytes": 1669, + "sha256": "9007684d92746203c280b53a69debfff75851e31c1cd9ce6cd5c61f705d5179c" + }, + { + "path": "source-artifacts/gcc-base-selected/gcc/config/i386/t-linux64", + "bytes": 1774, + "sha256": "e5126d97ea7412563159865755129046714cc95ebf74f63339065748c5adb5dc" + }, + { + "path": "source-artifacts/gcc-base-selected/gcc/config/linux.h", + "bytes": 8504, + "sha256": "ce71be1f80fac59483042c6dd421bd267765c44f977505955b2718e30da612c4" + }, + { + "path": "source-artifacts/gcc-base-selected/gcc/config.gcc", + "bytes": 168460, + "sha256": "9d22d65c6a106a7802d0c67da6695ac918088bb097e2007646467cfb415cb481" + }, + { + "path": "source-artifacts/gcc-base-selected/gcc/cppdefault.cc", + "bytes": 4378, + "sha256": "afaf16ab53ef0781ccb4e4ba3751a314c66eda24ec3132cc6d8b347d9c0ac9c3" + }, + { + "path": "source-artifacts/gcc-base-selected/gcc/gcc.cc", + "bytes": 320626, + "sha256": "c260c6321fb3852df326618d18642a3c795a8886c285db71acde6a97fd031b0a" + }, + { + "path": "source-artifacts/gcc-base-selected/gcc/incpath.cc", + "bytes": 15771, + "sha256": "70dca72168648a2606684b7c8dc6d31f68472f32ca1058724997abb7185d0e39" + }, + { + "path": "source-artifacts/gcc-base-selected/libcpp/charset.cc", + "bytes": 96795, + "sha256": "de762070022c62edaac06f0a0df23c3e27c84678298fe0e8c720818271a7e105" + }, + { + "path": "source-artifacts/gcc-base-selected/libcpp/directives.cc", + "bytes": 83304, + "sha256": "bd4ec75ba6fa41dee76915588763f37804b446a0f5cf0e3cfe11b0596fa680bf" + }, + { + "path": "source-artifacts/gcc-base-selected/libcpp/files.cc", + "bytes": 62715, + "sha256": "fc754c98510adae4af651de11b88e866490f71fb312fe001d0edc83ab4eec4d6" + }, + { + "path": "source-artifacts/gcc-base-selected/libcpp/init.cc", + "bytes": 32504, + "sha256": "62513e415dc0072231b466d2027172758633ea6f64f43f6d58d92b7f0759769d" + }, + { + "path": "source-artifacts/gcc-base-selected/libcpp/lex.cc", + "bytes": 159800, + "sha256": "aa757d3e37199621d4f5853b823ee154ce6ac3b5444e28f3bfd235e26233be86" + }, + { + "path": "source-artifacts/gcc-base-selected/libcpp/pch.cc", + "bytes": 23172, + "sha256": "ee92685b7854baef6c206cdd9e4e4ff4536a4e911d6f35a4724f295a7371145f" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/0001-Ada-remove-conversions-with-C-struct-timeval-from-GN.diff", + "bytes": 4294, + "sha256": "55dfce012fa49a15c2a523e936976f5522eaa0fbeefb02e81c9057ff9494f159" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/0002-Ada-remove-C-conversions-with-C-struct-timespec-from.diff", + "bytes": 4554, + "sha256": "1fd7cab221966aafe8a988ec3293792391870a89bf6f56f138d79a744bc0dc0b" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/0003-Ada-define-time_t-timeval-timespec-C-types-in-a-sing.diff", + "bytes": 127291, + "sha256": "1313baa61eaa952f3f56bb1aa8868f5bc43d015f802a6022c5ae9445961ec97c" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/0003-Ada-remove-conversions-with-C-time_t-from-System.OS_.diff", + "bytes": 2189, + "sha256": "cf57baf090cda43ffda3652810df91031e45c023401eb3222966537dab5d3161" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/0005-Ada-import-nanosleep-from-System.OS_Primitives.Timed_.diff", + "bytes": 2087, + "sha256": "340eeab6cceba2fd1f7e42a1db96e8df2e2272cbeade11a6667875b8e57ced07" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/0006-Ada-select-64-bits-time-functions-from-GNU-libc-when-.diff", + "bytes": 9481, + "sha256": "3a2f2f419b85ed41101e0adfe101fcdae88bec5c7cced14e6ef6b96b8a7e185b" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/ada-749574.diff", + "bytes": 4994, + "sha256": "07820c8e27bd9ef993a4ba996fe97710403d671cddf48eb0d2e8abaa0c476f6e" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/ada-armel-libatomic.diff", + "bytes": 2092, + "sha256": "8d8c2444885aae6e94f4cf38cc31f852a82b3d9835759c5bebac095201fbd7c4" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/ada-gcc-name.diff", + "bytes": 10800, + "sha256": "fe7721c2677380a2f9c3aee86d930f78e8101fbaadccc35843fb218649dc3e1e" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/ada-gnattools-cross.diff", + "bytes": 9635, + "sha256": "115d50f0dade4b30613057a8c12d7c0e5830b27f35d6ebccdd787a545fac6167" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/ada-kfreebsd.diff", + "bytes": 2879, + "sha256": "99d1ce834579dc0f0a70956ff5e7465310e0bb97015868266711fd9aa1e79235" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/ada-lib-info-source-date-epoch.diff", + "bytes": 4459, + "sha256": "c7ad83b8a26d88ba491901243aa370634b5ddc56d3620e64e2e902b4f8376b7c" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/ada-link-lib.diff", + "bytes": 6044, + "sha256": "64dd337dda96bf73e43919c1f2e3eddc8c7080866263fe2294cf97f7c6a09214" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/ada-nobiarch-check.diff", + "bytes": 902, + "sha256": "6b756ea5f28badaa6fcabe128458cad2ec36659e9fa59fc05ee83614ed60eac0" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/ada-perl-shebang.diff", + "bytes": 327, + "sha256": "b7440ca466305c0385d2e53f1ded7e004aa9ea9ad7aa54826c5a3c872e9d4b98" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/ada-sjlj.diff", + "bytes": 15733, + "sha256": "be3ff090488c08ad9dd4a95eab739785f562eb0923a43734d736dcdc874cda22" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/ada-verbose.diff", + "bytes": 2233, + "sha256": "08d15a9726f9f4d2edaaf4ed1466869b513d93da763d8bdd2d13a7fd6ee31c3f" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/alpha-ieee-doc.diff", + "bytes": 1087, + "sha256": "fb9fc660453dfc8e8d0f92e9b6e3eca15e39b29a4b377053a1646e1fd1306492" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/alpha-ieee.diff", + "bytes": 504, + "sha256": "899835f011abb832f52bbb9cc6f6f4f4466d2c47439a4fcbe8d669764a0cdb36" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/alpha-no-ev4-directive.diff", + "bytes": 815, + "sha256": "b0e65e8eb6acdf3a0fdf5c64945bea749980ecbbb0547ce6ceae134802df7133" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/arc-stddef.diff", + "bytes": 783, + "sha256": "47ca9b5f7899e885777ce3eac30f838be686ef221d51f974db981f363a8a7acc" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/arm-multilib-defaults.diff", + "bytes": 2704, + "sha256": "b030153b1b38940e09b0119a0f9a66f2cf443e534e73a053eeab0e183f355634" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/arm-multilib-soft-cross.diff", + "bytes": 1177, + "sha256": "614e198f0af1b9fa904185fa2d4a6d99f4227e7c1fb3e7a18267d7830c565062" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/arm-multilib-soft-float.diff", + "bytes": 1204, + "sha256": "194fe207ec6c38e0fbc7bf178dba2f4eee22e25609f083863438bec7482246f1" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/arm-multilib-soft.diff", + "bytes": 1088, + "sha256": "6ce4a4337635b4906cdd29e8c12886055920dce9d6c017a0373efb377b9adf25" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/arm-multilib-softfp-cross.diff", + "bytes": 1241, + "sha256": "0dc80d8deb83b4214b526e25369ac911c8fb3156b36be481a63e3c5649a09f85" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/arm-multilib-softfp.diff", + "bytes": 1261, + "sha256": "4813ad4a730f793c747719819e599bb07a67e13b3a2745e5d337356ce5b3bb0b" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/asan-allocator-base.diff", + "bytes": 999, + "sha256": "5368ebc426150e65d29b7185c91bba5be1804a3c9909ad47e489e6e42cbd2c44" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/bootstrap-no-unneeded-libs.diff", + "bytes": 1234, + "sha256": "992812bf94a94fcf122b099ca5c88d3a130d0acf10906be35ab1fa0d78288609" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/canonical-cpppath.diff", + "bytes": 768, + "sha256": "4bf530e452c8d13c6199cb191d0ce94f3ae44f2b28cbaf06c0739812c4528bb4" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/config-ml.diff", + "bytes": 1667, + "sha256": "243bcbf1148ebc5ec860bbea0dec588fffab35692a0700723becc58e7e89f729" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/cross-biarch.diff", + "bytes": 4537, + "sha256": "4539a027bc28dea101f968f4260d55f596ac86f35e19f43d99090d09b3e8cb37" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/cross-fixes.diff", + "bytes": 1758, + "sha256": "55bfa5116e4e4aaf0f19cd2ccc39a0e2651dd188d3aa4163520fdd6f09388226" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/cross-install-location.diff", + "bytes": 22890, + "sha256": "9e943d2ea5dbabe60ee30a3cd08384874ce7c933ed233018871dbb568275eeb3" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/cross-no-locale-include.diff", + "bytes": 580, + "sha256": "f0fcb28e5324f14e2ebf68a5e0e750e79158f559cf4735c0df599d1b8acf2187" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/cuda-float128.diff", + "bytes": 2436, + "sha256": "bb5b97c0061471ca5a4f15e42bcc2a0de7ca77792f1a14d07de8fcbe50c6ef75" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/disable-gdc-tests.diff", + "bytes": 529, + "sha256": "2857ba64270cb7b5d7cc24c44fff55338cbb407ed3bfa939bffdefb21bf0027b" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/dwarf5-revert-default-doc.diff", + "bytes": 541, + "sha256": "3a292cc57f441d03db9bb02218c739eede3d15fb34be24572118c8881b346561" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/dwarf5-revert-default.diff", + "bytes": 886, + "sha256": "99d69adaed301f2e745eebce16e5c5ec996a963ba14142dff56bd05debc83814" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/g++-multiarch-incdir.diff", + "bytes": 5131, + "sha256": "bc30caf1d10804375e6104e004d658fb2df1857cbab55871d715d81c1b6ce049" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-arm-disable-guality-tests.diff", + "bytes": 1164, + "sha256": "24b87b8c95ee7074ccc01dfe982f5b37474b96d6820ad50b2441b69c28b3d504" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-as-needed-gold.diff", + "bytes": 4492, + "sha256": "8bb7658a5fef8d262535b4507295bfd9f62fa973a27ec08e2a8be6650ae0d70d" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-as-needed.diff", + "bytes": 11789, + "sha256": "f2145cce7b9633be112cb7961f92c85434cf7cca28a93cc9ce4b038ff1c0bbc4" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-auto-build.diff", + "bytes": 592, + "sha256": "183ec477fec9aa8a96d655e1b19d9842b3fdc3640b4c29528466772ca0f635a3" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-distro-specs-ubuntu-doc.diff", + "bytes": 3428, + "sha256": "43d0af5d8ac2c6db9d0d77d4ada0f74cac928fbcbb9bd4caf4b5805f3cd4d45b" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-distro-specs.diff", + "bytes": 17113, + "sha256": "22e7b3c4e7a3437c456bae439501f97c560460b46670700d9e09aafa032ef072" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-driver-extra-langs.diff", + "bytes": 1111, + "sha256": "ac5a6a7bf051708f917c59d9736b83cc65740168bc240147f94af67d13ad272d" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-foffload-default.diff", + "bytes": 4196, + "sha256": "e1bd3bfe68414470018d4f24ec0d0af3bab685901b103b70cd40490e874d7aaf" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-force-cross-layout.diff", + "bytes": 2090, + "sha256": "2d71d1b68a28e5980cfb55a49aab1321dac31756dcfa2c95438c306b3f140aac" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-gfdl-build.diff", + "bytes": 1741, + "sha256": "6a9344c1498dfa2cdb47e02bac1991e2e120d277ceddd06c6da62a371354df8a" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-hash-style-gnu.diff", + "bytes": 5837, + "sha256": "b994015da754fdc89c4654181d4ba26fa4d63cf89ae1d0b0b2322cd6eeee0aa0" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-ice-apport.diff", + "bytes": 1177, + "sha256": "89c0a21abc34c5f320a32cc0f07ecc46a6d9ebb9e0656e560b103530f594a841" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-ice-dump.diff", + "bytes": 3388, + "sha256": "530cdb9a70740c8c3d6029ece09205cd92b6dab3676530cbd4dfbd1b57587e36" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-multiarch.diff", + "bytes": 11141, + "sha256": "18022b0748f43bf018eea1916b4f11bca68daad7ce8ecf076e4e103a1acba0e8" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-multilib-multiarch.diff", + "bytes": 5721, + "sha256": "b5d6ba4e2831fd8f4614381ef1da42e38fb3744e0e3782d5c1e650b192ab4837" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-search-prefixed-as-ld.diff", + "bytes": 1366, + "sha256": "7ec5fb60d1e42c346a2381f10c7ce561a9ccb2ec74e45807c83328f4f81a4090" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-target-include-asm.diff", + "bytes": 791, + "sha256": "d5162f826158aee096e1f699e6cce6a8adf74291cf28c5dfe038dae5d16da849" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-textdomain.diff", + "bytes": 2712, + "sha256": "85f819e014b708635e695002fb323da73ea72996de8e4c4fa3fc308e3e6300dd" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-verbose-lto-link.diff", + "bytes": 358, + "sha256": "357e6581ae291ee102bbcaa4dd9df10e86f89e424d1e5be210b621183d2745fa" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-vhdl.diff", + "bytes": 605, + "sha256": "af8f5448ab8487d6596b10211f073cd56412db49f293e8a3ebf76cf184939ff5" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/gccrs-bootstrap-mipsel.diff", + "bytes": 583, + "sha256": "f665d2a06c95f3252a67abf581e653ef65169a578437746bedd1fcee638cae0b" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/gdc-dynamic-link-phobos.diff", + "bytes": 594, + "sha256": "21288b8c5b6444caae885cc000220078009cf134a129f1ab5c03402bdfc57b65" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/gdc-multiarch.diff", + "bytes": 492, + "sha256": "9b2fe79af02c72bc5b8f2ae7c7d593699dd5d94d9d2b59a1c15494d9543f3dfb" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/gdc-texinfo.diff", + "bytes": 1285, + "sha256": "14d8c9d15e0126e2bda8f2fe246529962b62bb8a6b5fd31702b37907a5fac924" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/git-doc-updates.diff", + "bytes": 1766, + "sha256": "8430cab8bf949900c0db75f6a4cbd3ab7f1f1fe7d7d170da9c64da64c99689aa" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/git-updates.diff", + "bytes": 464763, + "sha256": "d4ff0b3be1a4630f8e2ee8d1c631bc7fe1272dc71a9a4816fc044fa96e063eb4" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/gm2-bootstrap-compare.diff", + "bytes": 616, + "sha256": "89cd05a772150cffe1f9a74db27c1556460390f84d92e9c7dd50688f8b7db911" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/gm2-texinfo.diff", + "bytes": 711, + "sha256": "e142f747b874b03f009fb7a43b695f702569dffba3527f6b47a7fd32fc9a1ba4" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/go-testsuite.diff", + "bytes": 507, + "sha256": "664fde089be949febea33e4b7fffcdaeaa4cb5c753f600fb4ec30694e3698a4e" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/hppa64-libgcov-fallback.diff", + "bytes": 348, + "sha256": "24472fb0f01d25d6e5a16de7f49a26a43af9ebd9f95d4ef0879c94f26b475428" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/hurd-amd64.diff", + "bytes": 4911, + "sha256": "8975d47d0ae92526ac4c569ab9b454baeca7a3b77a326bd62170ce796a11883f" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/hurd-changes.diff", + "bytes": 649, + "sha256": "468a5006bb9c09228a5b3cf8f6f27f26ed9ed5bf8c05062b905582276a5a7da2" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/hurd-multiarch.diff", + "bytes": 738, + "sha256": "b2b7ab65b3ecbc33b0856afc818cd31c71ba2072fa70a0c3822406d71796dfdd" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/hurd-multilib-multiarch.diff", + "bytes": 1264, + "sha256": "af27525094757fdf1e207dc94721a6614d6ec01edb0469d3d7dceb5d9c52d2cb" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/ia64-disable-selective-scheduling.diff", + "bytes": 517, + "sha256": "54a060fdc9fa670594dd7ea8861a54367fc0fd87880b5286cb586f9df6087928" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/ignore-pie-specs-when-not-enabled.diff", + "bytes": 1585, + "sha256": "0b0f6143314c43c42bf0393932dd969d747c539be5f4045247e7e7d9c492553e" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/kfreebsd-decimal-float.diff", + "bytes": 1213, + "sha256": "ed05fbba7ee04ac36cb128652c907a616dac38afd63c9eac6e6237b776e9a2dd" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/libasan-sparc.diff", + "bytes": 5174, + "sha256": "31259c11930356abef803c5a3d3f247d4aa8a6fd3881a44d832c176c218c375e" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/libffi-race-condition.diff", + "bytes": 1107, + "sha256": "abb665a36ea6f96eab7eb3028afbc06f787775a1dfc8aed48fbcae85ca2f6ebf" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/libffi-ro-eh_frame_sect.diff", + "bytes": 388, + "sha256": "88df2bf9a652bda7df674f552c34449092eb07bad0e642e439a8a567511ab17a" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/libgo-cleanfiles.diff", + "bytes": 913, + "sha256": "01a23227ec7c4f6d30cdde7d3dddd4313643962716027dfd3175d44c883045f0" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/libgo-hurd-hack.diff", + "bytes": 1043, + "sha256": "fea8ff97fe411f17f3ab24d0926aa484ee49402e95e37b984b30bbaf6542f84a" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/libgo-revert-timeout-exp.diff", + "bytes": 292, + "sha256": "c7fc5e583f8d8c722f7cfddf837b94c0b45addf16efa0e7c47aa18309dbcc63c" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/libgo-setcontext-config.diff", + "bytes": 675, + "sha256": "6814b069b0118d4b6235af79e2238cbd6fa85ab43afba85c69a73717e170ea9a" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/libgo-testsuite.diff", + "bytes": 2413, + "sha256": "9fcd37d1b54851ba065acc437591538caac227c466b960170934924f50a9d92d" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/libgomp-kfreebsd-testsuite.diff", + "bytes": 292, + "sha256": "9fc54fd88488d66e54678b063593eb559559b2e6dd2445b17ca68e7bdb0141b3" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/libgomp-omp_h-multilib.diff", + "bytes": 904, + "sha256": "87fee448f135273b765570217687a579979e5eb03cda3d3301b64c4ec7406409" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/libiberty-sha1-1.diff", + "bytes": 14327, + "sha256": "f1420469f9259ce9ba031636c937a82e94ac23a8b3aaf84e00be37f9e4f98274" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/libiberty-sha1-2.diff", + "bytes": 7283, + "sha256": "217276154f41d9b30dbfacd4d367b637a3b2e9b1e57d45c6a82e6aa18ef846e2" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/libitm-no-fortify-source.diff", + "bytes": 465, + "sha256": "01ee6ba95ee2c4ecfdbeef56fd61188153f6b80471577f37deb735a81491c1f2" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/libphobos-zlib.diff", + "bytes": 2141, + "sha256": "84e8c1468fcf2dc5dafce2a3b2b926975c98e0b50449f0da3f6825f8b0dfef01" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/libsanitizer-no-crypt.diff", + "bytes": 5689, + "sha256": "7f84a0a496cfb96923d297070876aed8b3d54f7a6bc587c69a1a8dd93448e64e" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/libsanitizer-timebits.diff", + "bytes": 792, + "sha256": "6e7fbbbdb968bc88743e46e1f46388288b91b2dde6cbe30b0efdca50096ab252" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/libstdc++-doclink.diff", + "bytes": 2356, + "sha256": "68a7126e13097fd072867a7a0b96ce47cb05d2dc35c5c6412648b418d0f9e222" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/libstdc++-doxygen-SOURCE_DATE_EPOCH.diff", + "bytes": 565, + "sha256": "798b86ca29d0fc1736dc70f0258ce4b8d8844848098be2ec3d9ed65127056cca" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/libstdc++-hurd.diff", + "bytes": 1741, + "sha256": "99990061a3f17ff633ea01678930f5dc4b5f41affee8fe880ec7178f74b8a36d" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/libstdc++-man-3cxx.diff", + "bytes": 2587, + "sha256": "6e6e66eba28f090b549eeb5f9391de2f64cd2de88473731011805a3b187eb76f" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/libstdc++-no-testsuite.diff", + "bytes": 513, + "sha256": "fdf48c99cddf3de82d5722d6b4e4f3c53504a723452da98c62ce5814ab00f459" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/libstdc++-nothumb-check.diff", + "bytes": 1490, + "sha256": "c8775e9772f5dc83dad4d30c57f51a3bd61d318871578657d8e1eaa8a7b2a006" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/libstdc++-pic.diff", + "bytes": 3765, + "sha256": "1d9c2a8874585cc3beb5ec93795974345d3e0c81a6f2362bf5d773fbb622b1d0" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/libstdc++-pythondir.diff", + "bytes": 819, + "sha256": "dc8c35675108db2ae50e2f5c8212e6dea3954aabb2cb64241ad6f92f29185f37" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/libstdc++-test-installed.diff", + "bytes": 2574, + "sha256": "c8a2cbc73e22874f1d2acedb905b94c32b6e4ebd6bf9fde50c3c6ac952e3a505" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/musl-ssp.diff", + "bytes": 905, + "sha256": "b5aa722bf90ef419ab9682998b5eebba2d7fc1f4065359e0e48bd8b231628fa4" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/newlib-amdgcn-locks.diff", + "bytes": 13055, + "sha256": "b822b4d0b1490c89d5aa50b4ed4cb7d3553e57442064d046422abd10ca98d8e6" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/note-gnu-stack.diff", + "bytes": 3266, + "sha256": "8339552b0d1ffee7e60f330ac7aff380cd1615de4b549bd2d3f1949e3164ba9b" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/pr100067-revert.diff", + "bytes": 5506, + "sha256": "d7c086be304a34adc0fc375a108f9eec48ca03ffa730cbe4dac0c435bcc5aeae" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/pr104290-followup.diff", + "bytes": 478, + "sha256": "7f5f7923ba318ed6d519d2a46ad0e4f48d164aaca6595edf3f78db2f5ac85fd9" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/pr107475.diff", + "bytes": 370, + "sha256": "b4cc88cc20723ca6b6a1b0fdeb9708c5bc5a838f450b7dd3f2583452dc3a0bd6" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/pr110934.diff", + "bytes": 3661, + "sha256": "632225848c2a95180b6caccf8ef2865a4457a09b5147810758ffa2a4e9c90105" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/pr113030.diff", + "bytes": 2117, + "sha256": "e05596d8340161aac67919d3585d81261c3808b50aa7ce35497a18616c504199" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/pr11897.diff", + "bytes": 2212, + "sha256": "c0d6b4ea127e970b3f6771ca260ffe6376c50931dbbe63e48fa33501816b69a5" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/pr39491.diff", + "bytes": 3067, + "sha256": "063b444c5934839c567ca5c6bed3b4f261fb0b1032493de41a26d60e4da90387" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/pr66368.diff", + "bytes": 875, + "sha256": "bd13defa60e4720dc4af31f6e754809b0fddf4cc715ac52d0af4390860d37872" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/pr67590.diff", + "bytes": 1197, + "sha256": "fbabda522ec79a5c479ccd6c609897545cd9fbf26c48174fab525102837a1cee" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/pr67899.diff", + "bytes": 941, + "sha256": "dc101ca9dcffb64760e4eaf3f17f031d8f68a38ac42c770ef696c7ed179c1b98" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/pr79724-revert.diff", + "bytes": 722, + "sha256": "579eb20f3962ce2d0994cf995e4ed4857af269e5293855575e42e22f2adfded2" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/pr81829.diff", + "bytes": 8647, + "sha256": "b7aeb12d9fe1f4707b322c04acc7495f45b53aeecc84e2164df7d53729a739a0" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/pr87808.diff", + "bytes": 1684, + "sha256": "fce0bbfd3154f16c28f957a46fb71c59321e64f0ce19c5d1c61e3c771b5d1506" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/pr88552.diff", + "bytes": 1418, + "sha256": "a143fb39e76dae769cd65ab63ab9ce5a17b0775916ed62da54653ca639291fc7" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/pr94253.diff", + "bytes": 2042, + "sha256": "90eb3d06db3abb4e1e40f20b4cdf88ca71ad72f6ecdae8bbb2fd42a8fb8b99ff" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/pr99832-distro.diff", + "bytes": 1366, + "sha256": "3c6f7a52bacdedb4c235d3f56761fecabd47afa050e792fbb205d29bf0c2e69f" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/rename-info-files.diff", + "bytes": 26988, + "sha256": "e28ad2ad80a9141c1883936abe5d22c90e409a23a2d6f5728db168aaa610cc25" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/rust-enabled.diff", + "bytes": 744, + "sha256": "3587254473e9f0b3191cc8ca66fcb546f61735cef968d5003b4623ddbdbf8360" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/skip-bootstrap-multilib.diff", + "bytes": 844, + "sha256": "3f77d1bb0f40f9cb7afcfa15449992753d8801e6c3c538f7526177c2482cb3c7" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/sparc64-biarch-long-double-128.diff", + "bytes": 1391, + "sha256": "beb10c84279c04656addab2ef688fb2e4310fee4d2f270789cb4a89e6df972ac" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/sys-auxv-header.diff", + "bytes": 1117, + "sha256": "bb2b1210ff1bb8d73988bd657ed4121ac4335d1e433fb1dd4416deb8a90a6615" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/t-libunwind-elf-Wl-z-defs.diff", + "bytes": 575, + "sha256": "a039ff99ee9c205319f670deaa44e78abaa73638cb3ddea14423aa9071d8518d" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/testsuite-glibc-warnings.diff", + "bytes": 741, + "sha256": "30d9f0633230db9b013950c11be9e98692b9c76debb802e1e0cfbcffbb75ba77" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/testsuite-hardening-format.diff", + "bytes": 11357, + "sha256": "91fc710ac3cded86a966c4707843521196c49610c79029dc6f34740f87ea2658" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/testsuite-hardening-printf-types.diff", + "bytes": 23599, + "sha256": "39acd6e24c8a86cb2f70a94b71fce0f540f1070f22a411f65569de787f6fd6f0" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/testsuite-hardening-updates.diff", + "bytes": 4558, + "sha256": "3265692e734290b939b0b37794d3ec59a1ee248ae8994a8ec6bd617798473377" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/toplevel-add-gprofng.diff", + "bytes": 31074, + "sha256": "999132b3927bf84f6f066dfa7c38ca2b4fa466d11622d69edebd982241af45b1" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/toplevel-add-libsframe.diff", + "bytes": 2679, + "sha256": "9bad85b06d6ea731aef97153220fa36a068f58c35d6cd92efedd0dee884e2787" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/rules.patch", + "bytes": 12473, + "sha256": "6c6d9dc472ee7082c5658030c812436668ffbb99f76966a6cf9081b03732e8dc" + }, + { + "path": "tests/c05_elf_edges_test_v1.py", + "bytes": 11390, + "sha256": "4e61638ccf09aaf4015206faf575c88df53a8e1997f3740f7da06d88bc701ef3" + }, + { + "path": "tests/v03_constructor_test_v1.py", + "bytes": 14546, + "sha256": "34eebcaf61ba240abf7f0bd045917f78af7e48289fedcf4795664dea2f5b8fda" + }, + { + "path": "verify.py", + "bytes": 1104, + "sha256": "33aec219444d6e23f9eb521ea86a0de08a233473d0f13b2dc595644ed07e276e" + } + ], + "scope": "Byte identity only; no completeness/admission" +} diff --git a/research/h25-c05-v03-input-constructors/EXPORT-SUMMARY.json b/research/h25-c05-v03-input-constructors/EXPORT-SUMMARY.json new file mode 100644 index 0000000000..db8f7f068e --- /dev/null +++ b/research/h25-c05-v03-input-constructors/EXPORT-SUMMARY.json @@ -0,0 +1,6 @@ +{ + "files_before_metadata": 207, + "gcc_source_inputs": 162, + "bytes": 5781710, + "namespace_code_included": false +} diff --git a/research/h25-c05-v03-input-constructors/INDEPENDENT-REVIEW.json b/research/h25-c05-v03-input-constructors/INDEPENDENT-REVIEW.json new file mode 100644 index 0000000000..f40a4815c0 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/INDEPENDENT-REVIEW.json @@ -0,0 +1,24 @@ +{ + "observed_utc": "2026-11-02T08:13:44.266384+00:00", + "reviewers": [ + "v03_source_route_review (SolMax)", + "c05_component_review (SolMax)" + ], + "scope": "Independent agent source review of exact new source increment; not human/proof-kernel or full original qualification", + "v03_repair": "PASS limited source/frame/stream corroborator; exact generator/fixture bytes and conditional genuine route confirmed", + "c05_delta": "Conditional PASS for passive incomplete increment after interior-parameter paste refusal and trailing-noLF rejection. ELF scopedPASS; all complete domain/loader/configured/namespace claims remainfalse.", + "retained_defects": [ + "original three-line traceback false positive", + "malformed separated caret false positive", + "multi-token macro argument splits source paste chain", + "trailing no-final-newline marker bypass", + "initial test .txt fixture-path error", + "GCC str.splitlines form-feed test-reader error", + "partial-clone promisor-object publication setup failure" + ], + "full_C05": false, + "full_V03": false, + "original_activity_credit": 0, + "runtime_qualified": false, + "physical_cost": "OPEN_NOT_ZERO" +} diff --git a/research/h25-c05-v03-input-constructors/README.md b/research/h25-c05-v03-input-constructors/README.md new file mode 100644 index 0000000000..0c155d8241 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/README.md @@ -0,0 +1,47 @@ +# C05 input-edge constructors and genuine V03 source drafts + +This increment implements source-pinned GCC, header and ELF input-edge helpers and a genuine-Root V03 source generator, fixture-data constructor and strict traceback corroborator. It advances the original C05/V03 dependency path. **Complete C05, complete V03, an effective GCC configuration, original execution, source/stage admission and runtime qualification remain open.** + +The original C05 requirement is a complete independently justified project/system-header, search, macro, compiler/specs, linker and dependent-library witness closure in bounded `source_files`. The original V03 recipe is to corrupt each pinned C/header or swap role/header/mode, reject through the original literal/custody route, and preserve the first reached rejection. Neither is replaced by these helper tests or an empty prebuild read-set. + +## Implemented and checked + +- The GCC model authenticates162 selected text inputs, interprets a bounded Make-data subset without invoking Make or shell functions, projects exact patch contexts in memory, and records configured-rule candidates and unknowns.94 selections are definite under its stated source-build values and four remain conditional. `construct_effective_configuration` deliberately raises `IncompleteConfiguration`; it cannot issue completeness from a supplied chain. +- The header extractor authenticates bytes, handles strict-C11 lexical ordering and literal include/probe edges, preserves include-next origin identity and records PCH and unsupported syntax obligations. It does not discharge configured roots or physical namespace facts. The repaired829-occurrence corpus has1,452 literal edges,705 supported and124 unresolved occurrences, with666 conservative frontier forms. The original six occurrences have20 edges and no reported frontier. This is the acquired package corpus, not a reached C05 inventory or evidence that every form causes a read. +- The ELF extractor authenticates supplied bytes and derives interpreter/dynamic dependency edges, preserving order/multiplicity and refusing ambiguous range mappings. The passive original-input observation records25 ELF inputs, five archive/script handoffs and52 ordered NEEDED occurrences. Loader search, aliases and full transitive resolution remain open. CI uses synthetic bytes and does not repeat host observations. +- The V03 generator retains the exact original producer prefix through independent dependency comparison, before either build. All eight original gate literals remainNone. The fixture constructor provides89 proposed DATA cases per profile:68 intended negatives,20 positive discriminators and one earlier-refusal trap. Those are not original control executions or a retroactive funded census. +- The complete refusal corroborator derives the actual f5Root/entry/selected-driver/prefix/terminal source frames. It requires exact frame/source-line structure and a standard contiguous caret range. The older API remains explicitly terminal-site-only. Both require a genuine parent's source/stream ownership and cannot mint admission. + +Registered new-code controls run seven V03 test methods,34 header methods,23 GCC methods and25 ELF methods in normal and optimized Python. The V03 methods include all89 constructor DATA cases and fresh owned byte/mode fixtures. Original Root/provider/helper/C/native sources are read as inert text/bytes only. `genuine_launch` returns launch DATA; no target launch occurs. + +## Retained review corrections + +Independent Sol Max review found and the final source repairs retain: + +1. A heading/final-frame/final-exception three-line traceback passed the initial Pro corroborator. Its old API is now documented narrowly; the complete source-frame API rejects it. A malformed separated caret group was also rejected after review. +2. `#define P(a) 0 ## a ## include` can split around a multi-token argument and synthesize `__has_include`. The header extractor now refuses an interior formal argument unless a stronger model is supplied. The rescan increased conservative unsupported forms from557 to666; earlier receipts remain historical locally. +3. A no-final-newline marker following completed hunk counts bypassed the patch helper's rejection. The helper now refuses that marker throughout the selected target section. No impact was found on the23 retained current projection digests. + +Tests, source identity, independent agent review, independent human acceptance and original qualification are separate. The new scanner's output limits do not prove a bound on every intermediate token/paste-analysis cost. No full resource-fit claim is made. + +## Sources and provenance + +Base `7c49fe32c55de02c2c873655c804b16e4c3fef0a`; canonical handoff [PR6321](https://github.com/CrocSwap/integer-mult-bounds/pull/6321). Predecessors [6351](https://github.com/CrocSwap/integer-mult-bounds/pull/6351), [6352](https://github.com/CrocSwap/integer-mult-bounds/pull/6352), [6354](https://github.com/CrocSwap/integer-mult-bounds/pull/6354) and [6358](https://github.com/CrocSwap/integer-mult-bounds/pull/6358) retain their own narrower scopes. `SOURCE-ORIGIN.json` maps exact copies; the V03 test's only packaging adapter changes fixture-path assignments, with every function/class AST unchanged. + +Exact primary amd64 publications link GCC to PPA-origin build32148542 and binutils to build32324448. Saved buildinfo/changes checksums match GCC/cpp/libgcc-dev/binutils package bytes; six executable members match original pins. No OpenPGP signatures or reproducible builds were independently verified. Python's official development payload independently reproduces215 original header hashes. libc6-dev and Python do not have the same reviewed publisher-build checksum chain. These associations do not establish complete applied configuration or semantics. + +Selected source/configuration text is committed for cold helper replay. The complete source/package archives and823-header corpus payloads are external public inputs described by the exact acquisition/payload manifests in `evidence/`; their full acquisition is not a registered CI command. Captured corpus observations are byte-checked here. The original29 dependency list, source identity and category labels do not establish complete witness membership. + +## Reproduction + +From the repository root, use `scripts/research_package.py --package research/h25-c05-v03-input-constructors --check-only`, then the same command without `--check-only`. `verify.py` checks committed packet identities; `run_controls.py` selects only the four new helper suites. Each command gets a fresh bytecode-cache namespace. No compiler, original module import, native target, namespace creation or scientific workload is part of replay. + +The source window was07:00:58–08:00:58UTC on2026-11-02. Inputs were recorded available before the15-minute gate; its assessment was recorded49.3seconds after that gate. Source repairs/tests finished07:52:20 and the final corpus rescan07:59:59. Source-close bookkeeping was later. All timing gaps and failed preparation evidence remain recorded. Publication is a separate phase. No original budget was expanded: recorded policy debit94.550533479/2400seconds is not physical cost; preparation/review/publication/final costs remainOPEN_NOT_ZERO. The separately observed app goal remainspaused. Original43.5%,22/49 activities,stage2/10,milestones1/10,24components and52helpers remain unchanged. + +## Credit and licenses + +Chris R / Clear1nsight, with substantial ChatGPT Pro consultation and OpenAI Codex/Sol Max implementation and independent agent review. Retain original source/review authors, PR6321/6029/5864 contributors, unpaidmoon with Cursor Grok for6339, and Douglas R.Colkitt's circuit/network/native/verification lineage. New code is Apache-2.0; copied GCC sources/patches retain their original GNU licenses and notices (`licenses/`). Original project snapshots retain their attribution. Archival merge is not source/scientific adoption. + +## Open next questions + +Complete actual effective configuration, reached header/file-producing constructs, linker/loader search, physical content/aliases/negative lookups, the immutable input interval and genuine owning-parent/configured-stage integration. Then establish all original bounds, first-error/raw retention and current guarded command/funding admission. A captured Pro proposal for private copied filesystem ownership is still being assessed; no kernel/namespace code from it is included or executed here. This increment does not finish the ongoing C05/V03 assignment. diff --git a/research/h25-c05-v03-input-constructors/SOURCE-ORIGIN.json b/research/h25-c05-v03-input-constructors/SOURCE-ORIGIN.json new file mode 100644 index 0000000000..2d168bfffd --- /dev/null +++ b/research/h25-c05-v03-input-constructors/SOURCE-ORIGIN.json @@ -0,0 +1,1457 @@ +{ + "files": [ + { + "path": "implementation/v03_integrated_constructor_v1.py", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/implementation/v03_integrated_constructor_v1.py", + "bytes": 6087, + "sha256": "5e08ff84298fe1249be5e8790ea259e6179048f4736fb7eafdb6e170b8bc1cf9", + "transformation": "none" + }, + { + "path": "implementation/v03_fixture_constructor_v1.py", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/implementation/v03_fixture_constructor_v1.py", + "bytes": 11065, + "sha256": "97737b9e09fe3103206588d383e62bc7fbef75caf944e88a5b8cbcda310a909e", + "transformation": "none" + }, + { + "path": "implementation/v03_source_refusal_observer_v1.py", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/implementation/v03_source_refusal_observer_v1.py", + "bytes": 14205, + "sha256": "abf25690d3bee4a9783ee504567c29f7fb47da670e0ec95f57cb5944bf57264f", + "transformation": "none" + }, + { + "path": "implementation/c05_gcc_rules_v1.py", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/implementation/c05_gcc_rules_v1.py", + "bytes": 33560, + "sha256": "b3b8c5229f6e1bfca8e903aae95ad306200fbdce9ebd3b80974117613f538697", + "transformation": "none" + }, + { + "path": "implementation/c05_gcc_rules_tests_v1.py", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/implementation/c05_gcc_rules_tests_v1.py", + "bytes": 13844, + "sha256": "4141837fa615c9d1f703fd0083df3e4ff601a7b9af405b03a41ec0885a5b63e4", + "transformation": "none" + }, + { + "path": "implementation/c05_gcc_rules_sourcepins_v1.json", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/implementation/c05_gcc_rules_sourcepins_v1.json", + "bytes": 31581, + "sha256": "5564d0d2b47a5803c96b3767d838676e8f2427089e3b02cda1b1e62430a3c24d", + "transformation": "none" + }, + { + "path": "implementation/c05_gcc_rules_derivation_v1.json", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/implementation/c05_gcc_rules_derivation_v1.json", + "bytes": 78960, + "sha256": "efd4f9ec5742dfb60ce05cf9ff1fcb8d05820e3f1068e57303993ff1f6916e9d", + "transformation": "none" + }, + { + "path": "implementation/c05_header_edges_v1.py", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/implementation/c05_header_edges_v1.py", + "bytes": 24920, + "sha256": "1ed7daadd2845ae2ac3047c1a3475cf76acd4b988925519a88f7385362e01d71", + "transformation": "none" + }, + { + "path": "implementation/c05_header_edges_test_v1.py", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/implementation/c05_header_edges_test_v1.py", + "bytes": 11098, + "sha256": "ffa888d5b04717cf437e90cde099607d7fb8a635fb07ca2f6cae2da656c1b012", + "transformation": "none" + }, + { + "path": "implementation/c05_header_edges_derivation_v1.md", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/implementation/c05_header_edges_derivation_v1.md", + "bytes": 14992, + "sha256": "9f0cd8d3490515f8ee72fc37fb14c5b703bd3dda7588bfce00ddf6c80a225cf9", + "transformation": "none" + }, + { + "path": "implementation/c05_header_edges_macro_source_v1.json", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/implementation/c05_header_edges_macro_source_v1.json", + "bytes": 643, + "sha256": "d87374f153a99c66e89307a454f804f6fc94832de7f187b4cec9ee8279368700", + "transformation": "none" + }, + { + "path": "implementation/c05_elf_edges_v1.py", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/implementation/c05_elf_edges_v1.py", + "bytes": 15905, + "sha256": "1ae92edd36b02a4fa2a17248cc97b555fc68e5147ceeae5540384ccc9659bb39", + "transformation": "none" + }, + { + "path": "tests/c05_elf_edges_test_v1.py", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/tests/c05_elf_edges_test_v1.py", + "bytes": 11390, + "sha256": "4e61638ccf09aaf4015206faf575c88df53a8e1997f3740f7da06d88bc701ef3", + "transformation": "none" + }, + { + "path": "tests/v03_constructor_test_v1.py", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/tests/v03_constructor_test_v1.py", + "source_sha256": "3f7aeb812e17a261062b378060964b1a1c45694e9258c177367ce6bb46623452", + "sha256": "34eebcaf61ba240abf7f0bd045917f78af7e48289fedcf4795664dea2f5b8fda", + "transformation": "Only ORIGINAL/ROOT fixture path assignments adapted to self-contained committed inputs; every function/class AST unchanged" + }, + { + "path": "inputs/areas/field-variant-producer-v2/variant_driver_v1.py.txt", + "source_path": "outputs/resolved-questions-publication-20261102T025112Z/v03-publication/research/h25-v03-source-prerequisites/snapshot/areas/field-variant-producer-v2/variant_driver_v1.py.txt", + "bytes": 41337, + "sha256": "cdb1479253358508088f8aa0e1e92e6c75ffcc127e54552698598a02de061254", + "transformation": "none" + }, + { + "path": "inputs/areas/field-negative-variants-v1/pyinit_failure/dict_probe_fields_v1.c.txt", + "source_path": "outputs/resolved-questions-publication-20261102T025112Z/v03-publication/research/h25-v03-source-prerequisites/snapshot/areas/field-negative-variants-v1/pyinit_failure/dict_probe_fields_v1.c.txt", + "bytes": 17806, + "sha256": "e0188999d41a9ab26e8d3d5c37b18b2238b3af21b1db90895f01f7be76d50b65", + "transformation": "none" + }, + { + "path": "inputs/areas/field-negative-variants-v1/pyinit_failure/field_service_v1.h.txt", + "source_path": "outputs/resolved-questions-publication-20261102T025112Z/v03-publication/research/h25-v03-source-prerequisites/snapshot/areas/field-negative-variants-v1/pyinit_failure/field_service_v1.h.txt", + "bytes": 17354, + "sha256": "7656cd37503986459c4133643372fec13d3e5ad5553881f0bf0343a9a3e11abd", + "transformation": "none" + }, + { + "path": "inputs/areas/field-negative-variants-v1/pyinit_failure/field_loader_snapshot_v1.h.txt", + "source_path": "outputs/resolved-questions-publication-20261102T025112Z/v03-publication/research/h25-v03-source-prerequisites/snapshot/areas/field-negative-variants-v1/pyinit_failure/field_loader_snapshot_v1.h.txt", + "bytes": 19495, + "sha256": "bf7ab049cea89c0a882b279e35b1383ac8f99b66aa4b9b8e1ca22eb9c24c5a8d", + "transformation": "none" + }, + { + "path": "inputs/areas/field-negative-variants-v1/exec_failure/dict_probe_fields_v1.c.txt", + "source_path": "outputs/resolved-questions-publication-20261102T025112Z/v03-publication/research/h25-v03-source-prerequisites/snapshot/areas/field-negative-variants-v1/exec_failure/dict_probe_fields_v1.c.txt", + "bytes": 17806, + "sha256": "e0188999d41a9ab26e8d3d5c37b18b2238b3af21b1db90895f01f7be76d50b65", + "transformation": "none" + }, + { + "path": "inputs/areas/field-negative-variants-v1/exec_failure/field_service_v1.h.txt", + "source_path": "outputs/resolved-questions-publication-20261102T025112Z/v03-publication/research/h25-v03-source-prerequisites/snapshot/areas/field-negative-variants-v1/exec_failure/field_service_v1.h.txt", + "bytes": 17040, + "sha256": "f5066831bd812e7e88fb971ba0e7ca86dbef91fc40a1a68c17b040ce474cd880", + "transformation": "none" + }, + { + "path": "inputs/areas/field-negative-variants-v1/exec_failure/field_loader_snapshot_v1.h.txt", + "source_path": "outputs/resolved-questions-publication-20261102T025112Z/v03-publication/research/h25-v03-source-prerequisites/snapshot/areas/field-negative-variants-v1/exec_failure/field_loader_snapshot_v1.h.txt", + "bytes": 19495, + "sha256": "bf7ab049cea89c0a882b279e35b1383ac8f99b66aa4b9b8e1ca22eb9c24c5a8d", + "transformation": "none" + }, + { + "path": "inputs/root/full_driver.py.txt", + "source_path": "outputs/c05-context-namespace-20261102T042817Z/publication/research/h25-cache-source-handoff/snapshot/stages/combined-finite-v8/integration/full_driver.py.txt", + "bytes": 38851, + "sha256": "f5a2d33f2b4d3651f214156a0e7094c2bb516ce2d5ab7698d18c11f98f35dee0", + "transformation": "none" + }, + { + "path": "inputs/prerequisite-source/native_tcb_v1.py.txt", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/prerequisite-source/native_tcb_v1.py.txt", + "bytes": 11353, + "sha256": "865943df5cfdbf9383362d7fb2b76c6d0fd895cf0a0e20d550a26b579606b5d7", + "transformation": "none" + }, + { + "path": "inputs/prerequisite-source/native_tcb_controls_v1.py.txt", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/prerequisite-source/native_tcb_controls_v1.py.txt", + "bytes": 4889, + "sha256": "63b1804caa7f89915662a1424f788c3becad13520e1f63212a338fb45aaa2c5a", + "transformation": "none" + }, + { + "path": "inputs/prerequisite-source/sealed_elf_profile_v2.py.txt", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/prerequisite-source/sealed_elf_profile_v2.py.txt", + "bytes": 76453, + "sha256": "89ed8c777e6b72af2d6a3595037e7e92385924c6087d88010a27192633391016", + "transformation": "none" + }, + { + "path": "inputs/prerequisite-source/cold_authority_v7.py.txt", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/prerequisite-source/cold_authority_v7.py.txt", + "bytes": 40473, + "sha256": "2a941111bdfd91037dfcbc5552aced004809240a7e2b43bfbce39fb35798af39", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-13-x86-64-linux-gnu-BUILD-v1.json", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-13-x86-64-linux-gnu-BUILD-v1.json", + "bytes": 1900, + "sha256": "c776295d23a87c9efdccbd9b43b0cc79f037163b14037a37c2e8f7dcfc714379", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-13_13.3.0-6ubuntu2~24.04.1-selected/debian/rules", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-13_13.3.0-6ubuntu2~24.04.1-selected/debian/rules", + "bytes": 2984, + "sha256": "2e0afdc6303e407f344d2f6724be731ae84b8fd59758f172491c25348432d75a", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-13_13.3.0-6ubuntu2~24.04.1-selected/debian/rules.defs", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-13_13.3.0-6ubuntu2~24.04.1-selected/debian/rules.defs", + "bytes": 70194, + "sha256": "aaf79170f51110b6b9c90d1bee022d2122401fdbbf8840d91baa3e6f13cbeb58", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-13_13.3.0-6ubuntu2~24.04.1-selected/debian/rules2", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-13_13.3.0-6ubuntu2~24.04.1-selected/debian/rules2", + "bytes": 97853, + "sha256": "c9b1cebada609601ef1fe3bb34babccae572dccc3e86cebfad3927229d3b83ae", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-base-selected/gcc/Makefile.in", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-base-selected/gcc/Makefile.in", + "bytes": 164044, + "sha256": "41e0fe9006909a793736b73fdd434929c913023992c33cf9b746423f78682e45", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-base-selected/gcc/c-family/c-cppbuiltin.cc", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-base-selected/gcc/c-family/c-cppbuiltin.cc", + "bytes": 72427, + "sha256": "e2220b9cdc85b785faf220fd3058a46212cd3b5f7da4040dd4ca3e839bd0f1bd", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-base-selected/gcc/c-family/c-lex.cc", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-base-selected/gcc/c-family/c-lex.cc", + "bytes": 43799, + "sha256": "41ab40b6b1986771f2d3c73c6c3218dba19ddc87b57bd39d32ca8c639f42bc78", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-base-selected/gcc/c-family/c-opts.cc", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-base-selected/gcc/c-family/c-opts.cc", + "bytes": 54255, + "sha256": "41c5789fab7d536c6f16b8d4bcaa83583120eefa970c929ac24b783bd6b289ee", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-base-selected/gcc/c-family/c-target.def", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-base-selected/gcc/c-family/c-target.def", + "bytes": 4617, + "sha256": "3e3a24b7ef32b651781c07852d8bce61fe6587173149003c59f8c02d2684f065", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-base-selected/gcc/collect2.cc", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-base-selected/gcc/collect2.cc", + "bytes": 86914, + "sha256": "fba4b594cc57c301ca402fc04080167a6cf4b58884b5bfd05075821dc1f29cd4", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-base-selected/gcc/config/glibc-c.cc", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-base-selected/gcc/config/glibc-c.cc", + "bytes": 1146, + "sha256": "8feaf44e45d44cdd2d8c79c228d2d3ce45ead2a3fcf9e90f2c187a262b2865b6", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-base-selected/gcc/config/gnu-user.h", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-base-selected/gcc/config/gnu-user.h", + "bytes": 5894, + "sha256": "cf7ac27fe1d79dbd0e038a5d4f282eb54508ca664d7d25d1011590e728c2bdbf", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-base-selected/gcc/config/i386/gnu-user64.h", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-base-selected/gcc/config/i386/gnu-user64.h", + "bytes": 3256, + "sha256": "190fabbd35d1f5b526427f6a4bb3afe62a375dd605a43c7b5f550cb9c1650561", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-base-selected/gcc/config/i386/i386-c.cc", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-base-selected/gcc/config/i386/i386-c.cc", + "bytes": 30487, + "sha256": "5d0d59b1f38a0f81b430ac86cfef905a19382710c55e5543607a36931b86b4bb", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-base-selected/gcc/config/i386/linux64.h", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-base-selected/gcc/config/i386/linux64.h", + "bytes": 1669, + "sha256": "9007684d92746203c280b53a69debfff75851e31c1cd9ce6cd5c61f705d5179c", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-base-selected/gcc/config/i386/t-linux64", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-base-selected/gcc/config/i386/t-linux64", + "bytes": 1774, + "sha256": "e5126d97ea7412563159865755129046714cc95ebf74f63339065748c5adb5dc", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-base-selected/gcc/config/linux.h", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-base-selected/gcc/config/linux.h", + "bytes": 8504, + "sha256": "ce71be1f80fac59483042c6dd421bd267765c44f977505955b2718e30da612c4", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-base-selected/gcc/config.gcc", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-base-selected/gcc/config.gcc", + "bytes": 168460, + "sha256": "9d22d65c6a106a7802d0c67da6695ac918088bb097e2007646467cfb415cb481", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-base-selected/gcc/cppdefault.cc", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-base-selected/gcc/cppdefault.cc", + "bytes": 4378, + "sha256": "afaf16ab53ef0781ccb4e4ba3751a314c66eda24ec3132cc6d8b347d9c0ac9c3", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-base-selected/gcc/gcc.cc", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-base-selected/gcc/gcc.cc", + "bytes": 320626, + "sha256": "c260c6321fb3852df326618d18642a3c795a8886c285db71acde6a97fd031b0a", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-base-selected/gcc/incpath.cc", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-base-selected/gcc/incpath.cc", + "bytes": 15771, + "sha256": "70dca72168648a2606684b7c8dc6d31f68472f32ca1058724997abb7185d0e39", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-base-selected/libcpp/charset.cc", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-base-selected/libcpp/charset.cc", + "bytes": 96795, + "sha256": "de762070022c62edaac06f0a0df23c3e27c84678298fe0e8c720818271a7e105", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-base-selected/libcpp/directives.cc", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-base-selected/libcpp/directives.cc", + "bytes": 83304, + "sha256": "bd4ec75ba6fa41dee76915588763f37804b446a0f5cf0e3cfe11b0596fa680bf", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-base-selected/libcpp/files.cc", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-base-selected/libcpp/files.cc", + "bytes": 62715, + "sha256": "fc754c98510adae4af651de11b88e866490f71fb312fe001d0edc83ab4eec4d6", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-base-selected/libcpp/init.cc", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-base-selected/libcpp/init.cc", + "bytes": 32504, + "sha256": "62513e415dc0072231b466d2027172758633ea6f64f43f6d58d92b7f0759769d", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-base-selected/libcpp/lex.cc", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-base-selected/libcpp/lex.cc", + "bytes": 159800, + "sha256": "aa757d3e37199621d4f5853b823ee154ce6ac3b5444e28f3bfd235e26233be86", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-base-selected/libcpp/pch.cc", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-base-selected/libcpp/pch.cc", + "bytes": 23172, + "sha256": "ee92685b7854baef6c206cdd9e4e4ff4536a4e911d6f35a4724f295a7371145f", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/0001-Ada-remove-conversions-with-C-struct-timeval-from-GN.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/0001-Ada-remove-conversions-with-C-struct-timeval-from-GN.diff", + "bytes": 4294, + "sha256": "55dfce012fa49a15c2a523e936976f5522eaa0fbeefb02e81c9057ff9494f159", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/0002-Ada-remove-C-conversions-with-C-struct-timespec-from.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/0002-Ada-remove-C-conversions-with-C-struct-timespec-from.diff", + "bytes": 4554, + "sha256": "1fd7cab221966aafe8a988ec3293792391870a89bf6f56f138d79a744bc0dc0b", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/0003-Ada-define-time_t-timeval-timespec-C-types-in-a-sing.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/0003-Ada-define-time_t-timeval-timespec-C-types-in-a-sing.diff", + "bytes": 127291, + "sha256": "1313baa61eaa952f3f56bb1aa8868f5bc43d015f802a6022c5ae9445961ec97c", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/0003-Ada-remove-conversions-with-C-time_t-from-System.OS_.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/0003-Ada-remove-conversions-with-C-time_t-from-System.OS_.diff", + "bytes": 2189, + "sha256": "cf57baf090cda43ffda3652810df91031e45c023401eb3222966537dab5d3161", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/0005-Ada-import-nanosleep-from-System.OS_Primitives.Timed_.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/0005-Ada-import-nanosleep-from-System.OS_Primitives.Timed_.diff", + "bytes": 2087, + "sha256": "340eeab6cceba2fd1f7e42a1db96e8df2e2272cbeade11a6667875b8e57ced07", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/0006-Ada-select-64-bits-time-functions-from-GNU-libc-when-.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/0006-Ada-select-64-bits-time-functions-from-GNU-libc-when-.diff", + "bytes": 9481, + "sha256": "3a2f2f419b85ed41101e0adfe101fcdae88bec5c7cced14e6ef6b96b8a7e185b", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/ada-749574.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/ada-749574.diff", + "bytes": 4994, + "sha256": "07820c8e27bd9ef993a4ba996fe97710403d671cddf48eb0d2e8abaa0c476f6e", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/ada-armel-libatomic.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/ada-armel-libatomic.diff", + "bytes": 2092, + "sha256": "8d8c2444885aae6e94f4cf38cc31f852a82b3d9835759c5bebac095201fbd7c4", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/ada-gcc-name.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/ada-gcc-name.diff", + "bytes": 10800, + "sha256": "fe7721c2677380a2f9c3aee86d930f78e8101fbaadccc35843fb218649dc3e1e", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/ada-gnattools-cross.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/ada-gnattools-cross.diff", + "bytes": 9635, + "sha256": "115d50f0dade4b30613057a8c12d7c0e5830b27f35d6ebccdd787a545fac6167", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/ada-kfreebsd.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/ada-kfreebsd.diff", + "bytes": 2879, + "sha256": "99d1ce834579dc0f0a70956ff5e7465310e0bb97015868266711fd9aa1e79235", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/ada-lib-info-source-date-epoch.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/ada-lib-info-source-date-epoch.diff", + "bytes": 4459, + "sha256": "c7ad83b8a26d88ba491901243aa370634b5ddc56d3620e64e2e902b4f8376b7c", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/ada-link-lib.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/ada-link-lib.diff", + "bytes": 6044, + "sha256": "64dd337dda96bf73e43919c1f2e3eddc8c7080866263fe2294cf97f7c6a09214", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/ada-nobiarch-check.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/ada-nobiarch-check.diff", + "bytes": 902, + "sha256": "6b756ea5f28badaa6fcabe128458cad2ec36659e9fa59fc05ee83614ed60eac0", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/ada-perl-shebang.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/ada-perl-shebang.diff", + "bytes": 327, + "sha256": "b7440ca466305c0385d2e53f1ded7e004aa9ea9ad7aa54826c5a3c872e9d4b98", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/ada-sjlj.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/ada-sjlj.diff", + "bytes": 15733, + "sha256": "be3ff090488c08ad9dd4a95eab739785f562eb0923a43734d736dcdc874cda22", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/ada-verbose.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/ada-verbose.diff", + "bytes": 2233, + "sha256": "08d15a9726f9f4d2edaaf4ed1466869b513d93da763d8bdd2d13a7fd6ee31c3f", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/alpha-ieee-doc.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/alpha-ieee-doc.diff", + "bytes": 1087, + "sha256": "fb9fc660453dfc8e8d0f92e9b6e3eca15e39b29a4b377053a1646e1fd1306492", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/alpha-ieee.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/alpha-ieee.diff", + "bytes": 504, + "sha256": "899835f011abb832f52bbb9cc6f6f4f4466d2c47439a4fcbe8d669764a0cdb36", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/alpha-no-ev4-directive.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/alpha-no-ev4-directive.diff", + "bytes": 815, + "sha256": "b0e65e8eb6acdf3a0fdf5c64945bea749980ecbbb0547ce6ceae134802df7133", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/arc-stddef.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/arc-stddef.diff", + "bytes": 783, + "sha256": "47ca9b5f7899e885777ce3eac30f838be686ef221d51f974db981f363a8a7acc", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/arm-multilib-defaults.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/arm-multilib-defaults.diff", + "bytes": 2704, + "sha256": "b030153b1b38940e09b0119a0f9a66f2cf443e534e73a053eeab0e183f355634", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/arm-multilib-soft-cross.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/arm-multilib-soft-cross.diff", + "bytes": 1177, + "sha256": "614e198f0af1b9fa904185fa2d4a6d99f4227e7c1fb3e7a18267d7830c565062", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/arm-multilib-soft-float.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/arm-multilib-soft-float.diff", + "bytes": 1204, + "sha256": "194fe207ec6c38e0fbc7bf178dba2f4eee22e25609f083863438bec7482246f1", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/arm-multilib-soft.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/arm-multilib-soft.diff", + "bytes": 1088, + "sha256": "6ce4a4337635b4906cdd29e8c12886055920dce9d6c017a0373efb377b9adf25", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/arm-multilib-softfp-cross.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/arm-multilib-softfp-cross.diff", + "bytes": 1241, + "sha256": "0dc80d8deb83b4214b526e25369ac911c8fb3156b36be481a63e3c5649a09f85", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/arm-multilib-softfp.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/arm-multilib-softfp.diff", + "bytes": 1261, + "sha256": "4813ad4a730f793c747719819e599bb07a67e13b3a2745e5d337356ce5b3bb0b", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/asan-allocator-base.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/asan-allocator-base.diff", + "bytes": 999, + "sha256": "5368ebc426150e65d29b7185c91bba5be1804a3c9909ad47e489e6e42cbd2c44", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/bootstrap-no-unneeded-libs.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/bootstrap-no-unneeded-libs.diff", + "bytes": 1234, + "sha256": "992812bf94a94fcf122b099ca5c88d3a130d0acf10906be35ab1fa0d78288609", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/canonical-cpppath.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/canonical-cpppath.diff", + "bytes": 768, + "sha256": "4bf530e452c8d13c6199cb191d0ce94f3ae44f2b28cbaf06c0739812c4528bb4", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/config-ml.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/config-ml.diff", + "bytes": 1667, + "sha256": "243bcbf1148ebc5ec860bbea0dec588fffab35692a0700723becc58e7e89f729", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/cross-biarch.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/cross-biarch.diff", + "bytes": 4537, + "sha256": "4539a027bc28dea101f968f4260d55f596ac86f35e19f43d99090d09b3e8cb37", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/cross-fixes.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/cross-fixes.diff", + "bytes": 1758, + "sha256": "55bfa5116e4e4aaf0f19cd2ccc39a0e2651dd188d3aa4163520fdd6f09388226", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/cross-install-location.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/cross-install-location.diff", + "bytes": 22890, + "sha256": "9e943d2ea5dbabe60ee30a3cd08384874ce7c933ed233018871dbb568275eeb3", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/cross-no-locale-include.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/cross-no-locale-include.diff", + "bytes": 580, + "sha256": "f0fcb28e5324f14e2ebf68a5e0e750e79158f559cf4735c0df599d1b8acf2187", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/cuda-float128.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/cuda-float128.diff", + "bytes": 2436, + "sha256": "bb5b97c0061471ca5a4f15e42bcc2a0de7ca77792f1a14d07de8fcbe50c6ef75", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/disable-gdc-tests.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/disable-gdc-tests.diff", + "bytes": 529, + "sha256": "2857ba64270cb7b5d7cc24c44fff55338cbb407ed3bfa939bffdefb21bf0027b", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/dwarf5-revert-default-doc.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/dwarf5-revert-default-doc.diff", + "bytes": 541, + "sha256": "3a292cc57f441d03db9bb02218c739eede3d15fb34be24572118c8881b346561", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/dwarf5-revert-default.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/dwarf5-revert-default.diff", + "bytes": 886, + "sha256": "99d69adaed301f2e745eebce16e5c5ec996a963ba14142dff56bd05debc83814", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/g++-multiarch-incdir.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/g++-multiarch-incdir.diff", + "bytes": 5131, + "sha256": "bc30caf1d10804375e6104e004d658fb2df1857cbab55871d715d81c1b6ce049", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-arm-disable-guality-tests.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-arm-disable-guality-tests.diff", + "bytes": 1164, + "sha256": "24b87b8c95ee7074ccc01dfe982f5b37474b96d6820ad50b2441b69c28b3d504", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-as-needed-gold.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-as-needed-gold.diff", + "bytes": 4492, + "sha256": "8bb7658a5fef8d262535b4507295bfd9f62fa973a27ec08e2a8be6650ae0d70d", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-as-needed.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-as-needed.diff", + "bytes": 11789, + "sha256": "f2145cce7b9633be112cb7961f92c85434cf7cca28a93cc9ce4b038ff1c0bbc4", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-auto-build.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-auto-build.diff", + "bytes": 592, + "sha256": "183ec477fec9aa8a96d655e1b19d9842b3fdc3640b4c29528466772ca0f635a3", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-distro-specs-ubuntu-doc.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-distro-specs-ubuntu-doc.diff", + "bytes": 3428, + "sha256": "43d0af5d8ac2c6db9d0d77d4ada0f74cac928fbcbb9bd4caf4b5805f3cd4d45b", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-distro-specs.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-distro-specs.diff", + "bytes": 17113, + "sha256": "22e7b3c4e7a3437c456bae439501f97c560460b46670700d9e09aafa032ef072", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-driver-extra-langs.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-driver-extra-langs.diff", + "bytes": 1111, + "sha256": "ac5a6a7bf051708f917c59d9736b83cc65740168bc240147f94af67d13ad272d", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-foffload-default.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-foffload-default.diff", + "bytes": 4196, + "sha256": "e1bd3bfe68414470018d4f24ec0d0af3bab685901b103b70cd40490e874d7aaf", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-force-cross-layout.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-force-cross-layout.diff", + "bytes": 2090, + "sha256": "2d71d1b68a28e5980cfb55a49aab1321dac31756dcfa2c95438c306b3f140aac", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-gfdl-build.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-gfdl-build.diff", + "bytes": 1741, + "sha256": "6a9344c1498dfa2cdb47e02bac1991e2e120d277ceddd06c6da62a371354df8a", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-hash-style-gnu.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-hash-style-gnu.diff", + "bytes": 5837, + "sha256": "b994015da754fdc89c4654181d4ba26fa4d63cf89ae1d0b0b2322cd6eeee0aa0", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-ice-apport.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-ice-apport.diff", + "bytes": 1177, + "sha256": "89c0a21abc34c5f320a32cc0f07ecc46a6d9ebb9e0656e560b103530f594a841", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-ice-dump.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-ice-dump.diff", + "bytes": 3388, + "sha256": "530cdb9a70740c8c3d6029ece09205cd92b6dab3676530cbd4dfbd1b57587e36", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-multiarch.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-multiarch.diff", + "bytes": 11141, + "sha256": "18022b0748f43bf018eea1916b4f11bca68daad7ce8ecf076e4e103a1acba0e8", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-multilib-multiarch.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-multilib-multiarch.diff", + "bytes": 5721, + "sha256": "b5d6ba4e2831fd8f4614381ef1da42e38fb3744e0e3782d5c1e650b192ab4837", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-search-prefixed-as-ld.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-search-prefixed-as-ld.diff", + "bytes": 1366, + "sha256": "7ec5fb60d1e42c346a2381f10c7ce561a9ccb2ec74e45807c83328f4f81a4090", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-target-include-asm.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-target-include-asm.diff", + "bytes": 791, + "sha256": "d5162f826158aee096e1f699e6cce6a8adf74291cf28c5dfe038dae5d16da849", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-textdomain.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-textdomain.diff", + "bytes": 2712, + "sha256": "85f819e014b708635e695002fb323da73ea72996de8e4c4fa3fc308e3e6300dd", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-verbose-lto-link.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-verbose-lto-link.diff", + "bytes": 358, + "sha256": "357e6581ae291ee102bbcaa4dd9df10e86f89e424d1e5be210b621183d2745fa", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-vhdl.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-vhdl.diff", + "bytes": 605, + "sha256": "af8f5448ab8487d6596b10211f073cd56412db49f293e8a3ebf76cf184939ff5", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/gccrs-bootstrap-mipsel.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/gccrs-bootstrap-mipsel.diff", + "bytes": 583, + "sha256": "f665d2a06c95f3252a67abf581e653ef65169a578437746bedd1fcee638cae0b", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/gdc-dynamic-link-phobos.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/gdc-dynamic-link-phobos.diff", + "bytes": 594, + "sha256": "21288b8c5b6444caae885cc000220078009cf134a129f1ab5c03402bdfc57b65", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/gdc-multiarch.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/gdc-multiarch.diff", + "bytes": 492, + "sha256": "9b2fe79af02c72bc5b8f2ae7c7d593699dd5d94d9d2b59a1c15494d9543f3dfb", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/gdc-texinfo.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/gdc-texinfo.diff", + "bytes": 1285, + "sha256": "14d8c9d15e0126e2bda8f2fe246529962b62bb8a6b5fd31702b37907a5fac924", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/git-doc-updates.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/git-doc-updates.diff", + "bytes": 1766, + "sha256": "8430cab8bf949900c0db75f6a4cbd3ab7f1f1fe7d7d170da9c64da64c99689aa", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/git-updates.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/git-updates.diff", + "bytes": 464763, + "sha256": "d4ff0b3be1a4630f8e2ee8d1c631bc7fe1272dc71a9a4816fc044fa96e063eb4", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/gm2-bootstrap-compare.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/gm2-bootstrap-compare.diff", + "bytes": 616, + "sha256": "89cd05a772150cffe1f9a74db27c1556460390f84d92e9c7dd50688f8b7db911", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/gm2-texinfo.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/gm2-texinfo.diff", + "bytes": 711, + "sha256": "e142f747b874b03f009fb7a43b695f702569dffba3527f6b47a7fd32fc9a1ba4", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/go-testsuite.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/go-testsuite.diff", + "bytes": 507, + "sha256": "664fde089be949febea33e4b7fffcdaeaa4cb5c753f600fb4ec30694e3698a4e", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/hppa64-libgcov-fallback.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/hppa64-libgcov-fallback.diff", + "bytes": 348, + "sha256": "24472fb0f01d25d6e5a16de7f49a26a43af9ebd9f95d4ef0879c94f26b475428", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/hurd-amd64.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/hurd-amd64.diff", + "bytes": 4911, + "sha256": "8975d47d0ae92526ac4c569ab9b454baeca7a3b77a326bd62170ce796a11883f", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/hurd-changes.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/hurd-changes.diff", + "bytes": 649, + "sha256": "468a5006bb9c09228a5b3cf8f6f27f26ed9ed5bf8c05062b905582276a5a7da2", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/hurd-multiarch.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/hurd-multiarch.diff", + "bytes": 738, + "sha256": "b2b7ab65b3ecbc33b0856afc818cd31c71ba2072fa70a0c3822406d71796dfdd", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/hurd-multilib-multiarch.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/hurd-multilib-multiarch.diff", + "bytes": 1264, + "sha256": "af27525094757fdf1e207dc94721a6614d6ec01edb0469d3d7dceb5d9c52d2cb", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/ia64-disable-selective-scheduling.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/ia64-disable-selective-scheduling.diff", + "bytes": 517, + "sha256": "54a060fdc9fa670594dd7ea8861a54367fc0fd87880b5286cb586f9df6087928", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/ignore-pie-specs-when-not-enabled.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/ignore-pie-specs-when-not-enabled.diff", + "bytes": 1585, + "sha256": "0b0f6143314c43c42bf0393932dd969d747c539be5f4045247e7e7d9c492553e", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/kfreebsd-decimal-float.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/kfreebsd-decimal-float.diff", + "bytes": 1213, + "sha256": "ed05fbba7ee04ac36cb128652c907a616dac38afd63c9eac6e6237b776e9a2dd", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/libasan-sparc.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/libasan-sparc.diff", + "bytes": 5174, + "sha256": "31259c11930356abef803c5a3d3f247d4aa8a6fd3881a44d832c176c218c375e", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/libffi-race-condition.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/libffi-race-condition.diff", + "bytes": 1107, + "sha256": "abb665a36ea6f96eab7eb3028afbc06f787775a1dfc8aed48fbcae85ca2f6ebf", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/libffi-ro-eh_frame_sect.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/libffi-ro-eh_frame_sect.diff", + "bytes": 388, + "sha256": "88df2bf9a652bda7df674f552c34449092eb07bad0e642e439a8a567511ab17a", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/libgo-cleanfiles.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/libgo-cleanfiles.diff", + "bytes": 913, + "sha256": "01a23227ec7c4f6d30cdde7d3dddd4313643962716027dfd3175d44c883045f0", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/libgo-hurd-hack.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/libgo-hurd-hack.diff", + "bytes": 1043, + "sha256": "fea8ff97fe411f17f3ab24d0926aa484ee49402e95e37b984b30bbaf6542f84a", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/libgo-revert-timeout-exp.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/libgo-revert-timeout-exp.diff", + "bytes": 292, + "sha256": "c7fc5e583f8d8c722f7cfddf837b94c0b45addf16efa0e7c47aa18309dbcc63c", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/libgo-setcontext-config.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/libgo-setcontext-config.diff", + "bytes": 675, + "sha256": "6814b069b0118d4b6235af79e2238cbd6fa85ab43afba85c69a73717e170ea9a", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/libgo-testsuite.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/libgo-testsuite.diff", + "bytes": 2413, + "sha256": "9fcd37d1b54851ba065acc437591538caac227c466b960170934924f50a9d92d", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/libgomp-kfreebsd-testsuite.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/libgomp-kfreebsd-testsuite.diff", + "bytes": 292, + "sha256": "9fc54fd88488d66e54678b063593eb559559b2e6dd2445b17ca68e7bdb0141b3", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/libgomp-omp_h-multilib.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/libgomp-omp_h-multilib.diff", + "bytes": 904, + "sha256": "87fee448f135273b765570217687a579979e5eb03cda3d3301b64c4ec7406409", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/libiberty-sha1-1.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/libiberty-sha1-1.diff", + "bytes": 14327, + "sha256": "f1420469f9259ce9ba031636c937a82e94ac23a8b3aaf84e00be37f9e4f98274", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/libiberty-sha1-2.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/libiberty-sha1-2.diff", + "bytes": 7283, + "sha256": "217276154f41d9b30dbfacd4d367b637a3b2e9b1e57d45c6a82e6aa18ef846e2", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/libitm-no-fortify-source.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/libitm-no-fortify-source.diff", + "bytes": 465, + "sha256": "01ee6ba95ee2c4ecfdbeef56fd61188153f6b80471577f37deb735a81491c1f2", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/libphobos-zlib.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/libphobos-zlib.diff", + "bytes": 2141, + "sha256": "84e8c1468fcf2dc5dafce2a3b2b926975c98e0b50449f0da3f6825f8b0dfef01", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/libsanitizer-no-crypt.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/libsanitizer-no-crypt.diff", + "bytes": 5689, + "sha256": "7f84a0a496cfb96923d297070876aed8b3d54f7a6bc587c69a1a8dd93448e64e", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/libsanitizer-timebits.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/libsanitizer-timebits.diff", + "bytes": 792, + "sha256": "6e7fbbbdb968bc88743e46e1f46388288b91b2dde6cbe30b0efdca50096ab252", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/libstdc++-doclink.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/libstdc++-doclink.diff", + "bytes": 2356, + "sha256": "68a7126e13097fd072867a7a0b96ce47cb05d2dc35c5c6412648b418d0f9e222", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/libstdc++-doxygen-SOURCE_DATE_EPOCH.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/libstdc++-doxygen-SOURCE_DATE_EPOCH.diff", + "bytes": 565, + "sha256": "798b86ca29d0fc1736dc70f0258ce4b8d8844848098be2ec3d9ed65127056cca", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/libstdc++-hurd.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/libstdc++-hurd.diff", + "bytes": 1741, + "sha256": "99990061a3f17ff633ea01678930f5dc4b5f41affee8fe880ec7178f74b8a36d", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/libstdc++-man-3cxx.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/libstdc++-man-3cxx.diff", + "bytes": 2587, + "sha256": "6e6e66eba28f090b549eeb5f9391de2f64cd2de88473731011805a3b187eb76f", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/libstdc++-no-testsuite.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/libstdc++-no-testsuite.diff", + "bytes": 513, + "sha256": "fdf48c99cddf3de82d5722d6b4e4f3c53504a723452da98c62ce5814ab00f459", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/libstdc++-nothumb-check.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/libstdc++-nothumb-check.diff", + "bytes": 1490, + "sha256": "c8775e9772f5dc83dad4d30c57f51a3bd61d318871578657d8e1eaa8a7b2a006", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/libstdc++-pic.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/libstdc++-pic.diff", + "bytes": 3765, + "sha256": "1d9c2a8874585cc3beb5ec93795974345d3e0c81a6f2362bf5d773fbb622b1d0", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/libstdc++-pythondir.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/libstdc++-pythondir.diff", + "bytes": 819, + "sha256": "dc8c35675108db2ae50e2f5c8212e6dea3954aabb2cb64241ad6f92f29185f37", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/libstdc++-test-installed.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/libstdc++-test-installed.diff", + "bytes": 2574, + "sha256": "c8a2cbc73e22874f1d2acedb905b94c32b6e4ebd6bf9fde50c3c6ac952e3a505", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/musl-ssp.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/musl-ssp.diff", + "bytes": 905, + "sha256": "b5aa722bf90ef419ab9682998b5eebba2d7fc1f4065359e0e48bd8b231628fa4", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/newlib-amdgcn-locks.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/newlib-amdgcn-locks.diff", + "bytes": 13055, + "sha256": "b822b4d0b1490c89d5aa50b4ed4cb7d3553e57442064d046422abd10ca98d8e6", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/note-gnu-stack.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/note-gnu-stack.diff", + "bytes": 3266, + "sha256": "8339552b0d1ffee7e60f330ac7aff380cd1615de4b549bd2d3f1949e3164ba9b", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/pr100067-revert.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/pr100067-revert.diff", + "bytes": 5506, + "sha256": "d7c086be304a34adc0fc375a108f9eec48ca03ffa730cbe4dac0c435bcc5aeae", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/pr104290-followup.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/pr104290-followup.diff", + "bytes": 478, + "sha256": "7f5f7923ba318ed6d519d2a46ad0e4f48d164aaca6595edf3f78db2f5ac85fd9", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/pr107475.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/pr107475.diff", + "bytes": 370, + "sha256": "b4cc88cc20723ca6b6a1b0fdeb9708c5bc5a838f450b7dd3f2583452dc3a0bd6", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/pr110934.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/pr110934.diff", + "bytes": 3661, + "sha256": "632225848c2a95180b6caccf8ef2865a4457a09b5147810758ffa2a4e9c90105", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/pr113030.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/pr113030.diff", + "bytes": 2117, + "sha256": "e05596d8340161aac67919d3585d81261c3808b50aa7ce35497a18616c504199", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/pr11897.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/pr11897.diff", + "bytes": 2212, + "sha256": "c0d6b4ea127e970b3f6771ca260ffe6376c50931dbbe63e48fa33501816b69a5", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/pr39491.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/pr39491.diff", + "bytes": 3067, + "sha256": "063b444c5934839c567ca5c6bed3b4f261fb0b1032493de41a26d60e4da90387", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/pr66368.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/pr66368.diff", + "bytes": 875, + "sha256": "bd13defa60e4720dc4af31f6e754809b0fddf4cc715ac52d0af4390860d37872", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/pr67590.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/pr67590.diff", + "bytes": 1197, + "sha256": "fbabda522ec79a5c479ccd6c609897545cd9fbf26c48174fab525102837a1cee", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/pr67899.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/pr67899.diff", + "bytes": 941, + "sha256": "dc101ca9dcffb64760e4eaf3f17f031d8f68a38ac42c770ef696c7ed179c1b98", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/pr79724-revert.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/pr79724-revert.diff", + "bytes": 722, + "sha256": "579eb20f3962ce2d0994cf995e4ed4857af269e5293855575e42e22f2adfded2", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/pr81829.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/pr81829.diff", + "bytes": 8647, + "sha256": "b7aeb12d9fe1f4707b322c04acc7495f45b53aeecc84e2164df7d53729a739a0", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/pr87808.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/pr87808.diff", + "bytes": 1684, + "sha256": "fce0bbfd3154f16c28f957a46fb71c59321e64f0ce19c5d1c61e3c771b5d1506", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/pr88552.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/pr88552.diff", + "bytes": 1418, + "sha256": "a143fb39e76dae769cd65ab63ab9ce5a17b0775916ed62da54653ca639291fc7", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/pr94253.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/pr94253.diff", + "bytes": 2042, + "sha256": "90eb3d06db3abb4e1e40f20b4cdf88ca71ad72f6ecdae8bbb2fd42a8fb8b99ff", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/pr99832-distro.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/pr99832-distro.diff", + "bytes": 1366, + "sha256": "3c6f7a52bacdedb4c235d3f56761fecabd47afa050e792fbb205d29bf0c2e69f", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/rename-info-files.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/rename-info-files.diff", + "bytes": 26988, + "sha256": "e28ad2ad80a9141c1883936abe5d22c90e409a23a2d6f5728db168aaa610cc25", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/rust-enabled.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/rust-enabled.diff", + "bytes": 744, + "sha256": "3587254473e9f0b3191cc8ca66fcb546f61735cef968d5003b4623ddbdbf8360", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/skip-bootstrap-multilib.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/skip-bootstrap-multilib.diff", + "bytes": 844, + "sha256": "3f77d1bb0f40f9cb7afcfa15449992753d8801e6c3c538f7526177c2482cb3c7", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/sparc64-biarch-long-double-128.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/sparc64-biarch-long-double-128.diff", + "bytes": 1391, + "sha256": "beb10c84279c04656addab2ef688fb2e4310fee4d2f270789cb4a89e6df972ac", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/sys-auxv-header.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/sys-auxv-header.diff", + "bytes": 1117, + "sha256": "bb2b1210ff1bb8d73988bd657ed4121ac4335d1e433fb1dd4416deb8a90a6615", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/t-libunwind-elf-Wl-z-defs.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/t-libunwind-elf-Wl-z-defs.diff", + "bytes": 575, + "sha256": "a039ff99ee9c205319f670deaa44e78abaa73638cb3ddea14423aa9071d8518d", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/testsuite-glibc-warnings.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/testsuite-glibc-warnings.diff", + "bytes": 741, + "sha256": "30d9f0633230db9b013950c11be9e98692b9c76debb802e1e0cfbcffbb75ba77", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/testsuite-hardening-format.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/testsuite-hardening-format.diff", + "bytes": 11357, + "sha256": "91fc710ac3cded86a966c4707843521196c49610c79029dc6f34740f87ea2658", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/testsuite-hardening-printf-types.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/testsuite-hardening-printf-types.diff", + "bytes": 23599, + "sha256": "39acd6e24c8a86cb2f70a94b71fce0f540f1070f22a411f65569de787f6fd6f0", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/testsuite-hardening-updates.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/testsuite-hardening-updates.diff", + "bytes": 4558, + "sha256": "3265692e734290b939b0b37794d3ec59a1ee248ae8994a8ec6bd617798473377", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/toplevel-add-gprofng.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/toplevel-add-gprofng.diff", + "bytes": 31074, + "sha256": "999132b3927bf84f6f066dfa7c38ca2b4fa466d11622d69edebd982241af45b1", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/patches/toplevel-add-libsframe.diff", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/patches/toplevel-add-libsframe.diff", + "bytes": 2679, + "sha256": "9bad85b06d6ea731aef97153220fa36a068f58c35d6cd92efedd0dee884e2787", + "transformation": "none" + }, + { + "path": "source-artifacts/gcc-debian-patch-inputs/debian/rules.patch", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-debian-patch-inputs/debian/rules.patch", + "bytes": 12473, + "sha256": "6c6d9dc472ee7082c5658030c812436668ffbb99f76966a6cf9081b03732e8dc", + "transformation": "none" + }, + { + "path": "source-artifacts/../evidence/EMBEDDED-CONFIGURATION-v1.json", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/../evidence/EMBEDDED-CONFIGURATION-v1.json", + "bytes": 1727, + "sha256": "b02f8530e592eddeac5f86a2fb3a8ea80f25ac0e8ab2945fccb64a665b18d4cc", + "transformation": "none" + }, + { + "path": "evidence/UNIT-01-INPUT-GATE-v1.json", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/evidence/UNIT-01-INPUT-GATE-v1.json", + "bytes": 1115, + "sha256": "05fe0819df45ee94e34d0d5c5b215429564365eb8cd767e29bbca1eef02d1640", + "transformation": "none" + }, + { + "path": "evidence/UNIT-01-SOURCE-CLOSE-v1.json", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/UNIT-01-SOURCE-CLOSE-v1.json", + "bytes": 2856, + "sha256": "4f41522472d31bb3904d24ddc0b0ac01aef63273e4f551575b6148457e23eed5", + "transformation": "none" + }, + { + "path": "evidence/NEW-TEST-FAILURE-001.json", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/evidence/NEW-TEST-FAILURE-001.json", + "bytes": 570, + "sha256": "a313c5316bd91f51df993722dd1fdfb0d0d946bb27a9817724e1e9fa8e929ce0", + "transformation": "none" + }, + { + "path": "evidence/V03-NEW-CONTROLS-normal-v2.txt", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/evidence/V03-NEW-CONTROLS-normal-v2.txt", + "bytes": 1069, + "sha256": "78bdc3e5153f3c0420508fbc98b6d630ccba4b06134d1ffa52779c7c53db7cf5", + "transformation": "none" + }, + { + "path": "evidence/V03-NEW-CONTROLS-optimized-v2.txt", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/evidence/V03-NEW-CONTROLS-optimized-v2.txt", + "bytes": 1069, + "sha256": "fe4d4dfdbeeb56151a37f35a7679d27280872b3d93b82447814fb9095b1dc3e5", + "transformation": "none" + }, + { + "path": "evidence/REPAIR-VALIDATION-v2.json", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/implementation/REPAIR-VALIDATION-v2.json", + "bytes": 14233, + "sha256": "e0b6233684cd137573a206ba3a45f41ac26e01cd85b2639ed12e34ab292719de", + "transformation": "none" + }, + { + "path": "derivation/c05_elf_edges_DERIVATION-v1.md", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/derivation/c05_elf_edges_DERIVATION-v1.md", + "bytes": 11592, + "sha256": "e5496023e71fc5da94022e2d25807973dffe03ed2cb5b2a03aeef85f2f2059fb", + "transformation": "none" + }, + { + "path": "evidence/c05_elf_edges_PASSIVE-INVENTORY-v1.json", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/derivation/c05_elf_edges_PASSIVE-INVENTORY-v1.json", + "bytes": 214273, + "sha256": "5d01bc09959e4fc1d0661f1f737e91411db879288a5db23691dc3237ace5bb8d", + "transformation": "none" + }, + { + "path": "evidence/header-corpus-v2/c05_header_edges_refined_corpus_summary_v1.json", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/repaired-header-corpus-v2/c05_header_edges_refined_corpus_summary_v1.json", + "bytes": 6075, + "sha256": "a456c3d674df1021692b693c87864b30aafa3d35c9765de98aa2c9a6307ea594", + "transformation": "none" + }, + { + "path": "evidence/header-corpus-v2/c05_header_edges_refined_corpus_v1_000.json", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/repaired-header-corpus-v2/c05_header_edges_refined_corpus_v1_000.json", + "bytes": 632911, + "sha256": "e6c53563da91809fdf2535644244cdb7037eaca1c52cff88a4f2c83f90d246e2", + "transformation": "none" + }, + { + "path": "evidence/header-corpus-v2/c05_header_edges_refined_corpus_v1_001.json", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/repaired-header-corpus-v2/c05_header_edges_refined_corpus_v1_001.json", + "bytes": 647254, + "sha256": "525731cae9328e303882b89d30ab0aff67fd41e9d9194f1d66eba80e27e80246", + "transformation": "none" + }, + { + "path": "evidence/header-corpus-v2/c05_header_edges_refined_corpus_v1_002.json", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/repaired-header-corpus-v2/c05_header_edges_refined_corpus_v1_002.json", + "bytes": 813956, + "sha256": "1edcdd45451d8cc628f6d7938ad1ca9d33684d7303be7f4f3d93f3c31c22992e", + "transformation": "none" + }, + { + "path": "evidence/header-corpus-v2/c05_header_edges_refined_corpus_v1_003.json", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/repaired-header-corpus-v2/c05_header_edges_refined_corpus_v1_003.json", + "bytes": 35404, + "sha256": "1e4efcf4d20c0b5cb85d679fafc2da6cc1a6448125dab11cf34e50c307dc9021", + "transformation": "none" + }, + { + "path": "evidence/LAUNCHPAD-BINARY-PUBLICATION-ACQUISITION-v1.json", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/LAUNCHPAD-BINARY-PUBLICATION-ACQUISITION-v1.json", + "bytes": 16581, + "sha256": "3d802d0400a15a7bab70bddd490dee46d0fef6349842c401d73f227fbd2e940a", + "transformation": "none" + }, + { + "path": "evidence/LAUNCHPAD-EXACT-BUILD-ACQUISITION-v1.json", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/LAUNCHPAD-EXACT-BUILD-ACQUISITION-v1.json", + "bytes": 2698, + "sha256": "cce05c10bb2065629b93870303777b112afd143a0f6c3fba8f3071158c81a93a", + "transformation": "none" + }, + { + "path": "evidence/PUBLISHER-BUILD-CHECKSUM-ASSOCIATION-v1.json", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/PUBLISHER-BUILD-CHECKSUM-ASSOCIATION-v1.json", + "bytes": 7161, + "sha256": "21cb1f2059830a63ae9c3a289e960ff7df15a10cb66b6ff9bfcab025ea5c2d3f", + "transformation": "none" + }, + { + "path": "evidence/BUILDINFO-CHANGES-ACQUISITION-v1.json", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/BUILDINFO-CHANGES-ACQUISITION-v1.json", + "bytes": 2565, + "sha256": "e88faa80dad30d0b90a35dbcefe8238b3904fdcb348b57736b2d828d41288e77", + "transformation": "none" + }, + { + "path": "evidence/BINARY-PACKAGE-CORRESPONDENCE-v1.json", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/BINARY-PACKAGE-CORRESPONDENCE-v1.json", + "bytes": 3437, + "sha256": "7ade5b65ff17b1a941bc768eb81aaffb986ba6b40fea689d3408f1889032b98f", + "transformation": "none" + }, + { + "path": "evidence/DEVELOPMENT-PACKAGE-VERSIONS-v1.json", + "source_path": "outputs/c05-v03-completion-20261102T055710Z/evidence/DEVELOPMENT-PACKAGE-VERSIONS-v1.json", + "bytes": 485, + "sha256": "3c318f3430f81f9a62da9a04d58df3b4cc47990eed3294fdb20b4bc3c297d123", + "transformation": "none" + } + ], + "full_C05": false, + "full_V03": false, + "no_original_execution": true, + "source_license_policy": "New code Apache-2.0; retained GCC source/patch files keep their original GNU notices/licenses. Original project snapshots retain original attribution." +} diff --git a/research/h25-c05-v03-input-constructors/SOURCES.json b/research/h25-c05-v03-input-constructors/SOURCES.json new file mode 100644 index 0000000000..594089b9c7 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/SOURCES.json @@ -0,0 +1,18 @@ +{ + "schema_version": 1, + "base_commit": "7c49fe32c55de02c2c873655c804b16e4c3fef0a", + "files": [ + { + "path": "certificates/selected-result.json", + "usage": "provenance", + "git_blob": "d59b5035e7b4cbaa9d688a1d32dd0d6eb79c466a", + "sha256": "9b8d0eea95b3bf0dfcb7938a732a6439b87a2685dec2a5ab9e525b3b34debbfa" + }, + { + "path": "docs/research/agent-task-catalog.json", + "usage": "provenance", + "git_blob": "3404fbdd5e7529a0674eef26114b5071e4586cec", + "sha256": "ead6cdc9d0af6d58e8a49744d8ec8c7c15e13d2ba93c276c434bcf9b51b93a81" + } + ] +} diff --git a/research/h25-c05-v03-input-constructors/TASK.json b/research/h25-c05-v03-input-constructors/TASK.json new file mode 100644 index 0000000000..0ecfb1049f --- /dev/null +++ b/research/h25-c05-v03-input-constructors/TASK.json @@ -0,0 +1,60 @@ +{ + "schema_version": 1, + "task_id": "portable-replay", + "priority_revision": 8, + "base_commit": "7c49fe32c55de02c2c873655c804b16e4c3fef0a", + "original_card": { + "id": "portable-replay", + "question": "Can one reproducible environment or artifact-comparison failure be repaired?", + "starting_points": [ + "research/gzip-container-reproducibility/README.md", + "docs/ci-verification.md" + ], + "methods": [ + "Reproduce one portability failure and add a minimal cross-environment fix.", + "Audit one canonical-payload comparison for omitted proof-relevant fields." + ], + "acceptance_gate": "Preserve immutable source hashes and proof-relevant content; a different compressed byte stream alone is not a mathematical mismatch.", + "first_step": { + "command": [ + "python3", + "-B", + "scripts/research_selected_baseline.py" + ], + "expected": "PASS_RESEARCH_BASELINE_BINDINGS_ONLY", + "inspect": "Resolve the current selected review, separate complex/ordinary BIT/admitted BIT/outer budgets, and compare the card against live handoffs before starting. Historical ceilings require exact source/model equivalence.", + "scope": "Source-binding orientation only; not a scientific replay or all-size proof. Materialize selected inputs if this checkout is sparse." + }, + "first_experiment": "Reproduce one specific mismatch or audit one canonical comparison for omitted proof-relevant fields.", + "bottleneck_link": "Portable exact checks prevent environment failures from blocking valid contributions.", + "allowed_variations": [ + "One interpreter/version mismatch or one payload field comparison." + ], + "scope_change_triggers": [ + "Removing immutable-source pins because generated compressed bytes differ." + ], + "overlap_terms": [ + "gzip container", + "reproducibility", + "canonical payload" + ] + }, + "scope_status": "changed", + "actual_scope": "Source-pinned partial C05 configured-rule/header/ELF input-edge construction and genuine-Root V03 source/data authoring with strict traceback corroboration; no complete original activity.", + "scope_change_reason": "Explicit user requests continued Pro consultation, implementation and upstream contributions until original C05 and V03 close. This is one reviewed incremental source prerequisite; original scopes, scores, runtime/funding gates and open edges are preserved.", + "bottleneck_link": "Source-bound verifier qualification prerequisites; no change to the multiplication supplier, selected result or framework assumptions.", + "budget_minutes": 60, + "stop_rule": "Fixed source window07:00:58\u201308:00:58UTC; one repair window ending07:53:26; freeze original source/controls; no original target/native/compiler execution or new budget. Publication is separate.", + "outcome": "partial", + "evidence": "Exact primary publication/build/package/header correspondence; new fixed-source constructors; normal/optimized new-code fixtures; retained independent-review counterexamples and exact-source repairs.", + "author": "Chris R / Clear1nsight", + "ai_assistance": "ChatGPT Pro source consultation and substantial OpenAI Codex source-audit/verification assistance. These are agent-assisted findings, not human or proof-kernel acceptance.", + "open_questions": [ + { + "question": "Can the remaining exact applied configuration, reached unsupported header/file rules, loader search and private namespace/owning-parent construction close original C05 and V03?", + "why_it_matters": "The new components expose and bound critical input edges but do not prove the complete W subset I or produce an admitted original stage.", + "first_step": "Complete the configured/source frontier and assess the captured Pro private-filesystem proposal against actual preparation authority and native-profile compatibility.", + "blocked_by": "Actual interval/alias/content and configured-stage integration, independent complete source/cost review and original guarded execution admission remain open." + } + ] +} diff --git a/research/h25-c05-v03-input-constructors/VALIDATION.json b/research/h25-c05-v03-input-constructors/VALIDATION.json new file mode 100644 index 0000000000..62b23daa00 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/VALIDATION.json @@ -0,0 +1,41 @@ +{ + "observed_utc": "2026-11-02T08:15:48.268299+00:00", + "command": [ + "/usr/bin/python3.12", + "-B", + "scripts/research_package.py", + "--package", + "research/h25-c05-v03-input-constructors" + ], + "returncode": 0, + "stdout_bytes": 1729, + "stderr_bytes": 13510, + "scope": "Eight registered new-helper commands only; no original execution", + "code_scope": "Self-contained publication adapter + source models/new helper tests only", + "observed_methods_per_profile": { + "v03": 7, + "header": 34, + "gcc": 23, + "elf": 25 + }, + "v03_constructor_data_cases_per_profile": { + "intended_negatives": 68, + "positive_discriminators": 20, + "earlier_refusal_trap": 1 + }, + "original_controls_executed": 0, + "full_C05": false, + "full_V03": false, + "physical_total": "OPEN_NOT_ZERO", + "metadata_failure": "Initial9commands rejected by upstream1..8limit; corrected to8commands, each checks packet identities before new tests. Failed metadata record retained locally.", + "proof_code_hashes": { + "implementation/c05_header_edges_v1.py": "1ed7daadd2845ae2ac3047c1a3475cf76acd4b988925519a88f7385362e01d71", + "implementation/v03_source_refusal_observer_v1.py": "abf25690d3bee4a9783ee504567c29f7fb47da670e0ec95f57cb5944bf57264f", + "implementation/c05_elf_edges_v1.py": "1ae92edd36b02a4fa2a17248cc97b555fc68e5147ceeae5540384ccc9659bb39", + "implementation/v03_integrated_constructor_v1.py": "5e08ff84298fe1249be5e8790ea259e6179048f4736fb7eafdb6e170b8bc1cf9", + "implementation/v03_fixture_constructor_v1.py": "97737b9e09fe3103206588d383e62bc7fbef75caf944e88a5b8cbcda310a909e", + "implementation/c05_gcc_rules_tests_v1.py": "4141837fa615c9d1f703fd0083df3e4ff601a7b9af405b03a41ec0885a5b63e4", + "implementation/c05_gcc_rules_v1.py": "b3b8c5229f6e1bfca8e903aae95ad306200fbdce9ebd3b80974117613f538697", + "implementation/c05_header_edges_test_v1.py": "ffa888d5b04717cf437e90cde099607d7fb8a635fb07ca2f6cae2da656c1b012" + } +} diff --git a/research/h25-c05-v03-input-constructors/VERIFY.json b/research/h25-c05-v03-input-constructors/VERIFY.json new file mode 100644 index 0000000000..4d7cab8efa --- /dev/null +++ b/research/h25-c05-v03-input-constructors/VERIFY.json @@ -0,0 +1,101 @@ +{ + "schema_version": 1, + "status": "ready", + "python": "3.12", + "requirements": [], + "inputs": [], + "commands": [ + { + "argv": [ + "{python}", + "-I", + "-B", + "{package}/run_controls.py", + "v03" + ], + "timeout_seconds": 30, + "checks": "Only new pure source/data helpers and fresh owned fixture tests; no original target/native/compiler/namespace work" + }, + { + "argv": [ + "{python}", + "-I", + "-B", + "{package}/run_controls.py", + "header" + ], + "timeout_seconds": 30, + "checks": "Only new pure source/data helpers and fresh owned fixture tests; no original target/native/compiler/namespace work" + }, + { + "argv": [ + "{python}", + "-I", + "-B", + "{package}/run_controls.py", + "gcc" + ], + "timeout_seconds": 30, + "checks": "Only new pure source/data helpers and fresh owned fixture tests; no original target/native/compiler/namespace work" + }, + { + "argv": [ + "{python}", + "-I", + "-B", + "{package}/run_controls.py", + "elf" + ], + "timeout_seconds": 30, + "checks": "Only new pure source/data helpers and fresh owned fixture tests; no original target/native/compiler/namespace work" + }, + { + "argv": [ + "{python}", + "-I", + "-O", + "-B", + "{package}/run_controls.py", + "v03" + ], + "timeout_seconds": 30, + "checks": "Only new pure source/data helpers and fresh owned fixture tests; no original target/native/compiler/namespace work" + }, + { + "argv": [ + "{python}", + "-I", + "-O", + "-B", + "{package}/run_controls.py", + "header" + ], + "timeout_seconds": 30, + "checks": "Only new pure source/data helpers and fresh owned fixture tests; no original target/native/compiler/namespace work" + }, + { + "argv": [ + "{python}", + "-I", + "-O", + "-B", + "{package}/run_controls.py", + "gcc" + ], + "timeout_seconds": 30, + "checks": "Only new pure source/data helpers and fresh owned fixture tests; no original target/native/compiler/namespace work" + }, + { + "argv": [ + "{python}", + "-I", + "-O", + "-B", + "{package}/run_controls.py", + "elf" + ], + "timeout_seconds": 30, + "checks": "Only new pure source/data helpers and fresh owned fixture tests; no original target/native/compiler/namespace work" + } + ] +} diff --git a/research/h25-c05-v03-input-constructors/derivation/c05_elf_edges_DERIVATION-v1.md b/research/h25-c05-v03-input-constructors/derivation/c05_elf_edges_DERIVATION-v1.md new file mode 100644 index 0000000000..b00b66b82e --- /dev/null +++ b/research/h25-c05-v03-input-constructors/derivation/c05_elf_edges_DERIVATION-v1.md @@ -0,0 +1,74 @@ +# C05 ELF input-edge extraction: source derivation and boundary + +This is a pure, bounded parser of independently authenticated ELF bytes. It is one input-expansion rule for the original two C05 build commands. It does not resolve loader searches, admit a launch, establish the original namespace or interval, or complete C05. Every successful result contains `full_C05: false`, `loader_search_resolved: false`, and an explicit unresolved frontier. There was no original module import, initialization, compiler/helper/native invocation, process inspection, `readelf`, `ldd`, archive execution, or dynamic loading in this slice. + +## Exact source basis + +The primary local source for ELF field widths/order, machine identifiers, segment types, dynamic tags, and flag bit values is the already acquired official package payload: + +`source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/elf.h` + +- 194,903 bytes; SHA256 `9f2df1ad48c311b675db6ee074ceda3efc8603ec08ce948d1d7fa8cae7faeff3`. +- Lines 22–97 define the integer types and `Elf64_Ehdr` fields. Lines 687–707 define `Elf64_Phdr`; lines 709–735 define extended-header signaling and the segment identifiers. Lines 857–877 define signed 64-bit `d_tag` and the unsigned 64-bit `d_val`/`d_ptr` union. Lines 879–988 identify the relevant dynamic tags. Lines 992–1040 define `DF_*`, `DF_1_*`, and position flags. +- `Elf64_Ehdr` is represented by the 16 identification bytes followed by ` sizeof (double)\t \t\t && __builtin_classify_type ((Val1) + (Val2)) == 8) \t\t ? __TGMATH_F128 ((Val1) + (Val2),\t\t\t \t\t\t\t (__tgmath_real_type2 (Val1, Val2)) Fct, \t\t\t\t (Val1, Val2))\t\t\t \t\t (__tgmath_real_type2 (Val1, Val2))\t\t\t \t\t __tgml(Fct) (Val1, Val2)\t\t\t\t \t\t : (sizeof (+(Val1)) == sizeof (double)\t\t \t\t\t|| sizeof (+(Val2)) == sizeof (double)\t\t \t\t\t|| __builtin_classify_type (Val1) != 8\t\t \t\t\t|| __builtin_classify_type (Val2) != 8)\t\t \t\t ? (__tgmath_real_type2 (Val1, Val2))\t\t \t\t Fct (Val1, Val2)\t\t\t\t\t \t\t : (__tgmath_real_type2 (Val1, Val2))\t\t \t\t Fct##f (Val1, Val2)))", + "physical_line": 460 + }, + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "# define __TGMATH_BINARY_REAL_STD_ONLY(Val1, Val2, Fct) (__extension__ ((sizeof ((Val1) + (Val2)) > sizeof (double)\t \t\t && __builtin_classify_type ((Val1) + (Val2)) == 8) \t\t ? (__typeof ((__tgmath_real_type (Val1)) 0\t\t \t\t\t\t + (__tgmath_real_type (Val2)) 0))\t \t\t __tgml(Fct) (Val1, Val2)\t\t\t\t \t\t : (sizeof (+(Val1)) == sizeof (double)\t\t \t\t\t|| sizeof (+(Val2)) == sizeof (double)\t\t \t\t\t|| __builtin_classify_type (Val1) != 8\t\t \t\t\t|| __builtin_classify_type (Val2) != 8)\t\t \t\t ? (__typeof ((__tgmath_real_type (Val1)) 0\t\t \t\t\t\t + (__tgmath_real_type (Val2)) 0))\t \t\t Fct (Val1, Val2)\t\t\t\t\t \t\t : (__typeof ((__tgmath_real_type (Val1)) 0\t\t \t\t\t\t + (__tgmath_real_type (Val2)) 0))\t \t\t Fct##f (Val1, Val2)))", + "physical_line": 479 + }, + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "# define __TGMATH_TERNARY_FIRST_SECOND_REAL_ONLY(Val1, Val2, Val3, Fct) (__extension__ ((sizeof ((Val1) + (Val2)) > sizeof (double)\t \t\t && __builtin_classify_type ((Val1) + (Val2)) == 8) \t\t ? __TGMATH_F128 ((Val1) + (Val2),\t\t\t \t\t\t\t (__tgmath_real_type2 (Val1, Val2)) Fct, \t\t\t\t (Val1, Val2, Val3))\t\t \t\t (__tgmath_real_type2 (Val1, Val2))\t\t\t \t\t __tgml(Fct) (Val1, Val2, Val3)\t\t\t \t\t : (sizeof (+(Val1)) == sizeof (double)\t\t \t\t\t|| sizeof (+(Val2)) == sizeof (double)\t\t \t\t\t|| __builtin_classify_type (Val1) != 8\t\t \t\t\t|| __builtin_classify_type (Val2) != 8)\t\t \t\t ? (__tgmath_real_type2 (Val1, Val2))\t\t \t\t Fct (Val1, Val2, Val3)\t\t\t\t \t\t : (__tgmath_real_type2 (Val1, Val2))\t\t \t\t Fct##f (Val1, Val2, Val3)))", + "physical_line": 498 + }, + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "# define __TGMATH_TERNARY_REAL_ONLY(Val1, Val2, Val3, Fct) (__extension__ ((sizeof ((Val1) + (Val2) + (Val3)) > sizeof (double) \t\t && __builtin_classify_type ((Val1) + (Val2) + (Val3)) \t\t\t == 8)\t\t\t\t\t\t \t\t ? __TGMATH_F128 ((Val1) + (Val2) + (Val3),\t\t \t\t\t\t (__tgmath_real_type3 (Val1, Val2,\t \t\t\t\t\t\t\t Val3)) Fct,\t \t\t\t\t (Val1, Val2, Val3))\t\t \t\t (__tgmath_real_type3 (Val1, Val2, Val3))\t\t \t\t __tgml(Fct) (Val1, Val2, Val3)\t\t\t \t\t : (sizeof (+(Val1)) == sizeof (double)\t\t \t\t\t|| sizeof (+(Val2)) == sizeof (double)\t\t \t\t\t|| sizeof (+(Val3)) == sizeof (double)\t\t \t\t\t|| __builtin_classify_type (Val1) != 8\t\t \t\t\t|| __builtin_classify_type (Val2) != 8\t\t \t\t\t|| __builtin_classify_type (Val3) != 8)\t\t \t\t ? (__tgmath_real_type3 (Val1, Val2, Val3))\t\t \t\t Fct (Val1, Val2, Val3)\t\t\t\t \t\t : (__tgmath_real_type3 (Val1, Val2, Val3))\t\t \t\t Fct##f (Val1, Val2, Val3)))", + "physical_line": 519 + }, + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "# define __TGMATH_TERNARY_FIRST_REAL_RET_ONLY(Val1, Val2, Val3, Fct) (__extension__ ((sizeof (+(Val1)) == sizeof (double)\t\t\t\t || __builtin_classify_type (Val1) != 8)\t\t\t\t ? Fct (Val1, Val2, Val3)\t\t\t\t\t\t : (sizeof (+(Val1)) == sizeof (float))\t\t\t\t ? Fct##f (Val1, Val2, Val3)\t\t\t\t\t : __TGMATH_F128 ((Val1), Fct, (Val1, Val2, Val3))\t\t\t __tgml(Fct) (Val1, Val2, Val3)))", + "physical_line": 528 + }, + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "# define __TGMATH_UNARY_REAL_IMAG(Val, Fct, Cfct) (__extension__ ((sizeof (+__real__ (Val)) == sizeof (double)\t \t\t || __builtin_classify_type (__real__ (Val)) != 8)\t \t\t ? (__expr_is_real (Val)\t\t\t\t \t\t\t? (__tgmath_complex_type (Val)) Fct (Val)\t \t\t\t: (__tgmath_complex_type (Val)) Cfct (Val))\t \t\t : (sizeof (+__real__ (Val)) == sizeof (float))\t \t\t ? (__expr_is_real (Val)\t\t\t\t \t\t\t? (__tgmath_complex_type (Val)) Fct##f (Val)\t \t\t\t: (__tgmath_complex_type (Val)) Cfct##f (Val))\t \t\t : __TGMATH_CF128 ((Val),\t\t\t\t \t\t\t\t (__tgmath_complex_type (Val)) Fct, \t\t\t\t (__tgmath_complex_type (Val)) Cfct, \t\t\t\t (Val))\t\t\t\t \t\t (__expr_is_real (Val)\t\t\t\t \t\t ? (__tgmath_complex_type (Val)) __tgml(Fct) (Val)\t \t\t : (__tgmath_complex_type (Val)) __tgml(Cfct) (Val))))", + "physical_line": 542 + }, + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "# define __TGMATH_UNARY_REAL_IMAG(Val, Fct, Cfct) (__extension__ ((sizeof (+__real__ (Val)) == sizeof (double)\t \t\t || __builtin_classify_type (__real__ (Val)) != 8)\t \t\t ? (__expr_is_real (Val)\t\t\t\t \t\t\t? (__tgmath_complex_type (Val)) Fct (Val)\t \t\t\t: (__tgmath_complex_type (Val)) Cfct (Val))\t \t\t : (sizeof (+__real__ (Val)) == sizeof (float))\t \t\t ? (__expr_is_real (Val)\t\t\t\t \t\t\t? (__tgmath_complex_type (Val)) Fct##f (Val)\t \t\t\t: (__tgmath_complex_type (Val)) Cfct##f (Val))\t \t\t : __TGMATH_CF128 ((Val),\t\t\t\t \t\t\t\t (__tgmath_complex_type (Val)) Fct, \t\t\t\t (__tgmath_complex_type (Val)) Cfct, \t\t\t\t (Val))\t\t\t\t \t\t (__expr_is_real (Val)\t\t\t\t \t\t ? (__tgmath_complex_type (Val)) __tgml(Fct) (Val)\t \t\t : (__tgmath_complex_type (Val)) __tgml(Cfct) (Val))))", + "physical_line": 543 + }, + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "# define __TGMATH_UNARY_IMAG(Val, Cfct) (__extension__ ((sizeof (+__real__ (Val)) == sizeof (double)\t \t\t || __builtin_classify_type (__real__ (Val)) != 8)\t \t\t ? (__typeof__ ((__tgmath_real_type (Val)) 0\t \t\t\t\t + _Complex_I)) Cfct (Val)\t\t \t\t : (sizeof (+__real__ (Val)) == sizeof (float))\t \t\t ? (__typeof__ ((__tgmath_real_type (Val)) 0\t \t\t\t\t + _Complex_I)) Cfct##f (Val)\t \t\t : __TGMATH_F128 (__real__ (Val),\t\t\t \t\t\t\t (__typeof__\t\t\t \t\t\t\t ((__tgmath_real_type (Val)) 0\t \t\t\t\t\t+ _Complex_I)) Cfct, (Val))\t \t\t (__typeof__ ((__tgmath_real_type (Val)) 0\t\t \t\t\t\t + _Complex_I)) __tgml(Cfct) (Val)))", + "physical_line": 559 + }, + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "# define __TGMATH_UNARY_REAL_IMAG_RET_REAL(Val, Fct, Cfct) (__extension__ ((sizeof (+__real__ (Val)) == sizeof (double)\t \t\t || __builtin_classify_type (__real__ (Val)) != 8)\t \t\t ? (__expr_is_real (Val)\t\t\t\t \t\t\t? (__typeof__ (__real__ (__tgmath_real_type (Val)) 0))\t\t\t Fct (Val)\t\t\t\t\t \t\t\t: (__typeof__ (__real__ (__tgmath_real_type (Val)) 0))\t\t\t Cfct (Val))\t\t\t\t\t \t\t : (sizeof (+__real__ (Val)) == sizeof (float))\t \t\t ? (__expr_is_real (Val)\t\t\t\t \t\t\t? (__typeof__ (__real__ (__tgmath_real_type (Val)) 0))\t\t\t Fct##f (Val)\t\t\t\t\t \t\t\t: (__typeof__ (__real__ (__tgmath_real_type (Val)) 0))\t\t\t Cfct##f (Val))\t\t\t\t \t\t : __TGMATH_CF128 ((Val), \t\t\t\t (__typeof__\t\t\t \t\t\t\t\t(__real__\t\t\t \t\t\t\t\t (__tgmath_real_type (Val)) 0)) Fct, \t\t\t\t (__typeof__\t\t\t \t\t\t\t\t(__real__\t\t\t \t\t\t\t\t (__tgmath_real_type (Val)) 0)) Cfct, \t\t\t\t (Val))\t\t\t\t \t\t (__expr_is_real (Val)\t\t\t\t \t\t ? (__typeof__ (__real__ (__tgmath_real_type (Val)) 0)) \t\t __tgml(Fct) (Val)\t\t\t\t\t \t\t : (__typeof__ (__real__ (__tgmath_real_type (Val)) 0)) \t\t __tgml(Cfct) (Val))))", + "physical_line": 580 + }, + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "# define __TGMATH_UNARY_REAL_IMAG_RET_REAL(Val, Fct, Cfct) (__extension__ ((sizeof (+__real__ (Val)) == sizeof (double)\t \t\t || __builtin_classify_type (__real__ (Val)) != 8)\t \t\t ? (__expr_is_real (Val)\t\t\t\t \t\t\t? (__typeof__ (__real__ (__tgmath_real_type (Val)) 0))\t\t\t Fct (Val)\t\t\t\t\t \t\t\t: (__typeof__ (__real__ (__tgmath_real_type (Val)) 0))\t\t\t Cfct (Val))\t\t\t\t\t \t\t : (sizeof (+__real__ (Val)) == sizeof (float))\t \t\t ? (__expr_is_real (Val)\t\t\t\t \t\t\t? (__typeof__ (__real__ (__tgmath_real_type (Val)) 0))\t\t\t Fct##f (Val)\t\t\t\t\t \t\t\t: (__typeof__ (__real__ (__tgmath_real_type (Val)) 0))\t\t\t Cfct##f (Val))\t\t\t\t \t\t : __TGMATH_CF128 ((Val), \t\t\t\t (__typeof__\t\t\t \t\t\t\t\t(__real__\t\t\t \t\t\t\t\t (__tgmath_real_type (Val)) 0)) Fct, \t\t\t\t (__typeof__\t\t\t \t\t\t\t\t(__real__\t\t\t \t\t\t\t\t (__tgmath_real_type (Val)) 0)) Cfct, \t\t\t\t (Val))\t\t\t\t \t\t (__expr_is_real (Val)\t\t\t\t \t\t ? (__typeof__ (__real__ (__tgmath_real_type (Val)) 0)) \t\t __tgml(Fct) (Val)\t\t\t\t\t \t\t : (__typeof__ (__real__ (__tgmath_real_type (Val)) 0)) \t\t __tgml(Cfct) (Val))))", + "physical_line": 582 + }, + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "# define __TGMATH_BINARY_REAL_IMAG(Val1, Val2, Fct, Cfct) (__extension__ ((sizeof (__real__ (Val1)\t\t\t\t \t\t\t + __real__ (Val2)) > sizeof (double)\t \t\t && __builtin_classify_type (__real__ (Val1)\t \t\t\t\t\t\t + __real__ (Val2)) == 8) \t\t ? __TGMATH_CF128 ((Val1) + (Val2),\t\t\t \t\t\t\t (__tgmath_complex_type2 (Val1, Val2)) \t\t\t\t Fct,\t\t\t\t \t\t\t\t (__tgmath_complex_type2 (Val1, Val2)) \t\t\t\t Cfct,\t\t\t\t \t\t\t\t (Val1, Val2))\t\t\t \t\t (__expr_is_real ((Val1) + (Val2))\t\t\t \t\t ? (__tgmath_complex_type2 (Val1, Val2))\t\t \t\t __tgml(Fct) (Val1, Val2)\t\t\t\t \t\t : (__tgmath_complex_type2 (Val1, Val2))\t\t \t\t __tgml(Cfct) (Val1, Val2))\t\t\t \t\t : (sizeof (+__real__ (Val1)) == sizeof (double)\t \t\t\t|| sizeof (+__real__ (Val2)) == sizeof (double)\t \t\t\t|| __builtin_classify_type (__real__ (Val1)) != 8 \t\t\t|| __builtin_classify_type (__real__ (Val2)) != 8) \t\t ? (__expr_is_real ((Val1) + (Val2))\t\t \t\t\t? (__tgmath_complex_type2 (Val1, Val2))\t\t \t\t\t Fct (Val1, Val2)\t\t\t\t \t\t\t: (__tgmath_complex_type2 (Val1, Val2))\t\t \t\t\t Cfct (Val1, Val2))\t\t\t\t \t\t : (__expr_is_real ((Val1) + (Val2))\t\t \t\t\t? (__tgmath_complex_type2 (Val1, Val2))\t\t \t\t\t Fct##f (Val1, Val2)\t\t\t\t \t\t\t: (__tgmath_complex_type2 (Val1, Val2))\t\t \t\t\t Cfct##f (Val1, Val2))))", + "physical_line": 630 + }, + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "# define __TGMATH_BINARY_REAL_IMAG(Val1, Val2, Fct, Cfct) (__extension__ ((sizeof (__real__ (Val1)\t\t\t\t \t\t\t + __real__ (Val2)) > sizeof (double)\t \t\t && __builtin_classify_type (__real__ (Val1)\t \t\t\t\t\t\t + __real__ (Val2)) == 8) \t\t ? __TGMATH_CF128 ((Val1) + (Val2),\t\t\t \t\t\t\t (__tgmath_complex_type2 (Val1, Val2)) \t\t\t\t Fct,\t\t\t\t \t\t\t\t (__tgmath_complex_type2 (Val1, Val2)) \t\t\t\t Cfct,\t\t\t\t \t\t\t\t (Val1, Val2))\t\t\t \t\t (__expr_is_real ((Val1) + (Val2))\t\t\t \t\t ? (__tgmath_complex_type2 (Val1, Val2))\t\t \t\t __tgml(Fct) (Val1, Val2)\t\t\t\t \t\t : (__tgmath_complex_type2 (Val1, Val2))\t\t \t\t __tgml(Cfct) (Val1, Val2))\t\t\t \t\t : (sizeof (+__real__ (Val1)) == sizeof (double)\t \t\t\t|| sizeof (+__real__ (Val2)) == sizeof (double)\t \t\t\t|| __builtin_classify_type (__real__ (Val1)) != 8 \t\t\t|| __builtin_classify_type (__real__ (Val2)) != 8) \t\t ? (__expr_is_real ((Val1) + (Val2))\t\t \t\t\t? (__tgmath_complex_type2 (Val1, Val2))\t\t \t\t\t Fct (Val1, Val2)\t\t\t\t \t\t\t: (__tgmath_complex_type2 (Val1, Val2))\t\t \t\t\t Cfct (Val1, Val2))\t\t\t\t \t\t : (__expr_is_real ((Val1) + (Val2))\t\t \t\t\t? (__tgmath_complex_type2 (Val1, Val2))\t\t \t\t\t Fct##f (Val1, Val2)\t\t\t\t \t\t\t: (__tgmath_complex_type2 (Val1, Val2))\t\t \t\t\t Cfct##f (Val1, Val2))))", + "physical_line": 632 + }, + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "# define __TGMATH_1_NARROW_F(F, X)\t\t\t\t\t (__extension__ (sizeof ((__tgmath_real_type (X)) 0) > sizeof (double) \t\t ? F ## l (X)\t\t\t\t\t\t\t\t : F (X)))", + "physical_line": 638 + }, + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "# define __TGMATH_2_NARROW_F(F, X, Y)\t\t\t\t\t (__extension__ (sizeof ((__tgmath_real_type (X)) 0\t\t\t\t\t\t + (__tgmath_real_type (Y)) 0) > sizeof (double) \t\t ? F ## l (X, Y)\t\t\t\t\t\t\t : F (X, Y)))", + "physical_line": 643 + }, + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "# define __TGMATH_3_NARROW_F(F, X, Y, Z)\t\t\t\t (__extension__ (sizeof ((__tgmath_real_type (X)) 0\t\t\t\t\t\t + (__tgmath_real_type (Y)) 0\t\t\t\t\t\t + (__tgmath_real_type (Z)) 0) > sizeof (double) \t\t ? F ## l (X, Y, Z)\t\t\t\t\t\t\t : F (X, Y, Z)))", + "physical_line": 649 + }, + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "# define __TGMATH_1_NARROW_F32(F, X)\t\t\t\t\t (__extension__ (sizeof ((__tgmath_real_type (X)) 0) > sizeof (_Float64) \t\t ? __TGMATH_F128LD ((X), F, (X))\t\t\t\t\t F ## f64x (X)\t\t\t\t\t\t\t\t : F ## f64 (X)))", + "physical_line": 683 + }, + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "# define __TGMATH_1_NARROW_F32(F, X)\t\t\t\t\t (__extension__ (sizeof ((__tgmath_real_type (X)) 0) > sizeof (_Float64) \t\t ? __TGMATH_F128LD ((X), F, (X))\t\t\t\t\t F ## f64x (X)\t\t\t\t\t\t\t\t : F ## f64 (X)))", + "physical_line": 684 + }, + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "# define __TGMATH_2_NARROW_F32(F, X, Y)\t\t\t\t (__extension__ (sizeof ((__tgmath_real_type (X)) 0\t\t\t\t\t\t + (__tgmath_real_type (Y)) 0) > sizeof (_Float64) \t\t ? __TGMATH_F128LD ((X) + (Y), F, (X, Y))\t\t\t\t F ## f64x (X, Y)\t\t\t\t\t\t\t : F ## f64 (X, Y)))", + "physical_line": 689 + }, + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "# define __TGMATH_2_NARROW_F32(F, X, Y)\t\t\t\t (__extension__ (sizeof ((__tgmath_real_type (X)) 0\t\t\t\t\t\t + (__tgmath_real_type (Y)) 0) > sizeof (_Float64) \t\t ? __TGMATH_F128LD ((X) + (Y), F, (X, Y))\t\t\t\t F ## f64x (X, Y)\t\t\t\t\t\t\t : F ## f64 (X, Y)))", + "physical_line": 690 + }, + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "# define __TGMATH_3_NARROW_F32(F, X, Y, Z)\t\t\t\t (__extension__ (sizeof ((__tgmath_real_type (X)) 0\t\t\t\t\t\t + (__tgmath_real_type (Y)) 0\t\t\t\t\t\t + (__tgmath_real_type (Z)) 0) > sizeof (_Float64) \t\t ? __TGMATH_F128LD ((X) + (Y) + (Z), F, (X, Y, Z))\t\t\t F ## f64x (X, Y, Z)\t\t\t\t\t\t\t : F ## f64 (X, Y, Z)))", + "physical_line": 696 + }, + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "# define __TGMATH_3_NARROW_F32(F, X, Y, Z)\t\t\t\t (__extension__ (sizeof ((__tgmath_real_type (X)) 0\t\t\t\t\t\t + (__tgmath_real_type (Y)) 0\t\t\t\t\t\t + (__tgmath_real_type (Z)) 0) > sizeof (_Float64) \t\t ? __TGMATH_F128LD ((X) + (Y) + (Z), F, (X, Y, Z))\t\t\t F ## f64x (X, Y, Z)\t\t\t\t\t\t\t : F ## f64 (X, Y, Z)))", + "physical_line": 697 + }, + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "# define __TGMATH_1_NARROW_F64(F, X)\t\t\t\t\t (__extension__ (sizeof ((__tgmath_real_type (X)) 0) > sizeof (_Float64) \t\t ? __TGMATH_F128LD ((X), F, (X))\t\t\t\t\t F ## f64x (X)\t\t\t\t\t\t\t\t : F ## f128 (X)))", + "physical_line": 701 + }, + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "# define __TGMATH_1_NARROW_F64(F, X)\t\t\t\t\t (__extension__ (sizeof ((__tgmath_real_type (X)) 0) > sizeof (_Float64) \t\t ? __TGMATH_F128LD ((X), F, (X))\t\t\t\t\t F ## f64x (X)\t\t\t\t\t\t\t\t : F ## f128 (X)))", + "physical_line": 702 + }, + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "# define __TGMATH_2_NARROW_F64(F, X, Y)\t\t\t\t (__extension__ (sizeof ((__tgmath_real_type (X)) 0\t\t\t\t\t\t + (__tgmath_real_type (Y)) 0) > sizeof (_Float64) \t\t ? __TGMATH_F128LD ((X) + (Y), F, (X, Y))\t\t\t\t F ## f64x (X, Y)\t\t\t\t\t\t\t : F ## f128 (X, Y)))", + "physical_line": 707 + }, + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "# define __TGMATH_2_NARROW_F64(F, X, Y)\t\t\t\t (__extension__ (sizeof ((__tgmath_real_type (X)) 0\t\t\t\t\t\t + (__tgmath_real_type (Y)) 0) > sizeof (_Float64) \t\t ? __TGMATH_F128LD ((X) + (Y), F, (X, Y))\t\t\t\t F ## f64x (X, Y)\t\t\t\t\t\t\t : F ## f128 (X, Y)))", + "physical_line": 708 + }, + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "# define __TGMATH_3_NARROW_F64(F, X, Y, Z)\t\t\t\t (__extension__ (sizeof ((__tgmath_real_type (X)) 0\t\t\t\t\t\t + (__tgmath_real_type (Y)) 0\t\t\t\t\t\t + (__tgmath_real_type (Z)) 0) > sizeof (_Float64) \t\t ? __TGMATH_F128LD ((X) + (Y) + (Z), F, (X, Y, Z))\t\t\t F ## f64x (X, Y, Z)\t\t\t\t\t\t\t : F ## f128 (X, Y, Z)))", + "physical_line": 714 + }, + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "# define __TGMATH_3_NARROW_F64(F, X, Y, Z)\t\t\t\t (__extension__ (sizeof ((__tgmath_real_type (X)) 0\t\t\t\t\t\t + (__tgmath_real_type (Y)) 0\t\t\t\t\t\t + (__tgmath_real_type (Z)) 0) > sizeof (_Float64) \t\t ? __TGMATH_F128LD ((X) + (Y) + (Z), F, (X, Y, Z))\t\t\t F ## f64x (X, Y, Z)\t\t\t\t\t\t\t : F ## f128 (X, Y, Z)))", + "physical_line": 715 + }, + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "# define __TGMATH_1_NARROW_F32X(F, X)\t\t\t\t\t (__extension__ (sizeof ((__tgmath_real_type (X)) 0) > sizeof (_Float64) \t\t || __TGMATH_NARROW_F32X_USE_F64X (X)\t\t\t\t\t ? __TGMATH_F128 ((X), F, (X))\t\t\t\t\t\t F ## f64x (X)\t\t\t\t\t\t\t\t : F ## f64 (X)))", + "physical_line": 722 + }, + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "# define __TGMATH_1_NARROW_F32X(F, X)\t\t\t\t\t (__extension__ (sizeof ((__tgmath_real_type (X)) 0) > sizeof (_Float64) \t\t || __TGMATH_NARROW_F32X_USE_F64X (X)\t\t\t\t\t ? __TGMATH_F128 ((X), F, (X))\t\t\t\t\t\t F ## f64x (X)\t\t\t\t\t\t\t\t : F ## f64 (X)))", + "physical_line": 723 + }, + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "# define __TGMATH_2_NARROW_F32X(F, X, Y)\t\t\t\t (__extension__ (sizeof ((__tgmath_real_type (X)) 0\t\t\t\t\t\t + (__tgmath_real_type (Y)) 0) > sizeof (_Float64) \t\t || __TGMATH_NARROW_F32X_USE_F64X ((X) + (Y))\t\t\t\t ? __TGMATH_F128 ((X) + (Y), F, (X, Y))\t\t\t\t F ## f64x (X, Y)\t\t\t\t\t\t\t : F ## f64 (X, Y)))", + "physical_line": 729 + }, + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "# define __TGMATH_2_NARROW_F32X(F, X, Y)\t\t\t\t (__extension__ (sizeof ((__tgmath_real_type (X)) 0\t\t\t\t\t\t + (__tgmath_real_type (Y)) 0) > sizeof (_Float64) \t\t || __TGMATH_NARROW_F32X_USE_F64X ((X) + (Y))\t\t\t\t ? __TGMATH_F128 ((X) + (Y), F, (X, Y))\t\t\t\t F ## f64x (X, Y)\t\t\t\t\t\t\t : F ## f64 (X, Y)))", + "physical_line": 730 + }, + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "# define __TGMATH_3_NARROW_F32X(F, X, Y, Z)\t\t\t\t (__extension__ (sizeof ((__tgmath_real_type (X)) 0\t\t\t\t\t\t + (__tgmath_real_type (Y)) 0\t\t\t\t\t\t + (__tgmath_real_type (Z)) 0) > sizeof (_Float64) \t\t || __TGMATH_NARROW_F32X_USE_F64X ((X) + (Y) + (Z))\t\t\t ? __TGMATH_F128 ((X) + (Y) + (Z), F, (X, Y, Z))\t\t\t F ## f64x (X, Y, Z)\t\t\t\t\t\t\t : F ## f64 (X, Y, Z)))", + "physical_line": 737 + }, + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "# define __TGMATH_3_NARROW_F32X(F, X, Y, Z)\t\t\t\t (__extension__ (sizeof ((__tgmath_real_type (X)) 0\t\t\t\t\t\t + (__tgmath_real_type (Y)) 0\t\t\t\t\t\t + (__tgmath_real_type (Z)) 0) > sizeof (_Float64) \t\t || __TGMATH_NARROW_F32X_USE_F64X ((X) + (Y) + (Z))\t\t\t ? __TGMATH_F128 ((X) + (Y) + (Z), F, (X, Y, Z))\t\t\t F ## f64x (X, Y, Z)\t\t\t\t\t\t\t : F ## f64 (X, Y, Z)))", + "physical_line": 738 + }, + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "# define __TGMATH_1_NARROW_F32(F, X)\t\t\t\t\t (__extension__ (sizeof ((__tgmath_real_type (X)) 0) > sizeof (_Float64) \t\t ? F ## f128 (X)\t\t\t\t\t\t\t : F ## f64 (X)))", + "physical_line": 744 + }, + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "# define __TGMATH_1_NARROW_F32(F, X)\t\t\t\t\t (__extension__ (sizeof ((__tgmath_real_type (X)) 0) > sizeof (_Float64) \t\t ? F ## f128 (X)\t\t\t\t\t\t\t : F ## f64 (X)))", + "physical_line": 745 + }, + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "# define __TGMATH_2_NARROW_F32(F, X, Y)\t\t\t\t (__extension__ (sizeof ((__tgmath_real_type (X)) 0\t\t\t\t\t\t + (__tgmath_real_type (Y)) 0) > sizeof (_Float64) \t\t ? F ## f128 (X, Y)\t\t\t\t\t\t\t : F ## f64 (X, Y)))", + "physical_line": 749 + }, + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "# define __TGMATH_2_NARROW_F32(F, X, Y)\t\t\t\t (__extension__ (sizeof ((__tgmath_real_type (X)) 0\t\t\t\t\t\t + (__tgmath_real_type (Y)) 0) > sizeof (_Float64) \t\t ? F ## f128 (X, Y)\t\t\t\t\t\t\t : F ## f64 (X, Y)))", + "physical_line": 750 + }, + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "# define __TGMATH_3_NARROW_F32(F, X, Y, Z)\t\t\t\t (__extension__ (sizeof ((__tgmath_real_type (X)) 0\t\t\t\t\t\t + (__tgmath_real_type (Y)) 0\t\t\t\t\t\t + (__tgmath_real_type (Z)) 0) > sizeof (_Float64) \t\t ? F ## f128 (X, Y, Z)\t\t\t\t\t\t\t : F ## f64 (X, Y, Z)))", + "physical_line": 755 + }, + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "# define __TGMATH_3_NARROW_F32(F, X, Y, Z)\t\t\t\t (__extension__ (sizeof ((__tgmath_real_type (X)) 0\t\t\t\t\t\t + (__tgmath_real_type (Y)) 0\t\t\t\t\t\t + (__tgmath_real_type (Z)) 0) > sizeof (_Float64) \t\t ? F ## f128 (X, Y, Z)\t\t\t\t\t\t\t : F ## f64 (X, Y, Z)))", + "physical_line": 756 + }, + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "# define __TGMATH_1_NARROW_F64(F, X)\t\t (F ## f128 (X))", + "physical_line": 758 + }, + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "# define __TGMATH_2_NARROW_F64(F, X, Y)\t (F ## f128 (X, Y))", + "physical_line": 760 + }, + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "# define __TGMATH_3_NARROW_F64(F, X, Y, Z)\t (F ## f128 (X, Y, Z))", + "physical_line": 762 + }, + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "# define __TGMATH_1_NARROW_F32X(F, X)\t\t\t\t\t (__extension__ (sizeof ((__tgmath_real_type (X)) 0) > sizeof (_Float32x) \t\t || __TGMATH_NARROW_F32X_USE_F64X (X)\t\t\t\t\t ? F ## f64x (X)\t\t\t\t\t\t\t : F ## f64 (X)))", + "physical_line": 768 + }, + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "# define __TGMATH_1_NARROW_F32X(F, X)\t\t\t\t\t (__extension__ (sizeof ((__tgmath_real_type (X)) 0) > sizeof (_Float32x) \t\t || __TGMATH_NARROW_F32X_USE_F64X (X)\t\t\t\t\t ? F ## f64x (X)\t\t\t\t\t\t\t : F ## f64 (X)))", + "physical_line": 769 + }, + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "# define __TGMATH_2_NARROW_F32X(F, X, Y)\t\t\t\t (__extension__ (sizeof ((__tgmath_real_type (X)) 0\t\t\t\t\t\t + (__tgmath_real_type (Y)) 0) > sizeof (_Float32x) \t\t || __TGMATH_NARROW_F32X_USE_F64X ((X) + (Y))\t\t\t\t ? F ## f64x (X, Y)\t\t\t\t\t\t\t : F ## f64 (X, Y)))", + "physical_line": 774 + }, + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "# define __TGMATH_2_NARROW_F32X(F, X, Y)\t\t\t\t (__extension__ (sizeof ((__tgmath_real_type (X)) 0\t\t\t\t\t\t + (__tgmath_real_type (Y)) 0) > sizeof (_Float32x) \t\t || __TGMATH_NARROW_F32X_USE_F64X ((X) + (Y))\t\t\t\t ? F ## f64x (X, Y)\t\t\t\t\t\t\t : F ## f64 (X, Y)))", + "physical_line": 775 + }, + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "# define __TGMATH_3_NARROW_F32X(F, X, Y, Z)\t\t\t\t (__extension__ (sizeof ((__tgmath_real_type (X)) 0\t\t\t\t\t\t + (__tgmath_real_type (Y)) 0\t\t\t\t\t\t + (__tgmath_real_type (Z)) 0) > sizeof (_Float32x) \t\t || __TGMATH_NARROW_F32X_USE_F64X ((X) + (Y) + (Z))\t\t\t ? F ## f64x (X, Y, Z)\t\t\t\t\t\t\t : F ## f64 (X, Y, Z)))", + "physical_line": 781 + }, + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "# define __TGMATH_3_NARROW_F32X(F, X, Y, Z)\t\t\t\t (__extension__ (sizeof ((__tgmath_real_type (X)) 0\t\t\t\t\t\t + (__tgmath_real_type (Y)) 0\t\t\t\t\t\t + (__tgmath_real_type (Z)) 0) > sizeof (_Float32x) \t\t || __TGMATH_NARROW_F32X_USE_F64X ((X) + (Y) + (Z))\t\t\t ? F ## f64x (X, Y, Z)\t\t\t\t\t\t\t : F ## f64 (X, Y, Z)))", + "physical_line": 782 + }, + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "# define __TGMATH_1_NARROW_F32(F, X)\t\t (F ## f64 (X))", + "physical_line": 787 + }, + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "# define __TGMATH_2_NARROW_F32(F, X, Y)\t (F ## f64 (X, Y))", + "physical_line": 789 + }, + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "# define __TGMATH_3_NARROW_F32(F, X, Y, Z)\t (F ## f64 (X, Y, Z))", + "physical_line": 791 + } + ], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/tgmath.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 47627, + "is_primary_source": false, + "logical_path": "/usr/include/tgmath.h", + "occurrence_id": "corpus-0270", + "origin_position": null, + "sha256": "b30d87a8d2075fdbd2e048fd7f94000757c256da77898f899d8a8516d91f51fe" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 25, + "filename": "pthread.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 25 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 26, + "filename": "stdint.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 26 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 27, + "filename": "sys/types.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 27 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 28, + "filename": "sys/procfs.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 28 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/thread_db.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 16024, + "is_primary_source": false, + "logical_path": "/usr/include/thread_db.h", + "occurrence_id": "corpus-0271", + "origin_position": null, + "sha256": "f1a23c5456ff000eec860a809e9cd3f2ccfb056a39b686ab6ed5d83e5f833d2a" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 22, + "filename": "features.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 22 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 23, + "filename": "time.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 23 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 27, + "filename": "bits/thread-shared-types.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 27 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 28, + "filename": "bits/types/struct_timespec.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 28 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/threads.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 7799, + "is_primary_source": false, + "logical_path": "/usr/include/threads.h", + "occurrence_id": "corpus-0272", + "origin_position": null, + "sha256": "f31974dc3df2a24191f6eec7757f4835d05ae75d7c0ac65391a05d064045a2ba" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 25, + "filename": "features.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 25 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 29, + "filename": "stddef.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 29 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 33, + "filename": "bits/time.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 33 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 37, + "filename": "bits/types/clock_t.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 37 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 38, + "filename": "bits/types/time_t.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 38 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 39, + "filename": "bits/types/struct_tm.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 39 + }, + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 42, + "filename": "bits/types/struct_timespec.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 11, + "physical_line": 42 + }, + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 46, + "filename": "bits/types/clockid_t.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 11, + "physical_line": 46 + }, + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 47, + "filename": "bits/types/timer_t.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 11, + "physical_line": 47 + }, + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 48, + "filename": "bits/types/struct_itimerspec.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 11, + "physical_line": 48 + }, + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 60, + "filename": "bits/types/locale_t.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 11, + "physical_line": 60 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/time.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 15124, + "is_primary_source": false, + "logical_path": "/usr/include/time.h", + "occurrence_id": "corpus-0273", + "origin_position": null, + "sha256": "dba6d309d4b1ca0006342a7a1e08cfc6cb0a210610ff5ad1577d232ddaa10431" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 35, + "filename": "features.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 35 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/ttyent.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 2494, + "is_primary_source": false, + "logical_path": "/usr/include/ttyent.h", + "occurrence_id": "corpus-0274", + "origin_position": null, + "sha256": "abdfe537275a43106230b59f82686c355977912d4927faa2f8f3c8579d760504" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 26, + "filename": "features.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 26 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 29, + "filename": "stddef.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 29 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 31, + "filename": "bits/types.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 31 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 32, + "filename": "bits/types/mbstate_t.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 32 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/uchar.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 3117, + "is_primary_source": false, + "logical_path": "/usr/include/uchar.h", + "occurrence_id": "corpus-0275", + "origin_position": null, + "sha256": "651ba7e88ad7e091cc8e907c82cf2416cb071bd78b417a628693afbf0d74d32a" + }, + "supported_language_scan": false, + "unsupported_frontier": [ + { + "code": "unsupported_pragma", + "detail": "pragma/import/embed semantics are outside this extractor", + "form": "# pragma GCC diagnostic push", + "original_physical_line_bytes_latin1": "# pragma GCC diagnostic push", + "physical_line": 39 + }, + { + "code": "unsupported_pragma", + "detail": "pragma/import/embed semantics are outside this extractor", + "form": "# pragma GCC diagnostic ignored \"-Wc++20-compat\"", + "original_physical_line_bytes_latin1": "# pragma GCC diagnostic ignored \"-Wc++20-compat\"", + "physical_line": 40 + }, + { + "code": "unsupported_pragma", + "detail": "pragma/import/embed semantics are outside this extractor", + "form": "# pragma GCC diagnostic pop", + "original_physical_line_bytes_latin1": "# pragma GCC diagnostic pop", + "physical_line": 45 + } + ] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 23, + "filename": "features.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 23 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 26, + "filename": "bits/indirect-return.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 26 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 29, + "filename": "sys/ucontext.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 29 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/ucontext.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 2037, + "is_primary_source": false, + "logical_path": "/usr/include/ucontext.h", + "occurrence_id": "corpus-0276", + "origin_position": null, + "sha256": "139b7fb979b7ce275f9983ea6253b89e94bb3ea7969374e885c11036247b906c" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 21, + "filename": "features.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 21 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/ulimit.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1584, + "is_primary_source": false, + "logical_path": "/usr/include/ulimit.h", + "occurrence_id": "corpus-0277", + "origin_position": null, + "sha256": "1644d61580934da14a423e85cf2c4d0761ee6b35a71779b1955431a8fb1627c0" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 25, + "filename": "features.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 25 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 202, + "filename": "bits/posix_opt.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 202 + }, + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 206, + "filename": "bits/environments.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 11, + "physical_line": 206 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 217, + "filename": "bits/types.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 217 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 226, + "filename": "stddef.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 226 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 630, + "filename": "bits/confname.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 630 + }, + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 903, + "filename": "bits/getopt_posix.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 11, + "physical_line": 903 + }, + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 1217, + "filename": "bits/unistd.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 11, + "physical_line": 1217 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 1221, + "filename": "bits/unistd_ext.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 1221 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/unistd.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 45053, + "is_primary_source": false, + "logical_path": "/usr/include/unistd.h", + "occurrence_id": "corpus-0278", + "origin_position": null, + "sha256": "b7c94e0f780fccf2fffd9b2888e698f5519a75be6113e97141b1c5a082433381" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 25, + "filename": "features.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 25 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 29, + "filename": "bits/types.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 29 + }, + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 32, + "filename": "bits/types/time_t.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 11, + "physical_line": 32 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/utime.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1905, + "is_primary_source": false, + "logical_path": "/usr/include/utime.h", + "occurrence_id": "corpus-0279", + "origin_position": null, + "sha256": "1ff8e163f3d97632a9969b7bd1fe78db25aae01c5f47255c502d92730c5b4085" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 21, + "filename": "features.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 21 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 23, + "filename": "sys/types.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 23 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 29, + "filename": "bits/utmp.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 29 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/utmp.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 3223, + "is_primary_source": false, + "logical_path": "/usr/include/utmp.h", + "occurrence_id": "corpus-0280", + "origin_position": null, + "sha256": "d09c9fb6ea18e2ef0cfba7a2352f19f889ae1789f67cf53ddc096c93d51ea75a" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 21, + "filename": "features.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 21 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 22, + "filename": "sys/time.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 22 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 31, + "filename": "bits/utmpx.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 31 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/utmpx.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 4100, + "is_primary_source": false, + "logical_path": "/usr/include/utmpx.h", + "occurrence_id": "corpus-0281", + "origin_position": null, + "sha256": "e2dc26c4ce763fcdd7e857182d4b684cc50a20178d9247c122e8273494c90108" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 25, + "filename": "features.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 25 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 27, + "filename": "limits.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 27 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 51, + "filename": "float.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 51 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/values.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1956, + "is_primary_source": false, + "logical_path": "/usr/include/values.h", + "occurrence_id": "corpus-0282", + "origin_position": null, + "sha256": "8c5f7b27241b811e0c14e46d318bdf1b81e6c1e8385e067097fa628ccb90f8ed" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 0, + "delimiter": "angle", + "directive_physical_line": 1, + "filename": "sys/wait.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 1 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/wait.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 22, + "is_primary_source": false, + "logical_path": "/usr/include/wait.h", + "occurrence_id": "corpus-0283", + "origin_position": null, + "sha256": "c953eb0aab25d400ef690ac094d02854eeeb9b5935a2a9141c041949133db5bc" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 27, + "filename": "bits/libc-header-start.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 27 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 30, + "filename": "bits/floatn.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 30 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 35, + "filename": "stddef.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 35 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 38, + "filename": "stdarg.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 38 + }, + { + "conditional_depth": 3, + "delimiter": "angle", + "directive_physical_line": 47, + "filename": "stdarg.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 12, + "physical_line": 47 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 51, + "filename": "bits/wchar.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 51 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 52, + "filename": "bits/types/wint_t.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 52 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 53, + "filename": "bits/types/mbstate_t.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 53 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 54, + "filename": "bits/types/__FILE.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 54 + }, + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 57, + "filename": "bits/types/FILE.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 11, + "physical_line": 57 + }, + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 60, + "filename": "bits/types/locale_t.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 11, + "physical_line": 60 + }, + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 87, + "filename": "bits/wctype-wchar.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 11, + "physical_line": 87 + }, + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 1059, + "filename": "bits/wchar2-decl.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 11, + "physical_line": 1059 + }, + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 1065, + "filename": "bits/wchar-ldbl.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 11, + "physical_line": 1065 + }, + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 1070, + "filename": "bits/wchar2.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 11, + "physical_line": 1070 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/wchar.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 39102, + "is_primary_source": false, + "logical_path": "/usr/include/wchar.h", + "occurrence_id": "corpus-0284", + "origin_position": null, + "sha256": "8b3fc0b3857d76bfc8423bb97723d5af6919b31fff9b17d8c8fc120f63143865" + }, + "supported_language_scan": false, + "unsupported_frontier": [ + { + "code": "unsupported_assembler_construct", + "detail": "", + "form": " __THROW __asm (\"wcschr\") __attribute_pure__;", + "original_physical_line_bytes_latin1": " __THROW __asm (\"wcschr\") __attribute_pure__;", + "physical_line": 185 + }, + { + "code": "unsupported_assembler_construct", + "detail": "", + "form": " __THROW __asm (\"wcschr\") __attribute_pure__;", + "original_physical_line_bytes_latin1": " __THROW __asm (\"wcschr\") __attribute_pure__;", + "physical_line": 187 + }, + { + "code": "unsupported_assembler_construct", + "detail": "", + "form": " __THROW __asm (\"wcsrchr\") __attribute_pure__;", + "original_physical_line_bytes_latin1": " __THROW __asm (\"wcsrchr\") __attribute_pure__;", + "physical_line": 195 + }, + { + "code": "unsupported_assembler_construct", + "detail": "", + "form": " __THROW __asm (\"wcsrchr\") __attribute_pure__;", + "original_physical_line_bytes_latin1": " __THROW __asm (\"wcsrchr\") __attribute_pure__;", + "physical_line": 197 + }, + { + "code": "unsupported_assembler_construct", + "detail": "", + "form": " __THROW __asm (\"wcspbrk\") __attribute_pure__;", + "original_physical_line_bytes_latin1": " __THROW __asm (\"wcspbrk\") __attribute_pure__;", + "physical_line": 221 + }, + { + "code": "unsupported_assembler_construct", + "detail": "", + "form": " __THROW __asm (\"wcspbrk\") __attribute_pure__;", + "original_physical_line_bytes_latin1": " __THROW __asm (\"wcspbrk\") __attribute_pure__;", + "physical_line": 224 + }, + { + "code": "unsupported_assembler_construct", + "detail": "", + "form": " __THROW __asm (\"wcsstr\") __attribute_pure__;", + "original_physical_line_bytes_latin1": " __THROW __asm (\"wcsstr\") __attribute_pure__;", + "physical_line": 232 + }, + { + "code": "unsupported_assembler_construct", + "detail": "", + "form": " __THROW __asm (\"wcsstr\") __attribute_pure__;", + "original_physical_line_bytes_latin1": " __THROW __asm (\"wcsstr\") __attribute_pure__;", + "physical_line": 235 + }, + { + "code": "unsupported_assembler_construct", + "detail": "", + "form": " __THROW __asm (\"wcswcs\") __attribute_pure__;", + "original_physical_line_bytes_latin1": " __THROW __asm (\"wcswcs\") __attribute_pure__;", + "physical_line": 253 + }, + { + "code": "unsupported_assembler_construct", + "detail": "", + "form": " __THROW __asm (\"wcswcs\") __attribute_pure__;", + "original_physical_line_bytes_latin1": " __THROW __asm (\"wcswcs\") __attribute_pure__;", + "physical_line": 256 + }, + { + "code": "unsupported_assembler_construct", + "detail": "", + "form": " __THROW __asm (\"wmemchr\") __attribute_pure__;", + "original_physical_line_bytes_latin1": " __THROW __asm (\"wmemchr\") __attribute_pure__;", + "physical_line": 273 + }, + { + "code": "unsupported_assembler_construct", + "detail": "", + "form": " __THROW __asm (\"wmemchr\") __attribute_pure__;", + "original_physical_line_bytes_latin1": " __THROW __asm (\"wmemchr\") __attribute_pure__;", + "physical_line": 276 + }, + { + "code": "unsupported_assembler_construct", + "detail": "", + "form": "extern wint_t __btowc_alias (int __c) __asm (\"btowc\");", + "original_physical_line_bytes_latin1": "extern wint_t __btowc_alias (int __c) __asm (\"btowc\");", + "physical_line": 341 + }, + { + "code": "unsupported_assembler_construct", + "detail": "", + "form": "extern int __wctob_alias (wint_t __c) __asm (\"wctob\");", + "original_physical_line_bytes_latin1": "extern int __wctob_alias (wint_t __c) __asm (\"wctob\");", + "physical_line": 347 + } + ] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 26, + "filename": "features.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 26 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 27, + "filename": "bits/types.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 27 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 28, + "filename": "bits/types/wint_t.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 28 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 38, + "filename": "bits/wctype-wchar.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 38 + }, + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 59, + "filename": "bits/types/locale_t.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 12, + "physical_line": 59 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/wctype.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 5549, + "is_primary_source": false, + "logical_path": "/usr/include/wctype.h", + "occurrence_id": "corpus-0285", + "origin_position": null, + "sha256": "9ae8c4c9ea7aa89862b4c60edd069ccb04aa81023dfee97ea1dd3150cf10f250" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 21, + "filename": "features.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 21 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 23, + "filename": "stddef.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 23 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/wordexp.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 2502, + "is_primary_source": false, + "logical_path": "/usr/include/wordexp.h", + "occurrence_id": "corpus-0286", + "origin_position": null, + "sha256": "caef0c962eb7ff3b5f67e53959534d15a71db72007289021e40da0dda412ce68" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 4, + "filename": "bits/a.out.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 4 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/a.out.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 4351, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/a.out.h", + "occurrence_id": "corpus-0287", + "origin_position": null, + "sha256": "e17b09a2a22c09c1a9a0f06f6906e04dc893ae1577834cabef562ca781940c89" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/a.out.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 268, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/a.out.h", + "occurrence_id": "corpus-0288", + "origin_position": null, + "sha256": "ccf308c9f51c6d713d07b5c68b76cb0a690908d5dc96e9f9adbc139061ddb05c" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/argp-ldbl.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1010, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/argp-ldbl.h", + "occurrence_id": "corpus-0289", + "origin_position": null, + "sha256": "f915800150ff5a4b9ecbfc8f6491163e39c91579f0b1243bb17eff5f786f18a4" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/atomic_wide_counter.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1283, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/atomic_wide_counter.h", + "occurrence_id": "corpus-0290", + "origin_position": null, + "sha256": "ed3a79c28629d75907ef498b30f8db2b6a433d7a49be3a752bad01007599b976" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 26, + "filename": "features.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 26 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 27, + "filename": "bits/types.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 27 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/byteswap.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 2450, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/byteswap.h", + "occurrence_id": "corpus-0291", + "origin_position": null, + "sha256": "3c1abaa571e19f9b3148b46d0fe2a764a3254d9163a398d71006d6b839e5ab84" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/cmathcalls.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 4139, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/cmathcalls.h", + "occurrence_id": "corpus-0292", + "origin_position": null, + "sha256": "14d89b8484d3298cb29a5479a89f9ec562679c28c4f3163e741d4df188325e2f" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/confname.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 23828, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/confname.h", + "occurrence_id": "corpus-0293", + "origin_position": null, + "sha256": "873794f4472ddcc7b95e69ac923897decc10bb731223c4fadb7bab0d86cf8804" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/cpu-set.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 4516, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/cpu-set.h", + "occurrence_id": "corpus-0294", + "origin_position": null, + "sha256": "99270c57646f3410998ca958496e64c40648be3f429134d00ed8a2f3e7bbeadb" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/dirent.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1771, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/dirent.h", + "occurrence_id": "corpus-0295", + "origin_position": null, + "sha256": "5006e9786361ec0a987caaa9a0a6cd6ced26e13b1fb0014cc6cafd0ec50e2352" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/dirent_ext.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1275, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/dirent_ext.h", + "occurrence_id": "corpus-0296", + "origin_position": null, + "sha256": "781d8897a65ad6d92b9308d224080a9b3d5e359210cc5d9b7048fed57f13262b" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/dl_find_object.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1119, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/dl_find_object.h", + "occurrence_id": "corpus-0297", + "origin_position": null, + "sha256": "30e9caad35a1bfa6979665780b70b8b6e42f0c4c1c8e5c34295d9c1c400cd312" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/dlfcn.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 2521, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/dlfcn.h", + "occurrence_id": "corpus-0298", + "origin_position": null, + "sha256": "8544ab951f3c5e853fc73d5ad6248393195b68ab62f93a3a190d912cd0fa242a" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 0, + "delimiter": "angle", + "directive_physical_line": 9, + "filename": "bits/wordsize.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 9 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/elfclass.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 426, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/elfclass.h", + "occurrence_id": "corpus-0299", + "origin_position": null, + "sha256": "4de87067abd0016835a83633b715abc06c1beb7c10199626592077ffb6c27746" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 35, + "filename": "bits/endianness.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 35 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/endian.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1905, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/endian.h", + "occurrence_id": "corpus-0300", + "origin_position": null, + "sha256": "0add7af26d2f4529d28506f0af6506ef687e507e4eddc946171d3e6805e9b9fe" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/endianness.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 273, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/endianness.h", + "occurrence_id": "corpus-0301", + "origin_position": null, + "sha256": "659a7060004eda113671a38852c4d1e9cb97a35932bcd1d8540f98c09c180747" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 0, + "delimiter": "angle", + "directive_physical_line": 22, + "filename": "bits/wordsize.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 22 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/environments.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 3791, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/environments.h", + "occurrence_id": "corpus-0302", + "origin_position": null, + "sha256": "a11ec37187827c2f57d8227f8455d1ce29ee7ce22604db0a5e20f29fb3905b97" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/epoll.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1071, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/epoll.h", + "occurrence_id": "corpus-0303", + "origin_position": null, + "sha256": "c974e7255e1e4c8d598984e8adbdd9dfe706a2f4f2c7128cf36c003215b2e83b" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/err-ldbl.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1148, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/err-ldbl.h", + "occurrence_id": "corpus-0304", + "origin_position": null, + "sha256": "b4de28070778c1c08714584a6ac4f9badd4f0ca90095e6177dc5cefb670f89a3" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 26, + "filename": "linux/errno.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 11, + "physical_line": 26 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/errno.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1426, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/errno.h", + "occurrence_id": "corpus-0305", + "origin_position": null, + "sha256": "5484af7e4dec9029686f27eb08f5f33208a3e03e66574aee9ab9d377599783db" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/error-ldbl.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 2824, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/error-ldbl.h", + "occurrence_id": "corpus-0306", + "origin_position": null, + "sha256": "4618b6722292d547cf8c2f5bbcc6d82bfbd102c1bcf90b893efe23193a3946c3" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/error.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 2684, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/error.h", + "occurrence_id": "corpus-0307", + "origin_position": null, + "sha256": "ece98b0bb2039ea24b65c58ca163db72c47b081cf99499edfd659e3ffa9cf6c6" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/eventfd.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1129, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/eventfd.h", + "occurrence_id": "corpus-0308", + "origin_position": null, + "sha256": "c64a4abcaf64c430db74f577fd1d20c719e529017e8bbee8e9a5ac045172c308" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 38, + "filename": "bits/types/struct_iovec.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 11, + "physical_line": 38 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 355, + "filename": "linux/falloc.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 11, + "physical_line": 355 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 14484, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h", + "occurrence_id": "corpus-0309", + "origin_position": null, + "sha256": "8d50bc7737bcc76f42b1f406244acb287bcf0463d180b6b0566d27d1f23b3e98" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 0, + "delimiter": "angle", + "directive_physical_line": 61, + "filename": "bits/fcntl-linux.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 61 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/fcntl.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 2246, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/fcntl.h", + "occurrence_id": "corpus-0310", + "origin_position": null, + "sha256": "dd4dfce9d1624326b478f1ad3405b15f637f1419d8b04c88fe83556753285a73" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/fcntl2.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 5575, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/fcntl2.h", + "occurrence_id": "corpus-0311", + "origin_position": null, + "sha256": "d58813b1dd96737b565353ea71b0bab60813c4a70129770392fc016302646a80" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/fenv.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 3370, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/fenv.h", + "occurrence_id": "corpus-0312", + "origin_position": null, + "sha256": "a5fa0e5cd842e1e85a045dde3bb44a5508205527bc4f0ffe77c2875f18d404c6" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 23, + "filename": "features.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 23 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 24, + "filename": "bits/long-double.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 24 + } + ], + "full_C05": false, + "lexical_diagnostics": [ + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "# define __f16(x) ((_Float16) x##f)", + "physical_line": 83 + }, + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "# define __f16(x) x##f16", + "physical_line": 85 + }, + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "# define __f32(x) x##f", + "physical_line": 91 + }, + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "# define __f32(x) x##f32", + "physical_line": 93 + }, + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "# define __f64(x) x##l", + "physical_line": 100 + }, + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "# define __f64(x) x##f64", + "physical_line": 105 + }, + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "# define __f32x(x) x##f32x", + "physical_line": 113 + }, + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "# define __f64x(x) x##l", + "physical_line": 120 + }, + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "# define __f64x(x) x##f64x", + "physical_line": 125 + }, + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "# define __f128x(x) x##f128x", + "physical_line": 133 + } + ], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/floatn-common.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 10325, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/floatn-common.h", + "occurrence_id": "corpus-0313", + "origin_position": null, + "sha256": "b31050f2b142f1b5bedfa97158b1baa06575dd0d12dde4531b3815b57069e3da" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 22, + "filename": "features.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 22 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 119, + "filename": "bits/floatn-common.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 119 + } + ], + "full_C05": false, + "lexical_diagnostics": [ + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "# define __f128(x) x##q", + "physical_line": 63 + }, + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "# define __f128(x) x##f128", + "physical_line": 65 + } + ], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/floatn.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 4457, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/floatn.h", + "occurrence_id": "corpus-0314", + "origin_position": null, + "sha256": "273e3eac154e0fd777b8e7c6edd9cd64af69a0d215370da12243d5b22378c2dc" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/flt-eval-method.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1215, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/flt-eval-method.h", + "occurrence_id": "corpus-0315", + "origin_position": null, + "sha256": "61b9223ce4641088a5c7e5c00c99c5337f27184e0399dc6eaeb6f964f575fc01" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/fp-fast.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1216, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/fp-fast.h", + "occurrence_id": "corpus-0316", + "origin_position": null, + "sha256": "fdfbdd785f66fbfb1c09cff9be1268eba9e380333741f6fa2818f3c3cb87fa29" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/fp-logb.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1012, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/fp-logb.h", + "occurrence_id": "corpus-0317", + "origin_position": null, + "sha256": "712626c5021725ef9619d3fa39f67069f2f49029b19454b69d68444b3bb74794" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/getopt_core.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 3667, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/getopt_core.h", + "occurrence_id": "corpus-0318", + "origin_position": null, + "sha256": "16640bdef5ecba29e7a79f21878a24dea4455e996a0bfd0c211b0adea60a6c92" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/getopt_ext.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 3038, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/getopt_ext.h", + "occurrence_id": "corpus-0319", + "origin_position": null, + "sha256": "27d1072cee1630789735f690a243091c0beab597bd84933b1b312cedc8cf9cf4" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 27, + "filename": "bits/getopt_core.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 27 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/getopt_posix.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1810, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/getopt_posix.h", + "occurrence_id": "corpus-0320", + "origin_position": null, + "sha256": "a2ad1205e94a340a1ae72e939b2f3d4d1ff5de75d9bebe5cf17e546ed6d91256" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/hwcap.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 972, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/hwcap.h", + "occurrence_id": "corpus-0321", + "origin_position": null, + "sha256": "be43531f4e83ff78e2db474c939fd7e663c8b6484170e2adf3e6cd1e7b67650d" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/in.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 9366, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/in.h", + "occurrence_id": "corpus-0322", + "origin_position": null, + "sha256": "d578529989cc10e4166906a9f195594be6eaff2971f9ea2e8347ef6850c86e05" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/indirect-return.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1591, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/indirect-return.h", + "occurrence_id": "corpus-0323", + "origin_position": null, + "sha256": "f61df99c0336eeccbae64360d540c9cb366f0d279f9118057611194424df8589" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/initspin.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 25, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/initspin.h", + "occurrence_id": "corpus-0324", + "origin_position": null, + "sha256": "1ed49efcf7b4b2f2c26f2946ed5c664029d38d56b7b78924920efaf164e27b7a" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/inotify.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1080, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/inotify.h", + "occurrence_id": "corpus-0325", + "origin_position": null, + "sha256": "fb5d2be0f44356c71fcd8d73f9a44b9a0af9377eba3057575ac04ca54b52f419" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 0, + "delimiter": "angle", + "directive_physical_line": 24, + "filename": "asm/ioctls.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 24 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/ioctl-types.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 2456, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/ioctl-types.h", + "occurrence_id": "corpus-0326", + "origin_position": null, + "sha256": "c0b4d799c5208a085d87604c48c10345489cf96ccd78106860a1d8f311abdadb" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 0, + "delimiter": "angle", + "directive_physical_line": 23, + "filename": "asm/ioctls.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 23 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/ioctls.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 4478, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/ioctls.h", + "occurrence_id": "corpus-0327", + "origin_position": null, + "sha256": "31a4d9377c9eb537bb713c537985f00af0b5c3ed4b6dff8322b84cc35ef7afbc" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/ipc-perm.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1745, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/ipc-perm.h", + "occurrence_id": "corpus-0328", + "origin_position": null, + "sha256": "06b99d9a3c79aa85190a532a9db4866af316ec412400948221d7fa332b1d2ab2" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 0, + "delimiter": "angle", + "directive_physical_line": 22, + "filename": "bits/types.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 22 + }, + { + "conditional_depth": 0, + "delimiter": "angle", + "directive_physical_line": 40, + "filename": "bits/ipc-perm.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 40 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/ipc.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1523, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/ipc.h", + "occurrence_id": "corpus-0329", + "origin_position": null, + "sha256": "039f04e9ee4555708ce8e80e58e90330fad9c5e79c5dd3f8de10b1b47ed942dd" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/ipctypes.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1176, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/ipctypes.h", + "occurrence_id": "corpus-0330", + "origin_position": null, + "sha256": "0b99f60f8a741bd3b212b4a4d121ff5b8729519313ed49827793884925364f5c" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/iscanonical.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 2479, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/iscanonical.h", + "occurrence_id": "corpus-0331", + "origin_position": null, + "sha256": "03e912c18a01d00126a6d011dfd72042eeb3736ea8af5b79c0ff7742261b0da3" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 0, + "delimiter": "angle", + "directive_physical_line": 33, + "filename": "features.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 33 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/libc-header-start.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 4286, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h", + "occurrence_id": "corpus-0332", + "origin_position": null, + "sha256": "e86638082f9ce98c82e3022018fa5be175473445c824fe17bd32bf9668582368" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 8933, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h", + "occurrence_id": "corpus-0333", + "origin_position": null, + "sha256": "b00b3abd4ea49834f00c91f6f81b645a0b306a13f20ca0f8f4f2c7cc54809c61" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/link.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 4323, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/link.h", + "occurrence_id": "corpus-0334", + "origin_position": null, + "sha256": "72e65a92625138fec77d2e91c4d6d6e435459f280fe57b05f9c5ecb2216f9b04" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/link_lavcurrent.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1104, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/link_lavcurrent.h", + "occurrence_id": "corpus-0335", + "origin_position": null, + "sha256": "5d93aa2aea615cf87ebe47b8703f80a0ebd2bf62bfee4136dbec6a8c391396e9" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 0, + "delimiter": "angle", + "directive_physical_line": 38, + "filename": "linux/limits.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 38 + }, + { + "conditional_depth": 0, + "delimiter": "angle", + "directive_physical_line": 81, + "filename": "bits/pthread_stack_min-dynamic.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 81 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/local_lim.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 3175, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/local_lim.h", + "occurrence_id": "corpus-0336", + "origin_position": null, + "sha256": "9dbebbc341950944353717d158b08c28e1be355e59301854a92e46cfb097367f" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/locale.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1368, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/locale.h", + "occurrence_id": "corpus-0337", + "origin_position": null, + "sha256": "753e715e1df1b965f2137a89959779011b943153f1a6d4a88501f1b30d317e93" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/long-double.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 970, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/long-double.h", + "occurrence_id": "corpus-0338", + "origin_position": null, + "sha256": "40367287cd437d78a05313f6ec52cb0f0a711e1b6711fdcc3699bf2bf28e810f" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 0, + "delimiter": "angle", + "directive_physical_line": 25, + "filename": "bits/libm-simd-decl-stubs.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 25 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/math-vector.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 5402, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/math-vector.h", + "occurrence_id": "corpus-0339", + "origin_position": null, + "sha256": "2e61d60a40caeb9aae5842dfec8d674239b81c0477d2212a5afe801e4be7bf24" + }, + "supported_language_scan": false, + "unsupported_frontier": [ + { + "code": "unsupported_Pragma", + "detail": "", + "form": "# define __DECL_SIMD_x86_64 _Pragma (\"omp declare simd notinbranch\")", + "original_physical_line_bytes_latin1": "# define __DECL_SIMD_x86_64 _Pragma (\"omp declare simd notinbranch\")", + "physical_line": 30 + } + ] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1863, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h", + "occurrence_id": "corpus-0340", + "origin_position": null, + "sha256": "929a6ea9df8f8201c7a4bad2e1860fe7d839c84e4d72b91d49c29eb7af840f4f" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/mathcalls-narrow.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1515, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/mathcalls-narrow.h", + "occurrence_id": "corpus-0341", + "origin_position": null, + "sha256": "f82bd580c084609fa3dbc8d87a4127661fd49a582f57c95225110a6051270fa1" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/mathcalls.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 14562, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/mathcalls.h", + "occurrence_id": "corpus-0342", + "origin_position": null, + "sha256": "9c334a3ae196c1d619c46433e45e0a1266784f9cf7cd23461f1910c0f2d742dc" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/mathdef.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 891, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/mathdef.h", + "occurrence_id": "corpus-0343", + "origin_position": null, + "sha256": "26220b3392a9b2a407b77290d5912b05cac26be7ed949fac87075cb7ce80dc0d" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 0, + "delimiter": "angle", + "directive_physical_line": 116, + "filename": "bits/mman-shared.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 116 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/mman-linux.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 5188, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/mman-linux.h", + "occurrence_id": "corpus-0344", + "origin_position": null, + "sha256": "c2c3c4ed99567f102ea1eaec1253b59b8bd4658f43ca85df4c6fda616bad4ab7" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/mman-map-flags-generic.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1961, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/mman-map-flags-generic.h", + "occurrence_id": "corpus-0345", + "origin_position": null, + "sha256": "5f89076a5312f6ee10b8bcf6c0bf55c12627e8f92f330435889d4353f4079e18" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/mman-shared.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 2928, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/mman-shared.h", + "occurrence_id": "corpus-0346", + "origin_position": null, + "sha256": "4c1f3bb4536b96b3418b220fe4e30b651dc0c429e078a6003c4b241841fbff25" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 0, + "delimiter": "angle", + "directive_physical_line": 35, + "filename": "bits/mman-map-flags-generic.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 35 + }, + { + "conditional_depth": 0, + "delimiter": "angle", + "directive_physical_line": 38, + "filename": "bits/mman-linux.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 38 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/mman.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1463, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/mman.h", + "occurrence_id": "corpus-0347", + "origin_position": null, + "sha256": "0a78a69a61f06a5e8537d1205242d21334ba96c7fcfc09fb3a790392d04e9c54" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/mman_ext.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1230, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/mman_ext.h", + "occurrence_id": "corpus-0348", + "origin_position": null, + "sha256": "0475023a4b9f140ba0673a9c5e5ee473204e62d4ba7313eb1d34a229c5f6e2be" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/monetary-ldbl.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1047, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/monetary-ldbl.h", + "occurrence_id": "corpus-0349", + "origin_position": null, + "sha256": "0099b6551d06dfd607ceaf1535fb1e579f40079c43539544b09e641c07f5703d" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 0, + "delimiter": "angle", + "directive_physical_line": 22, + "filename": "bits/types.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 22 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/mqueue.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1246, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/mqueue.h", + "occurrence_id": "corpus-0350", + "origin_position": null, + "sha256": "f69008aac88897776dfdec74fb852573900ff04f847ab3340dbf5d53bff3e762" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/mqueue2.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 2151, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/mqueue2.h", + "occurrence_id": "corpus-0351", + "origin_position": null, + "sha256": "aaba51696247abb821132dbf11f7b47ca003910aa510ef33ed9b257710626914" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 0, + "delimiter": "angle", + "directive_physical_line": 22, + "filename": "bits/types.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 22 + }, + { + "conditional_depth": 0, + "delimiter": "angle", + "directive_physical_line": 28, + "filename": "bits/types/struct_msqid_ds.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 28 + }, + { + "conditional_depth": 0, + "delimiter": "angle", + "directive_physical_line": 29, + "filename": "bits/types/struct_msqid64_ds.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 29 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/msq.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1793, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/msq.h", + "occurrence_id": "corpus-0352", + "origin_position": null, + "sha256": "d4428ad3825547cdbedd27ae3d8dac74e3a63af134a0f10dafefea32f5cf3256" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/netdb.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1264, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/netdb.h", + "occurrence_id": "corpus-0353", + "origin_position": null, + "sha256": "b1cf1fe1ea307156d4bbdccac24ac9d3acfab5c0e76d8e2ff58f9ea1a4b01936" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 0, + "delimiter": "angle", + "directive_physical_line": 27, + "filename": "linux/limits.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 27 + }, + { + "conditional_depth": 0, + "delimiter": "angle", + "directive_physical_line": 28, + "filename": "linux/param.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 28 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/param.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1433, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/param.h", + "occurrence_id": "corpus-0354", + "origin_position": null, + "sha256": "a1f8763981be75b21d689116acb3689a4c7ae984098965449d816fca00b53a3b" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/platform/features.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1486, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/platform/features.h", + "occurrence_id": "corpus-0355", + "origin_position": null, + "sha256": "aaa59717558eb94c1f6565e7dbe20d6b9ee91e753728e60eb87d7a1c451e374f" + }, + "supported_language_scan": false, + "unsupported_frontier": [ + { + "code": "unsupported_assembler_construct", + "detail": "", + "form": " __asm__ (\"mov %%fs:72, %0\" : \"=r\" (__feature_1));", + "original_physical_line_bytes_latin1": " __asm__ (\"mov %%fs:72, %0\" : \"=r\" (__feature_1));", + "physical_line": 37 + }, + { + "code": "unsupported_assembler_construct", + "detail": "", + "form": " __asm__ (\"mov %%fs:40, %0\" : \"=r\" (__feature_1));", + "original_physical_line_bytes_latin1": " __asm__ (\"mov %%fs:40, %0\" : \"=r\" (__feature_1));", + "physical_line": 39 + } + ] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/platform/x86.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 13942, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/platform/x86.h", + "occurrence_id": "corpus-0356", + "origin_position": null, + "sha256": "3d04bc43f0b75971d42dbb49315ab0194aaafbe8720d99a72dff0bffd42046ec" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/poll.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 2076, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/poll.h", + "occurrence_id": "corpus-0357", + "origin_position": null, + "sha256": "644e410a7997e0e3b196cf8a747ee660b978e6a4774a534da067dc3fd1b5b74a" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/poll2.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 3676, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/poll2.h", + "occurrence_id": "corpus-0358", + "origin_position": null, + "sha256": "de9b7c07a5516cefe2e7acdf9006ff859e83f494fa26c0575e02d8d81b958592" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 27, + "filename": "bits/wordsize.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 27 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 161, + "filename": "bits/local_lim.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 161 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/posix1_lim.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 5198, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/posix1_lim.h", + "occurrence_id": "corpus-0359", + "origin_position": null, + "sha256": "575a32660c776ce2247e533615bee1ff0de20287b943d8368a382fdfb377b7c3" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/posix2_lim.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 2867, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/posix2_lim.h", + "occurrence_id": "corpus-0360", + "origin_position": null, + "sha256": "3dfd0c5a46dde7b70e5b1bbe9eb8cb890a76b2cb6d1996e264dea40ccaf6bad8" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + } + ], + "schema": "c05-passive-header-corpus-chunk-v1" +} diff --git a/research/h25-c05-v03-input-constructors/evidence/header-corpus-v2/c05_header_edges_refined_corpus_v1_002.json b/research/h25-c05-v03-input-constructors/evidence/header-corpus-v2/c05_header_edges_refined_corpus_v1_002.json new file mode 100644 index 0000000000..e976d7dfd7 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/evidence/header-corpus-v2/c05_header_edges_refined_corpus_v1_002.json @@ -0,0 +1,18767 @@ +{ + "C05_inventory": false, + "all_acquired_headers_are_reachable": false, + "diagnostic_only": true, + "full_C05": false, + "rows": [ + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/posix_opt.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 5913, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/posix_opt.h", + "occurrence_id": "corpus-0361", + "origin_position": null, + "sha256": "3cbbbf49bd3a49fe120b420eec6183803b17d7cb04f840c929455063f6ab7499" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/printf-ldbl.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 992, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/printf-ldbl.h", + "occurrence_id": "corpus-0362", + "origin_position": null, + "sha256": "b984a6181414c66148bd4fce0f7e91890a4ec0f4850867a1a4d40966be348dc0" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/procfs-extra.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 963, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/procfs-extra.h", + "occurrence_id": "corpus-0363", + "origin_position": null, + "sha256": "f9ea3d40e53ba051bb616f08c1f1828fb70704375af09ab3af4e2e97cfd7beb7" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/procfs-id.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1148, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/procfs-id.h", + "occurrence_id": "corpus-0364", + "origin_position": null, + "sha256": "a05c0a0697d2402a9f2d5602645dcf535a524c94cbbf341e809a9490e4f4a33b" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/procfs-prregset.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1050, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/procfs-prregset.h", + "occurrence_id": "corpus-0365", + "origin_position": null, + "sha256": "9bb78ab833c76654edd79c82a900c3ad08dd622c997c7c126ee4e71d76fbdc57" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/procfs.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 2025, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/procfs.h", + "occurrence_id": "corpus-0366", + "origin_position": null, + "sha256": "926eb176e0e9a2389a67cf96f8a44246b78626058900719f8b64971508f83eb1" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 29, + "filename": "bits/pthread_stack_min.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 12, + "physical_line": 29 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/pthread_stack_min-dynamic.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1214, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/pthread_stack_min-dynamic.h", + "occurrence_id": "corpus-0367", + "origin_position": null, + "sha256": "e919a98133620696ca672d6d7f62ba24ef819ab85673e953ac7487b1f38faccc" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/pthread_stack_min.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 951, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/pthread_stack_min.h", + "occurrence_id": "corpus-0368", + "origin_position": null, + "sha256": "1b6a8b6e7d1e7e5dec8d7467c51fc92fea33bfbfdbbdcd544bbe1a56dee2e832" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 21, + "filename": "bits/wordsize.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 21 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1838, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h", + "occurrence_id": "corpus-0369", + "origin_position": null, + "sha256": "adf5a36ccf71cf7252c97627b133285f53d3d66b499838bb717845dcd8d93571" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 23, + "filename": "bits/thread-shared-types.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 23 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 3072, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h", + "occurrence_id": "corpus-0370", + "origin_position": null, + "sha256": "c47d28c26504ebda1e15d82b9ae74d288c9d68e757c7f37456dc39b131131035" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/ptrace-shared.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 4523, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/ptrace-shared.h", + "occurrence_id": "corpus-0371", + "origin_position": null, + "sha256": "5a21e69853d104b1fc556597dbdea941044b0685e049a5317cae6a58423b42b0" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 0, + "delimiter": "angle", + "directive_physical_line": 23, + "filename": "bits/types.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 23 + }, + { + "conditional_depth": 0, + "delimiter": "angle", + "directive_physical_line": 178, + "filename": "bits/types/struct_timeval.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 178 + }, + { + "conditional_depth": 0, + "delimiter": "angle", + "directive_physical_line": 179, + "filename": "bits/types/struct_rusage.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 179 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/resource.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 6308, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/resource.h", + "occurrence_id": "corpus-0372", + "origin_position": null, + "sha256": "8287579c59dbaf5df0de9669150e4a05a495c6af0a469199e342c0946bf58d51" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/rseq.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1248, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/rseq.h", + "occurrence_id": "corpus-0373", + "origin_position": null, + "sha256": "516c965e721f6253db9b09926bf0ae0c9ea51d63173e70a4ff6f90c639f8fe25" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 80, + "filename": "bits/types/struct_sched_param.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 80 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/sched.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 4112, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/sched.h", + "occurrence_id": "corpus-0374", + "origin_position": null, + "sha256": "043d2683a24e16399bcfca1423ef0090151172dfe761af4464f0a9c8d6844a07" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/select-decl.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1234, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/select-decl.h", + "occurrence_id": "corpus-0375", + "origin_position": null, + "sha256": "7abad9cff45a26b298eab3b740977ece93eb6e0f5b4dc2aa22d2b6cd1a8ee066" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/select.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1505, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/select.h", + "occurrence_id": "corpus-0376", + "origin_position": null, + "sha256": "e046dd5c0b229550a439556bd2ca018b9652325ba7e8d6ac5c3ca9b014448e1e" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 0, + "delimiter": "angle", + "directive_physical_line": 23, + "filename": "bits/select-decl.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 23 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/select2.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1266, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/select2.h", + "occurrence_id": "corpus-0377", + "origin_position": null, + "sha256": "b8b26d025598e1477d7a4ed292df32a799c49f3fd6152dbd79f2f462a6d24a57" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 0, + "delimiter": "angle", + "directive_physical_line": 22, + "filename": "sys/types.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 22 + }, + { + "conditional_depth": 0, + "delimiter": "angle", + "directive_physical_line": 23, + "filename": "bits/timesize.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 23 + }, + { + "conditional_depth": 0, + "delimiter": "angle", + "directive_physical_line": 24, + "filename": "bits/types/struct_semid_ds.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 24 + }, + { + "conditional_depth": 0, + "delimiter": "angle", + "directive_physical_line": 25, + "filename": "bits/types/struct_semid64_ds.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 25 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/sem.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 2259, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/sem.h", + "occurrence_id": "corpus-0378", + "origin_position": null, + "sha256": "bee13378676e8a58f99996f38db9f62f1d53e673e3a84edd26a298fde0baf804" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 0, + "delimiter": "angle", + "directive_physical_line": 23, + "filename": "bits/wordsize.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 23 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/semaphore.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1215, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/semaphore.h", + "occurrence_id": "corpus-0379", + "origin_position": null, + "sha256": "e95172023e9584664228b5324b448d5793881c60e14a6588581f8207916233c9" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 26, + "filename": "bits/wordsize.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 26 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/setjmp.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1287, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/setjmp.h", + "occurrence_id": "corpus-0380", + "origin_position": null, + "sha256": "5fde1724c630063303aa2aae694e758c012616f94910907e909a99d0e15a58d5" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/setjmp2.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1705, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/setjmp2.h", + "occurrence_id": "corpus-0381", + "origin_position": null, + "sha256": "3f2710d847960230e9212802bf43f548baceddf8f29c072f336f3e0a2628589d" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 0, + "delimiter": "angle", + "directive_physical_line": 22, + "filename": "bits/types.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 22 + }, + { + "conditional_depth": 0, + "delimiter": "angle", + "directive_physical_line": 23, + "filename": "bits/wordsize.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 23 + }, + { + "conditional_depth": 0, + "delimiter": "angle", + "directive_physical_line": 24, + "filename": "bits/shmlba.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 24 + }, + { + "conditional_depth": 0, + "delimiter": "angle", + "directive_physical_line": 45, + "filename": "bits/types/struct_shmid_ds.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 45 + }, + { + "conditional_depth": 0, + "delimiter": "angle", + "directive_physical_line": 46, + "filename": "bits/types/struct_shmid64_ds.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 46 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/shm.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 2766, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/shm.h", + "occurrence_id": "corpus-0382", + "origin_position": null, + "sha256": "c8cbe50363535439f61ac34e9fa1c1762134da413a020dee576d50f86ea7d2e0" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/shmlba.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1106, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/shmlba.h", + "occurrence_id": "corpus-0383", + "origin_position": null, + "sha256": "7851f452f6c01f313187cbc63460036de5bf205898f57e916de15cba37cdda8b" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/sigaction.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 2935, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/sigaction.h", + "occurrence_id": "corpus-0384", + "origin_position": null, + "sha256": "b2f76a26bbfa3668859e8e8a93af9321e14083914df0aa0367cdffaabf4ece81" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 25, + "filename": "bits/types.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 25 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/sigcontext.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 4266, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/sigcontext.h", + "occurrence_id": "corpus-0385", + "origin_position": null, + "sha256": "4f0f2517d7d2ae6a132312e7c88e4f10a36700045b239346deed0ffa9e681c82" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/sigevent-consts.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1471, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/sigevent-consts.h", + "occurrence_id": "corpus-0386", + "origin_position": null, + "sha256": "e681d251d9a7090118233baaf64ae08ca518d3d8ca6dbab6d11ef5564d4720b0" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/siginfo-arch.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 729, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/siginfo-arch.h", + "occurrence_id": "corpus-0387", + "origin_position": null, + "sha256": "0839bdc7af291182ff9822a7b6419659fb26a49af5e4264857a71af4ccb12213" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/siginfo-consts-arch.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 204, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/siginfo-consts-arch.h", + "occurrence_id": "corpus-0388", + "origin_position": null, + "sha256": "56e019330b859cc4e28af30854df4d29be120ec4bff74849301bb3c40c9f19ca" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 28, + "filename": "bits/siginfo-arch.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 28 + }, + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 215, + "filename": "bits/siginfo-consts-arch.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 11, + "physical_line": 215 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/siginfo-consts.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 7117, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/siginfo-consts.h", + "occurrence_id": "corpus-0389", + "origin_position": null, + "sha256": "5eda010ce0233e02cea7c1b8679d42ab61eba23c369702661249eec8fd25785b" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/signal_ext.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1285, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/signal_ext.h", + "occurrence_id": "corpus-0390", + "origin_position": null, + "sha256": "94e633b9433baed6f4b10bb52e3f5cb3895f116a57d30eea729159efcd337ea7" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/signalfd.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1067, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/signalfd.h", + "occurrence_id": "corpus-0391", + "origin_position": null, + "sha256": "d0caad9b0f903e41500285948900401d7198cfca8c1753706c3a821955f52b16" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/signum-arch.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 2580, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/signum-arch.h", + "occurrence_id": "corpus-0392", + "origin_position": null, + "sha256": "ef1475e1546024be5b12edea07ed215ce3a9b004b1266ba7a3b5e40fb7bbe986" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 76, + "filename": "bits/signum-arch.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 76 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/signum-generic.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 3313, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/signum-generic.h", + "occurrence_id": "corpus-0393", + "origin_position": null, + "sha256": "0a27898a4f720aeabcafb45eba42b0cd6b9593a6e77bd87019969eda94cf435b" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/sigstack.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1168, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/sigstack.h", + "occurrence_id": "corpus-0394", + "origin_position": null, + "sha256": "0bc9d6eb37a657ac4fe8e637a331b2728f1d438c446352d9f8f64f366c757b29" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 24, + "filename": "unistd.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 11, + "physical_line": 24 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/sigstksz.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1283, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/sigstksz.h", + "occurrence_id": "corpus-0395", + "origin_position": null, + "sha256": "a2af66001d4a2f27d828112b04661282b7ff7d075158440e6649f396baea6d78" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 27, + "filename": "bits/types/__sigset_t.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 27 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/sigthread.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1692, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/sigthread.h", + "occurrence_id": "corpus-0396", + "origin_position": null, + "sha256": "e15690707a51a98e5ed5dffa07ace93d2eaf7e06cdf7e73dace990106da940a4" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [ + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "#define\t__SOCKADDR_COMMON(sa_prefix) sa_family_t sa_prefix##family", + "physical_line": 35 + } + ], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/sockaddr.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1514, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/sockaddr.h", + "occurrence_id": "corpus-0397", + "origin_position": null, + "sha256": "5822392d80071a660264fd2b9ad2fe556ca1feae5d29aeb3e31d0285cefd0473" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 0, + "delimiter": "angle", + "directive_physical_line": 23, + "filename": "bits/timesize.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 23 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/socket-constants.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 2497, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/socket-constants.h", + "occurrence_id": "corpus-0398", + "origin_position": null, + "sha256": "d16e1e6dede001514c72afde8226e9d8e4c14384d583a22dd70bf1ed2b221b00" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 27, + "filename": "stddef.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 27 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 29, + "filename": "sys/types.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 29 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 38, + "filename": "bits/socket_type.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 38 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 180, + "filename": "bits/sockaddr.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 180 + }, + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 388, + "filename": "bits/types/time_t.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 11, + "physical_line": 388 + }, + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 389, + "filename": "asm/socket.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 11, + "physical_line": 389 + }, + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 392, + "filename": "bits/socket-constants.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 11, + "physical_line": 392 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/socket.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 13726, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/socket.h", + "occurrence_id": "corpus-0399", + "origin_position": null, + "sha256": "0d54fcf79ed8111df5d3580eb4bb662b744f8ffae03206c624ebec84d43f0ea0" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/socket2.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 3037, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/socket2.h", + "occurrence_id": "corpus-0400", + "origin_position": null, + "sha256": "c78a45098104884476ae3acd5585001d8661dd2c492937b21e7d582cd94ccaf1" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/socket_type.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 2216, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/socket_type.h", + "occurrence_id": "corpus-0401", + "origin_position": null, + "sha256": "189018b45921558a3650c0a9db42d0ba31f265b792ca568c9282ce0014bc0da1" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/spawn_ext.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 2489, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/spawn_ext.h", + "occurrence_id": "corpus-0402", + "origin_position": null, + "sha256": "915023dc797088b99ea27172f2072e91aa128b9c046120f212596dc1890421d7" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/ss_flags.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1188, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/ss_flags.h", + "occurrence_id": "corpus-0403", + "origin_position": null, + "sha256": "064391807d78836b4e0915f5f8a0d0a875ed23c2c40da2e853fcf4ee5dacc408" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 25, + "filename": "bits/struct_stat.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 25 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/stat.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 2231, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/stat.h", + "occurrence_id": "corpus-0404", + "origin_position": null, + "sha256": "94cb3b45d5826d7d5ce6d81e9eb8b053dedd43dd9cde5b074e47c3a28d47bd8d" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 0, + "delimiter": "angle", + "directive_physical_line": 22, + "filename": "bits/types.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 22 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/statfs.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1917, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/statfs.h", + "occurrence_id": "corpus-0405", + "origin_position": null, + "sha256": "063abffe73524326242b3e46d1d13912d35462e758c41f7658959fd76f7ab70b" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 0, + "delimiter": "angle", + "directive_physical_line": 22, + "filename": "bits/types.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 22 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/statvfs.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 3569, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/statvfs.h", + "occurrence_id": "corpus-0406", + "origin_position": null, + "sha256": "fb2c030fa399a1e3af061adfd48c69737a12ae1ab4367d7958415e55d0f4c832" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 0, + "delimiter": "angle", + "directive_physical_line": 25, + "filename": "bits/types/struct_statx_timestamp.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 25 + }, + { + "conditional_depth": 0, + "delimiter": "angle", + "directive_physical_line": 26, + "filename": "bits/types/struct_statx.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 26 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/statx-generic.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 2219, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/statx-generic.h", + "occurrence_id": "corpus-0407", + "origin_position": null, + "sha256": "2cab536381a2e5b16ec63266830890d948012e0ef2ee7e607c5500e25d8abf44" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 30, + "filename": "linux/stat.h", + "kind": "__has_include", + "lookup_only": true, + "origin_position": null, + "phase2_column": 21, + "physical_line": 30 + }, + { + "conditional_depth": 2, + "delimiter": "quote", + "directive_physical_line": 31, + "filename": "linux/stat.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 12, + "physical_line": 31 + }, + { + "conditional_depth": 0, + "delimiter": "angle", + "directive_physical_line": 39, + "filename": "bits/statx-generic.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 39 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/statx.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1400, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/statx.h", + "occurrence_id": "corpus-0408", + "origin_position": null, + "sha256": "aa197c11709c0ab300b5c9feb8ea06d173725fa45cf4fcb7a93080f3496c5314" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 22, + "filename": "bits/types.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 22 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/stdint-intn.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1037, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/stdint-intn.h", + "occurrence_id": "corpus-0409", + "origin_position": null, + "sha256": "94286e42e4970304da5cbef69de6695c84132ff8fbd4b6d72d29aeb7406dc5ff" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 22, + "filename": "bits/types.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 22 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/stdint-least.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1300, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/stdint-least.h", + "occurrence_id": "corpus-0410", + "origin_position": null, + "sha256": "5bf66871bfc18ae6d22c91d03e392c1a4cc5969ca74c5fa31b7510703a496844" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 22, + "filename": "bits/types.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 22 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/stdint-uintn.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1049, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/stdint-uintn.h", + "occurrence_id": "corpus-0411", + "origin_position": null, + "sha256": "aeee224a19434556ef4a9a4afad553736789274656ca12463122300b557ce78c" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/stdio-ldbl.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 4313, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/stdio-ldbl.h", + "occurrence_id": "corpus-0412", + "origin_position": null, + "sha256": "166c6ceac6fdcbeb2d73e891fb9ddeb6014037121b4b43d1780b7748c5cc2fe5" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/stdio.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 5599, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/stdio.h", + "occurrence_id": "corpus-0413", + "origin_position": null, + "sha256": "bb9b0feccc1b326b8aee69fd00059b715947fee86b8638e27d07710f2c2895df" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/stdio2-decl.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 6309, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/stdio2-decl.h", + "occurrence_id": "corpus-0414", + "origin_position": null, + "sha256": "c3acb8208277348f1e7df5b44ca92a253947041a6c79e5a04db9d5ffa96327db" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/stdio2.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 8202, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/stdio2.h", + "occurrence_id": "corpus-0415", + "origin_position": null, + "sha256": "e553964cc1a45a330dc65224bae4e81299a6c4662985926f80151b4ea902cbf6" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/stdio_lim.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1059, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/stdio_lim.h", + "occurrence_id": "corpus-0416", + "origin_position": null, + "sha256": "509fc0d1fba9f06fe85d61b6b9c0b2208c8fe8e63af55fcfdd7e4ad5eabe6927" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1557, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h", + "occurrence_id": "corpus-0417", + "origin_position": null, + "sha256": "4c5e9e9b5f53c543ef6c8c933232e8a9aae0c2a93ef57d178c4edce76fd53531" + }, + "supported_language_scan": false, + "unsupported_frontier": [ + { + "code": "unsupported_pragma", + "detail": "pragma/import/embed semantics are outside this extractor", + "form": "# pragma GCC diagnostic push", + "original_physical_line_bytes_latin1": "# pragma GCC diagnostic push", + "physical_line": 41 + }, + { + "code": "unsupported_pragma", + "detail": "pragma/import/embed semantics are outside this extractor", + "form": "# pragma GCC diagnostic ignored \"-Wcast-qual\"", + "original_physical_line_bytes_latin1": "# pragma GCC diagnostic ignored \"-Wcast-qual\"", + "physical_line": 42 + }, + { + "code": "unsupported_pragma", + "detail": "pragma/import/embed semantics are outside this extractor", + "form": "# pragma GCC diagnostic pop", + "original_physical_line_bytes_latin1": "# pragma GCC diagnostic pop", + "physical_line": 46 + } + ] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/stdlib-float.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1115, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/stdlib-float.h", + "occurrence_id": "corpus-0418", + "origin_position": null, + "sha256": "ba3d25100d93a324122c4c8121759c689607656aedf0efa148f0bfe8826c9794" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/stdlib-ldbl.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 2020, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/stdlib-ldbl.h", + "occurrence_id": "corpus-0419", + "origin_position": null, + "sha256": "399623c07b26fb9bb9a6e324f8a73535e904a899fbbfb87a2c15711b01252e6e" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/stdlib.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 5779, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/stdlib.h", + "occurrence_id": "corpus-0420", + "origin_position": null, + "sha256": "1b70f2c7745d3ed2f4dff21b6d8afb8f9618441ca5c57ec3420d6173de500f8a" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 64, + "filename": "bits/strings_fortified.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 11, + "physical_line": 64 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/string_fortified.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 5625, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/string_fortified.h", + "occurrence_id": "corpus-0421", + "origin_position": null, + "sha256": "0cfa3c530938891615ab64ab5dfb72ebd8d02077d29d4410774b8a8ceff628fb" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/strings_fortified.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1240, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/strings_fortified.h", + "occurrence_id": "corpus-0422", + "origin_position": null, + "sha256": "26836e33fbedd8672b087a148df3035b5d52a6a9fd05d486ab6f3a457700fc3e" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/struct_mutex.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1810, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/struct_mutex.h", + "occurrence_id": "corpus-0423", + "origin_position": null, + "sha256": "ec8b2058d4ac8e98ebaf6bdcb078000dd4df92b584e2ce6ae79546fb4219cde2" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/struct_rwlock.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 2027, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/struct_rwlock.h", + "occurrence_id": "corpus-0424", + "origin_position": null, + "sha256": "4b55d768919e8183816e4cdf910f62c7ac5313e70e370b287157e503bd2c26d1" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 29, + "filename": "bits/struct_stat_time64_helper.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 11, + "physical_line": 29 + }, + { + "conditional_depth": 3, + "delimiter": "angle", + "directive_physical_line": 106, + "filename": "bits/struct_stat_time64_helper.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 12, + "physical_line": 106 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/struct_stat.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 6190, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/struct_stat.h", + "occurrence_id": "corpus-0425", + "origin_position": null, + "sha256": "00b3b33c165454470de0f21b324867ec6e9b43e34f5d503121adf021cad8202e" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [ + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "# define __fieldts64(name)\t\t\t\t\t __time64_t name; __int32_t :32; __int32_t name ## nsec", + "physical_line": 52 + }, + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "# define __fieldts64(name)\t\t\t\t\t __time64_t name; __int32_t name ## nsec; __int32_t :32", + "physical_line": 55 + } + ], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/struct_stat_time64_helper.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 2606, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/struct_stat_time64_helper.h", + "occurrence_id": "corpus-0426", + "origin_position": null, + "sha256": "747c66e4a093429c025c5dee952f2ee752be8a3753ee3b47d5fc62fdaa5551b5" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/syscall.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 46189, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/syscall.h", + "occurrence_id": "corpus-0427", + "origin_position": null, + "sha256": "0294b3635ca2b42446d90f7daa2077607ce38f0a626ea0156f8ddedb00934cb4" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/syslog-decl.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1334, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/syslog-decl.h", + "occurrence_id": "corpus-0428", + "origin_position": null, + "sha256": "74075fe5c9d461e80e873fbe9256fc66345d57eb17913df72cb8ecb8fc0694c3" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/syslog-ldbl.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1204, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/syslog-ldbl.h", + "occurrence_id": "corpus-0429", + "origin_position": null, + "sha256": "f40458097ed9fa156dc1ec45124c76fbdd7d7e6c0e34411da93257854a94b389" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/syslog-path.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1061, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/syslog-path.h", + "occurrence_id": "corpus-0430", + "origin_position": null, + "sha256": "eef9f540e38365941ad2dc3a36db6cd7612d9e79b691dc155081dd9b35de7efb" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 0, + "delimiter": "angle", + "directive_physical_line": 23, + "filename": "bits/syslog-decl.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 23 + }, + { + "conditional_depth": 0, + "delimiter": "angle", + "directive_physical_line": 25, + "filename": "bits/floatn.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 25 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 27, + "filename": "bits/syslog-ldbl.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 11, + "physical_line": 27 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/syslog.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1695, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/syslog.h", + "occurrence_id": "corpus-0431", + "origin_position": null, + "sha256": "2e7d33ed75b8be245776f270a78a1956d1aaa95af4aa80df9b7c88679ae45fd1" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/sysmacros.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 2953, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/sysmacros.h", + "occurrence_id": "corpus-0432", + "origin_position": null, + "sha256": "ce4b410a5c1bb6b412025a9e7ef1da880c8ef802530660d7b43638ab7f36ac8a" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/termios-baud.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1824, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/termios-baud.h", + "occurrence_id": "corpus-0433", + "origin_position": null, + "sha256": "1d8649bed983243b0d08ff8b25972d1ff76452383dca8b795e1a02acfc8e0669" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/termios-c_cc.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1279, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/termios-c_cc.h", + "occurrence_id": "corpus-0434", + "origin_position": null, + "sha256": "4414ed57966843e0114a112bc96fcca5e6109aa202cf98237e107dc05f8604ec" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/termios-c_cflag.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1283, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/termios-c_cflag.h", + "occurrence_id": "corpus-0435", + "origin_position": null, + "sha256": "456ece5bd574c208694df815157863ea9bcbbe630bcf6f58925ec5d83e562b84" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/termios-c_iflag.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1936, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/termios-c_iflag.h", + "occurrence_id": "corpus-0436", + "origin_position": null, + "sha256": "490c3c882c1df048d3e924586986b36abcbb6a389290f206c223d09322a73a21" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/termios-c_lflag.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 2594, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/termios-c_lflag.h", + "occurrence_id": "corpus-0437", + "origin_position": null, + "sha256": "6c550c5afe209cce3ea88b7caae7931f2e42408a74ceab56297df40718b0abf5" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/termios-c_oflag.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 2822, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/termios-c_oflag.h", + "occurrence_id": "corpus-0438", + "origin_position": null, + "sha256": "3a0d7712bc87d0d908edad50eb7c0c417ec8714cc21af7970631360275026d0a" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/termios-misc.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 969, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/termios-misc.h", + "occurrence_id": "corpus-0439", + "origin_position": null, + "sha256": "04009f6c6cf4d3371cab73d1ef0a85bf09279777928956242b0180407cc51ab2" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/termios-struct.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1433, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/termios-struct.h", + "occurrence_id": "corpus-0440", + "origin_position": null, + "sha256": "1e3ecaecb82ea06503e486c815fae09785e7f6529fc7dbf34fc5ddd32670afa3" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/termios-tcflow.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1062, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/termios-tcflow.h", + "occurrence_id": "corpus-0441", + "origin_position": null, + "sha256": "4b859f3f7b97f2534fcd2e89e5e25ebeb91c39bd0abd75bc3d5aa812ded718e9" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 0, + "delimiter": "angle", + "directive_physical_line": 27, + "filename": "bits/termios-struct.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 27 + }, + { + "conditional_depth": 0, + "delimiter": "angle", + "directive_physical_line": 28, + "filename": "bits/termios-c_cc.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 28 + }, + { + "conditional_depth": 0, + "delimiter": "angle", + "directive_physical_line": 29, + "filename": "bits/termios-c_iflag.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 29 + }, + { + "conditional_depth": 0, + "delimiter": "angle", + "directive_physical_line": 30, + "filename": "bits/termios-c_oflag.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 30 + }, + { + "conditional_depth": 0, + "delimiter": "angle", + "directive_physical_line": 53, + "filename": "bits/termios-baud.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 53 + }, + { + "conditional_depth": 0, + "delimiter": "angle", + "directive_physical_line": 55, + "filename": "bits/termios-c_cflag.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 55 + }, + { + "conditional_depth": 0, + "delimiter": "angle", + "directive_physical_line": 56, + "filename": "bits/termios-c_lflag.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 56 + }, + { + "conditional_depth": 0, + "delimiter": "angle", + "directive_physical_line": 74, + "filename": "bits/termios-tcflow.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 74 + }, + { + "conditional_depth": 0, + "delimiter": "angle", + "directive_physical_line": 76, + "filename": "bits/termios-misc.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 76 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/termios.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 2168, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/termios.h", + "occurrence_id": "corpus-0442", + "origin_position": null, + "sha256": "3d4886643c157d693a83093e819cc26db429b645f3e858830c29fe370e215da6" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 44, + "filename": "bits/pthreadtypes-arch.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 44 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 46, + "filename": "bits/atomic_wide_counter.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 46 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 76, + "filename": "bits/struct_mutex.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 76 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 89, + "filename": "bits/struct_rwlock.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 89 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 3912, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h", + "occurrence_id": "corpus-0443", + "origin_position": null, + "sha256": "21f6f60e8a28e6e0166f0b3685d939774b553a27d1f221559f2d8176b8fb2358" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 26, + "filename": "bits/types.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 26 + }, + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 73, + "filename": "bits/timex.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 11, + "physical_line": 73 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/time.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 3326, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/time.h", + "occurrence_id": "corpus-0444", + "origin_position": null, + "sha256": "458eb529d0a451d27dfa294b6da982be2f1300f46884da2fa9bee5ad8efc7063" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/time64.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1340, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/time64.h", + "occurrence_id": "corpus-0445", + "origin_position": null, + "sha256": "2be9170ce3621ea6062f10edef68bbc2db09bb454ec4397534263dd37b8f1f6a" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/timerfd.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1103, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/timerfd.h", + "occurrence_id": "corpus-0446", + "origin_position": null, + "sha256": "209efb09ad00ae4adcc23758b0ac7ded98e9510959b82ab04ef69ca65d40e2df" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 0, + "delimiter": "angle", + "directive_physical_line": 19, + "filename": "bits/wordsize.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 19 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/timesize.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1109, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/timesize.h", + "occurrence_id": "corpus-0447", + "origin_position": null, + "sha256": "8b686ad5fec2c4d6f759a6594d7c216337774d059623677547b7e182cc5269ae" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 21, + "filename": "bits/types.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 21 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 22, + "filename": "bits/types/struct_timeval.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 22 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/timex.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 6198, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/timex.h", + "occurrence_id": "corpus-0448", + "origin_position": null, + "sha256": "1a214847fbda711b4a14f211961593fcb2f5879b16f2f7115b2069dcca83acd3" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/types/FILE.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 180, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/types/FILE.h", + "occurrence_id": "corpus-0449", + "origin_position": null, + "sha256": "37515f78be386f2edad4746f2947c928f480728c56d9a94e25302ebbdaef3c96" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/types/__FILE.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 110, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/types/__FILE.h", + "occurrence_id": "corpus-0450", + "origin_position": null, + "sha256": "26c909942e8a6bc82725e9c402f393aed9e32d94190257ddf71e1b5f819b4e5e" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 4, + "filename": "bits/types.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 4 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 5, + "filename": "bits/types/__mbstate_t.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 5 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 410, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h", + "occurrence_id": "corpus-0451", + "origin_position": null, + "sha256": "8afae3abf006beb39fd9d4d4bae38745cdf08a91e6217ddf25833c8d4b04751b" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 4, + "filename": "bits/types.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 4 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 5, + "filename": "bits/types/__mbstate_t.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 5 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 381, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h", + "occurrence_id": "corpus-0452", + "origin_position": null, + "sha256": "603e58ab31ed75b7e0ab09a2ca94e99955f7fbc63310466321ce27c906227eb4" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/types/__locale_t.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1661, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/types/__locale_t.h", + "occurrence_id": "corpus-0453", + "origin_position": null, + "sha256": "0edc68d4ae8fd45f8127c6a8fe6936b6312f2835951a3157e51ad8b5dbcb46ad" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 564, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h", + "occurrence_id": "corpus-0454", + "origin_position": null, + "sha256": "c561df72d5b987ccbd022059fdb1bcb6899c3e94b403997a0576ef3e1afb0f94" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 206, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h", + "occurrence_id": "corpus-0455", + "origin_position": null, + "sha256": "05291a7d38bb1d0da1ed01c09fe85fa2b1f4d5bc708e06bb930efec672db08d5" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/types/__sigval_t.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1148, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/types/__sigval_t.h", + "occurrence_id": "corpus-0456", + "origin_position": null, + "sha256": "f0556deb7a832bc9bcc600ada0da3d15c99aad85b2ea2729c4d7c5830e40cc0c" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 4, + "filename": "bits/types.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 4 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/types/clock_t.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 143, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/types/clock_t.h", + "occurrence_id": "corpus-0457", + "origin_position": null, + "sha256": "81e60e8a8d99b28bc723c14b156d7f7fc8ff663d98a857a3f5aea90431f577e3" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 4, + "filename": "bits/types.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 4 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/types/clockid_t.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 174, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/types/clockid_t.h", + "occurrence_id": "corpus-0458", + "origin_position": null, + "sha256": "dcd64d184855b245e5c7acf21910a0aaca590f1faf094e400da5d30551d11eb0" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 21, + "filename": "bits/types.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 21 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 2725, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h", + "occurrence_id": "corpus-0459", + "origin_position": null, + "sha256": "aa4c25db20daf845f5d3e57d8aeba4011419c4ed1881992b73229a3f66a5c5c4" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/types/error_t.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 894, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/types/error_t.h", + "occurrence_id": "corpus-0460", + "origin_position": null, + "sha256": "f8fcd12a0bf9a17df83fd497c7d8e60e85e1594103642de1d6d7dbb5478ac9a0" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/types/idtype_t.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 369, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/types/idtype_t.h", + "occurrence_id": "corpus-0461", + "origin_position": null, + "sha256": "749f4d26f0d851e1fa4056d28c57e9fa8c664a99ee852857e530f1c4e60148cf" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 22, + "filename": "bits/types/__locale_t.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 22 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/types/locale_t.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 983, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/types/locale_t.h", + "occurrence_id": "corpus-0462", + "origin_position": null, + "sha256": "1f98dd4e58defd8d3a8b5f7e20d59f6cf1b728bbfb4102578234b822db8e6853" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 4, + "filename": "bits/types/__mbstate_t.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 4 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/types/mbstate_t.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 135, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/types/mbstate_t.h", + "occurrence_id": "corpus-0463", + "origin_position": null, + "sha256": "c0608830973c4e1a71219e477b470b7ed77b211dc870410776ec13a1b7bb759a" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 4, + "filename": "sys/types.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 4 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 5, + "filename": "netinet/in.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 5 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/types/res_state.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 2010, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/types/res_state.h", + "occurrence_id": "corpus-0464", + "origin_position": null, + "sha256": "e991567a7a1ae6b19400bafe3b61f3e8b15172cbdade040e48eaf1bf5b1f3815" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 4, + "filename": "bits/types.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 4 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/types/sig_atomic_t.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 272, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/types/sig_atomic_t.h", + "occurrence_id": "corpus-0465", + "origin_position": null, + "sha256": "8c44b91c2eb6e509905e1becec6b98f8ac006709bfa5d85d86e34a46eb9013cc" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 4, + "filename": "bits/wordsize.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 4 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 5, + "filename": "bits/types.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 5 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 6, + "filename": "bits/types/__sigval_t.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 6 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/types/sigevent_t.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1204, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/types/sigevent_t.h", + "occurrence_id": "corpus-0466", + "origin_position": null, + "sha256": "7125083b8096dd146e6498a61f38bf3bc7215c1c9237e92469550bb355545bab" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 4, + "filename": "bits/wordsize.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 4 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 5, + "filename": "bits/types.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 5 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 6, + "filename": "bits/types/__sigval_t.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 6 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 16, + "filename": "bits/siginfo-arch.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 16 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/types/siginfo_t.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 3892, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/types/siginfo_t.h", + "occurrence_id": "corpus-0467", + "origin_position": null, + "sha256": "88b1392b88af3a08d908866f4e9c5650c5cddb0c8e021b0a3f8293cef6616feb" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 4, + "filename": "bits/types/__sigset_t.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 4 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/types/sigset_t.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 195, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/types/sigset_t.h", + "occurrence_id": "corpus-0468", + "origin_position": null, + "sha256": "3db5ded9d98a694e8c7196a06690b2e816ec6bb82689940d281f6504533f37e1" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 4, + "filename": "bits/types/__sigval_t.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 4 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/types/sigval_t.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 599, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/types/sigval_t.h", + "occurrence_id": "corpus-0469", + "origin_position": null, + "sha256": "7d94a894bed0b9490967e8dbcd53725c0f2af9559e58d4b19bd14d3707974ee3" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 23, + "filename": "stddef.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 23 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/types/stack_t.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1062, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/types/stack_t.h", + "occurrence_id": "corpus-0470", + "origin_position": null, + "sha256": "02b6bb18391305b9311776f1c11b5b9788f3f9ebf804913f7691dd669b568b0b" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 33, + "filename": "bits/types.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 33 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 4104, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h", + "occurrence_id": "corpus-0471", + "origin_position": null, + "sha256": "79ad5bbe87e2be78d83990f8e28e0b20163e7ee03b733dc7cbea4eed94b8314f" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 22, + "filename": "bits/setjmp.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 22 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 23, + "filename": "bits/types/__sigset_t.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 23 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/types/struct___jmp_buf_tag.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1467, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/types/struct___jmp_buf_tag.h", + "occurrence_id": "corpus-0472", + "origin_position": null, + "sha256": "e54be99f52cb6e0b8ffacb2a91db83b8129863381f45c952582faf30a7fce6c5" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 23, + "filename": "stddef.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 23 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/types/struct_iovec.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1066, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/types/struct_iovec.h", + "occurrence_id": "corpus-0473", + "origin_position": null, + "sha256": "a78a5793a7cfa80ddd258a6cee637385e67b2b230500a24c1ded4060d604fe37" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 4, + "filename": "bits/types.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 4 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 5, + "filename": "bits/types/struct_timespec.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 5 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 288, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/types/struct_itimerspec.h", + "occurrence_id": "corpus-0474", + "origin_position": null, + "sha256": "d6299fbc46fc57e7d14635cd5cf69125710ed021ab7305586c84644a03a39f8e" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 28, + "filename": "bits/types/struct_msqid64_ds_helper.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 11, + "physical_line": 28 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/types/struct_msqid64_ds.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1094, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/types/struct_msqid64_ds.h", + "occurrence_id": "corpus-0475", + "origin_position": null, + "sha256": "983d4712eb0f3f926f74e71b9c2b9f257deb52be030b078c7ea8f1f9d12e5b42" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/types/struct_msqid64_ds_helper.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1522, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/types/struct_msqid64_ds_helper.h", + "occurrence_id": "corpus-0476", + "origin_position": null, + "sha256": "10e72e5bfe48fa935568c5f88ecd1c4e58b8a3d4c91246780cd824b0c9d98ac7" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 0, + "delimiter": "angle", + "directive_physical_line": 23, + "filename": "bits/types/time_t.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 23 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 30, + "filename": "bits/types/struct_msqid64_ds_helper.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 11, + "physical_line": 30 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/types/struct_msqid_ds.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 2127, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/types/struct_msqid_ds.h", + "occurrence_id": "corpus-0477", + "origin_position": null, + "sha256": "9540e11e5bcebe26bcbf26d28dc90c3ee9b10772ac3736c2b3608c015328bdbc" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/types/struct_osockaddr.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 274, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/types/struct_osockaddr.h", + "occurrence_id": "corpus-0478", + "origin_position": null, + "sha256": "63619500aa6095b881f62d7a255bd31eeeab9a829cf34ec40e20a62729323efc" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 22, + "filename": "bits/types.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 22 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 23, + "filename": "bits/types/struct_timeval.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 23 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/types/struct_rusage.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 4121, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/types/struct_rusage.h", + "occurrence_id": "corpus-0479", + "origin_position": null, + "sha256": "1f6c38afa7d5397789aaff400b4704db7bff67cd0050f01d95d2aea50d26e2ef" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1073, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/types/struct_sched_param.h", + "occurrence_id": "corpus-0480", + "origin_position": null, + "sha256": "737a8707aef29fbf80889e4a4411aff93d66dfe46b89b5d25fbc79c1f383fbdc" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 28, + "filename": "bits/types/struct_semid64_ds_helper.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 11, + "physical_line": 28 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/types/struct_semid64_ds.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1109, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/types/struct_semid64_ds.h", + "occurrence_id": "corpus-0481", + "origin_position": null, + "sha256": "081dcf8be3351646ac9c576f0f86163efbcfcbb8b1568c36f09aa75238ba71f3" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/types/struct_semid64_ds_helper.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1212, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/types/struct_semid64_ds_helper.h", + "occurrence_id": "corpus-0482", + "origin_position": null, + "sha256": "a75ac4b605e0c897d7cf35b22707365aa8038e83ddafab47b5502f057b31f800" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 27, + "filename": "bits/types/struct_semid64_ds_helper.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 11, + "physical_line": 27 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/types/struct_semid_ds.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1518, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/types/struct_semid_ds.h", + "occurrence_id": "corpus-0483", + "origin_position": null, + "sha256": "a6ca3f0d44f296e06599a34d71af6892f3517f40024f3f91cc310d8298e52953" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 28, + "filename": "bits/types/struct_shmid64_ds_helper.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 11, + "physical_line": 28 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/types/struct_shmid64_ds.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1111, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/types/struct_shmid64_ds.h", + "occurrence_id": "corpus-0484", + "origin_position": null, + "sha256": "43d45fb228deeaaa1fda068cc0481c57c0c336cf030e28254aeeabf44eece5cb" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/types/struct_shmid64_ds_helper.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1353, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/types/struct_shmid64_ds_helper.h", + "occurrence_id": "corpus-0485", + "origin_position": null, + "sha256": "4a3fd6f4bf3f4dd2b40926e7fda72aeb8082a3608d2dd8ade54424926c036975" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 27, + "filename": "bits/types/struct_shmid64_ds_helper.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 11, + "physical_line": 27 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/types/struct_shmid_ds.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1993, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/types/struct_shmid_ds.h", + "occurrence_id": "corpus-0486", + "origin_position": null, + "sha256": "7b56128b88612225a29a10d1644cbf3c1289b60877472fdb09b2222885cfc494" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/types/struct_sigstack.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1073, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/types/struct_sigstack.h", + "occurrence_id": "corpus-0487", + "origin_position": null, + "sha256": "2f56e65bbf7ad26a8eb5d73f772b7e3c7ece935bb4a9f7e92ae5a4a05d22984c" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/types/struct_statx.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1897, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/types/struct_statx.h", + "occurrence_id": "corpus-0488", + "origin_position": null, + "sha256": "d414d628034f1efb33effd2bbc85d2c0d1be9ea46d52cdc48fd99a93ecaa8acd" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/types/struct_statx_timestamp.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1202, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/types/struct_statx_timestamp.h", + "occurrence_id": "corpus-0489", + "origin_position": null, + "sha256": "b6b2d9c9110816ecbed3a6e1b7db6a581d62f8abb93b250a308ece977fe01d7c" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 4, + "filename": "bits/types/time_t.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 4 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/types/struct_timeb.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 413, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/types/struct_timeb.h", + "occurrence_id": "corpus-0490", + "origin_position": null, + "sha256": "3c2babd4efd77812403b34a534dbc90bf1092e89ed46d16a1389bff1fe21a199" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 5, + "filename": "bits/types.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 5 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 6, + "filename": "bits/endian.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 6 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 7, + "filename": "bits/types/time_t.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 7 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 867, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h", + "occurrence_id": "corpus-0491", + "origin_position": null, + "sha256": "8e7e964087b9c7638be2b5fb0fa01ceab43e4af8393b805b54ac2bd8642a1b98" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 4, + "filename": "bits/types.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 4 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 411, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h", + "occurrence_id": "corpus-0492", + "origin_position": null, + "sha256": "d2fbcbcb4cc072a11380c826e3c8d58ca08df21e8a2436a3fd9a64ad8b4acd0c" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 4, + "filename": "bits/types.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 4 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 760, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h", + "occurrence_id": "corpus-0493", + "origin_position": null, + "sha256": "e7bdda3f42eb0633850ed150fef0a0cf6193cbba8fa740e7505925424a595566" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 4, + "filename": "bits/types.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 4 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/types/time_t.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 203, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/types/time_t.h", + "occurrence_id": "corpus-0494", + "origin_position": null, + "sha256": "721a557cff3ed308c69719a44ba8f7cd9536f6c602fb8f1b1eea8ed6749ee37d" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 4, + "filename": "bits/types.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 4 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/types/timer_t.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 159, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/types/timer_t.h", + "occurrence_id": "corpus-0495", + "origin_position": null, + "sha256": "d96a2452da0d933941273d11d1048ea525f033306892835b0a7a0999b13853aa" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/types/wint_t.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 796, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/types/wint_t.h", + "occurrence_id": "corpus-0496", + "origin_position": null, + "sha256": "7321a39e4baa04e5d730bfe4e52d00ce82f2ae62dbd8292a4a6a3073b6ae3593" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 26, + "filename": "features.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 26 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 27, + "filename": "bits/wordsize.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 27 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 28, + "filename": "bits/timesize.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 28 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 141, + "filename": "bits/typesizes.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 141 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 142, + "filename": "bits/time64.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 142 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/types.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 8806, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/types.h", + "occurrence_id": "corpus-0497", + "origin_position": null, + "sha256": "371847ed3adab1c19db392034f6a22407d321b1dc5f2440563f4b0b8b6c5386b" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/typesizes.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 3737, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/typesizes.h", + "occurrence_id": "corpus-0498", + "origin_position": null, + "sha256": "047ee5ab17a95364c4b0f14c3eb0750e84e457c408f9a65a6c225ece585e0c14" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 26, + "filename": "bits/types.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 26 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/uintn-identity.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1542, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/uintn-identity.h", + "occurrence_id": "corpus-0499", + "origin_position": null, + "sha256": "f67180898ee0ea2b0d521d38d06eb80f9a28b931399ad37ffcec2c9bcbd24f37" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/uio-ext.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1923, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/uio-ext.h", + "occurrence_id": "corpus-0500", + "origin_position": null, + "sha256": "fef6dc6e659556e7ce73db41cc3208fa39ed77fd9163ebe05a3be357e3632bbd" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/uio_lim.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1385, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/uio_lim.h", + "occurrence_id": "corpus-0501", + "origin_position": null, + "sha256": "2f157ab18180169d3ab9af0710daaf17386eb248c7eb48a944348e66c45d40bf" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/unistd-decl.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 8687, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/unistd-decl.h", + "occurrence_id": "corpus-0502", + "origin_position": null, + "sha256": "012f7472dc39ca52b30cc9f6ad6e6c0f06f5591c07880061b32cc86cee622f5b" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 0, + "delimiter": "angle", + "directive_physical_line": 23, + "filename": "bits/unistd-decl.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 11, + "physical_line": 23 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/unistd.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 4488, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/unistd.h", + "occurrence_id": "corpus-0503", + "origin_position": null, + "sha256": "dd205e3ecb4183cf169ea1ee85233e968c50e3fc332f25bc71d5876dc822fde7" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 2, + "delimiter": "quote", + "directive_physical_line": 37, + "filename": "linux/close_range.h", + "kind": "__has_include", + "lookup_only": true, + "origin_position": null, + "phase2_column": 21, + "physical_line": 37 + }, + { + "conditional_depth": 3, + "delimiter": "quote", + "directive_physical_line": 38, + "filename": "linux/close_range.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 12, + "physical_line": 38 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/unistd_ext.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 2035, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/unistd_ext.h", + "occurrence_id": "corpus-0504", + "origin_position": null, + "sha256": "cbc2c3c1c89817f865595773d14f6554f88ce8a6a6cae99f2791c0d00a2ca60a" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 0, + "delimiter": "angle", + "directive_physical_line": 23, + "filename": "paths.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 23 + }, + { + "conditional_depth": 0, + "delimiter": "angle", + "directive_physical_line": 24, + "filename": "sys/time.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 24 + }, + { + "conditional_depth": 0, + "delimiter": "angle", + "directive_physical_line": 25, + "filename": "sys/types.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 25 + }, + { + "conditional_depth": 0, + "delimiter": "angle", + "directive_physical_line": 26, + "filename": "bits/wordsize.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 26 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/utmp.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 4067, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/utmp.h", + "occurrence_id": "corpus-0505", + "origin_position": null, + "sha256": "aff0ea40daed99131da54872b68d6e3cc775c5a3813b2b073e6529ec021bc273" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 0, + "delimiter": "angle", + "directive_physical_line": 23, + "filename": "bits/types.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 23 + }, + { + "conditional_depth": 0, + "delimiter": "angle", + "directive_physical_line": 24, + "filename": "sys/time.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 24 + }, + { + "conditional_depth": 0, + "delimiter": "angle", + "directive_physical_line": 25, + "filename": "bits/wordsize.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 25 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 29, + "filename": "paths.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 11, + "physical_line": 29 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/utmpx.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 3578, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/utmpx.h", + "occurrence_id": "corpus-0506", + "origin_position": null, + "sha256": "e96305473fc6065c1a18a226f379f7eda007a9f2b37022807c1f9f84533a3a50" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/utsname.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1213, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/utsname.h", + "occurrence_id": "corpus-0507", + "origin_position": null, + "sha256": "5632f54a85d6c845c6df68184fd98c3b8910f01ab956afc091067983ed2c3942" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/waitflags.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1697, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/waitflags.h", + "occurrence_id": "corpus-0508", + "origin_position": null, + "sha256": "c1f4b1268f7ed37c33b42020ae59934d7c8073f9fef0740312cc80cdf40b08b8" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/waitstatus.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 2287, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/waitstatus.h", + "occurrence_id": "corpus-0509", + "origin_position": null, + "sha256": "16aa0bd73a56cbb6cbc18095bd7a665bf9795196d056b0ec307b049f3871186c" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/wchar-ldbl.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 3945, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/wchar-ldbl.h", + "occurrence_id": "corpus-0510", + "origin_position": null, + "sha256": "69c99c534012da53d208539b6a316cf976804e925219477136a92c6d1bdd2604" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/wchar.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1906, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/wchar.h", + "occurrence_id": "corpus-0511", + "origin_position": null, + "sha256": "893fa450527ce645f17922788097d5fe331e2a53012bab4e724d8a1f63e21aa2" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/wchar2-decl.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 11461, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/wchar2-decl.h", + "occurrence_id": "corpus-0512", + "origin_position": null, + "sha256": "6ad27ddc21bb1cc01eaf7ffcc7375feaef119977831375436ff3183a297174cf" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/wchar2.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 9433, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/wchar2.h", + "occurrence_id": "corpus-0513", + "origin_position": null, + "sha256": "8a5fdd43cb94342ed56632dce01be24f5037197f0d0f6d8641b3f7d3b6784b6e" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 30, + "filename": "bits/types.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 30 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 31, + "filename": "bits/types/wint_t.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 31 + }, + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 45, + "filename": "bits/endian.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 12, + "physical_line": 45 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/wctype-wchar.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 6307, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/wctype-wchar.h", + "occurrence_id": "corpus-0514", + "origin_position": null, + "sha256": "a52c65766f5bab399a0bc7bdab67722480a8bec7929a6c56c4db340b57957b21" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/wordsize.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 442, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/wordsize.h", + "occurrence_id": "corpus-0515", + "origin_position": null, + "sha256": "716d8459074e2a082d65a28192b32eddbfd7587348372395b1c283a723ae4c18" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 64, + "filename": "bits/uio_lim.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 64 + }, + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 140, + "filename": "bits/wordsize.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 11, + "physical_line": 140 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/bits/xopen_lim.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 3858, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/bits/xopen_lim.h", + "occurrence_id": "corpus-0516", + "origin_position": null, + "sha256": "720cc9c5c2f81802882996bd20be16d6ddf0a19c95021fd6f82f190f44065cd0" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 57, + "filename": "features.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 57 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/fpu_control.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 3553, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/fpu_control.h", + "occurrence_id": "corpus-0517", + "origin_position": null, + "sha256": "97625fd1108ef8b55303394f4f098ac4591584baa06202111352a3214aba18c0" + }, + "supported_language_scan": false, + "unsupported_frontier": [ + { + "code": "unsupported_assembler_construct", + "detail": "", + "form": "#define _FPU_GETCW(cw) __asm__ __volatile__ (\"fnstcw %0\" : \"=m\" (*&cw))", + "original_physical_line_bytes_latin1": "#define _FPU_GETCW(cw) __asm__ __volatile__ (\"fnstcw %0\" : \"=m\" (*&cw))", + "physical_line": 102 + }, + { + "code": "unsupported_assembler_construct", + "detail": "", + "form": "#define _FPU_SETCW(cw) __asm__ __volatile__ (\"fldcw %0\" : : \"m\" (*&cw))", + "original_physical_line_bytes_latin1": "#define _FPU_SETCW(cw) __asm__ __volatile__ (\"fldcw %0\" : : \"m\" (*&cw))", + "physical_line": 103 + } + ] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/gnu/lib-names-64.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1434, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/gnu/lib-names-64.h", + "occurrence_id": "corpus-0518", + "origin_position": null, + "sha256": "25589f828010723a7f97d2e815445b81d74013dc10f7fda335ac98cd7661055d" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 8, + "filename": "gnu/lib-names-32.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 11, + "physical_line": 8 + }, + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 11, + "filename": "gnu/lib-names-64.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 11, + "physical_line": 11 + }, + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 14, + "filename": "gnu/lib-names-x32.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 11, + "physical_line": 14 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/gnu/lib-names.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 467, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/gnu/lib-names.h", + "occurrence_id": "corpus-0519", + "origin_position": null, + "sha256": "8dac643de94fca728867862466c959272fd5cf4ff8c74abd6e17e9068a4ca115" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 22, + "filename": "features.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 22 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/gnu/libc-version.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1264, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/gnu/libc-version.h", + "occurrence_id": "corpus-0520", + "origin_position": null, + "sha256": "bf41dfb151e797b92fdaaaa9e91b804c9e7dadddc2310f357f896b5ac3ad2477" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/gnu/stubs-64.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 481, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/gnu/stubs-64.h", + "occurrence_id": "corpus-0521", + "origin_position": null, + "sha256": "0b6ab3e2ed3ba79b30fe6ba81a68fc41f57965b8d56662763633431b703c9289" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 7, + "filename": "gnu/stubs-32.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 11, + "physical_line": 7 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 10, + "filename": "gnu/stubs-64.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 11, + "physical_line": 10 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 13, + "filename": "gnu/stubs-x32.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 11, + "physical_line": 13 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/gnu/stubs.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 384, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/gnu/stubs.h", + "occurrence_id": "corpus-0522", + "origin_position": null, + "sha256": "ef444295a0a9e8f5c40918399a00cc91ba0bd79774110cdf6e652baa6cfadb2e" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 21, + "filename": "features.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 21 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 23, + "filename": "bits/endian.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 23 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/ieee754.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 4916, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/ieee754.h", + "occurrence_id": "corpus-0523", + "origin_position": null, + "sha256": "5f1cb37491dba3a3fc0b2559ea83255db62580c6b0387887fca85c2b7dfdd924" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 21, + "filename": "sys/types.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 21 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 22, + "filename": "stdint.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 22 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 23, + "filename": "bits/endian.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 23 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 24, + "filename": "bits/types/time_t.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 24 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/sys/acct.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 3383, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/sys/acct.h", + "occurrence_id": "corpus-0524", + "origin_position": null, + "sha256": "cbfea703e06e3defc1c44b828b2749b0746da44eafef4781736f443879a0911b" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 22, + "filename": "elf.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 22 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 23, + "filename": "sys/cdefs.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 23 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 24, + "filename": "bits/hwcap.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 24 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/sys/auxv.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1260, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/sys/auxv.h", + "occurrence_id": "corpus-0525", + "origin_position": null, + "sha256": "0f204938fcb5b7641d974d3d6c8ae677da1dbbeb6a79c0e3f10c1d4e1c7fa01c" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 0, + "delimiter": "angle", + "directive_physical_line": 3, + "filename": "sys/types.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 3 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/sys/bitypes.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 86, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/sys/bitypes.h", + "occurrence_id": "corpus-0526", + "origin_position": null, + "sha256": "175f3c41f9db1d6df859fcc13aeb2569a47198c52f219d889ab2679b693d7acc" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 24, + "filename": "features.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 11, + "physical_line": 24 + }, + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 576, + "filename": "bits/wordsize.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 11, + "physical_line": 576 + }, + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 577, + "filename": "bits/long-double.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 11, + "physical_line": 577 + } + ], + "full_C05": false, + "lexical_diagnostics": [ + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "# define __LDBL_REDIR(name, proto) __LDBL_REDIR1 (name, proto, __nldbl_##name)", + "physical_line": 616 + }, + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "# define __LDBL_REDIR_NTH(name, proto) __LDBL_REDIR1_NTH (name, proto, __nldbl_##name)", + "physical_line": 619 + }, + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "# define __REDIRECT_LDBL(name, proto, alias) __LDBL_REDIR1 (name, proto, __nldbl_##alias)", + "physical_line": 627 + }, + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "# define __REDIRECT_NTH_LDBL(name, proto, alias) __LDBL_REDIR1_NTH (name, proto, __nldbl_##alias)", + "physical_line": 629 + } + ], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/sys/cdefs.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 27011, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/sys/cdefs.h", + "occurrence_id": "corpus-0527", + "origin_position": null, + "sha256": "173afb522c6877dda3be1c93742c2061cd6e748ce395d2b3ae833fb49bfbfc4f" + }, + "supported_language_scan": false, + "unsupported_frontier": [ + { + "code": "potential_synthesized_file_operator", + "detail": "may synthesize _Pragma,__has_include,__has_include_next,asm,__asm,__asm__", + "form": "#define __CONCAT(x,y)\tx ## y", + "original_physical_line_bytes_latin1": "#define __CONCAT(x,y)\tx ## y", + "physical_line": 131 + }, + { + "code": "potential_synthesized_file_operator", + "detail": "interior macro argument may split paste chains", + "form": "#define __glibc_fortify(f, __l, __s, __osz, ...) (__glibc_safe_or_unknown_len (__l, __s, __osz)\t\t\t ? __ ## f ## _alias (__VA_ARGS__)\t\t\t\t\t : (__glibc_unsafe_len (__l, __s, __osz)\t\t\t\t ? __ ## f ## _chk_warn (__VA_ARGS__, __osz)\t\t\t : __ ## f ## _chk (__VA_ARGS__, __osz)))", + "original_physical_line_bytes_latin1": " ? __ ## f ## _alias (__VA_ARGS__)\t\t\t\t\t \\", + "physical_line": 195 + }, + { + "code": "potential_synthesized_file_operator", + "detail": "interior macro argument may split paste chains", + "form": "#define __glibc_fortify(f, __l, __s, __osz, ...) (__glibc_safe_or_unknown_len (__l, __s, __osz)\t\t\t ? __ ## f ## _alias (__VA_ARGS__)\t\t\t\t\t : (__glibc_unsafe_len (__l, __s, __osz)\t\t\t\t ? __ ## f ## _chk_warn (__VA_ARGS__, __osz)\t\t\t : __ ## f ## _chk (__VA_ARGS__, __osz)))", + "original_physical_line_bytes_latin1": " ? __ ## f ## _chk_warn (__VA_ARGS__, __osz)\t\t\t \\", + "physical_line": 197 + }, + { + "code": "potential_synthesized_file_operator", + "detail": "interior macro argument may split paste chains", + "form": "#define __glibc_fortify(f, __l, __s, __osz, ...) (__glibc_safe_or_unknown_len (__l, __s, __osz)\t\t\t ? __ ## f ## _alias (__VA_ARGS__)\t\t\t\t\t : (__glibc_unsafe_len (__l, __s, __osz)\t\t\t\t ? __ ## f ## _chk_warn (__VA_ARGS__, __osz)\t\t\t : __ ## f ## _chk (__VA_ARGS__, __osz)))", + "original_physical_line_bytes_latin1": " : __ ## f ## _chk (__VA_ARGS__, __osz)))", + "physical_line": 198 + }, + { + "code": "potential_synthesized_file_operator", + "detail": "interior macro argument may split paste chains", + "form": "#define __glibc_fortify_n(f, __l, __s, __osz, ...) (__glibc_safe_or_unknown_len (__l, __s, __osz)\t\t\t ? __ ## f ## _alias (__VA_ARGS__)\t\t\t\t\t : (__glibc_unsafe_len (__l, __s, __osz)\t\t\t\t ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s))\t\t : __ ## f ## _chk (__VA_ARGS__, (__osz) / (__s))))", + "original_physical_line_bytes_latin1": " ? __ ## f ## _alias (__VA_ARGS__)\t\t\t\t\t \\", + "physical_line": 205 + }, + { + "code": "potential_synthesized_file_operator", + "detail": "interior macro argument may split paste chains", + "form": "#define __glibc_fortify_n(f, __l, __s, __osz, ...) (__glibc_safe_or_unknown_len (__l, __s, __osz)\t\t\t ? __ ## f ## _alias (__VA_ARGS__)\t\t\t\t\t : (__glibc_unsafe_len (__l, __s, __osz)\t\t\t\t ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s))\t\t : __ ## f ## _chk (__VA_ARGS__, (__osz) / (__s))))", + "original_physical_line_bytes_latin1": " ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s))\t\t \\", + "physical_line": 207 + }, + { + "code": "potential_synthesized_file_operator", + "detail": "interior macro argument may split paste chains", + "form": "#define __glibc_fortify_n(f, __l, __s, __osz, ...) (__glibc_safe_or_unknown_len (__l, __s, __osz)\t\t\t ? __ ## f ## _alias (__VA_ARGS__)\t\t\t\t\t : (__glibc_unsafe_len (__l, __s, __osz)\t\t\t\t ? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s))\t\t : __ ## f ## _chk (__VA_ARGS__, (__osz) / (__s))))", + "original_physical_line_bytes_latin1": " : __ ## f ## _chk (__VA_ARGS__, (__osz) / (__s))))", + "physical_line": 208 + }, + { + "code": "unsupported_assembler_construct", + "detail": "", + "form": "# define __REDIRECT(name, proto, alias) name proto __asm__ (__ASMNAME (#alias))", + "original_physical_line_bytes_latin1": "# define __REDIRECT(name, proto, alias) name proto __asm__ (__ASMNAME (#alias))", + "physical_line": 256 + }, + { + "code": "unsupported_assembler_construct", + "detail": "", + "form": "# define __REDIRECT_NTH(name, proto, alias) name proto __THROW __asm__ (__ASMNAME (#alias))", + "original_physical_line_bytes_latin1": " name proto __THROW __asm__ (__ASMNAME (#alias))", + "physical_line": 259 + }, + { + "code": "unsupported_assembler_construct", + "detail": "", + "form": "# define __REDIRECT_NTHNL(name, proto, alias) name proto __THROWNL __asm__ (__ASMNAME (#alias))", + "original_physical_line_bytes_latin1": " name proto __THROWNL __asm__ (__ASMNAME (#alias))", + "physical_line": 261 + }, + { + "code": "unsupported_assembler_construct", + "detail": "", + "form": "# define __REDIRECT_NTH(name, proto, alias) name proto __asm__ (__ASMNAME (#alias)) __THROW", + "original_physical_line_bytes_latin1": " name proto __asm__ (__ASMNAME (#alias)) __THROW", + "physical_line": 264 + }, + { + "code": "unsupported_assembler_construct", + "detail": "", + "form": "# define __REDIRECT_NTHNL(name, proto, alias) name proto __asm__ (__ASMNAME (#alias)) __THROWNL", + "original_physical_line_bytes_latin1": " name proto __asm__ (__ASMNAME (#alias)) __THROWNL", + "physical_line": 266 + }, + { + "code": "unsupported_assembler_construct", + "detail": "", + "form": "# define __LDBL_REDIR_DECL(name) extern __typeof (name) name __asm (__ASMNAME (\"__\" #name \"ieee128\"));", + "original_physical_line_bytes_latin1": " extern __typeof (name) name __asm (__ASMNAME (\"__\" #name \"ieee128\"));", + "physical_line": 586 + }, + { + "code": "unsupported_assembler_construct", + "detail": "", + "form": "# define __REDIRECT_LDBL(name, proto, alias) name proto __asm (__ASMNAME (\"__\" #alias \"ieee128\"))", + "original_physical_line_bytes_latin1": " name proto __asm (__ASMNAME (\"__\" #alias \"ieee128\"))", + "physical_line": 588 + }, + { + "code": "potential_synthesized_file_operator", + "detail": "may synthesize __has_include,__has_include_next,__asm,__asm__", + "form": "# define __LDBL_REDIR2_DECL(name) extern __typeof (__##name) __##name __asm (__ASMNAME (\"__\" #name \"ieee128\"));", + "original_physical_line_bytes_latin1": " extern __typeof (__##name) __##name \\", + "physical_line": 592 + }, + { + "code": "unsupported_assembler_construct", + "detail": "", + "form": "# define __LDBL_REDIR2_DECL(name) extern __typeof (__##name) __##name __asm (__ASMNAME (\"__\" #name \"ieee128\"));", + "original_physical_line_bytes_latin1": " __asm (__ASMNAME (\"__\" #name \"ieee128\"));", + "physical_line": 593 + }, + { + "code": "unsupported_assembler_construct", + "detail": "", + "form": "# define __LDBL_REDIR1_DECL(name, alias) extern __typeof (name) name __asm (__ASMNAME (#alias));", + "original_physical_line_bytes_latin1": " extern __typeof (name) name __asm (__ASMNAME (#alias));", + "physical_line": 598 + }, + { + "code": "potential_synthesized_file_operator", + "detail": "interior macro argument may split paste chains", + "form": "# define __REDIRECT_NTH_LDBL(name, proto, alias) __LDBL_REDIR1_NTH (name, proto, __##alias##ieee128)", + "original_physical_line_bytes_latin1": " __LDBL_REDIR1_NTH (name, proto, __##alias##ieee128)", + "physical_line": 603 + }, + { + "code": "potential_synthesized_file_operator", + "detail": "may synthesize __has_include,__has_include_next,__asm,__asm__", + "form": "# define __LDBL_REDIR2_DECL(name) extern __typeof (__##name) __##name __asm (__ASMNAME (\"__nldbl___\" #name));", + "original_physical_line_bytes_latin1": " extern __typeof (__##name) __##name __asm (__ASMNAME (\"__nldbl___\" #name));", + "physical_line": 621 + }, + { + "code": "unsupported_assembler_construct", + "detail": "", + "form": "# define __LDBL_REDIR2_DECL(name) extern __typeof (__##name) __##name __asm (__ASMNAME (\"__nldbl___\" #name));", + "original_physical_line_bytes_latin1": " extern __typeof (__##name) __##name __asm (__ASMNAME (\"__nldbl___\" #name));", + "physical_line": 621 + }, + { + "code": "unsupported_assembler_construct", + "detail": "", + "form": "# define __LDBL_REDIR1_DECL(name, alias) extern __typeof (name) name __asm (__ASMNAME (#alias));", + "original_physical_line_bytes_latin1": " extern __typeof (name) name __asm (__ASMNAME (#alias));", + "physical_line": 623 + }, + { + "code": "unsupported_assembler_construct", + "detail": "", + "form": "# define __LDBL_REDIR_DECL(name) extern __typeof (name) name __asm (__ASMNAME (\"__nldbl_\" #name));", + "original_physical_line_bytes_latin1": " extern __typeof (name) name __asm (__ASMNAME (\"__nldbl_\" #name));", + "physical_line": 625 + }, + { + "code": "unsupported_Pragma", + "detail": "", + "form": "# define __glibc_macro_warning1(message) _Pragma (#message)", + "original_physical_line_bytes_latin1": "# define __glibc_macro_warning1(message) _Pragma (#message)", + "physical_line": 653 + } + ] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/sys/debugreg.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 3576, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/sys/debugreg.h", + "occurrence_id": "corpus-0528", + "origin_position": null, + "sha256": "2e465e66a388469f6adb396636b7df7bc7526c97a831987c43747762bab337a8" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 21, + "filename": "features.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 21 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 23, + "filename": "dirent.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 23 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/sys/dir.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 922, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/sys/dir.h", + "occurrence_id": "corpus-0529", + "origin_position": null, + "sha256": "3a836b1e8a54612de9cce40303d34973a0524c4633a4c86de83866bb4bfc1575" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 26, + "filename": "sys/procfs.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 11, + "physical_line": 26 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/sys/elf.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1024, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/sys/elf.h", + "occurrence_id": "corpus-0530", + "origin_position": null, + "sha256": "b816d2477e70eab3366dc04e02dca115cc6f06a58d279323db774bce532b1ef8" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 21, + "filename": "stdint.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 21 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 22, + "filename": "sys/types.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 22 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 24, + "filename": "bits/types/sigset_t.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 24 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 25, + "filename": "bits/types/struct_timespec.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 25 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 28, + "filename": "bits/epoll.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 28 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/sys/epoll.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 5300, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/sys/epoll.h", + "occurrence_id": "corpus-0531", + "origin_position": null, + "sha256": "02152dc3b0fe7a1c71ead5e13186ddd8b5184cd4dfe6a9463c6b161f555c2d1d" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 0, + "delimiter": "angle", + "directive_physical_line": 1, + "filename": "errno.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 1 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/sys/errno.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 19, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/sys/errno.h", + "occurrence_id": "corpus-0532", + "origin_position": null, + "sha256": "6e7de80b970121f1c7092f504ec8b3595924a9b9d6880801950caa7170b6d678" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 21, + "filename": "stdint.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 21 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 24, + "filename": "bits/eventfd.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 24 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/sys/eventfd.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1400, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/sys/eventfd.h", + "occurrence_id": "corpus-0533", + "origin_position": null, + "sha256": "0ed79ecb2bea5125b9ca8e0fd789acfa6fdf31c89956c8cff995050a7d019150" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 21, + "filename": "stdint.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 21 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 22, + "filename": "linux/fanotify.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 22 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/sys/fanotify.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1292, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/sys/fanotify.h", + "occurrence_id": "corpus-0534", + "origin_position": null, + "sha256": "3247bbb10a6d9124c12e6d3c28a570a564288de527597a493e6b0d7ce7583704" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 0, + "delimiter": "angle", + "directive_physical_line": 1, + "filename": "fcntl.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 1 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/sys/fcntl.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 19, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/sys/fcntl.h", + "occurrence_id": "corpus-0535", + "origin_position": null, + "sha256": "642b8fa9ff6daf81d8a0cb22f764feed134b74dc8b84ea036ff4c220815d9832" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 21, + "filename": "features.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 21 + }, + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 24, + "filename": "fcntl.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 11, + "physical_line": 24 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/sys/file.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1675, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/sys/file.h", + "occurrence_id": "corpus-0536", + "origin_position": null, + "sha256": "0272508a06f0ae15817fbcf3019af41c78f476c816ecf5c8c3ad96c693766601" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 21, + "filename": "features.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 21 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 22, + "filename": "sys/types.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 22 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/sys/fsuid.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1188, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/sys/fsuid.h", + "occurrence_id": "corpus-0537", + "origin_position": null, + "sha256": "d85ed06150ef31d482a93aab21121e4ddc2a44a4d54fc589eb7597e91910bd16" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 35, + "filename": "features.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 35 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 37, + "filename": "sys/types.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 37 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/sys/gmon.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 6230, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/sys/gmon.h", + "occurrence_id": "corpus-0538", + "origin_position": null, + "sha256": "62668641007b7a6e7a902a9479b189c77fa035e1858e642ecde50140388b74b2" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 29, + "filename": "features.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 29 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/sys/gmon_out.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 2577, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/sys/gmon_out.h", + "occurrence_id": "corpus-0539", + "origin_position": null, + "sha256": "8d2ff63381ac97df9e2363bcf4ec4c1617a65f7989d64289a55fa5f9ad034a10" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 21, + "filename": "stdint.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 21 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 24, + "filename": "bits/inotify.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 24 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/sys/inotify.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 3901, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/sys/inotify.h", + "occurrence_id": "corpus-0540", + "origin_position": null, + "sha256": "7898f9ce9a0f38321bedfa7b4f8ec2142fb46a34a4057051783c0067faa041d4" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 21, + "filename": "features.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 21 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/sys/io.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 5086, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/sys/io.h", + "occurrence_id": "corpus-0541", + "origin_position": null, + "sha256": "032f02efd78803a0b4ec854bd01c083b92b1c63e62bd533b3d089aedaa64403d" + }, + "supported_language_scan": false, + "unsupported_frontier": [ + { + "code": "unsupported_assembler_construct", + "detail": "", + "form": " __asm__ __volatile__ (\"inb %w1,%0\":\"=a\" (_v):\"Nd\" (__port));", + "original_physical_line_bytes_latin1": " __asm__ __volatile__ (\"inb %w1,%0\":\"=a\" (_v):\"Nd\" (__port));", + "physical_line": 47 + }, + { + "code": "unsupported_assembler_construct", + "detail": "", + "form": " __asm__ __volatile__ (\"inb %w1,%0\\noutb %%al,$0x80\":\"=a\" (_v):\"Nd\" (__port));", + "original_physical_line_bytes_latin1": " __asm__ __volatile__ (\"inb %w1,%0\\noutb %%al,$0x80\":\"=a\" (_v):\"Nd\" (__port));", + "physical_line": 56 + }, + { + "code": "unsupported_assembler_construct", + "detail": "", + "form": " __asm__ __volatile__ (\"inw %w1,%0\":\"=a\" (_v):\"Nd\" (__port));", + "original_physical_line_bytes_latin1": " __asm__ __volatile__ (\"inw %w1,%0\":\"=a\" (_v):\"Nd\" (__port));", + "physical_line": 65 + }, + { + "code": "unsupported_assembler_construct", + "detail": "", + "form": " __asm__ __volatile__ (\"inw %w1,%0\\noutb %%al,$0x80\":\"=a\" (_v):\"Nd\" (__port));", + "original_physical_line_bytes_latin1": " __asm__ __volatile__ (\"inw %w1,%0\\noutb %%al,$0x80\":\"=a\" (_v):\"Nd\" (__port));", + "physical_line": 74 + }, + { + "code": "unsupported_assembler_construct", + "detail": "", + "form": " __asm__ __volatile__ (\"inl %w1,%0\":\"=a\" (_v):\"Nd\" (__port));", + "original_physical_line_bytes_latin1": " __asm__ __volatile__ (\"inl %w1,%0\":\"=a\" (_v):\"Nd\" (__port));", + "physical_line": 83 + }, + { + "code": "unsupported_assembler_construct", + "detail": "", + "form": " __asm__ __volatile__ (\"inl %w1,%0\\noutb %%al,$0x80\":\"=a\" (_v):\"Nd\" (__port));", + "original_physical_line_bytes_latin1": " __asm__ __volatile__ (\"inl %w1,%0\\noutb %%al,$0x80\":\"=a\" (_v):\"Nd\" (__port));", + "physical_line": 91 + }, + { + "code": "unsupported_assembler_construct", + "detail": "", + "form": " __asm__ __volatile__ (\"outb %b0,%w1\": :\"a\" (__value), \"Nd\" (__port));", + "original_physical_line_bytes_latin1": " __asm__ __volatile__ (\"outb %b0,%w1\": :\"a\" (__value), \"Nd\" (__port));", + "physical_line": 98 + }, + { + "code": "unsupported_assembler_construct", + "detail": "", + "form": " __asm__ __volatile__ (\"outb %b0,%w1\\noutb %%al,$0x80\": :\"a\" (__value),", + "original_physical_line_bytes_latin1": " __asm__ __volatile__ (\"outb %b0,%w1\\noutb %%al,$0x80\": :\"a\" (__value),", + "physical_line": 104 + }, + { + "code": "unsupported_assembler_construct", + "detail": "", + "form": " __asm__ __volatile__ (\"outw %w0,%w1\": :\"a\" (__value), \"Nd\" (__port));", + "original_physical_line_bytes_latin1": " __asm__ __volatile__ (\"outw %w0,%w1\": :\"a\" (__value), \"Nd\" (__port));", + "physical_line": 111 + }, + { + "code": "unsupported_assembler_construct", + "detail": "", + "form": " __asm__ __volatile__ (\"outw %w0,%w1\\noutb %%al,$0x80\": :\"a\" (__value),", + "original_physical_line_bytes_latin1": " __asm__ __volatile__ (\"outw %w0,%w1\\noutb %%al,$0x80\": :\"a\" (__value),", + "physical_line": 118 + }, + { + "code": "unsupported_assembler_construct", + "detail": "", + "form": " __asm__ __volatile__ (\"outl %0,%w1\": :\"a\" (__value), \"Nd\" (__port));", + "original_physical_line_bytes_latin1": " __asm__ __volatile__ (\"outl %0,%w1\": :\"a\" (__value), \"Nd\" (__port));", + "physical_line": 125 + }, + { + "code": "unsupported_assembler_construct", + "detail": "", + "form": " __asm__ __volatile__ (\"outl %0,%w1\\noutb %%al,$0x80\": :\"a\" (__value),", + "original_physical_line_bytes_latin1": " __asm__ __volatile__ (\"outl %0,%w1\\noutb %%al,$0x80\": :\"a\" (__value),", + "physical_line": 131 + }, + { + "code": "unsupported_assembler_construct", + "detail": "", + "form": " __asm__ __volatile__ (\"cld ; rep ; insb\":\"=D\" (__addr), \"=c\" (__count)", + "original_physical_line_bytes_latin1": " __asm__ __volatile__ (\"cld ; rep ; insb\":\"=D\" (__addr), \"=c\" (__count)", + "physical_line": 138 + }, + { + "code": "unsupported_assembler_construct", + "detail": "", + "form": " __asm__ __volatile__ (\"cld ; rep ; insw\":\"=D\" (__addr), \"=c\" (__count)", + "original_physical_line_bytes_latin1": " __asm__ __volatile__ (\"cld ; rep ; insw\":\"=D\" (__addr), \"=c\" (__count)", + "physical_line": 145 + }, + { + "code": "unsupported_assembler_construct", + "detail": "", + "form": " __asm__ __volatile__ (\"cld ; rep ; insl\":\"=D\" (__addr), \"=c\" (__count)", + "original_physical_line_bytes_latin1": " __asm__ __volatile__ (\"cld ; rep ; insl\":\"=D\" (__addr), \"=c\" (__count)", + "physical_line": 152 + }, + { + "code": "unsupported_assembler_construct", + "detail": "", + "form": " __asm__ __volatile__ (\"cld ; rep ; outsb\":\"=S\" (__addr), \"=c\" (__count)", + "original_physical_line_bytes_latin1": " __asm__ __volatile__ (\"cld ; rep ; outsb\":\"=S\" (__addr), \"=c\" (__count)", + "physical_line": 160 + }, + { + "code": "unsupported_assembler_construct", + "detail": "", + "form": " __asm__ __volatile__ (\"cld ; rep ; outsw\":\"=S\" (__addr), \"=c\" (__count)", + "original_physical_line_bytes_latin1": " __asm__ __volatile__ (\"cld ; rep ; outsw\":\"=S\" (__addr), \"=c\" (__count)", + "physical_line": 168 + }, + { + "code": "unsupported_assembler_construct", + "detail": "", + "form": " __asm__ __volatile__ (\"cld ; rep ; outsl\":\"=S\" (__addr), \"=c\" (__count)", + "original_physical_line_bytes_latin1": " __asm__ __volatile__ (\"cld ; rep ; outsl\":\"=S\" (__addr), \"=c\" (__count)", + "physical_line": 176 + } + ] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 21, + "filename": "features.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 21 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 26, + "filename": "bits/ioctls.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 26 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 29, + "filename": "bits/ioctl-types.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 29 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 36, + "filename": "sys/ttydefaults.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 36 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/sys/ioctl.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 2027, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/sys/ioctl.h", + "occurrence_id": "corpus-0542", + "origin_position": null, + "sha256": "db0c5da6516a75dfe264c71171799bb302fb62da8ef9142122de0fade0ee900f" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 21, + "filename": "features.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 21 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 24, + "filename": "bits/ipctypes.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 24 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 25, + "filename": "bits/ipc.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 25 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/sys/ipc.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1462, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/sys/ipc.h", + "occurrence_id": "corpus-0543", + "origin_position": null, + "sha256": "a3d6a4f4d881882bea33d9402656edb11ec42c008dea43b54910dae21f1808d3" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 27, + "filename": "linux/kd.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 27 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/sys/kd.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1112, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/sys/kd.h", + "occurrence_id": "corpus-0544", + "origin_position": null, + "sha256": "5bbf81aae9e37967befc43c191c83ae0dc7ed7a8659eacdd2c228e2073e12b82" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 21, + "filename": "features.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 21 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/sys/klog.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1204, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/sys/klog.h", + "occurrence_id": "corpus-0545", + "origin_position": null, + "sha256": "982f56ece7768aeff7c6d7a0bcc428b0a8e270a578bc8906ebdbcdafce53b2c3" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 22, + "filename": "features.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 22 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 23, + "filename": "bits/types.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 23 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 25, + "filename": "stddef.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 25 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 41, + "filename": "bits/mman.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 41 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 150, + "filename": "bits/mman_ext.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 150 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/sys/mman.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 5615, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/sys/mman.h", + "occurrence_id": "corpus-0546", + "origin_position": null, + "sha256": "20f2c67c85a131e3302b2c951bec0b6c65375ade5c706df1c518dd65d0c20dd8" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 24, + "filename": "fcntl.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 24 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 25, + "filename": "features.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 25 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 26, + "filename": "stdint.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 26 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 27, + "filename": "stddef.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 27 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 28, + "filename": "sys/ioctl.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 28 + }, + { + "conditional_depth": 2, + "delimiter": "quote", + "directive_physical_line": 31, + "filename": "linux/mount.h", + "kind": "__has_include", + "lookup_only": true, + "origin_position": null, + "phase2_column": 21, + "physical_line": 31 + }, + { + "conditional_depth": 3, + "delimiter": "quote", + "directive_physical_line": 32, + "filename": "linux/mount.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 12, + "physical_line": 32 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/sys/mount.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 12054, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/sys/mount.h", + "occurrence_id": "corpus-0547", + "origin_position": null, + "sha256": "050d66d171f1a78a6ea27faa4d267180f6069b3197400fa21a5690368dd72f88" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 21, + "filename": "features.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 21 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 24, + "filename": "stddef.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 24 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 27, + "filename": "sys/ipc.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 27 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 30, + "filename": "bits/msq.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 30 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 33, + "filename": "bits/types/time_t.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 33 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/sys/msg.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 2623, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/sys/msg.h", + "occurrence_id": "corpus-0548", + "origin_position": null, + "sha256": "18446c1225edac1f1081aa5d8d93720865f50d4c9c31b7aed671a398cbb0a309" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 24, + "filename": "sys/types.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 24 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 25, + "filename": "sys/ioctl.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 25 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/sys/mtio.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 11111, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/sys/mtio.h", + "occurrence_id": "corpus-0549", + "origin_position": null, + "sha256": "4dc46b70cd1fdfba155af3342ef946a964581447501a6c0a12cc046f06f4437b" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 23, + "filename": "stddef.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 23 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 25, + "filename": "sys/types.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 25 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 26, + "filename": "limits.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 26 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 27, + "filename": "endian.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 27 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 28, + "filename": "signal.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 28 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 31, + "filename": "bits/param.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 31 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/sys/param.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 3149, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/sys/param.h", + "occurrence_id": "corpus-0550", + "origin_position": null, + "sha256": "13cb0eb23f88bc391b443a33ad2edd96e18dcca8f61f545e3691fed4b1f69c95" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 22, + "filename": "linux/pci.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 22 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/sys/pci.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 923, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/sys/pci.h", + "occurrence_id": "corpus-0551", + "origin_position": null, + "sha256": "9ccb1cae1a15f0998f2d85b647906b4e1869c915d5e8077e7e97d015b2d740e1" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 21, + "filename": "features.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 21 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/sys/perm.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1127, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/sys/perm.h", + "occurrence_id": "corpus-0552", + "origin_position": null, + "sha256": "9bd553b8ca4d26d19d9db376f1ea65ef9ebdb978d52be42ee036b7de7b03e1c2" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 23, + "filename": "features.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 23 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/sys/personality.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 2723, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/sys/personality.h", + "occurrence_id": "corpus-0553", + "origin_position": null, + "sha256": "001c790e91b9d1c5483fd41113712ef363c2b3a4be081f1948fda593d8c8c72e" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 21, + "filename": "fcntl.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 21 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 22, + "filename": "bits/types/siginfo_t.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 22 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/sys/pidfd.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 2031, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/sys/pidfd.h", + "occurrence_id": "corpus-0554", + "origin_position": null, + "sha256": "fcd96ba6b05d59ccf36317ccad56c586300b5b9c16c9327b7018224eb97b58ec" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 22, + "filename": "features.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 22 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 23, + "filename": "stdbool.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 23 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 24, + "filename": "bits/platform/x86.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 24 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 25, + "filename": "bits/platform/features.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 25 + } + ], + "full_C05": false, + "lexical_diagnostics": [ + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "#define CPU_FEATURE_PRESENT(name) x86_cpu_present (x86_cpu_##name)", + "physical_line": 63 + }, + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "#define CPU_FEATURE_ACTIVE(name) x86_cpu_active (x86_cpu_##name)", + "physical_line": 65 + } + ], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/sys/platform/x86.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 2423, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/sys/platform/x86.h", + "occurrence_id": "corpus-0555", + "origin_position": null, + "sha256": "cf9796923f182aedfa757700057bb71902c04aeacc596978bc736e0b18a1de7f" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 22, + "filename": "features.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 22 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 25, + "filename": "bits/poll.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 25 + }, + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 27, + "filename": "bits/types/__sigset_t.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 11, + "physical_line": 27 + }, + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 28, + "filename": "bits/types/struct_timespec.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 11, + "physical_line": 28 + }, + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 87, + "filename": "bits/poll2.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 11, + "physical_line": 87 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/sys/poll.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 3025, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/sys/poll.h", + "occurrence_id": "corpus-0556", + "origin_position": null, + "sha256": "1b5c071ab9ee0aafd0f213b30ffa3aed761756016d5565e1252a927aa00ae5dc" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 21, + "filename": "features.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 21 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 22, + "filename": "linux/prctl.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 22 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/sys/prctl.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1795, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/sys/prctl.h", + "occurrence_id": "corpus-0557", + "origin_position": null, + "sha256": "a76908ae4f9cc728b69720ede3630ed2df5462e85d03fe949b48f269ad3dade6" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 32, + "filename": "features.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 32 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 33, + "filename": "sys/time.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 33 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 34, + "filename": "sys/types.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 34 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 35, + "filename": "sys/user.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 35 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 40, + "filename": "bits/procfs.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 40 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 44, + "filename": "bits/procfs-id.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 44 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 106, + "filename": "bits/procfs-prregset.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 106 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 124, + "filename": "bits/procfs-extra.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 124 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/sys/procfs.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 4338, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/sys/procfs.h", + "occurrence_id": "corpus-0558", + "origin_position": null, + "sha256": "55af1e92332df141499c78db4fe1213abc3471b003580709c2ecf5cbc0c319bc" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 21, + "filename": "features.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 21 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 23, + "filename": "sys/time.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 23 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 24, + "filename": "sys/types.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 24 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/sys/profil.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1959, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/sys/profil.h", + "occurrence_id": "corpus-0559", + "origin_position": null, + "sha256": "b8fc3c1aa79d47b63df7e107b172b33f4917955dbf905256809b528939d8a700" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 23, + "filename": "features.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 23 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 24, + "filename": "bits/types.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 24 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 212, + "filename": "bits/ptrace-shared.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 212 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/sys/ptrace.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 6680, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/sys/ptrace.h", + "occurrence_id": "corpus-0560", + "origin_position": null, + "sha256": "502eaa1eaa722c263e28d7fc50032bf6c4caf9d2206af2137fa66879f75997a4" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/sys/queue.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 19539, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/sys/queue.h", + "occurrence_id": "corpus-0561", + "origin_position": null, + "sha256": "8b284031772b1ba2035d9b05b24f2cb9b23e7bd324bcccb5e3fcc57d34aafa48" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 54, + "filename": "features.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 54 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 55, + "filename": "sys/types.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 55 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 57, + "filename": "linux/quota.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 57 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/sys/quota.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 5173, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/sys/quota.h", + "occurrence_id": "corpus-0562", + "origin_position": null, + "sha256": "d4508d42d2cb2bb76461e8c0698baa9d40534351d2a44629ae9031429aef040c" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 22, + "filename": "features.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 22 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 23, + "filename": "sys/types.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 23 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/sys/random.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1584, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/sys/random.h", + "occurrence_id": "corpus-0563", + "origin_position": null, + "sha256": "4c62f6ae82ec94c0c0be3d7fffad371fbea6fa0d7f6f0f272200494d84ab3bbc" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 21, + "filename": "stdint.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 21 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 22, + "filename": "sys/ioctl.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 22 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/sys/raw.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1182, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/sys/raw.h", + "occurrence_id": "corpus-0564", + "origin_position": null, + "sha256": "9310816bf0239a5a94f4e915a4a472239acd31ebdfcbb63512304294a2dc44a0" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 24, + "filename": "features.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 24 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/sys/reboot.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1633, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/sys/reboot.h", + "occurrence_id": "corpus-0565", + "origin_position": null, + "sha256": "029c745b7b9ed3d089e17de0934dcfe0af6841308f067429c3c7d1ac462bdfef" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/sys/reg.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1827, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/sys/reg.h", + "occurrence_id": "corpus-0566", + "origin_position": null, + "sha256": "5e4aac64b81c33a3527826e3855e483b27ab7a0e661e9b958ea01c1ea57b3401" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 21, + "filename": "features.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 21 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 24, + "filename": "bits/resource.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 24 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/sys/resource.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 4034, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/sys/resource.h", + "occurrence_id": "corpus-0567", + "origin_position": null, + "sha256": "5664e3166dd1e1b547b2e8ec740cbce5a5798055c306c80953c7958e8744b488" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 22, + "filename": "bits/rseq.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 22 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 24, + "filename": "stddef.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 24 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 25, + "filename": "stdint.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 25 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 26, + "filename": "sys/cdefs.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 26 + }, + { + "conditional_depth": 2, + "delimiter": "quote", + "directive_physical_line": 29, + "filename": "linux/rseq.h", + "kind": "__has_include", + "lookup_only": true, + "origin_position": null, + "phase2_column": 21, + "physical_line": 29 + }, + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 33, + "filename": "linux/version.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 11, + "physical_line": 33 + }, + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 41, + "filename": "linux/rseq.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 11, + "physical_line": 41 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/sys/rseq.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 6410, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/sys/rseq.h", + "occurrence_id": "corpus-0568", + "origin_position": null, + "sha256": "1f43eaa481116a4f6cd0b6ad86cd02ca5f24bf627a2f8b5a1ee53fbe0140dc6c" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 24, + "filename": "features.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 24 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 27, + "filename": "bits/types.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 27 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 30, + "filename": "bits/select.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 30 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 33, + "filename": "bits/types/sigset_t.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 33 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 36, + "filename": "bits/types/time_t.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 36 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 37, + "filename": "bits/types/struct_timeval.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 37 + }, + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 39, + "filename": "bits/types/struct_timespec.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 11, + "physical_line": 39 + }, + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 150, + "filename": "bits/select2.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 11, + "physical_line": 150 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/sys/select.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 5039, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/sys/select.h", + "occurrence_id": "corpus-0569", + "origin_position": null, + "sha256": "0cb0fc7af2948c2b02d01268796af8a5992985ee593866e70fd1c08e9c844ebc" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 21, + "filename": "features.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 21 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 24, + "filename": "stddef.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 24 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 27, + "filename": "sys/ipc.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 27 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 30, + "filename": "bits/sem.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 30 + }, + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 33, + "filename": "bits/types/struct_timespec.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 11, + "physical_line": 33 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/sys/sem.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 2660, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/sys/sem.h", + "occurrence_id": "corpus-0570", + "origin_position": null, + "sha256": "9481e695ce5437de547053682a213b036e2b5414ad8e4dd36126f9e3f2304900" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 22, + "filename": "features.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 22 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 23, + "filename": "sys/types.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 23 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/sys/sendfile.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1806, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/sys/sendfile.h", + "occurrence_id": "corpus-0571", + "origin_position": null, + "sha256": "abd9605bcd12377b805ea47494ac468f3fd530f35f0ad7daee98307151697872" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 21, + "filename": "features.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 21 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 24, + "filename": "stddef.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 24 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 27, + "filename": "sys/ipc.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 27 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 30, + "filename": "bits/shm.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 30 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 33, + "filename": "bits/types/time_t.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 33 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/sys/shm.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 2131, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/sys/shm.h", + "occurrence_id": "corpus-0572", + "origin_position": null, + "sha256": "28eb4668420711a91e16c8a97cea25c78239f0f9456e9ba3504517508433dc55" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 0, + "delimiter": "angle", + "directive_physical_line": 1, + "filename": "signal.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 1 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/sys/signal.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 20, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/sys/signal.h", + "occurrence_id": "corpus-0573", + "origin_position": null, + "sha256": "31dc64ab5a19df2d250c68d97a3b60c78385ae9ee25f2000cb8cf051ad372eac" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 21, + "filename": "stdint.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 21 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 22, + "filename": "bits/types/sigset_t.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 22 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 25, + "filename": "bits/signalfd.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 25 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/sys/signalfd.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1714, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/sys/signalfd.h", + "occurrence_id": "corpus-0574", + "origin_position": null, + "sha256": "4680068d4b02cb6e86260068fee5f897cf99802f8be2a968e9234655c2fa9b6c" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 22, + "filename": "features.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 22 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/sys/single_threaded.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1182, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/sys/single_threaded.h", + "occurrence_id": "corpus-0575", + "origin_position": null, + "sha256": "8734473bd5a6f39abd074bc2db10501f9cb1b8b31ce8ede1e4f59536eae831aa" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 22, + "filename": "features.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 22 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 26, + "filename": "bits/types/struct_iovec.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 26 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 28, + "filename": "stddef.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 28 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 33, + "filename": "bits/socket.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 33 + }, + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 36, + "filename": "bits/types/struct_osockaddr.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 11, + "physical_line": 36 + }, + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 343, + "filename": "bits/socket2.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 11, + "physical_line": 343 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/sys/socket.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 12382, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/sys/socket.h", + "occurrence_id": "corpus-0576", + "origin_position": null, + "sha256": "7d2e4c6165f4c5a21de573b76ee3ee3ae1d649e43236a4136ce47f0967dc1362" + }, + "supported_language_scan": false, + "unsupported_frontier": [ + { + "code": "potential_synthesized_file_operator", + "detail": "interior macro argument may split paste chains", + "form": "# define __SOCKADDR_ONETYPE(type) struct type *__restrict __##type##__;", + "original_physical_line_bytes_latin1": "# define __SOCKADDR_ONETYPE(type) struct type *__restrict __##type##__;", + "physical_line": 78 + }, + { + "code": "potential_synthesized_file_operator", + "detail": "interior macro argument may split paste chains", + "form": "# define __SOCKADDR_ONETYPE(type) const struct type *__restrict __##type##__;", + "original_physical_line_bytes_latin1": "# define __SOCKADDR_ONETYPE(type) const struct type *__restrict __##type##__;", + "physical_line": 82 + } + ] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 0, + "delimiter": "angle", + "directive_physical_line": 3, + "filename": "sys/socket.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 3 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/sys/socketvar.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 141, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/sys/socketvar.h", + "occurrence_id": "corpus-0577", + "origin_position": null, + "sha256": "d662846f457f7ff0c9efa4da20fa965563326fc64a157ae83c5f85623d5a6a63" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 0, + "delimiter": "angle", + "directive_physical_line": 1, + "filename": "linux/soundcard.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 1 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/sys/soundcard.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 29, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/sys/soundcard.h", + "occurrence_id": "corpus-0578", + "origin_position": null, + "sha256": "e52f4a87168f60c2860afe01fa7cc3f235bd6f3c9be2e997597672332fb0e56e" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 25, + "filename": "features.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 25 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 27, + "filename": "bits/types.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 27 + }, + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 30, + "filename": "bits/types/struct_timespec.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 11, + "physical_line": 30 + }, + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 37, + "filename": "bits/types/time_t.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 11, + "physical_line": 37 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 101, + "filename": "bits/stat.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 101 + }, + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 465, + "filename": "bits/statx.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 11, + "physical_line": 465 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/sys/stat.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 13769, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/sys/stat.h", + "occurrence_id": "corpus-0579", + "origin_position": null, + "sha256": "9449fcba5bdec5bfe162da24d67fc3ed57cedb5c8c801f1bb29958e6f550d9b7" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 22, + "filename": "features.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 22 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 25, + "filename": "bits/statfs.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 25 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/sys/statfs.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 2094, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/sys/statfs.h", + "occurrence_id": "corpus-0580", + "origin_position": null, + "sha256": "3e01283fc2e908ee350239e290a1c6d002c6199d854a6f23b94cc5ff98a9ac40" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 22, + "filename": "features.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 22 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 25, + "filename": "bits/statvfs.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 25 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/sys/statvfs.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 2821, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/sys/statvfs.h", + "occurrence_id": "corpus-0581", + "origin_position": null, + "sha256": "7c62c6d99e1703d67016ddf5ad47d1e4f89ca6a57bd160fb25da0e78d3fcc749" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 22, + "filename": "features.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 22 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/sys/swap.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1593, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/sys/swap.h", + "occurrence_id": "corpus-0582", + "origin_position": null, + "sha256": "ca222815d99faf478bbe1d73ee2530117d7b1d6f242063e613c8d49221c9faee" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 24, + "filename": "asm/unistd.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 24 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 29, + "filename": "bits/syscall.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 29 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/sys/syscall.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1256, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/sys/syscall.h", + "occurrence_id": "corpus-0583", + "origin_position": null, + "sha256": "62dc068fa3bdf214937e26c9e77f92de798f69803b826ca7eaef5d0f3fe742aa" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 21, + "filename": "features.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 21 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 24, + "filename": "linux/kernel.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 24 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/sys/sysinfo.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1518, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/sys/sysinfo.h", + "occurrence_id": "corpus-0584", + "origin_position": null, + "sha256": "d25a0cd050a5d68094cd3e1ce10ecd68494351750af84c1188693084cb77e1b4" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 35, + "filename": "features.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 35 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 37, + "filename": "stdarg.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 37 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 40, + "filename": "bits/syslog-path.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 40 + }, + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 207, + "filename": "bits/syslog.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 11, + "physical_line": 207 + }, + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 209, + "filename": "bits/floatn.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 11, + "physical_line": 209 + }, + { + "conditional_depth": 3, + "delimiter": "angle", + "directive_physical_line": 211, + "filename": "bits/syslog-ldbl.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 12, + "physical_line": 211 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/sys/syslog.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 7840, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/sys/syslog.h", + "occurrence_id": "corpus-0585", + "origin_position": null, + "sha256": "a29226d8ae591202c7db5bfa5967f32bf6a1e8ad96f87fddc8f5fa2635b779b6" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 22, + "filename": "features.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 22 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 23, + "filename": "bits/types.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 23 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 24, + "filename": "bits/sysmacros.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 24 + } + ], + "full_C05": false, + "lexical_diagnostics": [ + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "#define __SYSMACROS_DECL_TEMPL(rtype, name, proto)\t\t\t extern rtype gnu_dev_##name proto __THROW __attribute_const__;", + "physical_line": 27 + }, + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "#define __SYSMACROS_IMPL_TEMPL(rtype, name, proto)\t\t\t __extension__ __extern_inline __attribute_const__ rtype\t\t __NTH (gnu_dev_##name proto)", + "physical_line": 31 + } + ], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/sys/sysmacros.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 2103, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/sys/sysmacros.h", + "occurrence_id": "corpus-0586", + "origin_position": null, + "sha256": "76f37946e47e75d20c3b7febf975ad5da225cd7ea1da569ccdf36a919a76d17b" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 3, + "filename": "termios.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 3 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/sys/termios.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 74, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/sys/termios.h", + "occurrence_id": "corpus-0587", + "origin_position": null, + "sha256": "b504b9961485d933e946a1dcc62dc2048df2f99891814691a5605c109696c661" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 21, + "filename": "features.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 21 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 23, + "filename": "bits/types.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 23 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 24, + "filename": "bits/types/time_t.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 24 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 25, + "filename": "bits/types/struct_timeval.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 25 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 32, + "filename": "sys/select.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 32 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/sys/time.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 9139, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/sys/time.h", + "occurrence_id": "corpus-0588", + "origin_position": null, + "sha256": "a7468e1dd82ea8a895893496a7679fc9e5da726745333b01943401884d84162b" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 21, + "filename": "features.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 21 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 25, + "filename": "bits/types/struct_timeb.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 11, + "physical_line": 25 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/sys/timeb.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1155, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/sys/timeb.h", + "occurrence_id": "corpus-0589", + "origin_position": null, + "sha256": "a04be75be6fbedda3f36e711e01ecffe61cba1ecfed253c08829b2213204d7f5" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 21, + "filename": "time.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 21 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 22, + "filename": "bits/types/struct_itimerspec.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 22 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 25, + "filename": "bits/timerfd.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 25 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/sys/timerfd.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 2583, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/sys/timerfd.h", + "occurrence_id": "corpus-0590", + "origin_position": null, + "sha256": "8a9205316bd0d108ec2bcbd1f58f6fe3c4bc3f2d3abfa4b0dea3185fc1726049" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 25, + "filename": "features.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 25 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 27, + "filename": "bits/types/clock_t.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 27 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/sys/times.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1597, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/sys/times.h", + "occurrence_id": "corpus-0591", + "origin_position": null, + "sha256": "040a331b5151f13fc06cd20ce20fa66045c69a89e2dff76649c58c9085306167" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 21, + "filename": "features.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 21 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 22, + "filename": "sys/time.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 22 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 26, + "filename": "bits/timex.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 26 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/sys/timex.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 2967, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/sys/timex.h", + "occurrence_id": "corpus-0592", + "origin_position": null, + "sha256": "988082018c08c2026e9ae996086a611ebd82ef59641bbcce9829acd3f64353a2" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 58, + "filename": "sys/ttydefaults.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 58 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/sys/ttychars.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 2499, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/sys/ttychars.h", + "occurrence_id": "corpus-0593", + "origin_position": null, + "sha256": "67b7ccb5ac6ba994ee740fd42f237b907fe64b0ec9007b7debad92260b3ac997" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/sys/ttydefaults.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 3568, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/sys/ttydefaults.h", + "occurrence_id": "corpus-0594", + "origin_position": null, + "sha256": "23dbc1caef6d19508707ffb8aef4498beba70340c87440dfafcf4f3c9dd6589f" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 25, + "filename": "features.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 25 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 29, + "filename": "bits/types.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 29 + }, + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 126, + "filename": "bits/types/clock_t.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 11, + "physical_line": 126 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 128, + "filename": "bits/types/clockid_t.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 128 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 129, + "filename": "bits/types/time_t.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 129 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 130, + "filename": "bits/types/timer_t.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 130 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 144, + "filename": "stddef.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 144 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 155, + "filename": "bits/stdint-intn.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 155 + }, + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 176, + "filename": "endian.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 11, + "physical_line": 176 + }, + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 179, + "filename": "sys/select.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 11, + "physical_line": 179 + }, + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 227, + "filename": "bits/pthreadtypes.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 11, + "physical_line": 227 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/sys/types.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 5713, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/sys/types.h", + "occurrence_id": "corpus-0595", + "origin_position": null, + "sha256": "049fc3ed84e810730a0b56e2084f9c190f7fbb582de6b55d7aa416dc41b17cd3" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 21, + "filename": "features.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 21 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 23, + "filename": "bits/types.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 23 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 24, + "filename": "bits/types/sigset_t.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 24 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 25, + "filename": "bits/types/stack_t.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 25 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/sys/ucontext.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 5842, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/sys/ucontext.h", + "occurrence_id": "corpus-0596", + "origin_position": null, + "sha256": "4485d0daa586733fd121554bf5eef304076cc01b3bd59c9df8bb35d3d067ae84" + }, + "supported_language_scan": false, + "unsupported_frontier": [ + { + "code": "potential_synthesized_file_operator", + "detail": "may synthesize __has_include,__has_include_next,__asm,__asm__", + "form": "# define __ctx(fld) __ ## fld", + "original_physical_line_bytes_latin1": "# define __ctx(fld) __ ## fld", + "physical_line": 31 + } + ] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 21, + "filename": "features.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 21 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 22, + "filename": "sys/types.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 22 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 23, + "filename": "bits/types/struct_iovec.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 23 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 24, + "filename": "bits/uio_lim.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 24 + }, + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 179, + "filename": "bits/uio-ext.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 11, + "physical_line": 179 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/sys/uio.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 6796, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/sys/uio.h", + "occurrence_id": "corpus-0597", + "origin_position": null, + "sha256": "4f492590b0824814dadf07c9446561d9c6d67047903d4c8afe5208d5b95d6263" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 21, + "filename": "sys/cdefs.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 21 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 24, + "filename": "bits/sockaddr.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 24 + }, + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 37, + "filename": "stddef.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 11, + "physical_line": 37 + }, + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 38, + "filename": "string.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 11, + "physical_line": 38 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/sys/un.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1467, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/sys/un.h", + "occurrence_id": "corpus-0598", + "origin_position": null, + "sha256": "aa53c003fc3efcdecba205d7442b281a3b4781a19a547d0f8819f10704d96562" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 0, + "delimiter": "angle", + "directive_physical_line": 1, + "filename": "unistd.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 1 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/sys/unistd.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 20, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/sys/unistd.h", + "occurrence_id": "corpus-0599", + "origin_position": null, + "sha256": "b5239a9340ef9440234ebf0a16ae276a58cabb6923df05f7fc49b66cd70ace20" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/sys/user.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 5208, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/sys/user.h", + "occurrence_id": "corpus-0600", + "origin_position": null, + "sha256": "03e4f68077bf581285d6debddda9138332c3dfe9eecefe2c5dcdb79772bcf34c" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 25, + "filename": "features.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 25 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 29, + "filename": "bits/utsname.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 29 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/sys/utsname.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 2481, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/sys/utsname.h", + "occurrence_id": "corpus-0601", + "origin_position": null, + "sha256": "164b877bac5f231164ee251cc9e935c0303c5bc795db87f1f59aae6806f263ac" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 0, + "delimiter": "angle", + "directive_physical_line": 4, + "filename": "sys/statfs.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 4 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/sys/vfs.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 161, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/sys/vfs.h", + "occurrence_id": "corpus-0602", + "origin_position": null, + "sha256": "36e49a8e51dbc4e1d40c655454984a3fd6d401c482dfdcc74a93b0853918ac38" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 21, + "filename": "features.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 21 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/sys/vlimit.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1880, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/sys/vlimit.h", + "occurrence_id": "corpus-0603", + "origin_position": null, + "sha256": "898723b409e523399108cc7ce3a9c057e57e7fba61ff6eda5f15c8f52092dff5" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 21, + "filename": "features.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 21 + }, + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 27, + "filename": "asm/vm86.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 11, + "physical_line": 27 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/sys/vm86.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1199, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/sys/vm86.h", + "occurrence_id": "corpus-0604", + "origin_position": null, + "sha256": "b7a2ff012ebfecb82f596308c4be6924e217057e7549b5298b283545b88b0d6c" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 0, + "delimiter": "angle", + "directive_physical_line": 1, + "filename": "linux/vt.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 1 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/sys/vt.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 22, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/sys/vt.h", + "occurrence_id": "corpus-0605", + "origin_position": null, + "sha256": "59da9715f2ef97be98dc151d0c990b5b29885d72b21fce3b0e8182ac06f17c6a" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 25, + "filename": "features.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 25 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 29, + "filename": "bits/types.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 29 + }, + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 36, + "filename": "signal.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 11, + "physical_line": 36 + }, + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 42, + "filename": "bits/types/struct_rusage.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 11, + "physical_line": 42 + }, + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 49, + "filename": "bits/waitflags.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 11, + "physical_line": 49 + }, + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 52, + "filename": "bits/waitstatus.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 11, + "physical_line": 52 + }, + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 74, + "filename": "bits/types/idtype_t.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 11, + "physical_line": 74 + }, + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 114, + "filename": "bits/types/siginfo_t.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 11, + "physical_line": 114 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/sys/wait.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 6106, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/sys/wait.h", + "occurrence_id": "corpus-0606", + "origin_position": null, + "sha256": "d351f360526c195c0e52158a56bc0af00f959b5f1ffeb457d226a38716676c8f" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 21, + "filename": "features.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 21 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 22, + "filename": "sys/types.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 22 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libc6-dev_2.39-0ubuntu8.9_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libc6-dev_2.39-0ubuntu8.9_amd64.deb/usr/include/x86_64-linux-gnu/sys/xattr.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 4627, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/sys/xattr.h", + "occurrence_id": "corpus-0607", + "origin_position": null, + "sha256": "1125dcd75b0cb68166f5b98786a877ae63711b67b074ef14276f2b22b8b1296b" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 11, + "filename": "patchlevel.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 11 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 12, + "filename": "pyconfig.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 12 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 13, + "filename": "pymacconfig.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 13 + }, + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 23, + "filename": "stdlib.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 12, + "physical_line": 23 + }, + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 24, + "filename": "stdio.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 12, + "physical_line": 24 + }, + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 25, + "filename": "errno.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 12, + "physical_line": 25 + }, + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 26, + "filename": "string.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 12, + "physical_line": 26 + }, + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 29, + "filename": "unistd.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 12, + "physical_line": 29 + }, + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 32, + "filename": "stddef.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 12, + "physical_line": 32 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 35, + "filename": "assert.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 35 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 36, + "filename": "wchar.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 36 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 38, + "filename": "pyport.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 38 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 39, + "filename": "pymacro.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 39 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 40, + "filename": "pymath.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 40 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 41, + "filename": "pymem.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 41 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 42, + "filename": "pytypedefs.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 42 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 43, + "filename": "pybuffer.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 43 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 44, + "filename": "object.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 44 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 45, + "filename": "objimpl.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 45 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 46, + "filename": "typeslots.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 46 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 47, + "filename": "pyhash.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 47 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 48, + "filename": "cpython/pydebug.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 48 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 49, + "filename": "bytearrayobject.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 49 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 50, + "filename": "bytesobject.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 50 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 51, + "filename": "unicodeobject.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 51 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 52, + "filename": "cpython/initconfig.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 52 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 53, + "filename": "pystate.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 53 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 54, + "filename": "pyerrors.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 54 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 55, + "filename": "longobject.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 55 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 56, + "filename": "cpython/longintrepr.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 56 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 57, + "filename": "boolobject.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 57 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 58, + "filename": "floatobject.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 58 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 59, + "filename": "complexobject.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 59 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 60, + "filename": "rangeobject.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 60 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 61, + "filename": "memoryobject.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 61 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 62, + "filename": "tupleobject.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 62 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 63, + "filename": "listobject.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 63 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 64, + "filename": "dictobject.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 64 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 65, + "filename": "cpython/odictobject.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 65 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 66, + "filename": "enumobject.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 66 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 67, + "filename": "setobject.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 67 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 68, + "filename": "methodobject.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 68 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 69, + "filename": "moduleobject.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 69 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 70, + "filename": "cpython/funcobject.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 70 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 71, + "filename": "cpython/classobject.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 71 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 72, + "filename": "fileobject.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 72 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 73, + "filename": "pycapsule.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 73 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 74, + "filename": "cpython/code.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 74 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 75, + "filename": "pyframe.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 75 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 76, + "filename": "traceback.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 76 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 77, + "filename": "sliceobject.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 77 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 78, + "filename": "cpython/cellobject.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 78 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 79, + "filename": "iterobject.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 79 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 80, + "filename": "cpython/genobject.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 80 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 81, + "filename": "descrobject.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 81 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 82, + "filename": "genericaliasobject.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 82 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 83, + "filename": "warnings.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 83 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 84, + "filename": "weakrefobject.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 84 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 85, + "filename": "structseq.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 85 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 86, + "filename": "cpython/picklebufobject.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 86 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 87, + "filename": "cpython/pytime.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 87 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 88, + "filename": "codecs.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 88 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 89, + "filename": "pythread.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 89 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 90, + "filename": "cpython/context.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 90 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 91, + "filename": "modsupport.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 91 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 92, + "filename": "compile.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 92 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 93, + "filename": "pythonrun.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 93 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 94, + "filename": "pylifecycle.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 94 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 95, + "filename": "ceval.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 95 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 96, + "filename": "sysmodule.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 96 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 97, + "filename": "osmodule.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 97 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 98, + "filename": "intrcheck.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 98 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 99, + "filename": "import.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 99 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 100, + "filename": "abstract.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 100 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 101, + "filename": "bltinmodule.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 101 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 102, + "filename": "cpython/pyctype.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 102 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 103, + "filename": "pystrtod.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 103 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 104, + "filename": "pystrcmp.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 104 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 105, + "filename": "fileutils.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 105 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 106, + "filename": "cpython/pyfpe.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 106 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 107, + "filename": "tracemalloc.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 107 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/Python.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 2854, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/Python.h", + "occurrence_id": "corpus-0608", + "origin_position": null, + "sha256": "729ef157f6026e6e1b3104593f87dddc597c3b83b60c7c2965878c62a56c6f7d" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 2, + "delimiter": "quote", + "directive_physical_line": 892, + "filename": "cpython/abstract.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 12, + "physical_line": 892 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/abstract.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 32616, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/abstract.h", + "occurrence_id": "corpus-0609", + "origin_position": null, + "sha256": "8f0b27427f4e16b4295b2ab1a7bb499bf86748fafbd1959e220c506ed59f774f" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/bltinmodule.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 264, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/bltinmodule.h", + "occurrence_id": "corpus-0610", + "origin_position": null, + "sha256": "1b5101b4b85409fd910032713906800bbb83580503036469c2a60ac8e80b8f72" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/boolobject.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1136, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/boolobject.h", + "occurrence_id": "corpus-0611", + "origin_position": null, + "sha256": "84289d5b1a1b7ed6c547f4f081fba70e90a9d60dfa2d2b3155c33cdd2af41340" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 2, + "delimiter": "quote", + "directive_physical_line": 37, + "filename": "cpython/bytearrayobject.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 12, + "physical_line": 37 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/bytearrayobject.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1466, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/bytearrayobject.h", + "occurrence_id": "corpus-0612", + "origin_position": null, + "sha256": "0e93963caf43a057fb293ae5183d1b8bb45c9f57926ce8308f67a0f452843e85" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 10, + "filename": "stdarg.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 10 + }, + { + "conditional_depth": 2, + "delimiter": "quote", + "directive_physical_line": 62, + "filename": "cpython/bytesobject.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 12, + "physical_line": 62 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/bytesobject.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 2619, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/bytesobject.h", + "occurrence_id": "corpus-0613", + "origin_position": null, + "sha256": "de8551db9323e7dc463717a624f2d35dacd17cdf0c7a7f6299128dd06348cf30" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 2, + "delimiter": "quote", + "directive_physical_line": 161, + "filename": "cpython/ceval.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 12, + "physical_line": 161 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/ceval.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 6267, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/ceval.h", + "occurrence_id": "corpus-0614", + "origin_position": null, + "sha256": "9531cce1b80e804d46a9ef31bd22605f54d0ae0609dc3470946a4d8d4270af3a" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/codecs.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 7071, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/codecs.h", + "occurrence_id": "corpus-0615", + "origin_position": null, + "sha256": "0ca3c6e55e7ff62872b47aeeb7379d784b03ebfc61bbd029b67485fe783baac5" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 2, + "delimiter": "quote", + "directive_physical_line": 15, + "filename": "cpython/compile.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 12, + "physical_line": 15 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/compile.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 448, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/compile.h", + "occurrence_id": "corpus-0616", + "origin_position": null, + "sha256": "1f10c818b29007e6a4446505a1140dd77ca6618ad81e87b502f4e22f4b274406" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 2, + "delimiter": "quote", + "directive_physical_line": 23, + "filename": "cpython/complexobject.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 12, + "physical_line": 23 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/complexobject.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 728, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/complexobject.h", + "occurrence_id": "corpus-0617", + "origin_position": null, + "sha256": "9356805a24503256cd8914d7b7700357e01f471c211f9241c81981d89d6c3af8" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/cpython/abstract.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 7870, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/cpython/abstract.h", + "occurrence_id": "corpus-0618", + "origin_position": null, + "sha256": "07d8b3b9c7db77e30adef4c4d9c7a4453b8eb1f48341ed5394bd5eebe239c9fd" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/cpython/bytearrayobject.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1163, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/cpython/bytearrayobject.h", + "occurrence_id": "corpus-0619", + "origin_position": null, + "sha256": "ae5e099856657f3b8606701df312866eaa88992f6cfd9f8567456e1588efceb1" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/cpython/bytesobject.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 4660, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/cpython/bytesobject.h", + "occurrence_id": "corpus-0620", + "origin_position": null, + "sha256": "5ba5010b9aa79f401196740da7c653590f5f4eec6b4f33e99de5412a969fcc8a" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/cpython/cellobject.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1076, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/cpython/cellobject.h", + "occurrence_id": "corpus-0621", + "origin_position": null, + "sha256": "844f06178bbce2e9377a46ccc80e2aae85a73750932576a6cc4de934cc508cea" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/cpython/ceval.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1650, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/cpython/ceval.h", + "occurrence_id": "corpus-0622", + "origin_position": null, + "sha256": "b08c549971f1006e681267dd8a88481353ce4bd89b9d859f81b72cf9bf867895" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/cpython/classobject.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 2245, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/cpython/classobject.h", + "occurrence_id": "corpus-0623", + "origin_position": null, + "sha256": "b38a0ecdebeae2a4d28dfe8a5f2833f676d38be9561ca4bdfdf5087bbe2f9332" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [ + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": " #define PY_DEF_EVENT(op) PY_CODE_EVENT_##op,", + "physical_line": 280 + } + ], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/cpython/code.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 16188, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/cpython/code.h", + "occurrence_id": "corpus-0624", + "origin_position": null, + "sha256": "cb01a969c69fec0fc0c58fe6e674d392282b96639e2523d3e69100c771ed0bbd" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/cpython/compile.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 2660, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/cpython/compile.h", + "occurrence_id": "corpus-0625", + "origin_position": null, + "sha256": "32d7397c6fa5478feb2a4101641fca6dba3ac77abe4deed5c0f713a6cd6564f5" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/cpython/complexobject.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1248, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/cpython/complexobject.h", + "occurrence_id": "corpus-0626", + "origin_position": null, + "sha256": "a4c110008e4d791a4577ce6ebee33bc512ec3e3db918bd2c296f00dd79379fcb" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/cpython/context.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1965, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/cpython/context.h", + "occurrence_id": "corpus-0627", + "origin_position": null, + "sha256": "9e34d54a789cbf0d78d5ebb126e8384342c08dd81d944d10e3d8f0de0bbba10a" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/cpython/descrobject.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1642, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/cpython/descrobject.h", + "occurrence_id": "corpus-0628", + "origin_position": null, + "sha256": "a1ee0124142fe91204d0c5e85169b55341b2167111a1447e3a8ed50f9bd5a12f" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [ + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": " #define PY_DEF_EVENT(EVENT) PyDict_EVENT_##EVENT,", + "physical_line": 102 + } + ], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/cpython/dictobject.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 4686, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/cpython/dictobject.h", + "occurrence_id": "corpus-0629", + "origin_position": null, + "sha256": "5ac16d73f22038b12bd06904cf02a14bbdd723234d1d899354f1a041e8659505" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/cpython/fileobject.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 818, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/cpython/fileobject.h", + "occurrence_id": "corpus-0630", + "origin_position": null, + "sha256": "16ab872cbe2bb3351ce3090873440903b1460c1d68aed483c70c31edc4140ba2" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/cpython/fileutils.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 232, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/cpython/fileutils.h", + "occurrence_id": "corpus-0631", + "origin_position": null, + "sha256": "d7a2f703c6fba2efabd0b1cc916ad36074363a27a000987cfad17e21f04d44f1" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/cpython/floatobject.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 900, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/cpython/floatobject.h", + "occurrence_id": "corpus-0632", + "origin_position": null, + "sha256": "f1c53f5b87f221db66004b836aa2fc9462aa46c2fbe46b417a8ddc803ce2f585" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/cpython/frameobject.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1108, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/cpython/frameobject.h", + "occurrence_id": "corpus-0633", + "origin_position": null, + "sha256": "e1421b58c6a25efb56f423a749c313e3f5392f58cc0c7f4f09b0412217a4a734" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [ + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "#define COMMON_FIELDS(PREFIX) PyObject *PREFIX ## globals; PyObject *PREFIX ## builtins; PyObject *PREFIX ## name; PyObject *PREFIX ## qualname; PyObject *PREFIX ## code; /* A code object, the __code__ attribute */ PyObject *PREFIX ## defaults; /* NULL or a tuple */ PyObject *PREFIX ## kwdefaults; /* NULL or a dict */ PyObject *PREFIX ## closure; /* NULL or a tuple of cell objects */", + "physical_line": 12 + }, + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "#define COMMON_FIELDS(PREFIX) PyObject *PREFIX ## globals; PyObject *PREFIX ## builtins; PyObject *PREFIX ## name; PyObject *PREFIX ## qualname; PyObject *PREFIX ## code; /* A code object, the __code__ attribute */ PyObject *PREFIX ## defaults; /* NULL or a tuple */ PyObject *PREFIX ## kwdefaults; /* NULL or a dict */ PyObject *PREFIX ## closure; /* NULL or a tuple of cell objects */", + "physical_line": 13 + }, + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "#define COMMON_FIELDS(PREFIX) PyObject *PREFIX ## globals; PyObject *PREFIX ## builtins; PyObject *PREFIX ## name; PyObject *PREFIX ## qualname; PyObject *PREFIX ## code; /* A code object, the __code__ attribute */ PyObject *PREFIX ## defaults; /* NULL or a tuple */ PyObject *PREFIX ## kwdefaults; /* NULL or a dict */ PyObject *PREFIX ## closure; /* NULL or a tuple of cell objects */", + "physical_line": 14 + }, + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "#define COMMON_FIELDS(PREFIX) PyObject *PREFIX ## globals; PyObject *PREFIX ## builtins; PyObject *PREFIX ## name; PyObject *PREFIX ## qualname; PyObject *PREFIX ## code; /* A code object, the __code__ attribute */ PyObject *PREFIX ## defaults; /* NULL or a tuple */ PyObject *PREFIX ## kwdefaults; /* NULL or a dict */ PyObject *PREFIX ## closure; /* NULL or a tuple of cell objects */", + "physical_line": 15 + }, + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "#define COMMON_FIELDS(PREFIX) PyObject *PREFIX ## globals; PyObject *PREFIX ## builtins; PyObject *PREFIX ## name; PyObject *PREFIX ## qualname; PyObject *PREFIX ## code; /* A code object, the __code__ attribute */ PyObject *PREFIX ## defaults; /* NULL or a tuple */ PyObject *PREFIX ## kwdefaults; /* NULL or a dict */ PyObject *PREFIX ## closure; /* NULL or a tuple of cell objects */", + "physical_line": 16 + }, + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "#define COMMON_FIELDS(PREFIX) PyObject *PREFIX ## globals; PyObject *PREFIX ## builtins; PyObject *PREFIX ## name; PyObject *PREFIX ## qualname; PyObject *PREFIX ## code; /* A code object, the __code__ attribute */ PyObject *PREFIX ## defaults; /* NULL or a tuple */ PyObject *PREFIX ## kwdefaults; /* NULL or a dict */ PyObject *PREFIX ## closure; /* NULL or a tuple of cell objects */", + "physical_line": 17 + }, + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "#define COMMON_FIELDS(PREFIX) PyObject *PREFIX ## globals; PyObject *PREFIX ## builtins; PyObject *PREFIX ## name; PyObject *PREFIX ## qualname; PyObject *PREFIX ## code; /* A code object, the __code__ attribute */ PyObject *PREFIX ## defaults; /* NULL or a tuple */ PyObject *PREFIX ## kwdefaults; /* NULL or a dict */ PyObject *PREFIX ## closure; /* NULL or a tuple of cell objects */", + "physical_line": 18 + }, + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "#define COMMON_FIELDS(PREFIX) PyObject *PREFIX ## globals; PyObject *PREFIX ## builtins; PyObject *PREFIX ## name; PyObject *PREFIX ## qualname; PyObject *PREFIX ## code; /* A code object, the __code__ attribute */ PyObject *PREFIX ## defaults; /* NULL or a tuple */ PyObject *PREFIX ## kwdefaults; /* NULL or a dict */ PyObject *PREFIX ## closure; /* NULL or a tuple of cell objects */", + "physical_line": 19 + }, + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": " #define PY_DEF_EVENT(EVENT) PyFunction_EVENT_##EVENT,", + "physical_line": 143 + } + ], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/cpython/funcobject.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 7150, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/cpython/funcobject.h", + "occurrence_id": "corpus-0634", + "origin_position": null, + "sha256": "744cd5bc453de548ec454f1fb26e58efa581f3a51dee2b09872cb45bc3a5f981" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [ + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "#define _PyGenObject_HEAD(prefix) PyObject_HEAD /* List of weak reference. */ PyObject *prefix##_weakreflist; /* Name of the generator. */ PyObject *prefix##_name; /* Qualified name of the generator. */ PyObject *prefix##_qualname; _PyErr_StackItem prefix##_exc_state; PyObject *prefix##_origin_or_finalizer; char prefix##_hooks_inited; char prefix##_closed; char prefix##_running_async; /* The frame */ int8_t prefix##_frame_state; PyObject *prefix##_iframe[1]; ", + "physical_line": 17 + }, + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "#define _PyGenObject_HEAD(prefix) PyObject_HEAD /* List of weak reference. */ PyObject *prefix##_weakreflist; /* Name of the generator. */ PyObject *prefix##_name; /* Qualified name of the generator. */ PyObject *prefix##_qualname; _PyErr_StackItem prefix##_exc_state; PyObject *prefix##_origin_or_finalizer; char prefix##_hooks_inited; char prefix##_closed; char prefix##_running_async; /* The frame */ int8_t prefix##_frame_state; PyObject *prefix##_iframe[1]; ", + "physical_line": 19 + }, + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "#define _PyGenObject_HEAD(prefix) PyObject_HEAD /* List of weak reference. */ PyObject *prefix##_weakreflist; /* Name of the generator. */ PyObject *prefix##_name; /* Qualified name of the generator. */ PyObject *prefix##_qualname; _PyErr_StackItem prefix##_exc_state; PyObject *prefix##_origin_or_finalizer; char prefix##_hooks_inited; char prefix##_closed; char prefix##_running_async; /* The frame */ int8_t prefix##_frame_state; PyObject *prefix##_iframe[1]; ", + "physical_line": 21 + }, + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "#define _PyGenObject_HEAD(prefix) PyObject_HEAD /* List of weak reference. */ PyObject *prefix##_weakreflist; /* Name of the generator. */ PyObject *prefix##_name; /* Qualified name of the generator. */ PyObject *prefix##_qualname; _PyErr_StackItem prefix##_exc_state; PyObject *prefix##_origin_or_finalizer; char prefix##_hooks_inited; char prefix##_closed; char prefix##_running_async; /* The frame */ int8_t prefix##_frame_state; PyObject *prefix##_iframe[1]; ", + "physical_line": 22 + }, + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "#define _PyGenObject_HEAD(prefix) PyObject_HEAD /* List of weak reference. */ PyObject *prefix##_weakreflist; /* Name of the generator. */ PyObject *prefix##_name; /* Qualified name of the generator. */ PyObject *prefix##_qualname; _PyErr_StackItem prefix##_exc_state; PyObject *prefix##_origin_or_finalizer; char prefix##_hooks_inited; char prefix##_closed; char prefix##_running_async; /* The frame */ int8_t prefix##_frame_state; PyObject *prefix##_iframe[1]; ", + "physical_line": 23 + }, + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "#define _PyGenObject_HEAD(prefix) PyObject_HEAD /* List of weak reference. */ PyObject *prefix##_weakreflist; /* Name of the generator. */ PyObject *prefix##_name; /* Qualified name of the generator. */ PyObject *prefix##_qualname; _PyErr_StackItem prefix##_exc_state; PyObject *prefix##_origin_or_finalizer; char prefix##_hooks_inited; char prefix##_closed; char prefix##_running_async; /* The frame */ int8_t prefix##_frame_state; PyObject *prefix##_iframe[1]; ", + "physical_line": 24 + }, + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "#define _PyGenObject_HEAD(prefix) PyObject_HEAD /* List of weak reference. */ PyObject *prefix##_weakreflist; /* Name of the generator. */ PyObject *prefix##_name; /* Qualified name of the generator. */ PyObject *prefix##_qualname; _PyErr_StackItem prefix##_exc_state; PyObject *prefix##_origin_or_finalizer; char prefix##_hooks_inited; char prefix##_closed; char prefix##_running_async; /* The frame */ int8_t prefix##_frame_state; PyObject *prefix##_iframe[1]; ", + "physical_line": 25 + }, + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "#define _PyGenObject_HEAD(prefix) PyObject_HEAD /* List of weak reference. */ PyObject *prefix##_weakreflist; /* Name of the generator. */ PyObject *prefix##_name; /* Qualified name of the generator. */ PyObject *prefix##_qualname; _PyErr_StackItem prefix##_exc_state; PyObject *prefix##_origin_or_finalizer; char prefix##_hooks_inited; char prefix##_closed; char prefix##_running_async; /* The frame */ int8_t prefix##_frame_state; PyObject *prefix##_iframe[1]; ", + "physical_line": 26 + }, + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "#define _PyGenObject_HEAD(prefix) PyObject_HEAD /* List of weak reference. */ PyObject *prefix##_weakreflist; /* Name of the generator. */ PyObject *prefix##_name; /* Qualified name of the generator. */ PyObject *prefix##_qualname; _PyErr_StackItem prefix##_exc_state; PyObject *prefix##_origin_or_finalizer; char prefix##_hooks_inited; char prefix##_closed; char prefix##_running_async; /* The frame */ int8_t prefix##_frame_state; PyObject *prefix##_iframe[1]; ", + "physical_line": 28 + }, + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "#define _PyGenObject_HEAD(prefix) PyObject_HEAD /* List of weak reference. */ PyObject *prefix##_weakreflist; /* Name of the generator. */ PyObject *prefix##_name; /* Qualified name of the generator. */ PyObject *prefix##_qualname; _PyErr_StackItem prefix##_exc_state; PyObject *prefix##_origin_or_finalizer; char prefix##_hooks_inited; char prefix##_closed; char prefix##_running_async; /* The frame */ int8_t prefix##_frame_state; PyObject *prefix##_iframe[1]; ", + "physical_line": 29 + } + ], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/cpython/genobject.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 3316, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/cpython/genobject.h", + "occurrence_id": "corpus-0635", + "origin_position": null, + "sha256": "24f9bd2f19341dc73c7deebca17117ea3a94fd89865c0c6548e1bf5882f51d95" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/cpython/import.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1623, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/cpython/import.h", + "occurrence_id": "corpus-0636", + "origin_position": null, + "sha256": "f3a6cb7ea774d2ffcb64c834dffaf008e8f9f3f10b23600d5522d82176cb241c" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/cpython/initconfig.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 7820, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/cpython/initconfig.h", + "occurrence_id": "corpus-0637", + "origin_position": null, + "sha256": "86e3b9d1de6f310415912e2cdfdc276e311c026ec7fdf6190893f6313cd860a3" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/cpython/interpreteridobject.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 387, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/cpython/interpreteridobject.h", + "occurrence_id": "corpus-0638", + "origin_position": null, + "sha256": "8fc79784d556245d7b7f382063ef3797e3aebd0a6b375a95027dd63a5dfa30b6" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/cpython/listobject.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1633, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/cpython/listobject.h", + "occurrence_id": "corpus-0639", + "origin_position": null, + "sha256": "0ccca44b405add7a8c19d7a5e7701e06ab904cce5c430016b50f7968aef296fe" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/cpython/longintrepr.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 4889, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/cpython/longintrepr.h", + "occurrence_id": "corpus-0640", + "origin_position": null, + "sha256": "e2acf37f668089278081539473eeedc8537b848fcd2eb91f53172701c014b9c3" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/cpython/longobject.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 4679, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/cpython/longobject.h", + "occurrence_id": "corpus-0641", + "origin_position": null, + "sha256": "b443782d6b69a2cfd141ac13ac8b7a8d69e47bfdae9df984de4991b2d248b8b8" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/cpython/memoryobject.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 2272, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/cpython/memoryobject.h", + "occurrence_id": "corpus-0642", + "origin_position": null, + "sha256": "62f414f21611a31f453af7c8326b309aad8f79166087a951844921c50cc84dc7" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/cpython/methodobject.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 2276, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/cpython/methodobject.h", + "occurrence_id": "corpus-0643", + "origin_position": null, + "sha256": "5beb9f3b68ac72efe403a1b0a3fbbb14a5606a49a2840b9c7e9ff243d82d79b9" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/cpython/modsupport.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 4336, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/cpython/modsupport.h", + "occurrence_id": "corpus-0644", + "origin_position": null, + "sha256": "a8d08132874d9d642ade82e62e87a510577b7bd4ab0685a90b044cc3b005232d" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [ + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "#define _Py_IDENTIFIER(varname) _Py_static_string(PyId_##varname, #varname)", + "physical_line": 55 + } + ], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/cpython/object.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 21212, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/cpython/object.h", + "occurrence_id": "corpus-0645", + "origin_position": null, + "sha256": "f412fd84202ef228e6bf239c9a5a408b8d8623481a15452f8f3331dfc6342134" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/cpython/objimpl.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 3316, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/cpython/objimpl.h", + "occurrence_id": "corpus-0646", + "origin_position": null, + "sha256": "d99f0cff4297590a49f6616dbf1b04a06c745bed0a280ae35acc56fb3c47f2f3" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/cpython/odictobject.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1311, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/cpython/odictobject.h", + "occurrence_id": "corpus-0647", + "origin_position": null, + "sha256": "97dc6296e890463fc6994247e885df65cd4024dc1b05facfdc984c37d646b919" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/cpython/picklebufobject.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 848, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/cpython/picklebufobject.h", + "occurrence_id": "corpus-0648", + "origin_position": null, + "sha256": "7040fb48462296c903f2f0d24d2b54e0de63cf7512dcf8d3048a0cadf7d94fd0" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 31, + "filename": "bits/alltypes.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 12, + "physical_line": 31 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/cpython/pthread_stubs.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 3505, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/cpython/pthread_stubs.h", + "occurrence_id": "corpus-0649", + "origin_position": null, + "sha256": "0f3108e0430ee937098c86352d2ced6e3ec7f5cb5bc7e06eebee58cf779fcd89" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/cpython/pyctype.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1387, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/cpython/pyctype.h", + "occurrence_id": "corpus-0650", + "origin_position": null, + "sha256": "10b5ccbc210fd2832e9c34849a3952e8db75f0016add89188358b1da6a8f3dbb" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/cpython/pydebug.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1413, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/cpython/pydebug.h", + "occurrence_id": "corpus-0651", + "origin_position": null, + "sha256": "83d72e867b4fc9ac87efdfcb41c3d30ec20fa239fe6a74d1b85aa92e1f8d9506" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/cpython/pyerrors.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 4276, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/cpython/pyerrors.h", + "occurrence_id": "corpus-0652", + "origin_position": null, + "sha256": "1f5070d787263e3aa8845dc90b38aaeb0945be83ef2ba993a40b4af926daacad" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/cpython/pyfpe.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 444, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/cpython/pyfpe.h", + "occurrence_id": "corpus-0653", + "origin_position": null, + "sha256": "ea7bfa7d891a0b5372d8b40a57d1b466b7824296e5c3f8d50b1a7cde084429b7" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/cpython/pyframe.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1479, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/cpython/pyframe.h", + "occurrence_id": "corpus-0654", + "origin_position": null, + "sha256": "0c7ea17874b967892de6f6623aa426d5eaf267a56e6bbb84b3fefa40e59ec1b8" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/cpython/pylifecycle.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 3423, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/cpython/pylifecycle.h", + "occurrence_id": "corpus-0655", + "origin_position": null, + "sha256": "02505815b8bc3e33fe31a11f4f7f960826aa1dce2c4cee6d62d2a0394470c9bf" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/cpython/pymem.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 3379, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/cpython/pymem.h", + "occurrence_id": "corpus-0656", + "origin_position": null, + "sha256": "8a3795a9350b10548e8ad6d37dad69be2abd3870a751e67faa32a19a090608db" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/cpython/pystate.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 17228, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/cpython/pystate.h", + "occurrence_id": "corpus-0657", + "origin_position": null, + "sha256": "11494795dd1d6945fbf8036af5ccf247463e94d405a760924a1c78f78ebfc4ec" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/cpython/pythonrun.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 4903, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/cpython/pythonrun.h", + "occurrence_id": "corpus-0658", + "origin_position": null, + "sha256": "3290ea064e7450aaf43320a5fcac22d9b36acfab43d1d2c3381ade4b726ced8f" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 16, + "filename": "pthread.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 13, + "physical_line": 16 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 24, + "filename": "cpython/pthread_stubs.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 13, + "physical_line": 24 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/cpython/pythread.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1426, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/cpython/pythread.h", + "occurrence_id": "corpus-0659", + "origin_position": null, + "sha256": "7239113064e41ba5a678b665af17bee1f878d51076f6d82f89d5d52151ebf573" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/cpython/pytime.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 12375, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/cpython/pytime.h", + "occurrence_id": "corpus-0660", + "origin_position": null, + "sha256": "64b70f16b9e6845e0378f2f9108952731ca5bd43b33609781dccd5af70d60204" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/cpython/setobject.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 2146, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/cpython/setobject.h", + "occurrence_id": "corpus-0661", + "origin_position": null, + "sha256": "c965bf093325e20c319af5183a8e5723d4d0b373cb6d1b8781df8c1e588963c0" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/cpython/sysmodule.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 489, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/cpython/sysmodule.h", + "occurrence_id": "corpus-0662", + "origin_position": null, + "sha256": "d4936db24692cccadb19c11accda260787f95e5658f88cfc752d9a49344ee051" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/cpython/traceback.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 444, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/cpython/traceback.h", + "occurrence_id": "corpus-0663", + "origin_position": null, + "sha256": "7898a3c168973e1119fb3b57f144be627c1468082ab0b91d001dd876dd1dbcb6" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/cpython/tupleobject.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1377, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/cpython/tupleobject.h", + "occurrence_id": "corpus-0664", + "origin_position": null, + "sha256": "301c0720038f50d8e9087b38cf1392524abf9e28262b677d841fc1a7e172c3f3" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/cpython/unicodeobject.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 35296, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/cpython/unicodeobject.h", + "occurrence_id": "corpus-0665", + "origin_position": null, + "sha256": "edfa102633ee0e3cc42652a36912b568ae0cea8bb72360cc97876f170504209c" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/cpython/warnings.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 564, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/cpython/warnings.h", + "occurrence_id": "corpus-0666", + "origin_position": null, + "sha256": "b758a2e42b0c497ea811464f579603d14fc30b50bd6ebe064d8d2a7df7e2bd76" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/cpython/weakrefobject.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 2032, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/cpython/weakrefobject.h", + "occurrence_id": "corpus-0667", + "origin_position": null, + "sha256": "be0ab05169da7efcd13aba0ddc58604a80328d4e60349df6d4efdd1bf363e1a2" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/datetime.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 9769, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/datetime.h", + "occurrence_id": "corpus-0668", + "origin_position": null, + "sha256": "f3d8192cada0f490a67233e615e5974f062501b2876147118ddb042ee4a7f988" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 2, + "delimiter": "quote", + "directive_physical_line": 93, + "filename": "cpython/descrobject.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 12, + "physical_line": 93 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/descrobject.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 3080, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/descrobject.h", + "occurrence_id": "corpus-0669", + "origin_position": null, + "sha256": "2956a488f4c4c61341e361dac949cfa4a217e0fbd0097892513b02363c9570a7" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 2, + "delimiter": "quote", + "directive_physical_line": 90, + "filename": "cpython/dictobject.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 12, + "physical_line": 90 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/dictobject.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 3860, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/dictobject.h", + "occurrence_id": "corpus-0670", + "origin_position": null, + "sha256": "08f92e2a4421d3e81fa0fa1b60cbe97f2d69897226368481b0ffc41eeb202356" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [ + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "#define _Py_ANNOTATE_BENIGN_RACE_STATIC(static_var, description) namespace { class static_var ## _annotator { public: static_var ## _annotator() { _Py_ANNOTATE_BENIGN_RACE_SIZED(&static_var, sizeof(static_var), # static_var \": \" description); } }; static static_var ## _annotator the ## static_var ## _annotator; }", + "physical_line": 482 + }, + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "#define _Py_ANNOTATE_BENIGN_RACE_STATIC(static_var, description) namespace { class static_var ## _annotator { public: static_var ## _annotator() { _Py_ANNOTATE_BENIGN_RACE_SIZED(&static_var, sizeof(static_var), # static_var \": \" description); } }; static static_var ## _annotator the ## static_var ## _annotator; }", + "physical_line": 484 + }, + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "#define _Py_ANNOTATE_BENIGN_RACE_STATIC(static_var, description) namespace { class static_var ## _annotator { public: static_var ## _annotator() { _Py_ANNOTATE_BENIGN_RACE_SIZED(&static_var, sizeof(static_var), # static_var \": \" description); } }; static static_var ## _annotator the ## static_var ## _annotator; }", + "physical_line": 490 + } + ], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/dynamic_annotations.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 22471, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/dynamic_annotations.h", + "occurrence_id": "corpus-0671", + "origin_position": null, + "sha256": "3e4366f7d082835049730358d277a5ad7a60e16d1601f5622f0a045a37c152ac" + }, + "supported_language_scan": false, + "unsupported_frontier": [ + { + "code": "potential_synthesized_file_operator", + "detail": "interior macro argument may split paste chains", + "form": "#define _Py_ANNOTATE_BENIGN_RACE_STATIC(static_var, description) namespace { class static_var ## _annotator { public: static_var ## _annotator() { _Py_ANNOTATE_BENIGN_RACE_SIZED(&static_var, sizeof(static_var), # static_var \": \" description); } }; static static_var ## _annotator the ## static_var ## _annotator; }", + "original_physical_line_bytes_latin1": " static static_var ## _annotator the ## static_var ## _annotator;\\", + "physical_line": 490 + } + ] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/enumobject.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 253, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/enumobject.h", + "occurrence_id": "corpus-0672", + "origin_position": null, + "sha256": "2244fe250db9995068fe74dce0e23fd70c12b03fd94751d98b773be8f64896b6" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/errcode.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1779, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/errcode.h", + "occurrence_id": "corpus-0673", + "origin_position": null, + "sha256": "e09ffcbb80580103d52992eb5fd8fd01b9930fda5e8f3874bfb9ee7aa2fe99fa" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/exports.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1267, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/exports.h", + "occurrence_id": "corpus-0674", + "origin_position": null, + "sha256": "d02e9937f747660b218062bcdab504b706cad264b4df993f749d9118f2f7b65c" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 2, + "delimiter": "quote", + "directive_physical_line": 42, + "filename": "cpython/fileobject.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 12, + "physical_line": 42 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/fileobject.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1650, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/fileobject.h", + "occurrence_id": "corpus-0675", + "origin_position": null, + "sha256": "133e57cf705cbdaa79a0c115b27e748cc24dedb51ea17b441ff65d05df28a674" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 2, + "delimiter": "quote", + "directive_physical_line": 19, + "filename": "cpython/fileutils.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 12, + "physical_line": 19 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/fileutils.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 507, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/fileutils.h", + "occurrence_id": "corpus-0676", + "origin_position": null, + "sha256": "51ae1c2ca70a8005206f653121d1ba3247f59421c96399739845d687980e9b01" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 2, + "delimiter": "quote", + "directive_physical_line": 47, + "filename": "cpython/floatobject.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 12, + "physical_line": 47 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/floatobject.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1532, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/floatobject.h", + "occurrence_id": "corpus-0677", + "origin_position": null, + "sha256": "2da72b48fa342e53f72848d468c3c11a9d5b62922f2bd71c286331f54f2364a1" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 9, + "filename": "pyframe.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 9 + }, + { + "conditional_depth": 2, + "delimiter": "quote", + "directive_physical_line": 13, + "filename": "cpython/frameobject.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 12, + "physical_line": 13 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/frameobject.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 336, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/frameobject.h", + "occurrence_id": "corpus-0678", + "origin_position": null, + "sha256": "969cd93065ce79b81bbc67a65d31b742e23f30bf79d6e44a306963d552ed0c35" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/genericaliasobject.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 334, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/genericaliasobject.h", + "occurrence_id": "corpus-0679", + "origin_position": null, + "sha256": "0e53a0b18c114be68eccea9ffd1dd577e204b1f0ada4d3aedc8e7ee0c80fc7f8" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 2, + "delimiter": "quote", + "directive_physical_line": 91, + "filename": "cpython/import.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 12, + "physical_line": 91 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/import.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 3033, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/import.h", + "occurrence_id": "corpus-0680", + "origin_position": null, + "sha256": "4113e1b6afa760c3decce2bb765835adda19861394974cfe301e1ccb482e2b94" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/internal/pycore_abstract.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 611, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/internal/pycore_abstract.h", + "occurrence_id": "corpus-0681", + "origin_position": null, + "sha256": "75ecd34cdcd06fc64fcfa550f66975d755619e7cf06fdae8ecbe2de6ec49ce39" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 11, + "filename": "pycore_pyarena.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 11 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/internal/pycore_asdl.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 3035, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/internal/pycore_asdl.h", + "occurrence_id": "corpus-0682", + "origin_position": null, + "sha256": "b29dace0f84849c4a24bc3745523a36911cd192bad7ec6fb48aba8facff51d3e" + }, + "supported_language_scan": false, + "unsupported_frontier": [ + { + "code": "potential_synthesized_file_operator", + "detail": "interior macro argument may split paste chains", + "form": "#define GENERATE_ASDL_SEQ_CONSTRUCTOR(NAME, TYPE) asdl_ ## NAME ## _seq *_Py_asdl_ ## NAME ## _seq_new(Py_ssize_t size, PyArena *arena) { asdl_ ## NAME ## _seq *seq = NULL; size_t n; /* check size is sane */ if (size < 0 || (size && (((size_t)size - 1) > (SIZE_MAX / sizeof(void *))))) { PyErr_NoMemory(); return NULL; } n = (size ? (sizeof(TYPE *) * (size - 1)) : 0); /* check if size can be added safely */ if (n > SIZE_MAX - sizeof(asdl_ ## NAME ## _seq)) { PyErr_NoMemory(); return NULL; } n += sizeof(asdl_ ## NAME ## _seq); seq = (asdl_ ## NAME ## _seq *)_PyArena_Malloc(arena, n); if (!seq) { PyErr_NoMemory(); return NULL; } memset(seq, 0, n); seq->size = size; seq->elements = (void**)seq->typed_elements; return seq; }", + "original_physical_line_bytes_latin1": "asdl_ ## NAME ## _seq *_Py_asdl_ ## NAME ## _seq_new(Py_ssize_t size, PyArena *arena) \\", + "physical_line": 53 + }, + { + "code": "potential_synthesized_file_operator", + "detail": "interior macro argument may split paste chains", + "form": "#define GENERATE_ASDL_SEQ_CONSTRUCTOR(NAME, TYPE) asdl_ ## NAME ## _seq *_Py_asdl_ ## NAME ## _seq_new(Py_ssize_t size, PyArena *arena) { asdl_ ## NAME ## _seq *seq = NULL; size_t n; /* check size is sane */ if (size < 0 || (size && (((size_t)size - 1) > (SIZE_MAX / sizeof(void *))))) { PyErr_NoMemory(); return NULL; } n = (size ? (sizeof(TYPE *) * (size - 1)) : 0); /* check if size can be added safely */ if (n > SIZE_MAX - sizeof(asdl_ ## NAME ## _seq)) { PyErr_NoMemory(); return NULL; } n += sizeof(asdl_ ## NAME ## _seq); seq = (asdl_ ## NAME ## _seq *)_PyArena_Malloc(arena, n); if (!seq) { PyErr_NoMemory(); return NULL; } memset(seq, 0, n); seq->size = size; seq->elements = (void**)seq->typed_elements; return seq; }", + "original_physical_line_bytes_latin1": " asdl_ ## NAME ## _seq *seq = NULL; \\", + "physical_line": 55 + }, + { + "code": "potential_synthesized_file_operator", + "detail": "interior macro argument may split paste chains", + "form": "#define GENERATE_ASDL_SEQ_CONSTRUCTOR(NAME, TYPE) asdl_ ## NAME ## _seq *_Py_asdl_ ## NAME ## _seq_new(Py_ssize_t size, PyArena *arena) { asdl_ ## NAME ## _seq *seq = NULL; size_t n; /* check size is sane */ if (size < 0 || (size && (((size_t)size - 1) > (SIZE_MAX / sizeof(void *))))) { PyErr_NoMemory(); return NULL; } n = (size ? (sizeof(TYPE *) * (size - 1)) : 0); /* check if size can be added safely */ if (n > SIZE_MAX - sizeof(asdl_ ## NAME ## _seq)) { PyErr_NoMemory(); return NULL; } n += sizeof(asdl_ ## NAME ## _seq); seq = (asdl_ ## NAME ## _seq *)_PyArena_Malloc(arena, n); if (!seq) { PyErr_NoMemory(); return NULL; } memset(seq, 0, n); seq->size = size; seq->elements = (void**)seq->typed_elements; return seq; }", + "original_physical_line_bytes_latin1": " if (n > SIZE_MAX - sizeof(asdl_ ## NAME ## _seq)) { \\", + "physical_line": 65 + }, + { + "code": "potential_synthesized_file_operator", + "detail": "interior macro argument may split paste chains", + "form": "#define GENERATE_ASDL_SEQ_CONSTRUCTOR(NAME, TYPE) asdl_ ## NAME ## _seq *_Py_asdl_ ## NAME ## _seq_new(Py_ssize_t size, PyArena *arena) { asdl_ ## NAME ## _seq *seq = NULL; size_t n; /* check size is sane */ if (size < 0 || (size && (((size_t)size - 1) > (SIZE_MAX / sizeof(void *))))) { PyErr_NoMemory(); return NULL; } n = (size ? (sizeof(TYPE *) * (size - 1)) : 0); /* check if size can be added safely */ if (n > SIZE_MAX - sizeof(asdl_ ## NAME ## _seq)) { PyErr_NoMemory(); return NULL; } n += sizeof(asdl_ ## NAME ## _seq); seq = (asdl_ ## NAME ## _seq *)_PyArena_Malloc(arena, n); if (!seq) { PyErr_NoMemory(); return NULL; } memset(seq, 0, n); seq->size = size; seq->elements = (void**)seq->typed_elements; return seq; }", + "original_physical_line_bytes_latin1": " n += sizeof(asdl_ ## NAME ## _seq); \\", + "physical_line": 69 + }, + { + "code": "potential_synthesized_file_operator", + "detail": "interior macro argument may split paste chains", + "form": "#define GENERATE_ASDL_SEQ_CONSTRUCTOR(NAME, TYPE) asdl_ ## NAME ## _seq *_Py_asdl_ ## NAME ## _seq_new(Py_ssize_t size, PyArena *arena) { asdl_ ## NAME ## _seq *seq = NULL; size_t n; /* check size is sane */ if (size < 0 || (size && (((size_t)size - 1) > (SIZE_MAX / sizeof(void *))))) { PyErr_NoMemory(); return NULL; } n = (size ? (sizeof(TYPE *) * (size - 1)) : 0); /* check if size can be added safely */ if (n > SIZE_MAX - sizeof(asdl_ ## NAME ## _seq)) { PyErr_NoMemory(); return NULL; } n += sizeof(asdl_ ## NAME ## _seq); seq = (asdl_ ## NAME ## _seq *)_PyArena_Malloc(arena, n); if (!seq) { PyErr_NoMemory(); return NULL; } memset(seq, 0, n); seq->size = size; seq->elements = (void**)seq->typed_elements; return seq; }", + "original_physical_line_bytes_latin1": " seq = (asdl_ ## NAME ## _seq *)_PyArena_Malloc(arena, n); \\", + "physical_line": 70 + } + ] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 13, + "filename": "pycore_asdl.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 13 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/internal/pycore_ast.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 31288, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/internal/pycore_ast.h", + "occurrence_id": "corpus-0683", + "origin_position": null, + "sha256": "064b6778fa758fb2580fb8770f77dd0d1eb19323df0e345373788c75754910cf" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/internal/pycore_ast_state.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 6749, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/internal/pycore_ast_state.h", + "occurrence_id": "corpus-0684", + "origin_position": null, + "sha256": "1d76a7b5207c653a86dec97aab5ba1fcc5c75e94333662792a692cb68e5b26c6" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/internal/pycore_atexit.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1149, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/internal/pycore_atexit.h", + "occurrence_id": "corpus-0685", + "origin_position": null, + "sha256": "8c5c88b8452894cf8a5f243ceb9021060f0fe8f5689cbc3e705c19c5edc0798a" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 11, + "filename": "dynamic_annotations.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 11 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 12, + "filename": "pyconfig.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 12 + }, + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 15, + "filename": "stdatomic.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 12, + "physical_line": 15 + }, + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 20, + "filename": "intrin.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 20 + }, + { + "conditional_depth": 3, + "delimiter": "angle", + "directive_physical_line": 22, + "filename": "immintrin.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 12, + "physical_line": 22 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/internal/pycore_atomic.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 16979, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/internal/pycore_atomic.h", + "occurrence_id": "corpus-0686", + "origin_position": null, + "sha256": "95e7118e799ad3faafc8e58a29b2d1f1a4bb94e1aac3273e042f379f8e12d4e6" + }, + "supported_language_scan": false, + "unsupported_frontier": [ + { + "code": "unsupported_assembler_construct", + "detail": "", + "form": " __asm__ volatile(\"\":::\"memory\");", + "original_physical_line_bytes_latin1": " __asm__ volatile(\"\":::\"memory\");", + "physical_line": 127 + }, + { + "code": "unsupported_assembler_construct", + "detail": "", + "form": " __asm__ volatile(\"mfence\":::\"memory\");", + "original_physical_line_bytes_latin1": " __asm__ volatile(\"mfence\":::\"memory\");", + "physical_line": 134 + }, + { + "code": "unsupported_assembler_construct", + "detail": "", + "form": "#define _Py_atomic_store_explicit(ATOMIC_VAL, NEW_VAL, ORDER) __extension__ ({ __typeof__(ATOMIC_VAL) atomic_val = ATOMIC_VAL; __typeof__(atomic_val->_value) new_val = NEW_VAL; volatile __typeof__(new_val) *volatile_data = &atomic_val->_value; _Py_memory_order order = ORDER; _Py_ANNOTATE_MEMORY_ORDER(atomic_val, order); /* Perform the operation. */ _Py_ANNOTATE_IGNORE_WRITES_BEGIN(); switch(order) { case _Py_memory_order_release: _Py_atomic_signal_fence(_Py_memory_order_release); /* fallthrough */ case _Py_memory_order_relaxed: *volatile_data = new_val; break; case _Py_memory_order_acquire: case _Py_memory_order_acq_rel: case _Py_memory_order_seq_cst: __asm__ volatile(\"xchg %0, %1\" : \"+r\"(new_val) : \"m\"(atomic_val->_value) : \"memory\"); break; } _Py_ANNOTATE_IGNORE_WRITES_END(); })", + "original_physical_line_bytes_latin1": " __asm__ volatile(\"xchg %0, %1\" \\", + "physical_line": 185 + } + ] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 23, + "filename": "intrin.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 12, + "physical_line": 23 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/internal/pycore_atomic_funcs.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 2438, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/internal/pycore_atomic_funcs.h", + "occurrence_id": "corpus-0687", + "origin_position": null, + "sha256": "9d5cfa13ad863a0cc1b0ab06861c1f8cfbdc7d730b9c4603e5777a608263d399" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 30, + "filename": "intrin.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 12, + "physical_line": 30 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/internal/pycore_bitutils.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 6062, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/internal/pycore_bitutils.h", + "occurrence_id": "corpus-0688", + "origin_position": null, + "sha256": "86628b9cbefe4ff000e1190cd36f37b70a2dad6a4e9231cc2466a84579cc2139" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 41, + "filename": "Python.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 41 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/internal/pycore_blocks_output_buffer.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 8688, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/internal/pycore_blocks_output_buffer.h", + "occurrence_id": "corpus-0689", + "origin_position": null, + "sha256": "03fed5054d0d78e3711e73995e484fefb81495c063a5b9ef555c0395d7fc1ebc" + }, + "supported_language_scan": false, + "unsupported_frontier": [ + { + "code": "missing_final_newline", + "detail": "", + "form": "#endif /* Py_INTERNAL_BLOCKS_OUTPUT_BUFFER_H */", + "original_physical_line_bytes_latin1": "#endif /* Py_INTERNAL_BLOCKS_OUTPUT_BUFFER_H */", + "physical_line": 317 + } + ] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/internal/pycore_bytes_methods.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 3384, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/internal/pycore_bytes_methods.h", + "occurrence_id": "corpus-0690", + "origin_position": null, + "sha256": "1534326dbf027e9bb472be5ccf8b82fab48f3282cc7f6a61629b801fc80afc00" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/internal/pycore_bytesobject.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1339, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/internal/pycore_bytesobject.h", + "occurrence_id": "corpus-0691", + "origin_position": null, + "sha256": "d3ecf25cf0f0e9815ac24f496e5ccbbf8d57a10e570da81e84f2b5f6e95b59b8" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 11, + "filename": "pycore_pystate.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 11 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/internal/pycore_call.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 3920, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/internal/pycore_call.h", + "occurrence_id": "corpus-0692", + "origin_position": null, + "sha256": "5e780aed2dc991455a0e528fc7baca8df61d2e4bec4e137d7e788668b5750ec5" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 19, + "filename": "pycore_interp.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 19 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 20, + "filename": "pycore_pystate.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 20 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/internal/pycore_ceval.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 5265, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/internal/pycore_ceval.h", + "occurrence_id": "corpus-0693", + "origin_position": null, + "sha256": "1af22b50c9ececfc4c3a5f37ecb70cc1c0eefad5a2656e6e22fc088cae54e226" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 12, + "filename": "pycore_atomic.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 12 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 13, + "filename": "pycore_gil.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 13 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/internal/pycore_ceval_state.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 2744, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/internal/pycore_ceval_state.h", + "occurrence_id": "corpus-0694", + "origin_position": null, + "sha256": "f29e3d6dcac96b0067a17845df8483013230805db10c6f3c5ecd02b9134640e7" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/internal/pycore_code.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 15835, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/internal/pycore_code.h", + "occurrence_id": "corpus-0695", + "origin_position": null, + "sha256": "48e78dd1a12e6afa6e54e26f8e7c4f56e20689b84189d503507c7f6c36819092" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/internal/pycore_compile.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 3453, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/internal/pycore_compile.h", + "occurrence_id": "corpus-0696", + "origin_position": null, + "sha256": "4d386629f5e0ea801a01122833f11363cf9f1584aef6e9692ffd0b95eda37cbc" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 3, + "delimiter": "angle", + "directive_physical_line": 13, + "filename": "pthread.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 12, + "physical_line": 13 + }, + { + "conditional_depth": 3, + "delimiter": "angle", + "directive_physical_line": 24, + "filename": "pthread.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 12, + "physical_line": 24 + }, + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 41, + "filename": "windows.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 41 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/internal/pycore_condvar.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 2839, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/internal/pycore_condvar.h", + "occurrence_id": "corpus-0697", + "origin_position": null, + "sha256": "89a5d9c366c2e1c312e1ace5067d184380242c944deb698b6a4f53b51abd5826" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 8, + "filename": "pycore_hamt.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 8 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/internal/pycore_context.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1301, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/internal/pycore_context.h", + "occurrence_id": "corpus-0698", + "origin_position": null, + "sha256": "974d6bafbe0164d60dd1bc4f09b5eac9bcc9e2d9066924ba2a2ba6d502f115b5" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/internal/pycore_descrobject.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 499, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/internal/pycore_descrobject.h", + "occurrence_id": "corpus-0699", + "origin_position": null, + "sha256": "d9be424b5c2d109b51338016acab6132f299c0640fc069fb0e1d48575089574e" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 12, + "filename": "pycore_dict_state.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 12 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 13, + "filename": "pycore_runtime.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 13 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/internal/pycore_dict.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 6384, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/internal/pycore_dict.h", + "occurrence_id": "corpus-0700", + "origin_position": null, + "sha256": "4d51e7184d50a5f8785a1cbdc9f6eb36b86201158ae6e3527884ce2b5dd504bf" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/internal/pycore_dict_state.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1095, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/internal/pycore_dict_state.h", + "occurrence_id": "corpus-0701", + "origin_position": null, + "sha256": "5a15c2bb4020ce4a1d7a4c651e0f98b4becd910f89cd7c4089c80a0419ec4f1c" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 11, + "filename": "pycore_pymath.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 11 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/internal/pycore_dtoa.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1626, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/internal/pycore_dtoa.h", + "occurrence_id": "corpus-0702", + "origin_position": null, + "sha256": "a67261c7187a02a6d2ef7fef8207acb85ce5906f4ee970f4f06822f695f489ad" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/internal/pycore_emscripten_signal.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 562, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/internal/pycore_emscripten_signal.h", + "occurrence_id": "corpus-0703", + "origin_position": null, + "sha256": "1acd47a1c09e365be8c7fa51db31307021cc2e471471fc199e26f317df58c4b8" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/internal/pycore_exceptions.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 842, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/internal/pycore_exceptions.h", + "occurrence_id": "corpus-0704", + "origin_position": null, + "sha256": "4590af737d53afcbd7d559434190d2d8ff4f5cd0e923837721aea5ebb000ef68" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 12, + "filename": "signal.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 12, + "physical_line": 12 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/internal/pycore_faulthandler.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 2220, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/internal/pycore_faulthandler.h", + "occurrence_id": "corpus-0705", + "origin_position": null, + "sha256": "6444dce1924eae011d27385183ad1a5de6908501cedce2e1531abd834c68cae7" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 11, + "filename": "locale.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 11 + }, + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 262, + "filename": "winerror.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 262 + }, + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 276, + "filename": "stdlib.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 12, + "physical_line": 276 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/internal/pycore_fileutils.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 7910, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/internal/pycore_fileutils.h", + "occurrence_id": "corpus-0706", + "origin_position": null, + "sha256": "ea9cac693c87dc049f199cecd2844592ee08d0283dc0b059c4caab517932af73" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/internal/pycore_fileutils_windows.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 2724, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/internal/pycore_fileutils_windows.h", + "occurrence_id": "corpus-0707", + "origin_position": null, + "sha256": "9e976ea0f3457c8b40db0a3b2cfea9e9684737f75282400ec0040ae0df1e6385" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/internal/pycore_floatobject.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1578, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/internal/pycore_floatobject.h", + "occurrence_id": "corpus-0708", + "origin_position": null, + "sha256": "021fef24c4b7e7390c793af7ccf12ddd94b1871e27d26997b37eb3093d5380b5" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 11, + "filename": "pycore_opcode_utils.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 11 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 12, + "filename": "pycore_compile.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 12 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/internal/pycore_flowgraph.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 4630, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/internal/pycore_flowgraph.h", + "occurrence_id": "corpus-0709", + "origin_position": null, + "sha256": "c58cdc30ce8c853404f55881813ec69d6dbf921f2769ec9e289b5155b7a349db" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/internal/pycore_format.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 480, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/internal/pycore_format.h", + "occurrence_id": "corpus-0710", + "origin_position": null, + "sha256": "253cc77e6d11ba20d297813e064650fa965b3653f150bd85f805b94db5f3a98d" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 7, + "filename": "stdbool.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 7 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 8, + "filename": "stddef.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 8 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 9, + "filename": "pycore_code.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 9 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/internal/pycore_frame.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 9256, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/internal/pycore_frame.h", + "occurrence_id": "corpus-0711", + "origin_position": null, + "sha256": "97c7e2722af4c30c240b8b3c867a54b2fe49a4207d2e566c6a19a9d190fd0f8a" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/internal/pycore_function.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 611, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/internal/pycore_function.h", + "occurrence_id": "corpus-0712", + "origin_position": null, + "sha256": "8fad970bd3f31347aed72b92acd17270dbb6ec5333ab5ed6fe43dc9cf2527841" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/internal/pycore_gc.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 7658, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/internal/pycore_gc.h", + "occurrence_id": "corpus-0713", + "origin_position": null, + "sha256": "d0349a94dafb16ec4c05ba5a94d3b9e6cec53fe7b5e0d74216ea31996546f9a3" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/internal/pycore_genobject.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1186, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/internal/pycore_genobject.h", + "occurrence_id": "corpus-0714", + "origin_position": null, + "sha256": "a940f41da1e8d9d12c9c438ea0b4f24e72abc494447bcecd9423b76f54e3402a" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/internal/pycore_getopt.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 490, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/internal/pycore_getopt.h", + "occurrence_id": "corpus-0715", + "origin_position": null, + "sha256": "e93393067b66b557b0300e05c10ee904d4be54cadfb214c5328a9225ad199452" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 11, + "filename": "pycore_atomic.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 11 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 12, + "filename": "pycore_condvar.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 12 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/internal/pycore_gil.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1565, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/internal/pycore_gil.h", + "occurrence_id": "corpus-0716", + "origin_position": null, + "sha256": "cf455aacd5651e5b43547ebe69bb324eab84238d92665df53c1df32434bd0d9b" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 11, + "filename": "pycore_hashtable.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 11 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 12, + "filename": "pycore_gc.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 12 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 13, + "filename": "pycore_global_strings.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 13 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 14, + "filename": "pycore_hamt.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 14 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 15, + "filename": "pycore_context.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 15 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 16, + "filename": "pycore_typeobject.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 16 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/internal/pycore_global_objects.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 3035, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/internal/pycore_global_objects.h", + "occurrence_id": "corpus-0717", + "origin_position": null, + "sha256": "ce857a319514b1682eb054bf4a017974b0bf211092819b25f23e877a228090df" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/internal/pycore_global_objects_fini_generated.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 116175, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/internal/pycore_global_objects_fini_generated.h", + "occurrence_id": "corpus-0718", + "origin_position": null, + "sha256": "79fd2e366a02d8b39181f7466a32af1b1c69ec5566bf301b3d9943c552cf9206" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [ + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "#define STRUCT_FOR_STR(NAME, LITERAL) STRUCT_FOR_ASCII_STR(LITERAL) _py_ ## NAME;", + "physical_line": 22 + }, + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "#define STRUCT_FOR_ID(NAME) STRUCT_FOR_ASCII_STR(#NAME) _py_ ## NAME;", + "physical_line": 24 + }, + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "#define _Py_ID(NAME) (_Py_SINGLETON(strings.identifiers._py_ ## NAME._ascii.ob_base))", + "physical_line": 768 + }, + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "#define _Py_STR(NAME) (_Py_SINGLETON(strings.literals._py_ ## NAME._ascii.ob_base))", + "physical_line": 770 + } + ], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/internal/pycore_global_strings.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 25665, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/internal/pycore_global_strings.h", + "occurrence_id": "corpus-0719", + "origin_position": null, + "sha256": "7991d72ba2c0d8c4cc58575bc29a53fb2a61a89f03335e60320df097d58f1adb" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/internal/pycore_hamt.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 3742, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/internal/pycore_hamt.h", + "occurrence_id": "corpus-0720", + "origin_position": null, + "sha256": "074b31c2f5701cac43d8dc3e4ede40b2befc6dddfcaa2862cfc8f76234c30ae8" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/internal/pycore_hashtable.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 4286, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/internal/pycore_hashtable.h", + "occurrence_id": "corpus-0721", + "origin_position": null, + "sha256": "690488a7e50ad743e1bb685702fbcfac866ace89d2417a247c1171afdc222261" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 2, + "delimiter": "quote", + "directive_physical_line": 8, + "filename": "pycore_hashtable.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 8 + }, + { + "conditional_depth": 2, + "delimiter": "quote", + "directive_physical_line": 9, + "filename": "pycore_time.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 9 + }, + { + "conditional_depth": 3, + "delimiter": "angle", + "directive_physical_line": 83, + "filename": "dlfcn.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 12, + "physical_line": 83 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/internal/pycore_import.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 6358, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/internal/pycore_import.h", + "occurrence_id": "corpus-0722", + "origin_position": null, + "sha256": "e5b179692f05707e7fb182b908ed46f9a75f4a751b20501a74de2a440c387e1d" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/internal/pycore_initconfig.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 5706, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/internal/pycore_initconfig.h", + "occurrence_id": "corpus-0723", + "origin_position": null, + "sha256": "caf13e2c290ae8375636d0e1f3b1851a90396b3747da650d058c282b8743b558" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 6, + "filename": "pycore_bitutils.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 6 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 7, + "filename": "pycore_frame.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 7 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 9, + "filename": "cpython/code.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 9 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/internal/pycore_instruments.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 2998, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/internal/pycore_instruments.h", + "occurrence_id": "corpus-0724", + "origin_position": null, + "sha256": "dcdb0593cfa908c036d6661f1a776db48642c0fedd243da88161f45ff3c3e3fa" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 11, + "filename": "stdbool.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 11 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 13, + "filename": "pycore_ast_state.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 13 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 14, + "filename": "pycore_atexit.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 14 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 15, + "filename": "pycore_atomic.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 15 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 16, + "filename": "pycore_ceval_state.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 16 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 17, + "filename": "pycore_code.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 17 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 18, + "filename": "pycore_context.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 18 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 19, + "filename": "pycore_dict_state.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 19 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 20, + "filename": "pycore_dtoa.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 20 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 21, + "filename": "pycore_exceptions.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 21 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 22, + "filename": "pycore_floatobject.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 22 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 23, + "filename": "pycore_function.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 23 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 24, + "filename": "pycore_genobject.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 24 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 25, + "filename": "pycore_gc.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 25 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 26, + "filename": "pycore_global_objects.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 26 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 27, + "filename": "pycore_import.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 27 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 28, + "filename": "pycore_instruments.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 28 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 29, + "filename": "pycore_list.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 29 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 30, + "filename": "pycore_object_state.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 30 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 31, + "filename": "pycore_obmalloc.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 31 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 32, + "filename": "pycore_tuple.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 32 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 33, + "filename": "pycore_typeobject.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 33 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 34, + "filename": "pycore_unicodeobject.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 34 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 35, + "filename": "pycore_warnings.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 35 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/internal/pycore_interp.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 9086, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/internal/pycore_interp.h", + "occurrence_id": "corpus-0725", + "origin_position": null, + "sha256": "23f5d7884f9e0b212fe79879bbcdc5a2c23c22283db38cadbac6f108bf0f1b75" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/internal/pycore_intrinsics.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1397, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/internal/pycore_intrinsics.h", + "occurrence_id": "corpus-0726", + "origin_position": null, + "sha256": "e6d6d1eae51b508196615094a4c17189e9822eacb5c0e94102e78aa7136dd9a8" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 11, + "filename": "listobject.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 11 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/internal/pycore_list.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1980, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/internal/pycore_list.h", + "occurrence_id": "corpus-0727", + "origin_position": null, + "sha256": "470a62bb98b383b85ec738a6577424e6cdd51ae235f4e5ea06c5afdedb6e1652" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 11, + "filename": "pycore_global_objects.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 11 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 12, + "filename": "pycore_runtime.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 12 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/internal/pycore_long.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 7805, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/internal/pycore_long.h", + "occurrence_id": "corpus-0728", + "origin_position": null, + "sha256": "84c0c7bd7ba0c2fbbfb106561e32328e478d8350afe756af6a4862c95d921a06" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/internal/pycore_memoryobject.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 383, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/internal/pycore_memoryobject.h", + "occurrence_id": "corpus-0729", + "origin_position": null, + "sha256": "c845bb546019ed9999403018740ee5b26f83f8d888c5288895897cb2bd1b5eec" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/internal/pycore_moduleobject.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1192, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/internal/pycore_moduleobject.h", + "occurrence_id": "corpus-0730", + "origin_position": null, + "sha256": "55a8f42968545a349d8e0b43cd1822b22ae2cf9fa0fb098c6bb843e7af76e165" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/internal/pycore_namespace.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 392, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/internal/pycore_namespace.h", + "occurrence_id": "corpus-0731", + "origin_position": null, + "sha256": "466fe0e3f48e954d8bfe9e0c73fc9378cf79ca37710778ba6698e1c365304956" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 11, + "filename": "stdbool.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 11 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 12, + "filename": "pycore_gc.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 12 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 13, + "filename": "pycore_interp.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 13 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 14, + "filename": "pycore_pystate.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 14 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 15, + "filename": "pycore_runtime.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 15 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/internal/pycore_object.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 14429, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/internal/pycore_object.h", + "occurrence_id": "corpus-0732", + "origin_position": null, + "sha256": "ce41bd5e4720ffe713fd4f36798c92ec23ca966799805a0e2d4607dfc1d9dc2e" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/internal/pycore_object_state.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 737, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/internal/pycore_object_state.h", + "occurrence_id": "corpus-0733", + "origin_position": null, + "sha256": "3f8950c793e7121629508d4472c6b020f51d9eb583e317383b67da7f931c03ee" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/internal/pycore_obmalloc.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 27284, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/internal/pycore_obmalloc.h", + "occurrence_id": "corpus-0734", + "origin_position": null, + "sha256": "d8738004c5dbb5520f401919ed55181a48a9e64a3b51930309fc99fb9d219576" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/internal/pycore_obmalloc_init.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 2085, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/internal/pycore_obmalloc_init.h", + "occurrence_id": "corpus-0735", + "origin_position": null, + "sha256": "33853ff5ffac15a8622ff6920ff2bd0bf83d1df7ea6d1563916d05992b3203fb" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 13, + "filename": "opcode.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 13 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/internal/pycore_opcode.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 20081, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/internal/pycore_opcode.h", + "occurrence_id": "corpus-0736", + "origin_position": null, + "sha256": "432e30c6145dff72096325d17192d0eff9895b367d4590f782e2d8b9d5f78cd6" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 11, + "filename": "pycore_opcode.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 11 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/internal/pycore_opcode_utils.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 2686, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/internal/pycore_opcode_utils.h", + "occurrence_id": "corpus-0737", + "origin_position": null, + "sha256": "98dfb250812d554278dedee98a2e9cb05b2583b22d2af8ba1aeda6b130a21b40" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 12, + "filename": "pycore_ast.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 12 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 13, + "filename": "pycore_global_strings.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 13 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 14, + "filename": "pycore_pyarena.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 14 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/internal/pycore_parser.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1358, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/internal/pycore_parser.h", + "occurrence_id": "corpus-0738", + "origin_position": null, + "sha256": "91189a016020eb7de0b1ab8ae38145dbec6b561ae5c75cea15980cb76255ba5b" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/internal/pycore_pathconfig.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 606, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/internal/pycore_pathconfig.h", + "occurrence_id": "corpus-0739", + "origin_position": null, + "sha256": "ff96c74aae60eba62bec8c6d52f34471caf07792186bc16d76e7a783f61aa0ed" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/internal/pycore_pyarena.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 2733, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/internal/pycore_pyarena.h", + "occurrence_id": "corpus-0740", + "origin_position": null, + "sha256": "d4f4e513bae78ff985f51ca48fb7d1a4d57055c59393a1eb661e55e6ec3ba61f" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/internal/pycore_pyerrors.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 2783, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/internal/pycore_pyerrors.h", + "occurrence_id": "corpus-0741", + "origin_position": null, + "sha256": "6668d80af8838faf87ff2e37a536c2586e1588d1b23a08f04992c58f6c0630a3" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/internal/pycore_pyhash.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 709, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/internal/pycore_pyhash.h", + "occurrence_id": "corpus-0742", + "origin_position": null, + "sha256": "7c631d06afad90fa9c2ddc8dc04b7c2855ee5aa6e7ece0b22d0a966a702abf73" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 11, + "filename": "pycore_runtime.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 11 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/internal/pycore_pylifecycle.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 3365, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/internal/pycore_pylifecycle.h", + "occurrence_id": "corpus-0743", + "origin_position": null, + "sha256": "f6a91e690b8e5d3dca52dcdff63d36a6ad9ad85b7ee1edfc14215cc0483059fa" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 116, + "filename": "float.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 116 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/internal/pycore_pymath.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 8600, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/internal/pycore_pymath.h", + "occurrence_id": "corpus-0744", + "origin_position": null, + "sha256": "6dd3ea0f9a84bfa3a2eb0a2b7fa1af1dc8aadad3e74305e13f194a1586815376" + }, + "supported_language_scan": false, + "unsupported_frontier": [ + { + "code": "unsupported_assembler_construct", + "detail": "", + "form": "#define _Py_SET_53BIT_PRECISION_START do { __asm__ (\"fmove.l %%fpcr,%0\" : \"=g\" (old_fpcr)); /* Set double precision / round to nearest. */ new_fpcr = (old_fpcr & ~0xf0) | 0x80; if (new_fpcr != old_fpcr) { __asm__ volatile (\"fmove.l %0,%%fpcr\" : : \"g\" (new_fpcr)); } } while (0)", + "original_physical_line_bytes_latin1": " __asm__ (\"fmove.l %%fpcr,%0\" : \"=g\" (old_fpcr)); \\", + "physical_line": 149 + }, + { + "code": "unsupported_assembler_construct", + "detail": "", + "form": "#define _Py_SET_53BIT_PRECISION_START do { __asm__ (\"fmove.l %%fpcr,%0\" : \"=g\" (old_fpcr)); /* Set double precision / round to nearest. */ new_fpcr = (old_fpcr & ~0xf0) | 0x80; if (new_fpcr != old_fpcr) { __asm__ volatile (\"fmove.l %0,%%fpcr\" : : \"g\" (new_fpcr)); } } while (0)", + "original_physical_line_bytes_latin1": " __asm__ volatile (\"fmove.l %0,%%fpcr\" : : \"g\" (new_fpcr));\\", + "physical_line": 153 + }, + { + "code": "unsupported_assembler_construct", + "detail": "", + "form": "#define _Py_SET_53BIT_PRECISION_END do { if (new_fpcr != old_fpcr) { __asm__ volatile (\"fmove.l %0,%%fpcr\" : : \"g\" (old_fpcr)); } } while (0)", + "original_physical_line_bytes_latin1": " __asm__ volatile (\"fmove.l %0,%%fpcr\" : : \"g\" (old_fpcr)); \\", + "physical_line": 159 + } + ] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 11, + "filename": "pymem.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 11 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/internal/pycore_pymem.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 3040, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/internal/pycore_pymem.h", + "occurrence_id": "corpus-0745", + "origin_position": null, + "sha256": "ad0b35bbf5e665e90223499f8954bfcf36448b1634d54501b0c84d08680323ca" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 11, + "filename": "pycore_pymem.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 11 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/internal/pycore_pymem_init.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 2654, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/internal/pycore_pymem_init.h", + "occurrence_id": "corpus-0746", + "origin_position": null, + "sha256": "82a1418ee1867e5e9a2717e8a1acfec2e2ff3ef07225e30be7c8cd8f6e29a7ba" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 11, + "filename": "pycore_runtime.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 11 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/internal/pycore_pystate.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 4982, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/internal/pycore_pystate.h", + "occurrence_id": "corpus-0747", + "origin_position": null, + "sha256": "c06823811bf5dd3d84f40d6a087452da5915e3ad277afef2202c9e86e833ce00" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 3, + "delimiter": "angle", + "directive_physical_line": 17, + "filename": "pthread.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 12, + "physical_line": 17 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/internal/pycore_pythread.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 2075, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/internal/pycore_pythread.h", + "occurrence_id": "corpus-0748", + "origin_position": null, + "sha256": "ba04eed4d18d6110982cc58800fda11f3899c61fed644ff9e52a4adedb7b750a" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/internal/pycore_range.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 346, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/internal/pycore_range.h", + "occurrence_id": "corpus-0749", + "origin_position": null, + "sha256": "824c5023a85a9c1c2dd50fecf442d12c7b2966e0e71a2d291f6f17f7fd8c29bc" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 11, + "filename": "pycore_atexit.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 11 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 12, + "filename": "pycore_atomic.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 12 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 13, + "filename": "pycore_ceval_state.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 13 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 14, + "filename": "pycore_floatobject.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 14 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 15, + "filename": "pycore_faulthandler.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 15 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 16, + "filename": "pycore_global_objects.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 16 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 17, + "filename": "pycore_import.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 17 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 18, + "filename": "pycore_interp.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 18 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 19, + "filename": "pycore_object_state.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 19 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 20, + "filename": "pycore_parser.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 20 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 21, + "filename": "pycore_pymem.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 21 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 22, + "filename": "pycore_pyhash.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 22 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 23, + "filename": "pycore_pythread.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 23 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 24, + "filename": "pycore_signal.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 24 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 25, + "filename": "pycore_time.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 25 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 26, + "filename": "pycore_tracemalloc.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 26 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 27, + "filename": "pycore_typeobject.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 27 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 28, + "filename": "pycore_unicodeobject.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 28 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/internal/pycore_runtime.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 8429, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/internal/pycore_runtime.h", + "occurrence_id": "corpus-0750", + "origin_position": null, + "sha256": "d47fe4de4c245e2f90ce73792337565cae6ce95d8e2cd08bcda43ec92832b1ac" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 11, + "filename": "pycore_long.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 11 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 12, + "filename": "pycore_object.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 12 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 13, + "filename": "pycore_parser.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 13 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 14, + "filename": "pycore_pymem_init.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 14 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 15, + "filename": "pycore_obmalloc_init.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 15 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 190, + "filename": "pycore_runtime_init_generated.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 190 + } + ], + "full_C05": false, + "lexical_diagnostics": [ + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "#define INIT_STR(NAME, LITERAL) ._py_ ## NAME = _PyASCIIObject_INIT(LITERAL)", + "physical_line": 177 + }, + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "#define INIT_ID(NAME) ._py_ ## NAME = _PyASCIIObject_INIT(#NAME)", + "physical_line": 179 + } + ], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/internal/pycore_runtime_init.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 6087, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/internal/pycore_runtime_init.h", + "occurrence_id": "corpus-0751", + "origin_position": null, + "sha256": "60d97c6edbd7eaf3841ce88d3f33794b4c3dfead870914f021e1425e11670321" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/internal/pycore_runtime_init_generated.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 46045, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/internal/pycore_runtime_init_generated.h", + "occurrence_id": "corpus-0752", + "origin_position": null, + "sha256": "0c209438a3b41fbbfaffc76669325328d074be692d96c99eea255366689e4055" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 13, + "filename": "pycore_atomic.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 13 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 15, + "filename": "signal.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 15 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/internal/pycore_signal.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 2611, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/internal/pycore_signal.h", + "occurrence_id": "corpus-0753", + "origin_position": null, + "sha256": "186835a8702a10bb1f3f63185d50874f24885716707717f620d3ffd0a2039679" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/internal/pycore_sliceobject.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 414, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/internal/pycore_sliceobject.h", + "occurrence_id": "corpus-0754", + "origin_position": null, + "sha256": "e8b9ba794081a75bf73f0eb64089a766b5bd04b076d4368a14a83ff43ce909be" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/internal/pycore_strhex.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 937, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/internal/pycore_strhex.h", + "occurrence_id": "corpus-0755", + "origin_position": null, + "sha256": "45783d1137fc33a8d9e457692227e8395a93b27c76205f50ad7bd8f00fe7aefb" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/internal/pycore_structseq.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 923, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/internal/pycore_structseq.h", + "occurrence_id": "corpus-0756", + "origin_position": null, + "sha256": "e1c1be3681fec8c1146d5a084869c1bbabcbe68223382cdab8536c8b88958891" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/internal/pycore_symtable.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 6852, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/internal/pycore_symtable.h", + "occurrence_id": "corpus-0757", + "origin_position": null, + "sha256": "2f532ac82c3415dbc048f35451760a8203a67ca513b85e220fc38f5c10655db5" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/internal/pycore_sysmodule.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 734, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/internal/pycore_sysmodule.h", + "occurrence_id": "corpus-0758", + "origin_position": null, + "sha256": "2c22c3f98c917dee3d954957f36713e2ddd96a27b076e05f7360c629f37e983d" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/internal/pycore_time.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 388, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/internal/pycore_time.h", + "occurrence_id": "corpus-0759", + "origin_position": null, + "sha256": "6838118a537e71edaf76290da15cbf2da19499df1ee4e30b15f35bb4b9257b70" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/internal/pycore_token.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 3050, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/internal/pycore_token.h", + "occurrence_id": "corpus-0760", + "origin_position": null, + "sha256": "91c75ef718b8e8be2383fdcea502c1e63ebfa6d681afd45672e379ea7e5d3668" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/internal/pycore_traceback.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 3501, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/internal/pycore_traceback.h", + "occurrence_id": "corpus-0761", + "origin_position": null, + "sha256": "3f9dfb009dc161f2d979f5af76d660611264b5d0b1b4adeeae10d30ee0999ede" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 11, + "filename": "pycore_hashtable.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 11 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/internal/pycore_tracemalloc.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 3075, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/internal/pycore_tracemalloc.h", + "occurrence_id": "corpus-0762", + "origin_position": null, + "sha256": "61ac9b846ae579c667d20034c9c4004a07ab3ff039848ddeeec8d9c39ff1331a" + }, + "supported_language_scan": false, + "unsupported_frontier": [ + { + "code": "unsupported_pragma", + "detail": "pragma/import/embed semantics are outside this extractor", + "form": "#pragma pack(push, 4)", + "original_physical_line_bytes_latin1": "#pragma pack(push, 4)", + "physical_line": 40 + }, + { + "code": "unsupported_pragma", + "detail": "pragma/import/embed semantics are outside this extractor", + "form": "#pragma pack(pop)", + "original_physical_line_bytes_latin1": "#pragma pack(pop)", + "physical_line": 54 + } + ] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 11, + "filename": "tupleobject.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 11 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/internal/pycore_tuple.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 2197, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/internal/pycore_tuple.h", + "occurrence_id": "corpus-0763", + "origin_position": null, + "sha256": "de5677ac0809abf2744ebdd94768b6974e75ea62cc2cee44c4f433e2b818f953" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 7, + "filename": "pycore_moduleobject.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 7 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/internal/pycore_typeobject.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 4669, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/internal/pycore_typeobject.h", + "occurrence_id": "corpus-0764", + "origin_position": null, + "sha256": "9af7c474e699753e6830949962176eab1f2e3ffa9616a24ab395001fc75db90b" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/internal/pycore_typevarobject.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 763, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/internal/pycore_typevarobject.h", + "occurrence_id": "corpus-0765", + "origin_position": null, + "sha256": "b925204918e577bfb667a64f5f56e410cba0bc518207ed8535d1fcf1bdd6ab00" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/internal/pycore_ucnhash.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 898, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/internal/pycore_ucnhash.h", + "occurrence_id": "corpus-0766", + "origin_position": null, + "sha256": "6d9077e875703e5db7daf293a6c7ea3d43d1ee84dec137a950f17a26e9348eb5" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 11, + "filename": "pycore_fileutils.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 11 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 12, + "filename": "pycore_ucnhash.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 12 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/internal/pycore_unicodeobject.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1966, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/internal/pycore_unicodeobject.h", + "occurrence_id": "corpus-0767", + "origin_position": null, + "sha256": "916e12522af51502be463a9e722e1e5017827e1d8da62ac68a03887185c1c278" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/internal/pycore_unicodeobject_generated.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 91455, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/internal/pycore_unicodeobject_generated.h", + "occurrence_id": "corpus-0768", + "origin_position": null, + "sha256": "40f9a9c1b38fff0c3b512dd518c8df9a34493775b3c2ffe14f5e854dc4660e06" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/internal/pycore_unionobject.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 682, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/internal/pycore_unionobject.h", + "occurrence_id": "corpus-0769", + "origin_position": null, + "sha256": "f1c5bbdf5660e54872ff1555c179cf6c80f8e04cac41e974b7964e21f82be18c" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/internal/pycore_warnings.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 740, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/internal/pycore_warnings.h", + "occurrence_id": "corpus-0770", + "origin_position": null, + "sha256": "3229b207245cb9442f09991df7084c8e4cb87cb073a14a2d520bd92634371fcb" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 2, + "delimiter": "quote", + "directive_physical_line": 10, + "filename": "cpython/interpreteridobject.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 12, + "physical_line": 10 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/interpreteridobject.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 333, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/interpreteridobject.h", + "occurrence_id": "corpus-0771", + "origin_position": null, + "sha256": "b497c869333bdf1f79a580a36e9a0ed64fee226daa1d2d45bdfe16c01e52d73c" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/intrcheck.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 772, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/intrcheck.h", + "occurrence_id": "corpus-0772", + "origin_position": null, + "sha256": "696fe17618c579a8cbaad9b86175f60d43ea0b9e8aaaa1d65ad256d53dc163c1" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/iterobject.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 597, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/iterobject.h", + "occurrence_id": "corpus-0773", + "origin_position": null, + "sha256": "6b16711d2bb6cee55e4288f84142d592eebf07321e32998a5abe2c06deeb77b0" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 2, + "delimiter": "quote", + "directive_physical_line": 45, + "filename": "cpython/listobject.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 12, + "physical_line": 45 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/listobject.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1782, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/listobject.h", + "occurrence_id": "corpus-0774", + "origin_position": null, + "sha256": "f4cad9a1f48d27a9a7f56702ab0fe785013eb336ea919197600d86a6e54fa5bf" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 2, + "delimiter": "quote", + "directive_physical_line": 101, + "filename": "cpython/longobject.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 12, + "physical_line": 101 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/longobject.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 3739, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/longobject.h", + "occurrence_id": "corpus-0775", + "origin_position": null, + "sha256": "0567b258763af5e6cb0ecba02135b41b012425a673d4da8c87db1333ac638901" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/marshal.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 827, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/marshal.h", + "occurrence_id": "corpus-0776", + "origin_position": null, + "sha256": "d7f5760ef6496776cee99aca5491789f6ab261a78b156b5758538ea15e1827e5" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 2, + "delimiter": "quote", + "directive_physical_line": 27, + "filename": "cpython/memoryobject.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 12, + "physical_line": 27 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/memoryobject.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1081, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/memoryobject.h", + "occurrence_id": "corpus-0777", + "origin_position": null, + "sha256": "efb734845a1366d77f6351cbb954c08681d4acfe6a53e41e82dd45fa881e0090" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 2, + "delimiter": "quote", + "directive_physical_line": 125, + "filename": "cpython/methodobject.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 12, + "physical_line": 125 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/methodobject.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 5076, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/methodobject.h", + "occurrence_id": "corpus-0778", + "origin_position": null, + "sha256": "059e19bd8d418c8bf1481e301340f989317ba7b56de94729a19aae26fee3da62" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 10, + "filename": "stdarg.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 10 + }, + { + "conditional_depth": 2, + "delimiter": "quote", + "directive_physical_line": 161, + "filename": "cpython/modsupport.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 12, + "physical_line": 161 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/modsupport.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 6515, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/modsupport.h", + "occurrence_id": "corpus-0779", + "origin_position": null, + "sha256": "064d1440d862d08f296c1cbe868e417af12b34f770be515461211f5beade04ff" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/moduleobject.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 3559, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/moduleobject.h", + "occurrence_id": "corpus-0780", + "origin_position": null, + "sha256": "5eb48f5d99322d7912a5c6f2b3a974e283c7a6045f79a503d7e09f3ac15b42ec" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 54, + "filename": "pystats.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 54 + }, + { + "conditional_depth": 2, + "delimiter": "quote", + "directive_physical_line": 953, + "filename": "cpython/object.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 12, + "physical_line": 953 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/object.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 37155, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/object.h", + "occurrence_id": "corpus-0781", + "origin_position": null, + "sha256": "68b97095c521fcb3fab7193e166870b0c040c8f19ac50efb42088364862503a7" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 8, + "filename": "pymem.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 8 + }, + { + "conditional_depth": 2, + "delimiter": "quote", + "directive_physical_line": 227, + "filename": "cpython/objimpl.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 12, + "physical_line": 227 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/objimpl.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 9238, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/objimpl.h", + "occurrence_id": "corpus-0782", + "origin_position": null, + "sha256": "8828a8db3e9f14b5ca2d59b1d8c05f6bf54fae26736ae039b7420c886142dba2" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/opcode.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 12808, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/opcode.h", + "occurrence_id": "corpus-0783", + "origin_position": null, + "sha256": "4e8c6eee859813845b3a9dfe9e08ca4cc607a7f884048f5a6cebef6bdcc5d33d" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 28, + "filename": "sys/param.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 28 + }, + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 29, + "filename": "limits.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 29 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/osdefs.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 737, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/osdefs.h", + "occurrence_id": "corpus-0784", + "origin_position": null, + "sha256": "8372e9c507949a88ed3cad5fd0a830190d60a1655e9a3f59ef4d0832c06a041c" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/osmodule.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 291, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/osmodule.h", + "occurrence_id": "corpus-0785", + "origin_position": null, + "sha256": "c013935b48f48ca8ce249a4d482c55e3fb6f1cfe786c5a32a57969bb74a779d9" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/patchlevel.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1299, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/patchlevel.h", + "occurrence_id": "corpus-0786", + "origin_position": null, + "sha256": "f2f4800f05108bef77f6164484aba437b86b81e34744cbb5378f7bb2ccc69414" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 34, + "filename": "ncurses.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 34 + }, + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 36, + "filename": "curses.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 36 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/py_curses.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 2473, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/py_curses.h", + "occurrence_id": "corpus-0787", + "origin_position": null, + "sha256": "1aa826cacb9f07611155906d711403a7675ce573d61c888786178bb574dc3087" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/pybuffer.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 5282, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/pybuffer.h", + "occurrence_id": "corpus-0788", + "origin_position": null, + "sha256": "c95edd830772e922f60f976ac0d98470b48a443ba198b0866a4096003c0740a4" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/pycapsule.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1727, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/pycapsule.h", + "occurrence_id": "corpus-0789", + "origin_position": null, + "sha256": "6929a47483ea5bb1a7b9b490a876b21beefed11061c94b2963b2608b7f542728" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 3, + "filename": "x86_64-linux-gnu/python3.12/pyconfig.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 12, + "physical_line": 3 + }, + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 5, + "filename": "x86_64-linux-gnux32/python3.12/pyconfig.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 12, + "physical_line": 5 + }, + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 7, + "filename": "i386-linux-gnu/python3.12/pyconfig.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 12, + "physical_line": 7 + }, + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 9, + "filename": "aarch64-linux-gnu/python3.12/pyconfig.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 12, + "physical_line": 9 + }, + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 11, + "filename": "arc-linux-gnu/python3.12/pyconfig.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 12, + "physical_line": 11 + }, + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 13, + "filename": "alpha-linux-gnu/python3.12/pyconfig.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 12, + "physical_line": 13 + }, + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 15, + "filename": "arm-linux-gnueabihf/python3.12/pyconfig.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 12, + "physical_line": 15 + }, + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 17, + "filename": "arm-linux-gnueabi/python3.12/pyconfig.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 12, + "physical_line": 17 + }, + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 19, + "filename": "hppa-linux-gnu/python3.12/pyconfig.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 12, + "physical_line": 19 + }, + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 21, + "filename": "ia64-linux-gnu/python3.12/pyconfig.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 12, + "physical_line": 21 + }, + { + "conditional_depth": 4, + "delimiter": "angle", + "directive_physical_line": 25, + "filename": "loongarch64-linux-gnusf/python3.12/pyconfig.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 11, + "physical_line": 25 + }, + { + "conditional_depth": 4, + "delimiter": "angle", + "directive_physical_line": 27, + "filename": "loongarch64-linux-gnuf32/python3.12/pyconfig.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 11, + "physical_line": 27 + }, + { + "conditional_depth": 4, + "delimiter": "angle", + "directive_physical_line": 29, + "filename": "loongarch64-linux-gnu/python3.12/pyconfig.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 11, + "physical_line": 29 + }, + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 37, + "filename": "m68k-linux-gnu/python3.12/pyconfig.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 12, + "physical_line": 37 + }, + { + "conditional_depth": 3, + "delimiter": "angle", + "directive_physical_line": 40, + "filename": "mipsisa32r6el-linux-gnu/python3.12/pyconfig.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 13, + "physical_line": 40 + }, + { + "conditional_depth": 3, + "delimiter": "angle", + "directive_physical_line": 42, + "filename": "mipsisa64r6el-linux-gnuabin32/python3.12/pyconfig.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 13, + "physical_line": 42 + }, + { + "conditional_depth": 3, + "delimiter": "angle", + "directive_physical_line": 44, + "filename": "mipsisa64r6el-linux-gnuabi64/python3.12/pyconfig.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 13, + "physical_line": 44 + }, + { + "conditional_depth": 3, + "delimiter": "angle", + "directive_physical_line": 50, + "filename": "mipsisa32r6-linux-gnu/python3.12/pyconfig.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 13, + "physical_line": 50 + }, + { + "conditional_depth": 3, + "delimiter": "angle", + "directive_physical_line": 52, + "filename": "mipsisa64r6-linux-gnuabin32/python3.12/pyconfig.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 13, + "physical_line": 52 + }, + { + "conditional_depth": 3, + "delimiter": "angle", + "directive_physical_line": 54, + "filename": "mipsisa64r6-linux-gnuabi64/python3.12/pyconfig.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 13, + "physical_line": 54 + }, + { + "conditional_depth": 3, + "delimiter": "angle", + "directive_physical_line": 60, + "filename": "mipsel-linux-gnu/python3.12/pyconfig.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 13, + "physical_line": 60 + }, + { + "conditional_depth": 3, + "delimiter": "angle", + "directive_physical_line": 62, + "filename": "mips64el-linux-gnuabin32/python3.12/pyconfig.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 13, + "physical_line": 62 + }, + { + "conditional_depth": 3, + "delimiter": "angle", + "directive_physical_line": 64, + "filename": "mips64el-linux-gnuabi64/python3.12/pyconfig.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 13, + "physical_line": 64 + }, + { + "conditional_depth": 3, + "delimiter": "angle", + "directive_physical_line": 70, + "filename": "mips-linux-gnu/python3.12/pyconfig.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 13, + "physical_line": 70 + }, + { + "conditional_depth": 3, + "delimiter": "angle", + "directive_physical_line": 72, + "filename": "mips64-linux-gnuabin32/python3.12/pyconfig.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 13, + "physical_line": 72 + }, + { + "conditional_depth": 3, + "delimiter": "angle", + "directive_physical_line": 74, + "filename": "mips64-linux-gnuabi64/python3.12/pyconfig.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 13, + "physical_line": 74 + }, + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 79, + "filename": "or1k-linux-gnu/python3.12/pyconfig.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 12, + "physical_line": 79 + }, + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 81, + "filename": "powerpc-linux-gnuspe/python3.12/pyconfig.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 12, + "physical_line": 81 + }, + { + "conditional_depth": 3, + "delimiter": "angle", + "directive_physical_line": 84, + "filename": "powerpc64le-linux-gnu/python3.12/pyconfig.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 14, + "physical_line": 84 + }, + { + "conditional_depth": 3, + "delimiter": "angle", + "directive_physical_line": 86, + "filename": "powerpc64-linux-gnu/python3.12/pyconfig.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 14, + "physical_line": 86 + }, + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 89, + "filename": "powerpc-linux-gnu/python3.12/pyconfig.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 12, + "physical_line": 89 + }, + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 91, + "filename": "s390x-linux-gnu/python3.12/pyconfig.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 12, + "physical_line": 91 + }, + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 93, + "filename": "s390-linux-gnu/python3.12/pyconfig.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 12, + "physical_line": 93 + }, + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 95, + "filename": "sh4-linux-gnu/python3.12/pyconfig.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 12, + "physical_line": 95 + }, + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 97, + "filename": "sparc64-linux-gnu/python3.12/pyconfig.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 12, + "physical_line": 97 + }, + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 99, + "filename": "sparc-linux-gnu/python3.12/pyconfig.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 12, + "physical_line": 99 + }, + { + "conditional_depth": 3, + "delimiter": "angle", + "directive_physical_line": 102, + "filename": "riscv64-linux-gnu/python3.12/pyconfig.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 14, + "physical_line": 102 + }, + { + "conditional_depth": 3, + "delimiter": "angle", + "directive_physical_line": 104, + "filename": "riscv32-linux-gnu/python3.12/pyconfig.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 14, + "physical_line": 104 + }, + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 111, + "filename": "x86_64-kfreebsd-gnu/python3.12/pyconfig.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 12, + "physical_line": 111 + }, + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 113, + "filename": "i386-kfreebsd-gnu/python3.12/pyconfig.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 12, + "physical_line": 113 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 118, + "filename": "i386-gnu/python3.12/pyconfig.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 11, + "physical_line": 118 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/pyconfig.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 4661, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/pyconfig.h", + "occurrence_id": "corpus-0790", + "origin_position": null, + "sha256": "dcda0cfa3f4971db195817881c58025db6c76f19ae45f26d3dda0a43001253e8" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 2, + "delimiter": "quote", + "directive_physical_line": 11, + "filename": "pydtrace_probes.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 11 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/pydtrace.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 2404, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/pydtrace.h", + "occurrence_id": "corpus-0791", + "origin_position": null, + "sha256": "7ac591e56e12936a32e3b0b85dae803f8f00bdc91abe01799ca2e4ce69548555" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 7, + "filename": "stdarg.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 7 + }, + { + "conditional_depth": 2, + "delimiter": "quote", + "directive_physical_line": 330, + "filename": "cpython/pyerrors.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 12, + "physical_line": 330 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/pyerrors.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 13017, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/pyerrors.h", + "occurrence_id": "corpus-0792", + "origin_position": null, + "sha256": "59bf06c7ba877ec76d09a41aac75e385a2723545388b105864f48f295e2524e0" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/pyexpat.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 2572, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/pyexpat.h", + "occurrence_id": "corpus-0793", + "origin_position": null, + "sha256": "24eb6f486b4eec69bcd84ec6cc17833040095aabba7a0c4ebe491bb5de02879e" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 2, + "delimiter": "quote", + "directive_physical_line": 19, + "filename": "cpython/pyframe.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 12, + "physical_line": 19 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/pyframe.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 551, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/pyframe.h", + "occurrence_id": "corpus-0794", + "origin_position": null, + "sha256": "58513e7017805ee5c49a329a552f72a6be6d88ce2bcfa344f5130582fa75ecb6" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/pyhash.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 4154, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/pyhash.h", + "occurrence_id": "corpus-0795", + "origin_position": null, + "sha256": "a6ea755ff42ec955feaf49b1d234a5c2935899309ea59925d1d30f3e62fed67d" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 2, + "delimiter": "quote", + "directive_physical_line": 71, + "filename": "cpython/pylifecycle.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 12, + "physical_line": 71 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/pylifecycle.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 2249, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/pylifecycle.h", + "occurrence_id": "corpus-0796", + "origin_position": null, + "sha256": "d313c5f3fe805606061ea78982ca5d5a9f09e687210c8b0fbcb50db596106691" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/pymacconfig.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 2810, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/pymacconfig.h", + "occurrence_id": "corpus-0797", + "origin_position": null, + "sha256": "5dcd4fa505975be42c35a4707ab7cb5b6ddf2e896bb8fbb8c1fd9047e5183a3d" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [ + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "# define Py_UNUSED(name) _unused_ ## name __attribute__((unused))", + "physical_line": 120 + }, + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "# define Py_UNUSED(name) _unused_ ## name", + "physical_line": 122 + } + ], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/pymacro.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 6318, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/pymacro.h", + "occurrence_id": "corpus-0798", + "origin_position": null, + "sha256": "30af4b1a8deb972e716f24d32985b79deadb7f638d0b576a46214962ac4055fa" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/pymath.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1688, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/pymath.h", + "occurrence_id": "corpus-0799", + "origin_position": null, + "sha256": "eeea8396e1acd271ba83a568ba572ead47493e492ce998756fe1256bf917b3f9" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 8, + "filename": "pyport.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 8 + }, + { + "conditional_depth": 2, + "delimiter": "quote", + "directive_physical_line": 96, + "filename": "cpython/pymem.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 12, + "physical_line": 96 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/pymem.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 3914, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/pymem.h", + "occurrence_id": "corpus-0800", + "origin_position": null, + "sha256": "54a5315d7861e989c5099f168d946f5a421337efcd5d44896201016e92a81348" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 4, + "filename": "pyconfig.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 4 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 6, + "filename": "inttypes.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 6 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 8, + "filename": "limits.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 8 + }, + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 192, + "filename": "ieeefp.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 192 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 195, + "filename": "math.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 195 + }, + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 202, + "filename": "sys/time.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 202 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 204, + "filename": "time.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 204 + }, + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 213, + "filename": "sys/select.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 213 + }, + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 221, + "filename": "sys/stat.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 221 + }, + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 223, + "filename": "stat.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 223 + }, + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 433, + "filename": "sys/types.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 433 + }, + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 441, + "filename": "sys/termio.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 441 + }, + { + "conditional_depth": 3, + "delimiter": "angle", + "directive_physical_line": 463, + "filename": "ctype.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 463 + }, + { + "conditional_depth": 3, + "delimiter": "angle", + "directive_physical_line": 464, + "filename": "wctype.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 464 + }, + { + "conditional_depth": 1, + "delimiter": "quote", + "directive_physical_line": 506, + "filename": "exports.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 506 + } + ], + "full_C05": false, + "lexical_diagnostics": [ + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "#define Py_LL(x) x##LL", + "physical_line": 620 + }, + { + "code": "non_file_operator_token_paste", + "detail": "fixed-fragment paste cannot form file operators", + "form": "#define Py_ULL(x) Py_LL(x##U)", + "physical_line": 624 + } + ], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/pyport.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 25516, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/pyport.h", + "occurrence_id": "corpus-0801", + "origin_position": null, + "sha256": "fb25010bf4b52df6157e29bb4c0bbdc4797b417df0346c7258294f501667ec5e" + }, + "supported_language_scan": false, + "unsupported_frontier": [ + { + "code": "unsupported_pragma", + "detail": "pragma/import/embed semantics are outside this extractor", + "form": "# pragma warning(disable: 4710)", + "original_physical_line_bytes_latin1": "# pragma warning(disable: 4710)", + "physical_line": 178 + }, + { + "code": "unsupported_Pragma", + "detail": "", + "form": "#define _Py_COMP_DIAG_PUSH _Pragma(\"clang diagnostic push\")", + "original_physical_line_bytes_latin1": "#define _Py_COMP_DIAG_PUSH _Pragma(\"clang diagnostic push\")", + "physical_line": 335 + }, + { + "code": "unsupported_Pragma", + "detail": "", + "form": "#define _Py_COMP_DIAG_IGNORE_DEPR_DECLS _Pragma(\"clang diagnostic ignored \\\"-Wdeprecated-declarations\\\"\")", + "original_physical_line_bytes_latin1": " _Pragma(\"clang diagnostic ignored \\\"-Wdeprecated-declarations\\\"\")", + "physical_line": 337 + }, + { + "code": "unsupported_Pragma", + "detail": "", + "form": "#define _Py_COMP_DIAG_POP _Pragma(\"clang diagnostic pop\")", + "original_physical_line_bytes_latin1": "#define _Py_COMP_DIAG_POP _Pragma(\"clang diagnostic pop\")", + "physical_line": 338 + }, + { + "code": "unsupported_Pragma", + "detail": "", + "form": "#define _Py_COMP_DIAG_PUSH _Pragma(\"GCC diagnostic push\")", + "original_physical_line_bytes_latin1": "#define _Py_COMP_DIAG_PUSH _Pragma(\"GCC diagnostic push\")", + "physical_line": 341 + }, + { + "code": "unsupported_Pragma", + "detail": "", + "form": "#define _Py_COMP_DIAG_IGNORE_DEPR_DECLS _Pragma(\"GCC diagnostic ignored \\\"-Wdeprecated-declarations\\\"\")", + "original_physical_line_bytes_latin1": " _Pragma(\"GCC diagnostic ignored \\\"-Wdeprecated-declarations\\\"\")", + "physical_line": 343 + }, + { + "code": "unsupported_Pragma", + "detail": "", + "form": "#define _Py_COMP_DIAG_POP _Pragma(\"GCC diagnostic pop\")", + "original_physical_line_bytes_latin1": "#define _Py_COMP_DIAG_POP _Pragma(\"GCC diagnostic pop\")", + "physical_line": 344 + }, + { + "code": "unsupported_pragma", + "detail": "pragma/import/embed semantics are outside this extractor", + "form": "#pragma error_messages (off,E_END_OF_LOOP_CODE_NOT_REACHED)", + "original_physical_line_bytes_latin1": "#pragma error_messages (off,E_END_OF_LOOP_CODE_NOT_REACHED)", + "physical_line": 616 + } + ] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 2, + "delimiter": "quote", + "directive_physical_line": 125, + "filename": "cpython/pystate.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 12, + "physical_line": 125 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/pystate.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 4635, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/pystate.h", + "occurrence_id": "corpus-0802", + "origin_position": null, + "sha256": "065426aaa5fada90d61a17757fbc2e8ce3fb9cc203992990c4ca3cee7f9f80be" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/pystats.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 2741, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/pystats.h", + "occurrence_id": "corpus-0803", + "origin_position": null, + "sha256": "b93db83e29f09ff06b15bf39a21e53de82858ba92cbf48332d1ada1ac028d6f8" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/pystrcmp.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 436, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/pystrcmp.h", + "occurrence_id": "corpus-0804", + "origin_position": null, + "sha256": "f401d8338fb6ecf5f12768ee95cd09c262f880b2ee522ca344b890dbdcde4c88" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/pystrtod.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1557, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/pystrtod.h", + "occurrence_id": "corpus-0805", + "origin_position": null, + "sha256": "8c8e9d1d279216f1c08f0aedac5de49a9b8852a3f838f21e298300e969474ef4" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 2, + "delimiter": "quote", + "directive_physical_line": 42, + "filename": "cpython/pythonrun.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 12, + "physical_line": 42 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/pythonrun.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1313, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/pythonrun.h", + "occurrence_id": "corpus-0806", + "origin_position": null, + "sha256": "4749ef95e910632a1d04b912c4f1d615c9d10567cbaf52a2ab2c68c7c3a38d94" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 2, + "delimiter": "quote", + "directive_physical_line": 128, + "filename": "cpython/pythread.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 12, + "physical_line": 128 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/pythread.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 4875, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/pythread.h", + "occurrence_id": "corpus-0807", + "origin_position": null, + "sha256": "cd063073710988ea21b54588473542e5f3b2be06f637dc5a028aefd5a7949144" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + } + ], + "schema": "c05-passive-header-corpus-chunk-v1" +} diff --git a/research/h25-c05-v03-input-constructors/evidence/header-corpus-v2/c05_header_edges_refined_corpus_v1_003.json b/research/h25-c05-v03-input-constructors/evidence/header-corpus-v2/c05_header_edges_refined_corpus_v1_003.json new file mode 100644 index 0000000000..1c08d1c8a6 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/evidence/header-corpus-v2/c05_header_edges_refined_corpus_v1_003.json @@ -0,0 +1,845 @@ +{ + "C05_inventory": false, + "all_acquired_headers_are_reachable": false, + "diagnostic_only": true, + "full_C05": false, + "rows": [ + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/pytypedefs.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 851, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/pytypedefs.h", + "occurrence_id": "corpus-0808", + "origin_position": null, + "sha256": "26d09a78c44998e8c0a74ed2d14e5346e4b922892eb79288049b7ac5b6a1e751" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/rangeobject.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 630, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/rangeobject.h", + "occurrence_id": "corpus-0809", + "origin_position": null, + "sha256": "36547ab5862e82b09cbed7b786a4cfc86af1dec5a3778c50825bb266c9a6aec9" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 2, + "delimiter": "quote", + "directive_physical_line": 42, + "filename": "cpython/setobject.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 12, + "physical_line": 42 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/setobject.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1557, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/setobject.h", + "occurrence_id": "corpus-0810", + "origin_position": null, + "sha256": "7ff1b984647598b19ff593b0fa40d44cf5d7bc37d386dd9fac059e560f4a31ca" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/sliceobject.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 2518, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/sliceobject.h", + "occurrence_id": "corpus-0811", + "origin_position": null, + "sha256": "527719b92e4fa9d5b371c30bc87bc0304ec20099b18c446ad1aa49fd61e5e387" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 21, + "filename": "stddef.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 21 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/structmember.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1645, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/structmember.h", + "occurrence_id": "corpus-0812", + "origin_position": null, + "sha256": "9d4c39dee96e228f60cc8a6960b9e7049875ddbee15541a75629c07777916342" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/structseq.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1398, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/structseq.h", + "occurrence_id": "corpus-0813", + "origin_position": null, + "sha256": "067f8663a922eb142a3fd12ff18eaa756553bef8a68eaa863f80419dbb8d1ffe" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 2, + "delimiter": "quote", + "directive_physical_line": 47, + "filename": "cpython/sysmodule.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 12, + "physical_line": 47 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/sysmodule.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1729, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/sysmodule.h", + "occurrence_id": "corpus-0814", + "origin_position": null, + "sha256": "09b6f415d4054fee4eb8375a94a724e102bc9a40633d16a437960671b1a9a1b4" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 2, + "delimiter": "quote", + "directive_physical_line": 19, + "filename": "cpython/traceback.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 12, + "physical_line": 19 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/traceback.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 585, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/traceback.h", + "occurrence_id": "corpus-0815", + "origin_position": null, + "sha256": "ea59d511687f7f8643c7b8b0996e26f2c92bcc954639c6f98d08f6564b61d06d" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/tracemalloc.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 2192, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/tracemalloc.h", + "occurrence_id": "corpus-0816", + "origin_position": null, + "sha256": "296084c2140af69ee39e672feab2027411c7b0397a5719aa513802cd6a849d93" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 2, + "delimiter": "quote", + "directive_physical_line": 39, + "filename": "cpython/tupleobject.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 12, + "physical_line": 39 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/tupleobject.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1615, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/tupleobject.h", + "occurrence_id": "corpus-0817", + "origin_position": null, + "sha256": "d8de8d64e4b5c466c3bdd04f5664f0eba64a9198b30b5a29409d74a5b5f1def7" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/typeslots.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 2342, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/typeslots.h", + "occurrence_id": "corpus-0818", + "origin_position": null, + "sha256": "77fe4a71f5e5974c40fd3485d3c9aeb8b7ccf33969cd26feb58c64eda5f86f1d" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 4, + "filename": "stdarg.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 4 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 58, + "filename": "ctype.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 58 + }, + { + "conditional_depth": 2, + "delimiter": "angle", + "directive_physical_line": 97, + "filename": "wchar.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 12, + "physical_line": 97 + }, + { + "conditional_depth": 2, + "delimiter": "quote", + "directive_physical_line": 1013, + "filename": "cpython/unicodeobject.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 12, + "physical_line": 1013 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/unicodeobject.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 35164, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/unicodeobject.h", + "occurrence_id": "corpus-0819", + "origin_position": null, + "sha256": "5cc1350da2b00f5187065004a1f5d66764e86a0f20f8faba7d0eadf913297d93" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 2, + "delimiter": "quote", + "directive_physical_line": 37, + "filename": "cpython/warnings.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 12, + "physical_line": 37 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/warnings.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1129, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/warnings.h", + "occurrence_id": "corpus-0820", + "origin_position": null, + "sha256": "18fde34b12247460de805fc259ea7f14305fce4779d244c0a7bdc7c73b8f6b51" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 2, + "delimiter": "quote", + "directive_physical_line": 35, + "filename": "cpython/weakrefobject.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 12, + "physical_line": 35 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/python3.12/weakrefobject.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 1234, + "is_primary_source": false, + "logical_path": "/usr/include/python3.12/weakrefobject.h", + "occurrence_id": "corpus-0821", + "origin_position": null, + "sha256": "031b4bc091cf442b4305f7c5ac9713f32101a5e40617f3cb56c632cb7b15fb5b" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/development-payloads/libpython3.12-dev_3.12.3-1ubuntu0.17_amd64.deb/usr/include/x86_64-linux-gnu/python3.12/pyconfig.h", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/DEVELOPMENT-PAYLOAD-CORRESPONDENCE-v1.json#sha256=c351813bea16d6cec73105eafae1717015c0c7800f4389a7b765148b90bd155f", + "bytes": 55858, + "is_primary_source": false, + "logical_path": "/usr/include/x86_64-linux-gnu/python3.12/pyconfig.h", + "occurrence_id": "corpus-0822", + "origin_position": null, + "sha256": "23931f53bc7ee512c6bd3162828747494eaa5e21f23dd63b31170ec1adfbe65e" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 0, + "delimiter": "angle", + "directive_physical_line": 11, + "filename": "Python.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 11 + }, + { + "conditional_depth": 0, + "delimiter": "quote", + "directive_physical_line": 12, + "filename": "internal/pycore_dict.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 12 + }, + { + "conditional_depth": 0, + "delimiter": "angle", + "directive_physical_line": 13, + "filename": "stddef.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 13 + }, + { + "conditional_depth": 0, + "delimiter": "angle", + "directive_physical_line": 14, + "filename": "stdint.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 14 + }, + { + "conditional_depth": 0, + "delimiter": "angle", + "directive_physical_line": 15, + "filename": "string.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 15 + }, + { + "conditional_depth": 0, + "delimiter": "quote", + "directive_physical_line": 422, + "filename": "field_loader_snapshot_v1.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 422 + }, + { + "conditional_depth": 0, + "delimiter": "quote", + "directive_physical_line": 456, + "filename": "field_service_v1.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 456 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "original-six-occurrences", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/resolved-questions-publication-20261102T025112Z/v03-publication/research/h25-v03-source-prerequisites/snapshot/areas/field-negative-variants-v1/pyinit_failure/dict_probe_fields_v1.c.txt", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/resolved-questions-publication-20261102T025112Z/v03-publication/research/h25-v03-source-prerequisites/SOURCE-COPIES.json#sha256=ed845fbf3ada926fe17cd735558dcd6c84f15c3e378ef2cff6bfca379f9ba55e", + "bytes": 17806, + "is_primary_source": true, + "logical_path": "/areas/field-negative-variants-v1/pyinit_failure/dict_probe_fields_v1.c", + "occurrence_id": "corpus-0823", + "origin_position": null, + "sha256": "e0188999d41a9ab26e8d3d5c37b18b2238b3af21b1db90895f01f7be76d50b65" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "original-six-occurrences", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/resolved-questions-publication-20261102T025112Z/v03-publication/research/h25-v03-source-prerequisites/snapshot/areas/field-negative-variants-v1/pyinit_failure/field_service_v1.h.txt", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/resolved-questions-publication-20261102T025112Z/v03-publication/research/h25-v03-source-prerequisites/SOURCE-COPIES.json#sha256=ed845fbf3ada926fe17cd735558dcd6c84f15c3e378ef2cff6bfca379f9ba55e", + "bytes": 17354, + "is_primary_source": false, + "logical_path": "/areas/field-negative-variants-v1/pyinit_failure/field_service_v1.h", + "occurrence_id": "corpus-0824", + "origin_position": null, + "sha256": "7656cd37503986459c4133643372fec13d3e5ad5553881f0bf0343a9a3e11abd" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 13, + "filename": "dlfcn.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 13 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 14, + "filename": "link.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 14 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 15, + "filename": "elf.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 15 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "original-six-occurrences", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/resolved-questions-publication-20261102T025112Z/v03-publication/research/h25-v03-source-prerequisites/snapshot/areas/field-negative-variants-v1/pyinit_failure/field_loader_snapshot_v1.h.txt", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/resolved-questions-publication-20261102T025112Z/v03-publication/research/h25-v03-source-prerequisites/SOURCE-COPIES.json#sha256=ed845fbf3ada926fe17cd735558dcd6c84f15c3e378ef2cff6bfca379f9ba55e", + "bytes": 19495, + "is_primary_source": false, + "logical_path": "/areas/field-negative-variants-v1/pyinit_failure/field_loader_snapshot_v1.h", + "occurrence_id": "corpus-0825", + "origin_position": null, + "sha256": "bf7ab049cea89c0a882b279e35b1383ac8f99b66aa4b9b8e1ca22eb9c24c5a8d" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 0, + "delimiter": "angle", + "directive_physical_line": 11, + "filename": "Python.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 11 + }, + { + "conditional_depth": 0, + "delimiter": "quote", + "directive_physical_line": 12, + "filename": "internal/pycore_dict.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 12 + }, + { + "conditional_depth": 0, + "delimiter": "angle", + "directive_physical_line": 13, + "filename": "stddef.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 13 + }, + { + "conditional_depth": 0, + "delimiter": "angle", + "directive_physical_line": 14, + "filename": "stdint.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 14 + }, + { + "conditional_depth": 0, + "delimiter": "angle", + "directive_physical_line": 15, + "filename": "string.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 15 + }, + { + "conditional_depth": 0, + "delimiter": "quote", + "directive_physical_line": 422, + "filename": "field_loader_snapshot_v1.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 422 + }, + { + "conditional_depth": 0, + "delimiter": "quote", + "directive_physical_line": 456, + "filename": "field_service_v1.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 456 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "original-six-occurrences", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/resolved-questions-publication-20261102T025112Z/v03-publication/research/h25-v03-source-prerequisites/snapshot/areas/field-negative-variants-v1/exec_failure/dict_probe_fields_v1.c.txt", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/resolved-questions-publication-20261102T025112Z/v03-publication/research/h25-v03-source-prerequisites/SOURCE-COPIES.json#sha256=ed845fbf3ada926fe17cd735558dcd6c84f15c3e378ef2cff6bfca379f9ba55e", + "bytes": 17806, + "is_primary_source": true, + "logical_path": "/areas/field-negative-variants-v1/exec_failure/dict_probe_fields_v1.c", + "occurrence_id": "corpus-0826", + "origin_position": null, + "sha256": "e0188999d41a9ab26e8d3d5c37b18b2238b3af21b1db90895f01f7be76d50b65" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [], + "full_C05": false, + "lexical_diagnostics": [], + "package": "original-six-occurrences", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/resolved-questions-publication-20261102T025112Z/v03-publication/research/h25-v03-source-prerequisites/snapshot/areas/field-negative-variants-v1/exec_failure/field_service_v1.h.txt", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/resolved-questions-publication-20261102T025112Z/v03-publication/research/h25-v03-source-prerequisites/SOURCE-COPIES.json#sha256=ed845fbf3ada926fe17cd735558dcd6c84f15c3e378ef2cff6bfca379f9ba55e", + "bytes": 17040, + "is_primary_source": false, + "logical_path": "/areas/field-negative-variants-v1/exec_failure/field_service_v1.h", + "occurrence_id": "corpus-0827", + "origin_position": null, + "sha256": "f5066831bd812e7e88fb971ba0e7ca86dbef91fc40a1a68c17b040ce474cd880" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + }, + { + "all_conditional_branches_scanned": true, + "configured_search_rules_discharged": false, + "edges": [ + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 13, + "filename": "dlfcn.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 13 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 14, + "filename": "link.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 14 + }, + { + "conditional_depth": 1, + "delimiter": "angle", + "directive_physical_line": 15, + "filename": "elf.h", + "kind": "include", + "lookup_only": false, + "origin_position": null, + "phase2_column": 10, + "physical_line": 15 + } + ], + "full_C05": false, + "lexical_diagnostics": [], + "package": "original-six-occurrences", + "path_and_origin_authenticated": false, + "pch_namespace_discharged": false, + "retained_path": "outputs/resolved-questions-publication-20261102T025112Z/v03-publication/research/h25-v03-source-prerequisites/snapshot/areas/field-negative-variants-v1/exec_failure/field_loader_snapshot_v1.h.txt", + "schema": "c05-literal-header-edges-v1", + "source": { + "acquisition_provenance": "outputs/resolved-questions-publication-20261102T025112Z/v03-publication/research/h25-v03-source-prerequisites/SOURCE-COPIES.json#sha256=ed845fbf3ada926fe17cd735558dcd6c84f15c3e378ef2cff6bfca379f9ba55e", + "bytes": 19495, + "is_primary_source": false, + "logical_path": "/areas/field-negative-variants-v1/exec_failure/field_loader_snapshot_v1.h", + "occurrence_id": "corpus-0828", + "origin_position": null, + "sha256": "bf7ab049cea89c0a882b279e35b1383ac8f99b66aa4b9b8e1ca22eb9c24c5a8d" + }, + "supported_language_scan": true, + "unsupported_frontier": [] + } + ], + "schema": "c05-passive-header-corpus-chunk-v1" +} diff --git a/research/h25-c05-v03-input-constructors/evidence/pro-original/v03_fixture_constructor_v1.py b/research/h25-c05-v03-input-constructors/evidence/pro-original/v03_fixture_constructor_v1.py new file mode 100644 index 0000000000..30ffe7a267 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/evidence/pro-original/v03_fixture_constructor_v1.py @@ -0,0 +1,230 @@ +"""Pure V03 fixtures for the selected genuine-Root input-prefix driver. + +This file creates DATA, never files, imports, subprocesses or admissions. +Its baseline parameter must come from the independently reviewed C05/stage +constructor. Shape or equality checks here do not establish C05 completeness. +The future fixture installer writes each case BEFORE sealing its own stage. +The outer stage pins describe the actual mutant; the child oracle stays fixed. +""" +import hashlib + +ROLES = ('pyinit_failure', 'exec_failure') +NAMES = ('dict_probe_fields_v1.c', 'field_service_v1.h', + 'field_loader_snapshot_v1.h') +C_PIN = ('e0188999d41a9ab26e8d3d5c37b18b2238b3af21b1db90895f01f7be76d50b65', 17806) +L_PIN = ('bf7ab049cea89c0a882b279e35b1383ac8f99b66aa4b9b8e1ca22eb9c24c5a8d', 19495) +PINS = (C_PIN, + ('7656cd37503986459c4133643372fec13d3e5ad5553881f0bf0343a9a3e11abd', 17354), + L_PIN, C_PIN, + ('f5066831bd812e7e88fb971ba0e7ca86dbef91fc40a1a68c17b040ce474cd880', 17040), + L_PIN) +FIELDS = ('sha256', 'bytes', 'mode') +LITERAL = 'Variant reviewed source/header differs' +CUSTODY = 'Variant current source closure differs' +INVENTORY = 'Variant role file omitted from closure' + + +def need(condition, message): + if not condition: + raise ValueError(message) + + +def _copy(value, depth=0, budget=None): + if budget is None: + budget = [0, 0] + budget[0] += 1 + need(depth <= 24 and budget[0] <= 65536, 'fixture input tree bound') + kind = type(value) + if value is None or kind is bool: + return value + if kind is int: + need(-(1 << 64) <= value < (1 << 64), 'fixture integer bound') + return value + if kind is str: + budget[1] += len(value) + need(len(value) <= 8192 and budget[1] <= 524288, 'fixture text bound') + return value + if kind is list or kind is tuple: + need(len(value) <= 1024, 'fixture input sequence bound') + return [_copy(item, depth + 1, budget) for item in value] + if kind is dict: + need(len(value) <= 1024 and all(type(k) is str for k in value), + 'fixture input mapping domain') + for key in value: + _copy(key, depth + 1, budget) + return {k: _copy(value[k], depth + 1, budget) for k in value} + raise ValueError('fixture input must be an exact native plain tree') + + +def _relative(index): + return 'areas/field-negative-variants-v1/' + ROLES[index // 3] + '/' + NAMES[index % 3] + + +def _metadata(configuration, index): + role = configuration['roles'][index // 3] + return role['source'] if index % 3 == 0 else role['source_headers'][NAMES[index % 3]] + + +def _changed(field, value): + if field == 'sha256': + return ('0' if value[0] != '0' else '1') + value[1:] + if field == 'bytes': + return value + 1 + return 0o400 + + +def case_specs(): + """A conservative, explicitly proposed finite interpretation of V03. + + Both Python profiles apply to every returned case. These generated counts + are not asserted to have appeared in the original one-sentence recipe. + """ + rows = [('intact', -1, -1, '')] + for index in range(6): + rows += [('physical-byte', index, -1, ''), + ('physical-mode', index, -1, '')] + for field in FIELDS: + rows += [('literal-metadata', index, -1, field), + ('inventory-metadata', index, -1, field)] + for left in range(6): + for right in range(left + 1, 6): + rows += [('physical-swap', left, right, ''), + ('equal-mode-swap', left, right, '')] + rows += [('role-order', -1, -1, ''), + ('role-path', 0, 3, ''), ('role-path', 3, 0, ''), + ('header-label-swap', 1, 2, ''), + ('header-label-swap', 4, 5, ''), + ('equal-c-metadata-swap', 0, 3, ''), + ('equal-loader-metadata-swap', 2, 5, ''), + ('service-metadata-swap', 1, 4, ''), + ('literal-before-physical', 0, 4, 'sha256'), + ('earlier-preflight-before-physical', 0, -1, '')] + return tuple(rows) + + +def construct_case(baseline_configuration, payloads, stage, spec): + """Return the exact child plan, six physical payloads and parent oracle. + + `payloads` is the six original occurrences in P(C,H,L), E(C,H,L) order. + This verifies their original byte pins, without executing their contents. + `baseline_configuration` is the complete independent C05 successor input; + this function neither constructs missing C05 facts nor approves any gate. + """ + need(type(stage) is str and 1 < len(stage) <= 4096 and stage.startswith('/') and + all(32 <= ord(c) < 127 for c in stage) and + all(p not in ('', '.', '..') for p in stage.split('/')[1:]), + 'canonical absolute stage required') + need(type(payloads) is tuple and len(payloads) == 6, 'six payload occurrences required') + for raw, (digest, size) in zip(payloads, PINS): + need(type(raw) is bytes and len(raw) == size and + hashlib.sha256(raw).hexdigest() == digest, 'original fixture bytes differ') + need(type(spec) is tuple and len(spec) == 4 and type(spec[0]) is str and + type(spec[1]) is int and type(spec[2]) is int and type(spec[3]) is str and + spec in case_specs(), 'unknown finite V03 case') + plan = _copy(baseline_configuration) + need(type(plan) is dict and type(plan.get('roles')) is list and + len(plan['roles']) == 2 and + [r['role'] for r in plan['roles']] == list(ROLES), 'baseline role order differs') + inventory = plan['source_files'] + need(type(inventory) is list and 1 <= len(inventory) <= 512, + 'original source_files count differs') + by_path, declared_total = {}, 0 + for row in inventory: + need(type(row) is dict and set(row) == {'path', 'sha256', 'bytes', 'mode'} and + type(row['path']) is str and row['path'] not in by_path, + 'baseline source row or duplicate path differs') + need(type(row['sha256']) is str and len(row['sha256']) == 64 and + all(c in '0123456789abcdef' for c in row['sha256']) and + type(row['bytes']) is int and 0 <= row['bytes'] <= 67108864 and + type(row['mode']) is int and 0 <= row['mode'] <= 0o7777, + 'baseline source pin domain differs') + declared_total += row['bytes'] + need(declared_total <= 268435456, 'baseline declared custody byte bound') + by_path[row['path']] = row + preflight = plan['expected_preflight'] + need(type(preflight) is dict and set(preflight) == { + 'schema', 'authenticated_files', 'native_private_access', 'cached_admission'} and + type(preflight['schema']) is str and + preflight['schema'] == 'h25-public-runtime-preflight-v2' and + type(preflight['authenticated_files']) is int and + preflight['authenticated_files'] == 217 and + preflight['native_private_access'] is False and + preflight['cached_admission'] is False, + 'independent original preflight expectation differs') + for index, (digest, size) in enumerate(PINS): + role = plan['roles'][index // 3] + need(role['source_path'] == stage + '/' + _relative(3 * (index // 3)), + 'baseline role source path differs') + expected = {'sha256': digest, 'bytes': size, 'mode': 0o444} + need(_metadata(plan, index) == expected, 'baseline literal metadata differs') + need(by_path.get(stage + '/' + _relative(index)) == + {'path': stage + '/' + _relative(index), **expected}, + 'baseline source_files literal differs') + bodies, modes = list(payloads), [0o444] * 6 + kind, left, right, field = spec + message, terminal, is_v03 = None, None, True + if kind == 'physical-byte': + bodies[left] = bytes((bodies[left][0] ^ 1,)) + bodies[left][1:] + message, terminal = CUSTODY, '_vcheck_custody' + elif kind == 'physical-mode': + modes[left] = 0o400 + message, terminal = CUSTODY, '_vcheck_custody' + elif kind == 'literal-metadata': + row = _metadata(plan, left) + row[field] = _changed(field, row[field]) + message, terminal = LITERAL, '_vcheck_literal_sources' + elif kind == 'inventory-metadata': + row = by_path[stage + '/' + _relative(left)] + row[field] = _changed(field, row[field]) + message, terminal = INVENTORY, '_vcheck_literal_sources' + elif kind == 'physical-swap': + bodies[left], bodies[right] = bodies[right], bodies[left] + # Derived from independent original pins, never child return values. + if PINS[left] != PINS[right]: + message, terminal = CUSTODY, '_vcheck_custody' + elif kind == 'equal-mode-swap': + modes[left], modes[right] = modes[right], modes[left] + elif kind == 'role-order': + plan['roles'].reverse() + message, terminal = 'Variant literal configuration differs', '_v03_original_input_prefix' + elif kind == 'role-path': + plan['roles'][left // 3]['source_path'] = stage + '/' + _relative(right) + message, terminal = 'Variant source role path differs', '_vcheck_literal_sources' + elif kind in ('header-label-swap', 'equal-c-metadata-swap', + 'equal-loader-metadata-swap', 'service-metadata-swap'): + first, second = _metadata(plan, left), _metadata(plan, right) + old_first, old_second = dict(first), dict(second) + first.clear() + first.update(old_second) + second.clear() + second.update(old_first) + if PINS[left] != PINS[right]: + message, terminal = LITERAL, '_vcheck_literal_sources' + elif kind == 'literal-before-physical': + row = _metadata(plan, left) + row[field] = _changed(field, row[field]) + bodies[right] = bytes((bodies[right][0] ^ 1,)) + bodies[right][1:] + message, terminal = LITERAL, '_vcheck_literal_sources' + elif kind == 'earlier-preflight-before-physical': + plan['expected_preflight']['authenticated_files'] = 216 + bodies[left] = bytes((bodies[left][0] ^ 1,)) + bodies[left][1:] + message, terminal = 'Variant original preflight differs', '_v03_original_input_prefix' + is_v03 = False # Deliberate earlier refusal must NOT earn V03 credit. + else: + need(kind == 'intact', 'unimplemented finite V03 case') + return { + 'case': spec, + 'child_configuration': plan, + 'physical_files': tuple((stage + '/' + _relative(i), bodies[i], modes[i]) + for i in range(6)), + 'parent_expectation': { + 'outcome': 'PREFIX_RETURN' if message is None else 'EXACT_SOURCE_REFUSAL', + 'exception_type': None if message is None else 'RuntimeError', + 'message': message, 'terminal_function': terminal, + 'v03_discriminator': is_v03, + 'compiler_launches': 0, 'candidate_image_loads': 0, + 'complete_raw_and_owned_terminal_required': True, + }, + 'c05_completeness_established_here': False, + 'source_admitted': False, 'execution_admitted': False, + } diff --git a/research/h25-c05-v03-input-constructors/evidence/pro-original/v03_integrated_constructor_v1.py b/research/h25-c05-v03-input-constructors/evidence/pro-original/v03_integrated_constructor_v1.py new file mode 100644 index 0000000000..15c56b7dd1 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/evidence/pro-original/v03_integrated_constructor_v1.py @@ -0,0 +1,130 @@ +"""Pure authoring support for the proposed genuine-Root V03 prefix route. + +No original module is imported or executed. Output is a source draft with +all eight original admission/configuration literals still None. The selected +prefix requires independent review as V03 source-gate coverage, and is not V01. +""" +import ast +import hashlib + +ROOT_SHA = 'f5a2d33f2b4d3651f214156a0e7094c2bb516ce2d5ab7698d18c11f98f35dee0' +PROVIDER_SHA = '9cbb7368f89e71d1e6cc46db5dc77efed3e03ed2a801c98c88fe316e4d9f3ef2' +VARIANT_SHA = 'cdb1479253358508088f8aa0e1e92e6c75ffcc127e54552698598a02de061254' +NATIVE_ENV = { + b'PATH': b'/usr/bin:/bin', b'PYTHONHASHSEED': b'0', + b'LANG': b'C.UTF-8', b'LC_ALL': b'C.UTF-8', b'TZ': b'UTC', + b'PYTHONDONTWRITEBYTECODE': b'1', +} +GATES = ('VARIANT_CONFIGURATION', 'VARIANT_SOURCE_REVIEW', + 'VARIANT_STAGE_ADMISSION', 'VARIANT_NATIVE_PROFILE', + 'VARIANT_HEADER_ADMISSION', 'VARIANT_COMMAND_ADMISSION', + 'VARIANT_FUNDING', 'VARIANT_EXECUTION') +TAIL = b'''try: + _variant_main() +except BaseException as _variant_error: + _VARIANT_TERMINAL_ERROR[0] = _variant_error + raise +''' +CONTROL_TAIL = b'''_V03_RESULT = [None] +try: + _V03_RESULT[0] = _v03_original_input_prefix() + _vroot(_INITIAL_OUTPUT + '/v03-root-after.raw.json') + _vraw(_INITIAL_OUTPUT + '/v03-input-result.raw.json', { + 'schema': 'h25-v03-input-prefix-result-v1', + 'status': 'ORIGINAL_INPUT_PREFIX_RETURNED', + 'binding': _V03_RESULT[0], + 'whole_variant_producer_completed': False, + 'runtime_qualified': False}) +except BaseException as _v03_error: + _VARIANT_TERMINAL_ERROR[0] = _v03_error + # No diagnostic allocation or I/O after an inherited failure. The genuine + # parent retains its raw stderr stream and owned terminal facts; absent or + # incomplete evidence is STOP, never a successful negative control. + raise +''' + + +def need(condition, message): + if not condition: + raise ValueError(message) + + +def absolute(path): + need(type(path) is str and 1 < len(path) <= 4096 and + path.startswith('/') and all(32 <= ord(c) < 127 for c in path) and + all(part not in ('', '.', '..') for part in path.split('/')[1:]), + 'canonical bounded absolute ASCII path required') + return path + + +def build_control_driver(original): + """Construct an unconfigured driver by a checked source transformation.""" + need(type(original) is bytes and len(original) == 41337 and + hashlib.sha256(original).hexdigest() == VARIANT_SHA, + 'exact original variant source required') + tree = ast.parse(original, feature_version=(3, 12)) + functions = [node for node in tree.body if isinstance(node, ast.FunctionDef) + and node.name == '_variant_main'] + need(len(functions) == 1, 'unique original main required') + function = functions[0] + lines = original.splitlines(keepends=True) + body = b''.join(lines[function.lineno - 1:function.end_lineno]) + cut = b' builds = []\n' + need(body.count(cut) == 1 and body.startswith(b'def _variant_main():\n'), + 'original prebuild boundary differs') + prefix = body.split(cut, 1)[0] + prefix = prefix.replace(b'def _variant_main():\n', + b'def _v03_original_input_prefix():\n', 1) + prefix += b' return binding\n\n\n' + need(original.endswith(TAIL) and original.count(TAIL) == 1, + 'original terminal entry differs') + result = original[:-len(TAIL)] + prefix + CONTROL_TAIL + need(len(result) <= 262144, 'genuine Root driver limit exceeded') + result_tree = ast.parse(result, feature_version=(3, 12)) + found = {} + for node in result_tree.body: + if isinstance(node, ast.Assign) and len(node.targets) == 1: + target = node.targets[0] + if isinstance(target, ast.Name) and target.id in GATES: + need(isinstance(node.value, ast.Constant) and + node.value.value is None, 'original gate was configured') + found[target.id] = None + need(set(found) == set(GATES), 'original gate census differs') + return result + + +def genuine_launch(stage, output, generation, nonce, mode, driver_bytes): + """Return launch DATA only. It is not stage/source/funding admission. + + CWD=stage is an explicit choice of this launch instance, allowed by the + original Root. It becomes part of Gamma and must enter C05 rule derivation. + The future parent must authenticate and own that exact stage and output + ancestor before actually passing these values to its genuine Popen route. + """ + absolute(stage) + absolute(output) + need(output != stage and not output.startswith(stage + '/'), + 'output must be outside the immutable stage') + need(type(generation) is str and 1 <= len(generation) <= 96 and + all(c in 'abcdefghijklmnopqrstuvwxyz0123456789-' for c in generation), + 'generation differs') + need(type(nonce) is str and len(nonce) == 64 and + all(c in '0123456789abcdef' for c in nonce), 'nonce differs') + need(type(mode) is str and mode in ('normal', 'optimized'), 'mode differs') + need(type(driver_bytes) is bytes and 0 < len(driver_bytes) <= 262144, + 'bounded reviewed driver bytes required') + integration = stage + '/integration' + command = ['/usr/bin/python3.12', '-S', '-s', '-P', '-B'] + if mode == 'optimized': + command.append('-O') + command += [integration + '/full_driver.py', + '--root-sha256', ROOT_SHA, + '--provider', integration + '/probe_binding_v3.py', PROVIDER_SHA, + '--driver', integration + '/v03_control_driver_v1.py', + hashlib.sha256(driver_bytes).hexdigest(), + '--integration', integration, '--', + '--output', output, '--generation', generation, + '--launch-nonce', nonce] + return {'command': command, 'env': dict(NATIVE_ENV), 'cwd': stage, + 'mode': mode, 'generation': generation, 'launch_nonce': nonce, + 'source_admitted': False, 'execution_admitted': False} diff --git a/research/h25-c05-v03-input-constructors/evidence/pro-original/v03_source_refusal_observer_v1.py b/research/h25-c05-v03-input-constructors/evidence/pro-original/v03_source_refusal_observer_v1.py new file mode 100644 index 0000000000..968cd7deb2 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/evidence/pro-original/v03_source_refusal_observer_v1.py @@ -0,0 +1,198 @@ +"""Pure source-location corroboration for parent-retained V03 stderr. + +This does not establish ownership, currentness, admission, or even that a child +ran. The genuine parent must supply its complete retained raw stderr after +actual owned termination, with independently authenticated driver/stage pins. +No result of this function by itself is a V03 PASS or a ParentCompletion. +""" +import ast +import json + +COMPONENT_LOG_BYTES = 2 * 1024 * 1024 +COMPONENT_RECORD_BYTES = 1048576 +ROOT_COUNTERS = ('load_calls', 'native_creations', 'native_execs', + 'activation_attempts', 'successful_bindings', + 'deactivation_attempts', 'cleanup_failures', + 'control_module_creations') + +MESSAGES = { + '_vcheck_literal_sources': ( + 'Variant source role path differs', + 'Variant reviewed source/header differs', + 'Variant role file omitted from closure'), + '_vcheck_custody': ('Variant current source closure differs',), + '_v03_original_input_prefix': ( + 'Variant literal configuration differs', + 'Variant original preflight differs'), +} + + +def source_site(driver_bytes, function, message): + """Derive the unique original logical-raise line without running code.""" + if (type(driver_bytes) is not bytes or not 0 < len(driver_bytes) <= 262144 or + type(function) is not str or type(message) is not str or + function not in MESSAGES or message not in MESSAGES[function]): + raise ValueError('bounded source and literal V03 refusal required') + tree = ast.parse(driver_bytes, feature_version=(3, 12)) + candidates = [node for node in tree.body + if isinstance(node, ast.FunctionDef) and node.name == function] + if len(candidates) != 1: + raise ValueError('unique actual control function required') + sites = [] + for node in ast.walk(candidates[0]): + if not isinstance(node, ast.Raise): + continue + value = node.exc + if (isinstance(value, ast.Call) and isinstance(value.func, ast.Name) and + value.func.id == 'RuntimeError' and len(value.args) == 1 and + not value.keywords and isinstance(value.args[0], ast.Constant) and + type(value.args[0].value) is str and value.args[0].value == message): + sites.append(node.lineno) + if len(sites) != 1: + raise ValueError('unique actual literal raise required') + return sites[0] + + +def corroborate_raw_refusal(driver_bytes, driver_path, stderr_raw, + function, message, original_log_bound): + """Recognize only the expected terminal logical source refusal. + + All exceptions from this checker mean incomplete verification. A False + return means different or insufficient raw evidence; never generic success. + The bound is the existing parent's independently fixed log limit, not a + newly increased allowance. This parser intentionally refuses chained, + grouped, truncated and nonstandard tracebacks; those require review. + """ + if (type(driver_path) is not str or not 1 < len(driver_path) <= 4096 or + not driver_path.startswith('/') or + any(not 32 <= ord(c) < 127 for c in driver_path) or + type(original_log_bound) is not int or original_log_bound <= 0): + raise ValueError('actual source path and existing parent log limit required') + if (type(stderr_raw) is not bytes or + len(stderr_raw) > min(original_log_bound, COMPONENT_LOG_BYTES)): + return False + line_number = source_site(driver_bytes, function, message) + header = (' File "' + driver_path + '", line ' + str(line_number) + + ', in ' + function).encode('ascii') + ending = ('RuntimeError: ' + message + '\n').encode('ascii') + start = b'Traceback (most recent call last):\n' + if (not stderr_raw.startswith(start) or not stderr_raw.endswith(ending) or + stderr_raw.count(start) != 1 or + b'During handling of the above exception' in stderr_raw or + b'The above exception was the direct cause' in stderr_raw): + return False + frames = [line for line in stderr_raw.splitlines() if line.startswith(b' File "')] + return bool(frames) and frames[-1] == header + + +def _no_noninteger(token): + raise ValueError('noninteger JSON number or constant') + + +def _integer(token): + if len(token) > 21: + raise ValueError('JSON integer length bound') + value = int(token) + if not -(1 << 64) <= value < (1 << 64): + raise ValueError('JSON integer domain') + return value + + +def _pairs(pairs): + if len(pairs) > 1024: + raise ValueError('JSON mapping bound') + result = {} + for key, value in pairs: + if key in result: + raise ValueError('duplicate JSON key') + result[key] = value + return result + + +def _tree(value, depth, budget): + budget[0] += 1 + if depth > 24 or budget[0] > 65536: + raise ValueError('JSON tree bound') + kind = type(value) + if value is None or kind is bool or kind is int: + return + if kind is str: + budget[1] += len(value) + if len(value) > 8192 or budget[1] > 524288: + raise ValueError('JSON text bound') + return + if kind is list: + if len(value) > 1024: + raise ValueError('JSON sequence bound') + for item in value: + _tree(item, depth + 1, budget) + return + if kind is dict: + for key in value: + _tree(key, depth + 1, budget) + _tree(value[key], depth + 1, budget) + return + raise ValueError('foreign JSON value') + + +def _decode(raw, original_record_bound): + if (type(original_record_bound) is not int or original_record_bound <= 0 or + type(raw) is not bytes or + not 0 < len(raw) <= min(original_record_bound, COMPONENT_RECORD_BYTES)): + raise ValueError('existing parent/raw component byte bound') + value = json.loads(raw.decode('ascii'), object_pairs_hook=_pairs, + parse_int=_integer, parse_float=_no_noninteger, + parse_constant=_no_noninteger) + _tree(value, 0, [0, 0]) + return value + + +def corroborate_positive(result_raw, root_after_raw, preflight_raw, + parent_binding, original_record_bound): + """Corroborate three complete raw records against independent launch data. + + A True result is ONLY these three checks. Original initial TCB/five-control/ + restoration records, custody-before, independent dependencies, parent source + continuity, domain ownership and terminal capture remain required elsewhere. + Limits here are additional component ceilings, never increased parent caps. + Decode resource/MemoryError failures propagate for parent first-error capture. + """ + if (type(parent_binding) is not dict or + any(type(k) is not str for k in parent_binding) or set(parent_binding) != { + 'mode', 'generation', 'launch_nonce'} or + any(type(v) is not str for v in parent_binding.values()) or + parent_binding['mode'] not in ('normal', 'optimized') or + not 1 <= len(parent_binding['generation']) <= 96 or + any(c not in 'abcdefghijklmnopqrstuvwxyz0123456789-' + for c in parent_binding['generation']) or + len(parent_binding['launch_nonce']) != 64 or + any(c not in '0123456789abcdef' for c in parent_binding['launch_nonce'])): + raise ValueError('independent actual parent launch binding required') + result = _decode(result_raw, original_record_bound) + counters = _decode(root_after_raw, original_record_bound) + preflight = _decode(preflight_raw, original_record_bound) + if (type(result) is not dict or set(result) != { + 'schema', 'status', 'binding', 'whole_variant_producer_completed', + 'runtime_qualified'} or + type(result['schema']) is not str or + result['schema'] != 'h25-v03-input-prefix-result-v1' or + type(result['status']) is not str or + result['status'] != 'ORIGINAL_INPUT_PREFIX_RETURNED' or + result['whole_variant_producer_completed'] is not False or + result['runtime_qualified'] is not False or + type(result['binding']) is not dict or + set(result['binding']) != set(parent_binding) or + any(type(result['binding'][k]) is not str or + result['binding'][k] != parent_binding[k] for k in parent_binding)): + return False + if (type(counters) is not dict or set(counters) != set(ROOT_COUNTERS) or + any(type(counters[k]) is not int or counters[k] != 0 for k in ROOT_COUNTERS)): + return False + return (type(preflight) is dict and set(preflight) == { + 'schema', 'authenticated_files', 'native_private_access', 'cached_admission'} and + type(preflight['schema']) is str and + preflight['schema'] == 'h25-public-runtime-preflight-v2' and + type(preflight['authenticated_files']) is int and + preflight['authenticated_files'] == 217 and + preflight['native_private_access'] is False and + preflight['cached_admission'] is False) diff --git a/research/h25-c05-v03-input-constructors/implementation/c05_elf_edges_v1.py b/research/h25-c05-v03-input-constructors/implementation/c05_elf_edges_v1.py new file mode 100644 index 0000000000..7c97c0d0b9 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/implementation/c05_elf_edges_v1.py @@ -0,0 +1,312 @@ +"""Pure authenticated ELF input-edge extraction; never a loader admission. + +Only exact built-in bytes/strings are consumed. No filesystem, subprocess, +dynamic-loader, archive, or archived-module APIs are used. The caller owns the +byte acquisition, independent expected digest, path/alias and interval facts. + +The narrow checked-range/address-mapping approach is adapted from the original +sealed_elf_profile_v2.py (SHA256 89ed8c777e6b72af2d6a3595037e7e92385924c6087d88010a27192633391016), +read as reference text only. That predecessor's service admission, section, +symbol, relocation and runtime checks are NOT carried forward. This parser +preserves repeated DT_NEEDED occurrences instead of imposing its uniqueness +policy. ELF structures/constants are derived from the acquired glibc 2.39 +libc6-dev elf.h; see c05_elf_edges_DERIVATION-v1.md for exact source pins. + +Supported format: ELF64, little endian, EM_X86_64, ET_REL/ET_EXEC/ET_DYN, +ordinary (not extended) header counts, printable ASCII edge strings. Rejected +profiles do not become empty edges. Unknown semantic constructs remain explicit +unsupported frontier entries. Every successful result has full_C05=False. +""" + +from hashlib import sha256 +from json import dumps +from struct import unpack_from + +SCHEMA = "c05-elf-input-edges-v1" +U64 = (1 << 64) - 1 +MAX_FILE = 64 * 1024 * 1024 +MAX_PH = 128 +MAX_SH = 4096 +MAX_DYNAMIC = 1024 +MAX_STRING = 8192 +MAX_STRTAB = 8 * 1024 * 1024 +MAX_EDGES = 512 +MAX_TEXT = 524288 +MAX_RAW_RECORD = 1048576 + +_STRING_TAGS = { + 1: "DT_NEEDED", 14: "DT_SONAME", 15: "DT_RPATH", 29: "DT_RUNPATH", + 0x6ffffefa: "DT_CONFIG", 0x6ffffefb: "DT_DEPAUDIT", + 0x6ffffefc: "DT_AUDIT", 0x7ffffffd: "DT_AUXILIARY", + 0x7fffffff: "DT_FILTER", +} +_FLAG_NAMES = { + 30: ("DT_FLAGS", ("DF_ORIGIN", "DF_SYMBOLIC", "DF_TEXTREL", + "DF_BIND_NOW", "DF_STATIC_TLS")), + 0x6ffffffb: ("DT_FLAGS_1", ( + "DF_1_NOW", "DF_1_GLOBAL", "DF_1_GROUP", "DF_1_NODELETE", + "DF_1_LOADFLTR", "DF_1_INITFIRST", "DF_1_NOOPEN", "DF_1_ORIGIN", + "DF_1_DIRECT", "DF_1_TRANS", "DF_1_INTERPOSE", "DF_1_NODEFLIB", + "DF_1_NODUMP", "DF_1_CONFALT", "DF_1_ENDFILTEE", "DF_1_DISPRELDNE", + "DF_1_DISPRELPND", "DF_1_NODIRECT", "DF_1_IGNMULDEF", "DF_1_NOKSYMS", + "DF_1_NOHDR", "DF_1_EDITED", "DF_1_NORELOC", "DF_1_SYMINTPOSE", + "DF_1_GLOBAUDIT", "DF_1_SINGLETON", "DF_1_STUB", "DF_1_PIE", + "DF_1_KMOD", "DF_1_WEAKFILTER", "DF_1_NOCOMMON")), + 0x6ffffdfd: ("DT_POSFLAG_1", ("DF_P1_LAZYLOAD", "DF_P1_GROUPPERM")), +} +_PRESENCE_FLAGS = {16: "DT_SYMBOLIC", 22: "DT_TEXTREL", 24: "DT_BIND_NOW"} +_KNOWN_TAGS = (set(range(0, 38)) - {31}) | set(_STRING_TAGS) | set(_FLAG_NAMES) | { + 0x6ffffef5, 0x6ffffff0, 0x6ffffff9, 0x6ffffffa, 0x6ffffffc, + 0x6ffffffd, 0x6ffffffe, 0x6fffffff, +} +_KNOWN_PH = {0, 1, 2, 3, 4, 6, 7, 0x6474e550, 0x6474e551, + 0x6474e552, 0x6474e553} +_REPEATABLE = {1, 0x6ffffdfd, 0x7ffffffd, 0x7fffffff} + + +class ELFEdgeError(ValueError): + """Malformed, ambiguous, unauthenticated or outside the bounded profile.""" + + +def _need(condition, reason): + if not condition: + raise ELFEdgeError(reason) + + +def _end(start, size, limit=U64): + _need(type(start) is int and type(size) is int and + 0 <= start <= limit and 0 <= size <= limit - start, + "range overflow/out of bounds") + return start + size + + +def _disjoint(ranges, reason): + ordered = sorted((a, b) for a, b in ranges if a < b) + for left, right in zip(ordered, ordered[1:]): + _need(left[1] <= right[0], reason) + + +def _ascii(raw, *, empty=False): + _need(len(raw) <= MAX_STRING and (empty or len(raw) > 0) and + all(32 <= c < 127 for c in raw), "unsupported ELF edge string") + return raw.decode("ascii") + + +def _lookup_form(name): + if name.startswith("/"): + return "absolute-path" + return "relative-path" if "/" in name else "loader-search-name" + + +def _bounded_output(result): + text = [0] + nodes = [0] + + def visit(value, depth=0): + nodes[0] += 1 + _need(depth <= 24 and nodes[0] <= 65536, "output representation depth/nodes") + if type(value) is str: + text[0] += len(value) + _need(len(value) <= MAX_STRING and text[0] <= MAX_TEXT, + "output representation text cap") + elif type(value) in (list, tuple): + _need(len(value) <= 1024, "output representation sequence cap") + for item in value: + visit(item, depth + 1) + elif type(value) is dict: + _need(len(value) <= 1024, "output representation mapping cap") + for key, item in value.items(): + visit(key, depth + 1) + visit(item, depth + 1) + visit(result) + _need(len(dumps(result, sort_keys=True, separators=(",", ":")).encode("ascii")) + <= MAX_RAW_RECORD, "output representation raw cap") + return result + + +def extract_elf_input_edges(raw, expected_sha256, *, origin): + """Extract ordered unresolved ELF edges from independently pinned bytes. + + Raises ELFEdgeError for malformed/out-of-profile input. A successful return + authenticates equality to the caller's digest, not provenance of that digest + or the current identity of `origin`. No search candidate is resolved here. + `edges` includes PT_INTERP, each DT_NEEDED occurrence, and loader configuration + strings; DT_SONAME is metadata in `strings`, not an external-file edge. + """ + _need(type(raw) is bytes and 64 <= len(raw) <= MAX_FILE, "ELF byte type/size") + _need(type(expected_sha256) is str and len(expected_sha256) == 64 and + all(c in "0123456789abcdef" for c in expected_sha256), "expected digest") + _need(type(origin) is str and 1 < len(origin) <= MAX_STRING and + origin.startswith("/") and all(32 <= ord(c) < 127 for c in origin), + "absolute literal ASCII origin required") + _need(sha256(raw).hexdigest() == expected_sha256, "authenticated ELF digest mismatch") + _need(raw[:7] == b"\x7fELF\x02\x01\x01" and raw[7] in (0, 3) and + raw[8:16] == b"\0" * 8, "unsupported ELF identity/ABI") + (kind, machine, version, entry, phoff, shoff, eflags, ehsize, phsize, + phnum, shsize, shnum, shstr) = unpack_from(" 0 and phoff >= 64 and phsize == 56), "program header layout") + phend = _end(phoff, phnum * phsize, len(raw)) + _need((shnum == 0 and shoff == 0 and shstr == 0 and shsize in (0, 64)) or + (shnum > 0 and shoff >= 64 and shsize == 64 and shstr < shnum), + "section header layout") + shend = _end(shoff, shnum * shsize, len(raw)) + _disjoint([(0, 64), (phoff, phend), (shoff, shend)], "ELF header table overlap") + _need(kind != 1 or phnum == 0, "ET_REL program headers outside profile") + _need(kind == 1 or phnum > 0, "loadable ELF without program headers") + + programs, loads, unsupported = [], [], [] + for index in range(phnum): + ptype, flags, off, va, pa, fs, ms, align = unpack_from( + " 0 and fs <= ms and + (align <= 1 or va % align == off % align), "PT_LOAD size/alignment") + loads.append(p) + if ptype not in _KNOWN_PH: + unsupported.append(dict(kind="program-header", index=index, type=ptype)) + _need([p["vaddr"] for p in loads] == sorted(p["vaddr"] for p in loads), + "PT_LOAD ordering") + _disjoint([(p["vaddr"], p["vaddr"] + p["memsz"]) for p in loads], + "overlapping/ambiguous PT_LOAD memory ranges") + _disjoint([(p["offset"], p["offset"] + p["filesz"]) for p in loads], + "overlapping/ambiguous PT_LOAD file ranges") + _need(kind == 1 or loads, "loadable ELF without PT_LOAD") + + def file_at(address, size): + end = _end(address, size) + owners = [p for p in loads if p["vaddr"] <= address and + end <= p["vaddr"] + p["filesz"]] + _need(size > 0 and len(owners) == 1, "ambiguous/unmapped file-backed address") + owner = owners[0] + off = owner["offset"] + address - owner["vaddr"] + _end(off, size, len(raw)) + return off + + interp_segments = [p for p in programs if p["type"] == 3] + dynamic_segments = [p for p in programs if p["type"] == 2] + _need(len(interp_segments) <= 1 and len(dynamic_segments) <= 1, + "duplicate PT_INTERP/PT_DYNAMIC") + edges, strings, needed, paths, flags, dynamic = [], [], [], [], [], [] + interpreter = None + if interp_segments: + p = interp_segments[0] + _need(2 <= p["filesz"] <= MAX_STRING + 1, "PT_INTERP size") + value = raw[p["offset"]:p["offset"] + p["filesz"]] + _need(value[-1:] == b"\0" and b"\0" not in value[:-1], "PT_INTERP terminator") + interpreter = _ascii(value[:-1]) + edges.append(dict(kind="interpreter", tag="PT_INTERP", name=interpreter, + program_index=p["index"], file_offset=p["offset"], + lookup_form=_lookup_form(interpreter), resolved=False)) + if dynamic_segments: + p = dynamic_segments[0] + _need(p["filesz"] == p["memsz"] and p["filesz"] % 16 == 0 and + 1 <= p["filesz"] // 16 <= MAX_DYNAMIC, "PT_DYNAMIC size/profile") + _need(file_at(p["vaddr"], p["filesz"]) == p["offset"], "PT_DYNAMIC mapping mismatch") + ended, seen = False, set() + for index in range(p["filesz"] // 16): + tag, value = unpack_from("= start, "unterminated/oversized dynamic string") + name = _ascii(raw[start:stop], empty=tag in (15, 29)) + item = dict(tag=_STRING_TAGS[tag], dynamic_index=index, + string_offset=value, file_offset=start, name=name) + strings.append(item) + if tag == 14: + continue + if tag in (15, 29): + components = name.split(":") + _need(len(components) <= 512, "loader search component cap") + path = dict(item, components=components, + empty_component_requires_cwd="" in components, + token_expansion_required="$" in name) + paths.append(path) + edges.append(dict(item, kind="loader-search-path", resolved=False)) + else: + edge = dict(item, kind="needed" if tag == 1 else "loader-auxiliary-input", + lookup_form=_lookup_form(name), + token_expansion_required="$" in name, resolved=False) + edges.append(edge) + if tag == 1: + needed.append(dict(item, occurrence=len(needed))) + else: + unsupported.append(dict(kind="additional-loader-input-semantics", + tag=_STRING_TAGS[tag], dynamic_index=index)) + if tag in _FLAG_NAMES: + tag_name, names = _FLAG_NAMES[tag] + known_mask = (1 << len(names)) - 1 + flags.append(dict(tag=tag_name, dynamic_index=index, value=value, + set_flags=[name for bit, name in enumerate(names) if value & (1 << bit)], + unknown_bits=value & ~known_mask)) + if value & ~known_mask or tag == 0x6ffffdfd: + unsupported.append(dict(kind="dynamic-flag-semantics", tag=tag_name, + dynamic_index=index, value=value)) + if tag in _PRESENCE_FLAGS: + _need(value == 0, "nonzero presence-only dynamic tag payload") + flags.append(dict(tag=_PRESENCE_FLAGS[tag], dynamic_index=index, value=0, + set_flags=[_PRESENCE_FLAGS[tag]], unknown_bits=0)) + _need(len(edges) <= MAX_EDGES, "ELF edge count cap") + frontier = [ + "configured-loader-source-and-binary-correspondence", + "actual-interpreter-and-transitive-dependency-resolution", + "ordered-negative-lookups-and-alias-directory-identity", + "rpath-runpath-inheritance-and-search-precedence", + "origin-lib-platform-token-expansion-and-origin-binding", + "loader-cache-default-directories-and-nodeflib-rules", + "system-preload-audit-and-launch-configuration", + "glibc-hwcaps-cpu-platform-and-secure-execution-rules", + "initializers-ifunc-and-execution-dependent-loads", + "namespace-ownership-and-interval-currentness", + "original-two-command-C05-expansion-and-capture-fit", + ] + if kind == 1: + frontier.append("ET_REL-linker-input-selection-and-relocations-outside-parser") + if not dynamic_segments: + frontier.append("absence-of-PT_DYNAMIC-does-not-prove-input-completeness") + return _bounded_output(dict( + schema=SCHEMA, origin=origin, sha256=expected_sha256, bytes=len(raw), + format="ELF64-little-endian-x86-64", elf_type={1: "ET_REL", 2: "ET_EXEC", 3: "ET_DYN"}[kind], + interpreter=interpreter, needed=needed, search_paths=paths, strings=strings, + dynamic_flags=flags, edges=edges, dynamic_entries=dynamic, + program_headers=programs, unsupported_constructs=unsupported, + unresolved_loader_frontier=frontier, loader_search_resolved=False, + full_C05=False, original_runtime_activity=False, + scope="authenticated-file-bytes-only; no path, loader or interval admission")) diff --git a/research/h25-c05-v03-input-constructors/implementation/c05_gcc_rules_derivation_v1.json b/research/h25-c05-v03-input-constructors/implementation/c05_gcc_rules_derivation_v1.json new file mode 100644 index 0000000000..26603ab7a7 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/implementation/c05_gcc_rules_derivation_v1.json @@ -0,0 +1,2417 @@ +{ + "files": [ + { + "bytes": 33402, + "path": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/c05-v03-completion-20261102T055710Z/implementation/c05_gcc_rules_v1.py", + "sha256": "483586044c81537fcf19d9d9dd6ed331884b427d80bd91a38ae4f38c31237e7a" + }, + { + "bytes": 13509, + "path": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/c05-v03-completion-20261102T055710Z/implementation/c05_gcc_rules_tests_v1.py", + "sha256": "869ec7f49f56a7482f7927b77123bfa2f6663d76002431560322ff86db8b5026" + }, + { + "bytes": 31581, + "path": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/c05-v03-completion-20261102T055710Z/implementation/c05_gcc_rules_sourcepins_v1.json", + "sha256": "5564d0d2b47a5803c96b3767d838676e8f2427089e3b02cda1b1e62430a3c24d" + } + ], + "frozen_utc": "2026-11-02T07:40:22.964736+00:00", + "model": { + "automatic_preinclude": { + "condition": "hosted && std_inc && !preprocessed with selected glibc targetcm", + "effective": false, + "name": "stdc-predef.h" + }, + "automatic_specs_rules": [ + { + "ordered_candidates_proven": false, + "rule": "find_a_file(startfile_prefixes, specs, R_OK, do_multi=true)" + }, + { + "configured_candidate": "/usr/lib/gcc/x86_64-linux-gnu/specs", + "observed": false, + "rule": "independent access(STANDARD_EXEC_PREFIX + target/ + specs, R_OK)" + } + ], + "build_values_override_absence_proven": false, + "builtin_shared_link_recipe": { + "applied_effective_recipe_proven": false, + "dynamic_interpreter_for_shared_output": "GNU_USER_TARGET_LINK_SPEC guards the dynamic-linker option with !shared; toolchain ELF loading is a separate closure.", + "emulation_candidate": "elf_x86_64", + "nostartfiles_suppresses": "startfile/endfile specs, not all standard libraries" + }, + "command": [ + "/usr/bin/x86_64-linux-gnu-gcc-13", + "-nostartfiles", + "-shared", + "-fPIC", + "-O3", + "-std=c11", + "-Wall", + "-Wextra", + "-Werror", + "-I/usr/include/python3.12", + "/finite-fixture/stage/original-role.c", + "-o", + "/finite-fixture/stage/fresh.so" + ], + "compiler": "/usr/bin/x86_64-linux-gnu-gcc-13", + "compiler_sha256": "1b99826121ae6682a634e5efe09bd3e3df58ce58e0b28f849114ab5b89139c26", + "conditional_distro_defines": { + "conditional": [ + { + "conditions": [ + { + "expression": "ifeq ($(with_ssp)-$(with_ssp_default),yes-yes)", + "value": null + } + ], + "directive": "#define DIST_DEFAULT_SSP 1", + "line": 355 + }, + { + "conditions": [ + { + "expression": "ifeq ($(with_ssp)-$(with_ssp_default),yes-yes)", + "value": null + }, + { + "expression": "ifeq (,$(filter $(distrelease), precise trusty))", + "value": true + } + ], + "directive": "#define DIST_DEFAULT_SSP_STRONG 1", + "line": 358 + }, + { + "conditions": [ + { + "expression": "ifeq ($(with_ssp)-$(with_ssp_default),yes-yes)", + "value": null + } + ], + "directive": "#define DIST_DEFAULT_FORMAT_SECURITY 1", + "line": 361 + } + ], + "definite_under_build_values": { + "DIST_DEFAULT_ASYNC_UNWIND": { + "conditions": [ + { + "expression": "ifeq ($(with_async_unwind),yes)", + "value": true + } + ], + "directive": "#define DIST_DEFAULT_ASYNC_UNWIND 1", + "line": 351 + }, + "DIST_DEFAULT_BIND_NOW": { + "conditions": [ + { + "expression": "ifneq (,$(filter $(derivative),Ubuntu))", + "value": true + } + ], + "directive": "#define DIST_DEFAULT_BIND_NOW 1", + "line": 378 + }, + "DIST_DEFAULT_CF_PROTECTION": { + "conditions": [ + { + "expression": "ifneq (,$(filter $(derivative),Ubuntu))", + "value": true + }, + { + "expression": "ifeq ($(with_cf_protection),yes)", + "value": true + } + ], + "directive": "#define DIST_DEFAULT_CF_PROTECTION 1", + "line": 385 + }, + "DIST_DEFAULT_FORTIFY_SOURCE": { + "conditions": [ + { + "expression": "ifneq (,$(filter $(derivative),Ubuntu))", + "value": true + }, + { + "expression": "else", + "value": true + } + ], + "directive": "#define DIST_DEFAULT_FORTIFY_SOURCE 3", + "line": 372 + }, + "DIST_DEFAULT_FORTIFY_SOURCE_S": { + "conditions": [ + { + "expression": "ifneq (,$(filter $(derivative),Ubuntu))", + "value": true + }, + { + "expression": "else", + "value": true + } + ], + "directive": "#define DIST_DEFAULT_FORTIFY_SOURCE_S \"3\"", + "line": 373 + }, + "DIST_DEFAULT_PKG_METADATA_SPEC": { + "conditions": [ + { + "expression": "ifneq (,$(filter $(derivative),Ubuntu))", + "value": true + }, + { + "expression": "ifeq (,$(filter $(distrelease),lucid precise trusty xenial bionic focal jammy kinetic lunar mantic))", + "value": true + } + ], + "directive": "#define DIST_DEFAULT_PKG_METADATA_SPEC 1", + "line": 398 + }, + "DIST_DEFAULT_RELRO": { + "conditions": [ + { + "expression": "ifneq (,$(filter $(derivative),Ubuntu))", + "value": true + } + ], + "directive": "#define DIST_DEFAULT_RELRO 1", + "line": 376 + }, + "DIST_DEFAULT_STACK_CLASH": { + "conditions": [ + { + "expression": "ifneq (,$(filter $(derivative),Ubuntu))", + "value": true + }, + { + "expression": "ifeq ($(with_stack_clash),yes)", + "value": true + } + ], + "directive": "#define DIST_DEFAULT_STACK_CLASH 1", + "line": 381 + } + }, + "executed_recipe": false, + "generated_header_observed": false + }, + "configuration_recipe": { + "authoritative_generated_configuration": false, + "default_abi": "m64", + "default_multiarch": "x86_64-linux-gnu", + "default_os_multilib": "../lib", + "default_pie": true, + "libdir": "/usr/lib", + "libexecdir": "/usr/libexec", + "libexecsubdir": "/usr/libexec/gcc/x86_64-linux-gnu/13", + "libsubdir": "/usr/lib/gcc/x86_64-linux-gnu/13", + "prefix": "/usr", + "target": "x86_64-linux-gnu", + "version": "13" + }, + "cwd": "/finite-fixture/stage", + "definite_patch_projection": [ + { + "base_sha256": "41e0fe9006909a793736b73fdd434929c913023992c33cf9b746423f78682e45", + "definite_patch_projection_sha256": "cfc972b69df4bc9d03f6d8cf9cdb61275143ba5659599fbefbd1937e92fec53b", + "installed_applied_equivalence_proven": false, + "patches": [ + { + "hunks": [ + { + "actual_old_line": 3335, + "exact_context": true, + "new_count": 31, + "new_line": 3335, + "old_count": 8, + "old_line": 3335 + }, + { + "actual_old_line": 3407, + "exact_context": true, + "new_count": 20, + "new_line": 3407, + "old_count": 7, + "old_line": 3384 + }, + { + "actual_old_line": 3428, + "exact_context": true, + "new_count": 41, + "new_line": 3428, + "old_count": 21, + "old_line": 3392 + }, + { + "actual_old_line": 3866, + "exact_context": true, + "new_count": 11, + "new_line": 3866, + "old_count": 11, + "old_line": 3810 + }, + { + "actual_old_line": 4109, + "exact_context": true, + "new_count": 11, + "new_line": 4109, + "old_count": 8, + "old_line": 4053 + } + ], + "patch": "rename-info-files.diff", + "patch_sha256": "e28ad2ad80a9141c1883936abe5d22c90e409a23a2d6f5728db168aaa610cc25" + }, + { + "hunks": [ + { + "actual_old_line": 2637, + "exact_context": true, + "new_count": 8, + "new_line": 2637, + "old_count": 31, + "old_line": 2637 + } + ], + "patch": "gcc-gfdl-build.diff", + "patch_sha256": "6a9344c1498dfa2cdb47e02bac1991e2e120d277ceddd06c6da62a371354df8a" + }, + { + "hunks": [ + { + "actual_old_line": 4460, + "exact_context": true, + "new_count": 8, + "new_line": 4401, + "old_count": 8, + "old_line": 4401 + } + ], + "patch": "gcc-textdomain.diff", + "patch_sha256": "85f819e014b708635e695002fb323da73ea72996de8e4c4fa3fc308e3e6300dd" + }, + { + "hunks": [ + { + "actual_old_line": 589, + "exact_context": true, + "new_count": 8, + "new_line": 589, + "old_count": 8, + "old_line": 589 + } + ], + "patch": "gcc-driver-extra-langs.diff", + "patch_sha256": "ac5a6a7bf051708f917c59d9736b83cc65740168bc240147f94af67d13ad272d" + }, + { + "hunks": [ + { + "actual_old_line": 284, + "exact_context": true, + "new_count": 7, + "new_line": 284, + "old_count": 7, + "old_line": 284 + } + ], + "patch": "gcc-verbose-lto-link.diff", + "patch_sha256": "357e6581ae291ee102bbcaa4dd9df10e86f89e424d1e5be210b621183d2745fa" + }, + { + "hunks": [ + { + "actual_old_line": 553, + "exact_context": true, + "new_count": 7, + "new_line": 553, + "old_count": 7, + "old_line": 553 + } + ], + "patch": "gcc-multiarch.diff", + "patch_sha256": "18022b0748f43bf018eea1916b4f11bca68daad7ce8ecf076e4e103a1acba0e8" + }, + { + "hunks": [ + { + "actual_old_line": 1215, + "exact_context": true, + "new_count": 7, + "new_line": 1215, + "old_count": 6, + "old_line": 1215 + }, + { + "actual_old_line": 1883, + "exact_context": true, + "new_count": 14, + "new_line": 1883, + "old_count": 6, + "old_line": 1882 + }, + { + "actual_old_line": 3048, + "exact_context": true, + "new_count": 7, + "new_line": 3048, + "old_count": 7, + "old_line": 3039 + } + ], + "patch": "g++-multiarch-incdir.diff", + "patch_sha256": "bc30caf1d10804375e6104e004d658fb2df1857cbab55871d715d81c1b6ce049" + } + ], + "target": "gcc/Makefile.in" + }, + { + "base_sha256": "e2220b9cdc85b785faf220fd3058a46212cd3b5f7da4040dd4ca3e839bd0f1bd", + "definite_patch_projection_sha256": "e2220b9cdc85b785faf220fd3058a46212cd3b5f7da4040dd4ca3e839bd0f1bd", + "installed_applied_equivalence_proven": false, + "patches": [], + "target": "gcc/c-family/c-cppbuiltin.cc" + }, + { + "base_sha256": "41ab40b6b1986771f2d3c73c6c3218dba19ddc87b57bd39d32ca8c639f42bc78", + "definite_patch_projection_sha256": "41ab40b6b1986771f2d3c73c6c3218dba19ddc87b57bd39d32ca8c639f42bc78", + "installed_applied_equivalence_proven": false, + "patches": [], + "target": "gcc/c-family/c-lex.cc" + }, + { + "base_sha256": "41c5789fab7d536c6f16b8d4bcaa83583120eefa970c929ac24b783bd6b289ee", + "definite_patch_projection_sha256": "41c5789fab7d536c6f16b8d4bcaa83583120eefa970c929ac24b783bd6b289ee", + "installed_applied_equivalence_proven": false, + "patches": [], + "target": "gcc/c-family/c-opts.cc" + }, + { + "base_sha256": "3e3a24b7ef32b651781c07852d8bce61fe6587173149003c59f8c02d2684f065", + "definite_patch_projection_sha256": "3e3a24b7ef32b651781c07852d8bce61fe6587173149003c59f8c02d2684f065", + "installed_applied_equivalence_proven": false, + "patches": [], + "target": "gcc/c-family/c-target.def" + }, + { + "base_sha256": "fba4b594cc57c301ca402fc04080167a6cf4b58884b5bfd05075821dc1f29cd4", + "definite_patch_projection_sha256": "fba4b594cc57c301ca402fc04080167a6cf4b58884b5bfd05075821dc1f29cd4", + "installed_applied_equivalence_proven": false, + "patches": [], + "target": "gcc/collect2.cc" + }, + { + "base_sha256": "9d22d65c6a106a7802d0c67da6695ac918088bb097e2007646467cfb415cb481", + "definite_patch_projection_sha256": "d6c960cc8cd449fba2f3a840b636a0b519a3f38cd2e3d8a184f75db28f471cad", + "installed_applied_equivalence_proven": false, + "patches": [ + { + "hunks": [ + { + "actual_old_line": 5829, + "exact_context": true, + "new_count": 9, + "new_line": 5828, + "old_count": 6, + "old_line": 5828 + } + ], + "patch": "hurd-amd64.diff", + "patch_sha256": "8975d47d0ae92526ac4c569ab9b454baeca7a3b77a326bd62170ce796a11883f" + }, + { + "hunks": [ + { + "actual_old_line": 2520, + "exact_context": true, + "new_count": 8, + "new_line": 2519, + "old_count": 7, + "old_line": 2519 + }, + { + "actual_old_line": 2543, + "exact_context": true, + "new_count": 8, + "new_line": 2542, + "old_count": 7, + "old_line": 2541 + }, + { + "actual_old_line": 5659, + "exact_context": true, + "new_count": 7, + "new_line": 5658, + "old_count": 7, + "old_line": 5656 + } + ], + "patch": "gcc-multiarch.diff", + "patch_sha256": "18022b0748f43bf018eea1916b4f11bca68daad7ce8ecf076e4e103a1acba0e8" + } + ], + "target": "gcc/config.gcc" + }, + { + "base_sha256": "8feaf44e45d44cdd2d8c79c228d2d3ce45ead2a3fcf9e90f2c187a262b2865b6", + "definite_patch_projection_sha256": "8feaf44e45d44cdd2d8c79c228d2d3ce45ead2a3fcf9e90f2c187a262b2865b6", + "installed_applied_equivalence_proven": false, + "patches": [], + "target": "gcc/config/glibc-c.cc" + }, + { + "base_sha256": "cf7ac27fe1d79dbd0e038a5d4f282eb54508ca664d7d25d1011590e728c2bdbf", + "definite_patch_projection_sha256": "8f3518bc748dd1f7c1f19bcc2d59201405b5a599820256ff1ecdf9ea63392daf", + "installed_applied_equivalence_proven": false, + "patches": [ + { + "hunks": [ + { + "actual_old_line": 136, + "exact_context": true, + "new_count": 22, + "new_line": 136, + "old_count": 22, + "old_line": 136 + } + ], + "patch": "gcc-as-needed.diff", + "patch_sha256": "f2145cce7b9633be112cb7961f92c85434cf7cca28a93cc9ce4b038ff1c0bbc4" + }, + { + "hunks": [ + { + "actual_old_line": 136, + "exact_context": true, + "new_count": 22, + "new_line": 136, + "old_count": 22, + "old_line": 136 + } + ], + "patch": "gcc-as-needed-gold.diff", + "patch_sha256": "8bb7658a5fef8d262535b4507295bfd9f62fa973a27ec08e2a8be6650ae0d70d" + } + ], + "target": "gcc/config/gnu-user.h" + }, + { + "base_sha256": "190fabbd35d1f5b526427f6a4bb3afe62a375dd605a43c7b5f550cb9c1650561", + "definite_patch_projection_sha256": "5507732a24911a39abbf7d2526fd8c1b09db98c0519b7388b7143a3c01bdbccb", + "installed_applied_equivalence_proven": false, + "patches": [ + { + "hunks": [ + { + "actual_old_line": 56, + "exact_context": true, + "new_count": 7, + "new_line": 56, + "old_count": 6, + "old_line": 56 + } + ], + "patch": "gcc-hash-style-gnu.diff", + "patch_sha256": "b994015da754fdc89c4654181d4ba26fa4d63cf89ae1d0b0b2322cd6eeee0aa0" + }, + { + "hunks": [ + { + "actual_old_line": 57, + "exact_context": true, + "new_count": 7, + "new_line": 57, + "old_count": 6, + "old_line": 57 + } + ], + "patch": "gcc-as-needed.diff", + "patch_sha256": "f2145cce7b9633be112cb7961f92c85434cf7cca28a93cc9ce4b038ff1c0bbc4" + } + ], + "target": "gcc/config/i386/gnu-user64.h" + }, + { + "base_sha256": "5d0d59b1f38a0f81b430ac86cfef905a19382710c55e5543607a36931b86b4bb", + "definite_patch_projection_sha256": "5d0d59b1f38a0f81b430ac86cfef905a19382710c55e5543607a36931b86b4bb", + "installed_applied_equivalence_proven": false, + "patches": [], + "target": "gcc/config/i386/i386-c.cc" + }, + { + "base_sha256": "9007684d92746203c280b53a69debfff75851e31c1cd9ce6cd5c61f705d5179c", + "definite_patch_projection_sha256": "9007684d92746203c280b53a69debfff75851e31c1cd9ce6cd5c61f705d5179c", + "installed_applied_equivalence_proven": false, + "patches": [], + "target": "gcc/config/i386/linux64.h" + }, + { + "base_sha256": "e5126d97ea7412563159865755129046714cc95ebf74f63339065748c5adb5dc", + "definite_patch_projection_sha256": "91b725effa065b7e3de3dab23c4dfc2e56612bb435d2313c4dea464e755935cf", + "installed_applied_equivalence_proven": false, + "patches": [ + { + "hunks": [ + { + "actual_old_line": 36, + "exact_context": true, + "new_count": 13, + "new_line": 36, + "old_count": 3, + "old_line": 36 + } + ], + "patch": "gcc-multiarch.diff", + "patch_sha256": "18022b0748f43bf018eea1916b4f11bca68daad7ce8ecf076e4e103a1acba0e8" + }, + { + "hunks": [ + { + "actual_old_line": 33, + "exact_context": true, + "new_count": 19, + "new_line": 33, + "old_count": 9, + "old_line": 33 + } + ], + "patch": "gcc-multilib-multiarch.diff", + "patch_sha256": "b5d6ba4e2831fd8f4614381ef1da42e38fb3744e0e3782d5c1e650b192ab4837" + } + ], + "target": "gcc/config/i386/t-linux64" + }, + { + "base_sha256": "ce71be1f80fac59483042c6dd421bd267765c44f977505955b2718e30da612c4", + "definite_patch_projection_sha256": "ce71be1f80fac59483042c6dd421bd267765c44f977505955b2718e30da612c4", + "installed_applied_equivalence_proven": false, + "patches": [], + "target": "gcc/config/linux.h" + }, + { + "base_sha256": "afaf16ab53ef0781ccb4e4ba3751a314c66eda24ec3132cc6d8b347d9c0ac9c3", + "definite_patch_projection_sha256": "c2323867ffd2e30129143f9f611cc94f31b7a3a3738e15bfa2685e1369021798", + "installed_applied_equivalence_proven": false, + "patches": [ + { + "hunks": [ + { + "actual_old_line": 49, + "exact_context": true, + "new_count": 8, + "new_line": 49, + "old_count": 6, + "old_line": 49 + } + ], + "patch": "g++-multiarch-incdir.diff", + "patch_sha256": "bc30caf1d10804375e6104e004d658fb2df1857cbab55871d715d81c1b6ce049" + } + ], + "target": "gcc/cppdefault.cc" + }, + { + "base_sha256": "c260c6321fb3852df326618d18642a3c795a8886c285db71acde6a97fd031b0a", + "definite_patch_projection_sha256": "27ba86f74276e1efbc27e369a0343bc996f6f38193d8e433a349c1b07de4f357", + "installed_applied_equivalence_proven": false, + "patches": [ + { + "hunks": [ + { + "actual_old_line": 27, + "exact_context": true, + "new_count": 11, + "new_line": 27, + "old_count": 6, + "old_line": 27 + }, + { + "actual_old_line": 448, + "exact_context": true, + "new_count": 7, + "new_line": 448, + "old_count": 6, + "old_line": 443 + }, + { + "actual_old_line": 977, + "exact_context": true, + "new_count": 121, + "new_line": 977, + "old_count": 6, + "old_line": 971 + }, + { + "actual_old_line": 1148, + "exact_context": true, + "new_count": 7, + "new_line": 1148, + "old_count": 7, + "old_line": 1027 + }, + { + "actual_old_line": 1265, + "exact_context": true, + "new_count": 7, + "new_line": 1265, + "old_count": 6, + "old_line": 1144 + }, + { + "actual_old_line": 1306, + "exact_context": true, + "new_count": 8, + "new_line": 1306, + "old_count": 6, + "old_line": 1184 + }, + { + "actual_old_line": 1366, + "exact_context": true, + "new_count": 7, + "new_line": 1366, + "old_count": 7, + "old_line": 1242 + }, + { + "actual_old_line": 1560, + "exact_context": true, + "new_count": 9, + "new_line": 1560, + "old_count": 9, + "old_line": 1436 + }, + { + "actual_old_line": 1576, + "exact_context": true, + "new_count": 18, + "new_line": 1576, + "old_count": 18, + "old_line": 1452 + }, + { + "actual_old_line": 1819, + "exact_context": true, + "new_count": 8, + "new_line": 1819, + "old_count": 6, + "old_line": 1695 + }, + { + "actual_old_line": 1894, + "exact_context": true, + "new_count": 7, + "new_line": 1894, + "old_count": 6, + "old_line": 1768 + }, + { + "actual_old_line": 10318, + "exact_context": true, + "new_count": 33, + "new_line": 10318, + "old_count": 6, + "old_line": 10191 + } + ], + "patch": "gcc-distro-specs.diff", + "patch_sha256": "22e7b3c4e7a3437c456bae439501f97c560460b46670700d9e09aafa032ef072" + }, + { + "hunks": [ + { + "actual_old_line": 2929, + "exact_context": true, + "new_count": 7, + "new_line": 2919, + "old_count": 6, + "old_line": 2919 + }, + { + "actual_old_line": 3143, + "exact_context": true, + "new_count": 24, + "new_line": 3133, + "old_count": 6, + "old_line": 3132 + } + ], + "patch": "gcc-search-prefixed-as-ld.diff", + "patch_sha256": "7ec5fb60d1e42c346a2381f10c7ce561a9ccb2ec74e45807c83328f4f81a4090" + }, + { + "hunks": [ + { + "actual_old_line": 1094, + "exact_context": true, + "new_count": 15, + "new_line": 1085, + "old_count": 8, + "old_line": 1085 + } + ], + "patch": "musl-ssp.diff", + "patch_sha256": "b5aa722bf90ef419ab9682998b5eebba2d7fc1f4065359e0e48bd8b231628fa4" + }, + { + "hunks": [ + { + "actual_old_line": 3132, + "exact_context": true, + "new_count": 61, + "new_line": 3122, + "old_count": 6, + "old_line": 3122 + }, + { + "actual_old_line": 3713, + "exact_context": true, + "new_count": 10, + "new_line": 3703, + "old_count": 9, + "old_line": 3648 + }, + { + "actual_old_line": 7974, + "exact_context": true, + "new_count": 27, + "new_line": 7964, + "old_count": 8, + "old_line": 7908 + } + ], + "patch": "gcc-ice-dump.diff", + "patch_sha256": "530cdb9a70740c8c3d6029ece09205cd92b6dab3676530cbd4dfbd1b57587e36" + }, + { + "hunks": [ + { + "actual_old_line": 7975, + "exact_context": true, + "new_count": 16, + "new_line": 7965, + "old_count": 13, + "old_line": 7965 + }, + { + "actual_old_line": 7998, + "exact_context": true, + "new_count": 15, + "new_line": 7988, + "old_count": 6, + "old_line": 7985 + } + ], + "patch": "gcc-ice-apport.diff", + "patch_sha256": "89c0a21abc34c5f320a32cc0f07ecc46a6d9ebb9e0656e560b103530f594a841" + }, + { + "hunks": [ + { + "actual_old_line": 760, + "exact_context": true, + "new_count": 11, + "new_line": 759, + "old_count": 8, + "old_line": 759 + }, + { + "actual_old_line": 799, + "exact_context": true, + "new_count": 11, + "new_line": 798, + "old_count": 8, + "old_line": 795 + }, + { + "actual_old_line": 820, + "exact_context": true, + "new_count": 11, + "new_line": 819, + "old_count": 8, + "old_line": 813 + }, + { + "actual_old_line": 839, + "exact_context": true, + "new_count": 11, + "new_line": 838, + "old_count": 8, + "old_line": 829 + } + ], + "patch": "gcc-as-needed.diff", + "patch_sha256": "f2145cce7b9633be112cb7961f92c85434cf7cca28a93cc9ce4b038ff1c0bbc4" + }, + { + "hunks": [ + { + "actual_old_line": 761, + "exact_context": true, + "new_count": 10, + "new_line": 760, + "old_count": 10, + "old_line": 760 + }, + { + "actual_old_line": 800, + "exact_context": true, + "new_count": 10, + "new_line": 799, + "old_count": 10, + "old_line": 799 + }, + { + "actual_old_line": 821, + "exact_context": true, + "new_count": 10, + "new_line": 820, + "old_count": 10, + "old_line": 820 + }, + { + "actual_old_line": 840, + "exact_context": true, + "new_count": 10, + "new_line": 839, + "old_count": 10, + "old_line": 839 + } + ], + "patch": "gcc-as-needed-gold.diff", + "patch_sha256": "8bb7658a5fef8d262535b4507295bfd9f62fa973a27ec08e2a8be6650ae0d70d" + } + ], + "target": "gcc/gcc.cc" + }, + { + "base_sha256": "70dca72168648a2606684b7c8dc6d31f68472f32ca1058724997abb7185d0e39", + "definite_patch_projection_sha256": "e20e570e857ef5f4db1e6a9005c2c06e0e7761ae56931a19d1c9f0226b9bc49d", + "installed_applied_equivalence_proven": false, + "patches": [ + { + "hunks": [ + { + "actual_old_line": 164, + "exact_context": true, + "new_count": 18, + "new_line": 164, + "old_count": 6, + "old_line": 164 + }, + { + "actual_old_line": 241, + "exact_context": true, + "new_count": 16, + "new_line": 241, + "old_count": 7, + "old_line": 229 + } + ], + "patch": "g++-multiarch-incdir.diff", + "patch_sha256": "bc30caf1d10804375e6104e004d658fb2df1857cbab55871d715d81c1b6ce049" + }, + { + "hunks": [ + { + "actual_old_line": 177, + "exact_context": true, + "new_count": 14, + "new_line": 177, + "old_count": 6, + "old_line": 177 + }, + { + "actual_old_line": 260, + "exact_context": true, + "new_count": 14, + "new_line": 260, + "old_count": 6, + "old_line": 252 + } + ], + "patch": "canonical-cpppath.diff", + "patch_sha256": "4bf530e452c8d13c6199cb191d0ce94f3ae44f2b28cbaf06c0739812c4528bb4" + } + ], + "target": "gcc/incpath.cc" + }, + { + "base_sha256": "de762070022c62edaac06f0a0df23c3e27c84678298fe0e8c720818271a7e105", + "definite_patch_projection_sha256": "de762070022c62edaac06f0a0df23c3e27c84678298fe0e8c720818271a7e105", + "installed_applied_equivalence_proven": false, + "patches": [], + "target": "libcpp/charset.cc" + }, + { + "base_sha256": "bd4ec75ba6fa41dee76915588763f37804b446a0f5cf0e3cfe11b0596fa680bf", + "definite_patch_projection_sha256": "bd4ec75ba6fa41dee76915588763f37804b446a0f5cf0e3cfe11b0596fa680bf", + "installed_applied_equivalence_proven": false, + "patches": [], + "target": "libcpp/directives.cc" + }, + { + "base_sha256": "fc754c98510adae4af651de11b88e866490f71fb312fe001d0edc83ab4eec4d6", + "definite_patch_projection_sha256": "fc754c98510adae4af651de11b88e866490f71fb312fe001d0edc83ab4eec4d6", + "installed_applied_equivalence_proven": false, + "patches": [], + "target": "libcpp/files.cc" + }, + { + "base_sha256": "62513e415dc0072231b466d2027172758633ea6f64f43f6d58d92b7f0759769d", + "definite_patch_projection_sha256": "808e9e04de736e9bfd4ed81db0a9755a30ed4a6fec15984ad161d3ecb1e9417c", + "installed_applied_equivalence_proven": false, + "patches": [ + { + "hunks": [ + { + "actual_old_line": 181, + "exact_context": true, + "new_count": 7, + "new_line": 181, + "old_count": 7, + "old_line": 181 + } + ], + "patch": "gcc-textdomain.diff", + "patch_sha256": "85f819e014b708635e695002fb323da73ea72996de8e4c4fa3fc308e3e6300dd" + } + ], + "target": "libcpp/init.cc" + }, + { + "base_sha256": "aa757d3e37199621d4f5853b823ee154ce6ac3b5444e28f3bfd235e26233be86", + "definite_patch_projection_sha256": "aa757d3e37199621d4f5853b823ee154ce6ac3b5444e28f3bfd235e26233be86", + "installed_applied_equivalence_proven": false, + "patches": [], + "target": "libcpp/lex.cc" + }, + { + "base_sha256": "ee92685b7854baef6c206cdd9e4e4ff4536a4e911d6f35a4724f295a7371145f", + "definite_patch_projection_sha256": "ee92685b7854baef6c206cdd9e4e4ff4536a4e911d6f35a4724f295a7371145f", + "installed_applied_equivalence_proven": false, + "patches": [], + "target": "libcpp/pch.cc" + } + ], + "effective_include_chain_proven": false, + "execution_ready": false, + "fixed_build_values": { + "DEB_CROSS": "", + "DEB_TARGET_ARCH": "amd64", + "DEB_TARGET_ARCH_OS": "linux", + "GFDL_INVARIANT_FREE": "no", + "PKGSOURCE": "gcc-13", + "biarch64": "no", + "biarchhfarchs": "", + "biarchsfarchs": "", + "build_type": "build-native", + "derivative": "Ubuntu", + "distrelease": "noble", + "multilib": "yes", + "no_timet64_distreleases": "jessy stretch buster bullseye bookworm precise trusty xenial bionic focal jammy kinetic lunar mantic", + "single_package": "", + "trunk_build": "", + "with_ada": "yes", + "with_async_unwind": "yes", + "with_cf_protection": "yes", + "with_multiarch_cxxheaders": "yes", + "with_stack_clash": "yes", + "with_timet64": "" + }, + "frontier": [ + { + "id": "GCC_CONDITIONAL_PATCH_SELECTION_AND_BUILD_OVERRIDES", + "needed": [ + { + "conditions": [ + { + "expression": "ifneq (,$(newlib_tarball))", + "value": null + } + ], + "line": 90, + "list": "debian_patches", + "patch": "newlib-amdgcn-locks.diff", + "selected": null + }, + { + "conditions": [ + { + "expression": "ifeq ($(with_ada),yes)", + "value": true + }, + { + "expression": "ifeq ($(with_gnatsjlj),yes)", + "value": null + } + ], + "line": 166, + "list": "debian_patches", + "patch": "ada-sjlj.diff", + "selected": null + }, + { + "conditions": [ + { + "expression": "ifeq ($(with_ibm_branch),yes)", + "value": null + } + ], + "line": 210, + "list": "debian_patches", + "patch": "ibm-branch.diff", + "selected": null + }, + { + "conditions": [ + { + "expression": "ifeq ($(with_softfloat),yes)", + "value": null + } + ], + "line": 214, + "list": "debian_patches", + "patch": "arm-multilib-soft-float.diff", + "selected": null + } + ] + }, + { + "id": "GCC_GENERATED_CONFIGURATION_AND_BUILD_CORRESPONDENCE", + "needed": "Exact applied config.h/auto-host.h/tm.h/options.h/specs.h/multilib.h, generated distro-defaults.h and configured Makefile substitutions or an equivalent complete source derivation tied to the pinned installed driver/cc1/collect2 bytes." + }, + { + "id": "GCC_COMPLETE_TARGET_AND_RELOCATION_RULES", + "needed": "All selected tm_file headers and hooks, gcc/prefix.cc update_path, libiberty make_relative_prefix/lrealpath, target/default options; literal argv prefix alone does not decide runtime relocation/aliases." + }, + { + "id": "GCC_AUTOMATIC_AND_TRANSITIVE_SPECS_LOOKUPS", + "needed": "Actual ordered startfile-prefix specs lookups, independent standard_exec_prefix/target/specs lookup, selected contents and every reached specs include/function edge, with genuine errors." + }, + { + "id": "GCC_INCLUDE_DIRECTORY_IDENTITIES_AND_LOOKUPS", + "needed": "Actual stat errors, canonical paths, device/inode aliases, GCC directory deduplication and target include hooks before calling any template an effective chain." + }, + { + "id": "GCC_PCH_CONTENT_VALIDATION_AND_ORDER", + "needed": "Actual eligible .gch existence/type, readdir order and members, exact gcc/c-family/c-pch.cc validity rules and full selected PCH content dependencies." + }, + { + "id": "GCC_INITIAL_MACROS_AND_HEADER_CLOSURE", + "needed": "Applied option/target builtins, automatic stdc-predef.h and recursive file-producing preprocessing rules; generator defaults may be affected by external specs." + }, + { + "id": "GCC_SUBPROGRAM_COLLECT2_AND_LINK_INPUT_SELECTION", + "needed": "Exact exec/startfile prefix construction/expansion and access results, collect2 configured alternatives, subordinate environment and actual binutils/loader closure." + }, + { + "id": "C05_ORIGINAL_BINDING_NAMESPACE_INTERVAL_AND_CAPS", + "needed": "Authenticated six original path occurrences, actual content/negative lookup custody, namespace stability interval, owning process integration and fit under every unchanged original cap." + } + ], + "full_C05": false, + "full_V03": false, + "include_templates_before_relocation_hooks_canonicalization_and_dedup": [ + { + "add_sysroot": false, + "chain": "bracket", + "effective": false, + "path": "/usr/include/python3.12", + "rule": "explicit -I" + }, + { + "add_sysroot": false, + "chain": "system", + "effective": false, + "path": "/usr/lib/gcc/x86_64-linux-gnu/13/include", + "rule": "GCC_INCLUDE_DIR" + }, + { + "add_sysroot": true, + "chain": "system", + "effective": false, + "path": "/usr/local/include/x86_64-linux-gnu", + "rule": "LOCAL_INCLUDE_DIR + multiarch" + }, + { + "add_sysroot": true, + "chain": "system", + "effective": false, + "path": "/usr/local/include", + "rule": "LOCAL_INCLUDE_DIR" + }, + { + "add_sysroot": false, + "chain": "system", + "effective": false, + "path": "/usr/lib/gcc/x86_64-linux-gnu/13/include-fixed/x86_64-linux-gnu", + "rule": "FIXED_INCLUDE_DIR + multiarch" + }, + { + "add_sysroot": false, + "chain": "system", + "effective": false, + "path": "/usr/lib/gcc/x86_64-linux-gnu/13/include-fixed", + "rule": "FIXED_INCLUDE_DIR" + }, + { + "add_sysroot": false, + "chain": "system", + "effective": false, + "path": "/usr/x86_64-linux-gnu/include", + "rule": "TOOL_INCLUDE_DIR" + }, + { + "add_sysroot": true, + "chain": "system", + "effective": false, + "path": "/usr/include/x86_64-linux-gnu", + "rule": "NATIVE_SYSTEM_HEADER_DIR + multiarch" + }, + { + "add_sysroot": true, + "chain": "system", + "effective": false, + "path": "/usr/include", + "rule": "NATIVE_SYSTEM_HEADER_DIR" + } + ], + "installed_applied_equivalence_proven": false, + "native_launch_environment": { + "LANG": "C.UTF-8", + "LC_ALL": "C.UTF-8", + "PATH": "/usr/bin:/bin", + "PYTHONDONTWRITEBYTECODE": "1", + "PYTHONHASHSEED": "0", + "TZ": "UTC" + }, + "new_scientific_activity_credit": 0, + "original_caps": { + "aggregate_text": 524288, + "capture_bytes": 268435456, + "depth": 24, + "file_bytes": 67108864, + "nodes": 65536, + "raw_record_bytes": 1048576, + "rows": 512, + "sequence_or_mapping": 1024, + "string": 8192 + }, + "original_occurrence_binding_proven": false, + "original_target_executed": false, + "patch_selection": { + "conditional": [ + { + "conditions": [ + { + "expression": "ifneq (,$(newlib_tarball))", + "value": null + } + ], + "line": 90, + "list": "debian_patches", + "patch": "newlib-amdgcn-locks.diff", + "selected": null + }, + { + "conditions": [ + { + "expression": "ifeq ($(with_ada),yes)", + "value": true + }, + { + "expression": "ifeq ($(with_gnatsjlj),yes)", + "value": null + } + ], + "line": 166, + "list": "debian_patches", + "patch": "ada-sjlj.diff", + "selected": null + }, + { + "conditions": [ + { + "expression": "ifeq ($(with_ibm_branch),yes)", + "value": null + } + ], + "line": 210, + "list": "debian_patches", + "patch": "ibm-branch.diff", + "selected": null + }, + { + "conditions": [ + { + "expression": "ifeq ($(with_softfloat),yes)", + "value": null + } + ], + "line": 214, + "list": "debian_patches", + "patch": "arm-multilib-soft-float.diff", + "selected": null + } + ], + "definitely_selected": [ + "git-updates.diff", + "rename-info-files.diff", + "gcc-gfdl-build.diff", + "gcc-textdomain.diff", + "gcc-distro-specs.diff", + "gcc-driver-extra-langs.diff", + "gcc-hash-style-gnu.diff", + "libstdc++-doclink.diff", + "libstdc++-man-3cxx.diff", + "libstdc++-test-installed.diff", + "libstdc++-doxygen-SOURCE_DATE_EPOCH.diff", + "alpha-no-ev4-directive.diff", + "note-gnu-stack.diff", + "libgomp-omp_h-multilib.diff", + "libgo-testsuite.diff", + "libgo-cleanfiles.diff", + "gcc-target-include-asm.diff", + "libgo-revert-timeout-exp.diff", + "libgo-setcontext-config.diff", + "gcc-auto-build.diff", + "libitm-no-fortify-source.diff", + "sparc64-biarch-long-double-128.diff", + "pr66368.diff", + "pr67590.diff", + "libffi-race-condition.diff", + "cuda-float128.diff", + "t-libunwind-elf-Wl-z-defs.diff", + "gcc-force-cross-layout.diff", + "gcc-search-prefixed-as-ld.diff", + "kfreebsd-decimal-float.diff", + "pr87808.diff", + "pr94253.diff", + "gcc-arm-disable-guality-tests.diff", + "musl-ssp.diff", + "pr79724-revert.diff", + "pr104290-followup.diff", + "arc-stddef.diff", + "pr107475.diff", + "gccrs-bootstrap-mipsel.diff", + "pr88552.diff", + "hppa64-libgcov-fallback.diff", + "toplevel-add-gprofng.diff", + "toplevel-add-libsframe.diff", + "libiberty-sha1-1.diff", + "libiberty-sha1-2.diff", + "pr113030.diff", + "libsanitizer-timebits.diff", + "asan-allocator-base.diff", + "gcc-vhdl.diff", + "pr110934.diff", + "0001-Ada-remove-conversions-with-C-struct-timeval-from-GN.diff", + "0002-Ada-remove-C-conversions-with-C-struct-timespec-from.diff", + "0003-Ada-remove-conversions-with-C-time_t-from-System.OS_.diff", + "0003-Ada-define-time_t-timeval-timespec-C-types-in-a-sing.diff", + "0005-Ada-import-nanosleep-from-System.OS_Primitives.Timed_.diff", + "0006-Ada-select-64-bits-time-functions-from-GNU-libc-when-.diff", + "pr11897.diff", + "libsanitizer-no-crypt.diff", + "pr99832-distro.diff", + "ada-gcc-name.diff", + "ada-verbose.diff", + "ada-link-lib.diff", + "ada-gnattools-cross.diff", + "ada-lib-info-source-date-epoch.diff", + "ada-perl-shebang.diff", + "alpha-ieee.diff", + "alpha-ieee-doc.diff", + "sys-auxv-header.diff", + "gdc-dynamic-link-phobos.diff", + "ia64-disable-selective-scheduling.diff", + "libstdc++-pythondir.diff", + "gcc-verbose-lto-link.diff", + "ada-kfreebsd.diff", + "hurd-amd64.diff", + "hurd-multiarch.diff", + "hurd-multilib-multiarch.diff", + "gcc-ice-dump.diff", + "gcc-ice-apport.diff", + "skip-bootstrap-multilib.diff", + "libffi-ro-eh_frame_sect.diff", + "gcc-multiarch.diff", + "config-ml.diff", + "g++-multiarch-incdir.diff", + "canonical-cpppath.diff", + "gcc-multilib-multiarch.diff", + "gcc-as-needed.diff", + "gcc-as-needed-gold.diff", + "libgomp-kfreebsd-testsuite.diff", + "go-testsuite.diff", + "gcc-distro-specs-ubuntu-doc.diff", + "testsuite-hardening-format.diff", + "testsuite-hardening-printf-types.diff", + "testsuite-hardening-updates.diff", + "testsuite-glibc-warnings.diff" + ], + "executed_make": false, + "records": [ + { + "conditions": [], + "line": 15, + "list": "debian_patches", + "patch": "git-updates.diff", + "selected": true + }, + { + "conditions": [ + { + "expression": "ifneq ($(GFDL_INVARIANT_FREE),yes)", + "value": true + } + ], + "line": 21, + "list": "debian_patches", + "patch": "rename-info-files.diff", + "selected": true + }, + { + "conditions": [], + "line": 28, + "list": "debian_patches", + "patch": "gcc-gfdl-build.diff", + "selected": true + }, + { + "conditions": [], + "line": 33, + "list": "debian_patches", + "patch": "gcc-textdomain.diff", + "selected": true + }, + { + "conditions": [], + "line": 33, + "list": "debian_patches", + "patch": "gcc-distro-specs.diff", + "selected": true + }, + { + "conditions": [], + "line": 33, + "list": "debian_patches", + "patch": "gcc-driver-extra-langs.diff", + "selected": true + }, + { + "conditions": [], + "line": 33, + "list": "debian_patches", + "patch": "gcc-hash-style-gnu.diff", + "selected": true + }, + { + "conditions": [], + "line": 33, + "list": "debian_patches", + "patch": "libstdc++-doclink.diff", + "selected": true + }, + { + "conditions": [], + "line": 33, + "list": "debian_patches", + "patch": "libstdc++-man-3cxx.diff", + "selected": true + }, + { + "conditions": [], + "line": 33, + "list": "debian_patches", + "patch": "libstdc++-test-installed.diff", + "selected": true + }, + { + "conditions": [], + "line": 33, + "list": "debian_patches", + "patch": "libstdc++-doxygen-SOURCE_DATE_EPOCH.diff", + "selected": true + }, + { + "conditions": [], + "line": 33, + "list": "debian_patches", + "patch": "alpha-no-ev4-directive.diff", + "selected": true + }, + { + "conditions": [], + "line": 33, + "list": "debian_patches", + "patch": "note-gnu-stack.diff", + "selected": true + }, + { + "conditions": [], + "line": 33, + "list": "debian_patches", + "patch": "libgomp-omp_h-multilib.diff", + "selected": true + }, + { + "conditions": [], + "line": 33, + "list": "debian_patches", + "patch": "libgo-testsuite.diff", + "selected": true + }, + { + "conditions": [], + "line": 33, + "list": "debian_patches", + "patch": "libgo-cleanfiles.diff", + "selected": true + }, + { + "conditions": [], + "line": 33, + "list": "debian_patches", + "patch": "gcc-target-include-asm.diff", + "selected": true + }, + { + "conditions": [], + "line": 33, + "list": "debian_patches", + "patch": "libgo-revert-timeout-exp.diff", + "selected": true + }, + { + "conditions": [], + "line": 33, + "list": "debian_patches", + "patch": "libgo-setcontext-config.diff", + "selected": true + }, + { + "conditions": [], + "line": 33, + "list": "debian_patches", + "patch": "gcc-auto-build.diff", + "selected": true + }, + { + "conditions": [], + "line": 33, + "list": "debian_patches", + "patch": "libitm-no-fortify-source.diff", + "selected": true + }, + { + "conditions": [], + "line": 33, + "list": "debian_patches", + "patch": "sparc64-biarch-long-double-128.diff", + "selected": true + }, + { + "conditions": [], + "line": 33, + "list": "debian_patches", + "patch": "pr66368.diff", + "selected": true + }, + { + "conditions": [], + "line": 33, + "list": "debian_patches", + "patch": "pr67590.diff", + "selected": true + }, + { + "conditions": [], + "line": 33, + "list": "debian_patches", + "patch": "libffi-race-condition.diff", + "selected": true + }, + { + "conditions": [], + "line": 33, + "list": "debian_patches", + "patch": "cuda-float128.diff", + "selected": true + }, + { + "conditions": [], + "line": 33, + "list": "debian_patches", + "patch": "t-libunwind-elf-Wl-z-defs.diff", + "selected": true + }, + { + "conditions": [], + "line": 33, + "list": "debian_patches", + "patch": "gcc-force-cross-layout.diff", + "selected": true + }, + { + "conditions": [], + "line": 33, + "list": "debian_patches", + "patch": "gcc-search-prefixed-as-ld.diff", + "selected": true + }, + { + "conditions": [], + "line": 33, + "list": "debian_patches", + "patch": "kfreebsd-decimal-float.diff", + "selected": true + }, + { + "conditions": [], + "line": 33, + "list": "debian_patches", + "patch": "pr87808.diff", + "selected": true + }, + { + "conditions": [], + "line": 33, + "list": "debian_patches", + "patch": "pr94253.diff", + "selected": true + }, + { + "conditions": [], + "line": 33, + "list": "debian_patches", + "patch": "gcc-arm-disable-guality-tests.diff", + "selected": true + }, + { + "conditions": [], + "line": 33, + "list": "debian_patches", + "patch": "musl-ssp.diff", + "selected": true + }, + { + "conditions": [], + "line": 33, + "list": "debian_patches", + "patch": "pr79724-revert.diff", + "selected": true + }, + { + "conditions": [], + "line": 33, + "list": "debian_patches", + "patch": "pr104290-followup.diff", + "selected": true + }, + { + "conditions": [], + "line": 33, + "list": "debian_patches", + "patch": "arc-stddef.diff", + "selected": true + }, + { + "conditions": [], + "line": 33, + "list": "debian_patches", + "patch": "pr107475.diff", + "selected": true + }, + { + "conditions": [], + "line": 33, + "list": "debian_patches", + "patch": "gccrs-bootstrap-mipsel.diff", + "selected": true + }, + { + "conditions": [], + "line": 33, + "list": "debian_patches", + "patch": "pr88552.diff", + "selected": true + }, + { + "conditions": [], + "line": 33, + "list": "debian_patches", + "patch": "hppa64-libgcov-fallback.diff", + "selected": true + }, + { + "conditions": [], + "line": 33, + "list": "debian_patches", + "patch": "toplevel-add-gprofng.diff", + "selected": true + }, + { + "conditions": [], + "line": 33, + "list": "debian_patches", + "patch": "toplevel-add-libsframe.diff", + "selected": true + }, + { + "conditions": [], + "line": 33, + "list": "debian_patches", + "patch": "libiberty-sha1-1.diff", + "selected": true + }, + { + "conditions": [], + "line": 33, + "list": "debian_patches", + "patch": "libiberty-sha1-2.diff", + "selected": true + }, + { + "conditions": [], + "line": 33, + "list": "debian_patches", + "patch": "pr113030.diff", + "selected": true + }, + { + "conditions": [], + "line": 33, + "list": "debian_patches", + "patch": "libsanitizer-timebits.diff", + "selected": true + }, + { + "conditions": [], + "line": 33, + "list": "debian_patches", + "patch": "asan-allocator-base.diff", + "selected": true + }, + { + "conditions": [], + "line": 33, + "list": "debian_patches", + "patch": "gcc-vhdl.diff", + "selected": true + }, + { + "conditions": [], + "line": 33, + "list": "debian_patches", + "patch": "pr110934.diff", + "selected": true + }, + { + "conditions": [], + "line": 33, + "list": "debian_patches", + "patch": "0001-Ada-remove-conversions-with-C-struct-timeval-from-GN.diff", + "selected": true + }, + { + "conditions": [], + "line": 33, + "list": "debian_patches", + "patch": "0002-Ada-remove-C-conversions-with-C-struct-timespec-from.diff", + "selected": true + }, + { + "conditions": [], + "line": 33, + "list": "debian_patches", + "patch": "0003-Ada-remove-conversions-with-C-time_t-from-System.OS_.diff", + "selected": true + }, + { + "conditions": [], + "line": 33, + "list": "debian_patches", + "patch": "0003-Ada-define-time_t-timeval-timespec-C-types-in-a-sing.diff", + "selected": true + }, + { + "conditions": [], + "line": 33, + "list": "debian_patches", + "patch": "0005-Ada-import-nanosleep-from-System.OS_Primitives.Timed_.diff", + "selected": true + }, + { + "conditions": [], + "line": 33, + "list": "debian_patches", + "patch": "0006-Ada-select-64-bits-time-functions-from-GNU-libc-when-.diff", + "selected": true + }, + { + "conditions": [], + "line": 33, + "list": "debian_patches", + "patch": "pr11897.diff", + "selected": true + }, + { + "conditions": [ + { + "expression": "ifneq (,$(newlib_tarball))", + "value": null + } + ], + "line": 90, + "list": "debian_patches", + "patch": "newlib-amdgcn-locks.diff", + "selected": null + }, + { + "conditions": [ + { + "expression": "ifeq (,$(filter $(distrelease),wheezy jessie stretch buster precise xenial bionic))", + "value": true + } + ], + "line": 95, + "list": "debian_patches", + "patch": "libsanitizer-no-crypt.diff", + "selected": true + }, + { + "conditions": [ + { + "expression": "ifeq (,$(filter $(distrelease),$(no_timet64_distreleases)))", + "value": true + } + ], + "line": 114, + "list": "debian_patches", + "patch": "pr99832-distro.diff", + "selected": true + }, + { + "conditions": [ + { + "expression": "ifneq (,$(filter $(derivative),Ubuntu))", + "value": true + }, + { + "expression": "ifneq (,$(findstring gcc-13, $(PKGSOURCE)))", + "value": true + } + ], + "line": 126, + "list": "hardening_patches", + "patch": "gcc-distro-specs-ubuntu-doc.diff", + "selected": true + }, + { + "conditions": [ + { + "expression": "ifneq (,$(filter $(derivative),Ubuntu))", + "value": true + }, + { + "expression": "ifneq (,$(findstring gcc-13, $(PKGSOURCE)))", + "value": true + } + ], + "line": 126, + "list": "hardening_patches", + "patch": "testsuite-hardening-format.diff", + "selected": true + }, + { + "conditions": [ + { + "expression": "ifneq (,$(filter $(derivative),Ubuntu))", + "value": true + }, + { + "expression": "ifneq (,$(findstring gcc-13, $(PKGSOURCE)))", + "value": true + } + ], + "line": 126, + "list": "hardening_patches", + "patch": "testsuite-hardening-printf-types.diff", + "selected": true + }, + { + "conditions": [ + { + "expression": "ifneq (,$(filter $(derivative),Ubuntu))", + "value": true + }, + { + "expression": "ifneq (,$(findstring gcc-13, $(PKGSOURCE)))", + "value": true + } + ], + "line": 126, + "list": "hardening_patches", + "patch": "testsuite-hardening-updates.diff", + "selected": true + }, + { + "conditions": [ + { + "expression": "ifneq (,$(filter $(derivative),Ubuntu))", + "value": true + }, + { + "expression": "ifneq (,$(findstring gcc-13, $(PKGSOURCE)))", + "value": true + } + ], + "line": 126, + "list": "hardening_patches", + "patch": "testsuite-glibc-warnings.diff", + "selected": true + }, + { + "conditions": [ + { + "expression": "ifeq ($(with_ada),yes)", + "value": true + } + ], + "line": 158, + "list": "debian_patches", + "patch": "ada-gcc-name.diff", + "selected": true + }, + { + "conditions": [ + { + "expression": "ifeq ($(with_ada),yes)", + "value": true + } + ], + "line": 159, + "list": "debian_patches", + "patch": "ada-verbose.diff", + "selected": true + }, + { + "conditions": [ + { + "expression": "ifeq ($(with_ada),yes)", + "value": true + } + ], + "line": 163, + "list": "debian_patches", + "patch": "ada-link-lib.diff", + "selected": true + }, + { + "conditions": [ + { + "expression": "ifeq ($(with_ada),yes)", + "value": true + } + ], + "line": 164, + "list": "debian_patches", + "patch": "ada-gnattools-cross.diff", + "selected": true + }, + { + "conditions": [ + { + "expression": "ifeq ($(with_ada),yes)", + "value": true + }, + { + "expression": "ifeq ($(with_gnatsjlj),yes)", + "value": null + } + ], + "line": 166, + "list": "debian_patches", + "patch": "ada-sjlj.diff", + "selected": null + }, + { + "conditions": [ + { + "expression": "ifeq ($(with_ada),yes)", + "value": true + } + ], + "line": 168, + "list": "debian_patches", + "patch": "ada-lib-info-source-date-epoch.diff", + "selected": true + }, + { + "conditions": [ + { + "expression": "ifeq ($(with_ada),yes)", + "value": true + } + ], + "line": 170, + "list": "debian_patches", + "patch": "ada-perl-shebang.diff", + "selected": true + }, + { + "conditions": [], + "line": 183, + "list": "debian_patches", + "patch": "alpha-ieee.diff", + "selected": true + }, + { + "conditions": [ + { + "expression": "ifneq ($(GFDL_INVARIANT_FREE),yes)", + "value": true + } + ], + "line": 185, + "list": "debian_patches", + "patch": "alpha-ieee-doc.diff", + "selected": true + }, + { + "conditions": [], + "line": 194, + "list": "debian_patches", + "patch": "sys-auxv-header.diff", + "selected": true + }, + { + "conditions": [], + "line": 194, + "list": "debian_patches", + "patch": "gdc-dynamic-link-phobos.diff", + "selected": true + }, + { + "conditions": [], + "line": 194, + "list": "debian_patches", + "patch": "ia64-disable-selective-scheduling.diff", + "selected": true + }, + { + "conditions": [], + "line": 194, + "list": "debian_patches", + "patch": "libstdc++-pythondir.diff", + "selected": true + }, + { + "conditions": [], + "line": 194, + "list": "debian_patches", + "patch": "gcc-verbose-lto-link.diff", + "selected": true + }, + { + "conditions": [ + { + "expression": "ifeq ($(with_ada),yes)", + "value": true + } + ], + "line": 205, + "list": "debian_patches", + "patch": "ada-kfreebsd.diff", + "selected": true + }, + { + "conditions": [ + { + "expression": "ifeq ($(with_ibm_branch),yes)", + "value": null + } + ], + "line": 210, + "list": "debian_patches", + "patch": "ibm-branch.diff", + "selected": null + }, + { + "conditions": [ + { + "expression": "ifeq ($(with_softfloat),yes)", + "value": null + } + ], + "line": 214, + "list": "debian_patches", + "patch": "arm-multilib-soft-float.diff", + "selected": null + }, + { + "conditions": [], + "line": 233, + "list": "debian_patches", + "patch": "hurd-amd64.diff", + "selected": true + }, + { + "conditions": [], + "line": 234, + "list": "debian_patches", + "patch": "hurd-multiarch.diff", + "selected": true + }, + { + "conditions": [], + "line": 235, + "list": "debian_patches", + "patch": "hurd-multilib-multiarch.diff", + "selected": true + }, + { + "conditions": [], + "line": 242, + "list": "debian_patches", + "patch": "gcc-ice-dump.diff", + "selected": true + }, + { + "conditions": [], + "line": 243, + "list": "debian_patches", + "patch": "gcc-ice-apport.diff", + "selected": true + }, + { + "conditions": [], + "line": 244, + "list": "debian_patches", + "patch": "skip-bootstrap-multilib.diff", + "selected": true + }, + { + "conditions": [], + "line": 245, + "list": "debian_patches", + "patch": "libffi-ro-eh_frame_sect.diff", + "selected": true + }, + { + "conditions": [], + "line": 253, + "list": "debian_patches", + "patch": "gcc-multiarch.diff", + "selected": true + }, + { + "conditions": [], + "line": 254, + "list": "debian_patches", + "patch": "config-ml.diff", + "selected": true + }, + { + "conditions": [ + { + "expression": "ifneq ($(single_package),yes)", + "value": true + }, + { + "expression": "ifeq ($(with_multiarch_cxxheaders),yes)", + "value": true + } + ], + "line": 257, + "list": "debian_patches", + "patch": "g++-multiarch-incdir.diff", + "selected": true + }, + { + "conditions": [ + { + "expression": "ifneq ($(single_package),yes)", + "value": true + }, + { + "expression": "ifeq ($(with_multiarch_cxxheaders),yes)", + "value": true + } + ], + "line": 258, + "list": "debian_patches", + "patch": "canonical-cpppath.diff", + "selected": true + }, + { + "conditions": [], + "line": 265, + "list": "debian_patches", + "patch": "gcc-multilib-multiarch.diff", + "selected": true + }, + { + "conditions": [ + { + "expression": "ifneq ($(trunk_build),yes)", + "value": true + }, + { + "expression": "ifneq (,$(filter $(derivative),Ubuntu))", + "value": true + } + ], + "line": 269, + "list": "debian_patches", + "patch": "gcc-as-needed.diff", + "selected": true + }, + { + "conditions": [ + { + "expression": "ifneq ($(trunk_build),yes)", + "value": true + }, + { + "expression": "ifneq (,$(filter $(derivative),Ubuntu))", + "value": true + }, + { + "expression": "ifeq (,$(filter $(distrelease), precise trusty xenial))", + "value": true + } + ], + "line": 271, + "list": "debian_patches", + "patch": "gcc-as-needed-gold.diff", + "selected": true + }, + { + "conditions": [], + "line": 280, + "list": "debian_patches", + "patch": "libgomp-kfreebsd-testsuite.diff", + "selected": true + }, + { + "conditions": [], + "line": 281, + "list": "debian_patches", + "patch": "go-testsuite.diff", + "selected": true + } + ], + "scope": "Under the stated metadata-aligned fixed build values; unrecorded build overrides and conditional selections are not resolved." + }, + "pch_rule": { + "before_normal_header": true, + "candidate": "consequential-header-path + .gch", + "directory_members": "readdir order, excluding . and .., until first valid candidate", + "eligibility": "first non-implicit-preinclude include and enabled valid_pch callback", + "observed": false + }, + "physical_costs": "OPEN_NOT_ZERO", + "prefixed_as_ld_rule": "At each GCC file_at_path prefix, try x86_64-linux-gnu-as/ld before unprefixed as/ld; collect2 has its own configured search.", + "quote_source_directory_rule": "Search including file's directory first unless the exact include mechanism disables it; source and alias identity still required.", + "recorded_policy_debit_seconds": "94.550533479/2400", + "schema": "c05-fixed-gcc-rule-model-v1", + "source_evidence": { + "automatic_specs": { + "anchor": "find_a_file (&startfile_prefixes, \"specs\", R_OK, true)", + "line": 8318, + "path": "gcc-base-selected/gcc/gcc.cc", + "sha256": "c260c6321fb3852df326618d18642a3c795a8886c285db71acde6a97fd031b0a" + }, + "build_native": { + "anchor": "build_type = build-native", + "line": 229, + "path": "gcc-13_13.3.0-6ubuntu2~24.04.1-selected/debian/rules.defs", + "sha256": "aaf79170f51110b6b9c90d1bee022d2122401fdbbf8840d91baa3e6f13cbeb58" + }, + "canonical_paths": { + "anchor": "char *rp = lrealpath (str);", + "line": 10, + "path": "gcc-debian-patch-inputs/debian/patches/canonical-cpppath.diff", + "sha256": "4bf530e452c8d13c6199cb191d0ce94f3ae44f2b28cbaf06c0739812c4528bb4" + }, + "chain_merge": { + "anchor": "merge_include_chains (const char *sysroot", + "line": 354, + "path": "gcc-base-selected/gcc/incpath.cc", + "sha256": "70dca72168648a2606684b7c8dc6d31f68472f32ca1058724997abb7185d0e39" + }, + "defaults": { + "anchor": "const struct default_include cpp_include_defaults[]", + "line": 38, + "path": "gcc-base-selected/gcc/cppdefault.cc", + "sha256": "afaf16ab53ef0781ccb4e4ba3751a314c66eda24ec3132cc6d8b347d9c0ac9c3" + }, + "directory_identity": { + "anchor": "remove_duplicates (cpp_reader", + "line": 58, + "path": "gcc-base-selected/gcc/incpath.cc", + "sha256": "70dca72168648a2606684b7c8dc6d31f68472f32ca1058724997abb7185d0e39" + }, + "distro_generator": { + "anchor": ": # generate the distro-defaults.h header", + "line": 343, + "path": "gcc-debian-patch-inputs/debian/rules.patch", + "sha256": "6c6d9dc472ee7082c5658030c812436668ffbb99f76966a6cf9081b03732e8dc" + }, + "environment_rebuild": { + "anchor": "putenv_from_prefixes (&exec_prefixes, \"COMPILER_PATH\", false)", + "line": 9099, + "path": "gcc-base-selected/gcc/gcc.cc", + "sha256": "c260c6321fb3852df326618d18642a3c795a8886c285db71acde6a97fd031b0a" + }, + "installed_layout": { + "anchor": "gcc_lexec_dir\t= $(libexecdir)/$(gcc_subdir_name)/$(TARGET_ALIAS)/$(versiondir)", + "line": 1075, + "path": "gcc-13_13.3.0-6ubuntu2~24.04.1-selected/debian/rules2", + "sha256": "c9b1cebada609601ef1fe3bb34babccae572dccc3e86cebfad3927229d3b83ae" + }, + "libc_selection": { + "anchor": "#define LIB_SPEC GNU_USER_TARGET_LIB_SPEC", + "line": 106, + "path": "gcc-base-selected/gcc/config/gnu-user.h", + "sha256": "cf7ac27fe1d79dbd0e038a5d4f282eb54508ca664d7d25d1011590e728c2bdbf" + }, + "link_emulation": { + "anchor": "#define GNU_USER_LINK_EMULATION64 \"elf_x86_64\"", + "line": 27, + "path": "gcc-base-selected/gcc/config/i386/linux64.h", + "sha256": "9007684d92746203c280b53a69debfff75851e31c1cd9ce6cd5c61f705d5179c" + }, + "multiarch": { + "anchor": "MULTIARCH_DIRNAME = $(call if_multiarch,x86_64-linux-gnu)", + "line": 80, + "path": "gcc-debian-patch-inputs/debian/patches/gcc-multiarch.diff", + "sha256": "18022b0748f43bf018eea1916b4f11bca68daad7ce8ecf076e4e103a1acba0e8" + }, + "multiarch_cxx_branch": { + "anchor": "with_multiarch_cxxheaders := yes", + "line": 584, + "path": "gcc-13_13.3.0-6ubuntu2~24.04.1-selected/debian/rules.defs", + "sha256": "aaf79170f51110b6b9c90d1bee022d2122401fdbbf8840d91baa3e6f13cbeb58" + }, + "multilib": { + "anchor": "MULTILIB_OSDIRNAMES = m64=../lib$(call if_multiarch,:x86_64-linux-gnu)", + "line": 72, + "path": "gcc-debian-patch-inputs/debian/patches/gcc-multilib-multiarch.diff", + "sha256": "b5d6ba4e2831fd8f4614381ef1da42e38fb3744e0e3782d5c1e650b192ab4837" + }, + "override_specs": { + "anchor": "strcat (specs_file, spec_machine_suffix);", + "line": 8336, + "path": "gcc-base-selected/gcc/gcc.cc", + "sha256": "c260c6321fb3852df326618d18642a3c795a8886c285db71acde6a97fd031b0a" + }, + "pch": { + "anchor": "static const char extension[] = \".gch\";", + "line": 283, + "path": "gcc-base-selected/libcpp/files.cc", + "sha256": "fc754c98510adae4af651de11b88e866490f71fb312fe001d0edc83ab4eec4d6" + }, + "pch_order": { + "anchor": "if (pch_open_file (pfile, file, invalid_pch))", + "line": 423, + "path": "gcc-base-selected/libcpp/files.cc", + "sha256": "fc754c98510adae4af651de11b88e866490f71fb312fe001d0edc83ab4eec4d6" + }, + "prefixed_as_ld": { + "anchor": "/* search for the -as / -ld first. */", + "line": 17, + "path": "gcc-debian-patch-inputs/debian/patches/gcc-search-prefixed-as-ld.diff", + "sha256": "7ec5fb60d1e42c346a2381f10c7ce561a9ccb2ec74e45807c83328f4f81a4090" + }, + "preinclude": { + "anchor": "return \"stdc-predef.h\";", + "line": 31, + "path": "gcc-base-selected/gcc/config/glibc-c.cc", + "sha256": "8feaf44e45d44cdd2d8c79c228d2d3ce45ead2a3fcf9e90f2c187a262b2865b6" + }, + "preinclude_condition": { + "anchor": "if (flag_hosted && std_inc && !cpp_opts->preprocessed)", + "line": 1569, + "path": "gcc-base-selected/gcc/c-family/c-opts.cc", + "sha256": "41c5789fab7d536c6f16b8d4bcaa83583120eefa970c929ac24b783bd6b289ee" + }, + "preprocessor_defines": { + "anchor": "PREPROCESSOR_DEFINES =", + "line": 3060, + "path": "gcc-base-selected/gcc/Makefile.in", + "sha256": "41e0fe9006909a793736b73fdd434929c913023992c33cf9b746423f78682e45" + }, + "relocation": { + "anchor": "gcc_exec_prefix = get_relative_prefix", + "line": 4702, + "path": "gcc-base-selected/gcc/gcc.cc", + "sha256": "c260c6321fb3852df326618d18642a3c795a8886c285db71acde6a97fd031b0a" + }, + "startfiles_condition": { + "anchor": "%{!nostdlib:%{!r:%{!nostartfiles:%S}}}", + "line": 1148, + "path": "gcc-base-selected/gcc/gcc.cc", + "sha256": "c260c6321fb3852df326618d18642a3c795a8886c285db71acde6a97fd031b0a" + }, + "ubuntu_gfdl": { + "anchor": "GFDL_INVARIANT_FREE := no", + "line": 1554, + "path": "gcc-13_13.3.0-6ubuntu2~24.04.1-selected/debian/rules.defs", + "sha256": "aaf79170f51110b6b9c90d1bee022d2122401fdbbf8840d91baa3e6f13cbeb58" + } + }, + "source_pinset_sha256": "5564d0d2b47a5803c96b3767d838676e8f2427089e3b02cda1b1e62430a3c24d", + "subordinate_environment_rule": "GCC may create GCC_EXEC_PREFIX and rebuilds COMPILER_PATH and LIBRARY_PATH from filtered configured prefix lists; launch-time absence is not subprocess absence.", + "subprogram_root_templates": [ + "/usr/libexec/gcc/x86_64-linux-gnu/13", + "/usr/lib/gcc/x86_64-linux-gnu/13", + "/usr/x86_64-linux-gnu/bin", + "/usr/bin", + "/bin" + ], + "subprogram_templates_are_complete_or_ordered": false + }, + "schema": "c05-gcc-rules-derivation-v1", + "scope": "Passive derivation and new pure fixture controls only; no effective configured rule set, original execution, qualification, new research credit or publication.", + "source_gate": { + "hard_stop_utc": "2026-11-02T07:51:26Z", + "result": "Input availability sufficient for explicitly partial source model; exact configured rule-set completeness gate remains failed.", + "source_gate_deadline_utc": "2026-11-02T07:36:26Z", + "start_utc": "2026-11-02T07:21:26Z" + }, + "source_input_bytes": 2682114, + "source_input_count": 162, + "validation": { + "command": "python3 -B -S /home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453/outputs/c05-v03-completion-20261102T055710Z/implementation/c05_gcc_rules_tests_v1.py", + "coverage": [ + "8 exhaustive independent Boolean branch-oracle combinations", + "unknown-value and unresolved-reset refusal", + "shell-expression refusal without shell execution", + "exact patch offsets, absent/ambiguous context, unrelated target and truncated hunk", + "real source-pin mutation and arbitrary source/chain injection refusal", + "automatic specs independent source branches", + "PCH-before-normal-header source ordering and two-namespace countermodel", + "patch postimages and physical source anchors", + "glibc automatic stdc-predef source", + "noble/jammy generator branch control and unresolved SSP", + "command/environment/stage mutations and byte environment", + "effective constructor refuses caller claimed completeness", + "unchanged original caps and zero new original credit" + ], + "cwd": "/home/d3lerium/.codex/.chatgpt-projects/g-p-6ad5817fd84881918865926b6fd51453", + "failed": 0, + "initial_failure_retained": "The initial run found six physical-line reference assertion failures within one test method because str.splitlines treats GCC form-feed page breaks as line separators; corrected the test reader to split LF, with no source/constructor repair for those assertions.", + "passed": 22, + "reported_result": "Ran 22 tests in 0.364s; OK", + "tests": 22 + } +} diff --git a/research/h25-c05-v03-input-constructors/implementation/c05_gcc_rules_sourcepins_v1.json b/research/h25-c05-v03-input-constructors/implementation/c05_gcc_rules_sourcepins_v1.json new file mode 100644 index 0000000000..89f817e7c2 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/implementation/c05_gcc_rules_sourcepins_v1.json @@ -0,0 +1,816 @@ +{ + "files": [ + { + "bytes": 1900, + "path": "gcc-13-x86-64-linux-gnu-BUILD-v1.json", + "sha256": "c776295d23a87c9efdccbd9b43b0cc79f037163b14037a37c2e8f7dcfc714379" + }, + { + "bytes": 2984, + "path": "gcc-13_13.3.0-6ubuntu2~24.04.1-selected/debian/rules", + "sha256": "2e0afdc6303e407f344d2f6724be731ae84b8fd59758f172491c25348432d75a" + }, + { + "bytes": 70194, + "path": "gcc-13_13.3.0-6ubuntu2~24.04.1-selected/debian/rules.defs", + "sha256": "aaf79170f51110b6b9c90d1bee022d2122401fdbbf8840d91baa3e6f13cbeb58" + }, + { + "bytes": 97853, + "path": "gcc-13_13.3.0-6ubuntu2~24.04.1-selected/debian/rules2", + "sha256": "c9b1cebada609601ef1fe3bb34babccae572dccc3e86cebfad3927229d3b83ae" + }, + { + "bytes": 164044, + "path": "gcc-base-selected/gcc/Makefile.in", + "sha256": "41e0fe9006909a793736b73fdd434929c913023992c33cf9b746423f78682e45" + }, + { + "bytes": 72427, + "path": "gcc-base-selected/gcc/c-family/c-cppbuiltin.cc", + "sha256": "e2220b9cdc85b785faf220fd3058a46212cd3b5f7da4040dd4ca3e839bd0f1bd" + }, + { + "bytes": 43799, + "path": "gcc-base-selected/gcc/c-family/c-lex.cc", + "sha256": "41ab40b6b1986771f2d3c73c6c3218dba19ddc87b57bd39d32ca8c639f42bc78" + }, + { + "bytes": 54255, + "path": "gcc-base-selected/gcc/c-family/c-opts.cc", + "sha256": "41c5789fab7d536c6f16b8d4bcaa83583120eefa970c929ac24b783bd6b289ee" + }, + { + "bytes": 4617, + "path": "gcc-base-selected/gcc/c-family/c-target.def", + "sha256": "3e3a24b7ef32b651781c07852d8bce61fe6587173149003c59f8c02d2684f065" + }, + { + "bytes": 86914, + "path": "gcc-base-selected/gcc/collect2.cc", + "sha256": "fba4b594cc57c301ca402fc04080167a6cf4b58884b5bfd05075821dc1f29cd4" + }, + { + "bytes": 1146, + "path": "gcc-base-selected/gcc/config/glibc-c.cc", + "sha256": "8feaf44e45d44cdd2d8c79c228d2d3ce45ead2a3fcf9e90f2c187a262b2865b6" + }, + { + "bytes": 5894, + "path": "gcc-base-selected/gcc/config/gnu-user.h", + "sha256": "cf7ac27fe1d79dbd0e038a5d4f282eb54508ca664d7d25d1011590e728c2bdbf" + }, + { + "bytes": 3256, + "path": "gcc-base-selected/gcc/config/i386/gnu-user64.h", + "sha256": "190fabbd35d1f5b526427f6a4bb3afe62a375dd605a43c7b5f550cb9c1650561" + }, + { + "bytes": 30487, + "path": "gcc-base-selected/gcc/config/i386/i386-c.cc", + "sha256": "5d0d59b1f38a0f81b430ac86cfef905a19382710c55e5543607a36931b86b4bb" + }, + { + "bytes": 1669, + "path": "gcc-base-selected/gcc/config/i386/linux64.h", + "sha256": "9007684d92746203c280b53a69debfff75851e31c1cd9ce6cd5c61f705d5179c" + }, + { + "bytes": 1774, + "path": "gcc-base-selected/gcc/config/i386/t-linux64", + "sha256": "e5126d97ea7412563159865755129046714cc95ebf74f63339065748c5adb5dc" + }, + { + "bytes": 8504, + "path": "gcc-base-selected/gcc/config/linux.h", + "sha256": "ce71be1f80fac59483042c6dd421bd267765c44f977505955b2718e30da612c4" + }, + { + "bytes": 168460, + "path": "gcc-base-selected/gcc/config.gcc", + "sha256": "9d22d65c6a106a7802d0c67da6695ac918088bb097e2007646467cfb415cb481" + }, + { + "bytes": 4378, + "path": "gcc-base-selected/gcc/cppdefault.cc", + "sha256": "afaf16ab53ef0781ccb4e4ba3751a314c66eda24ec3132cc6d8b347d9c0ac9c3" + }, + { + "bytes": 320626, + "path": "gcc-base-selected/gcc/gcc.cc", + "sha256": "c260c6321fb3852df326618d18642a3c795a8886c285db71acde6a97fd031b0a" + }, + { + "bytes": 15771, + "path": "gcc-base-selected/gcc/incpath.cc", + "sha256": "70dca72168648a2606684b7c8dc6d31f68472f32ca1058724997abb7185d0e39" + }, + { + "bytes": 96795, + "path": "gcc-base-selected/libcpp/charset.cc", + "sha256": "de762070022c62edaac06f0a0df23c3e27c84678298fe0e8c720818271a7e105" + }, + { + "bytes": 83304, + "path": "gcc-base-selected/libcpp/directives.cc", + "sha256": "bd4ec75ba6fa41dee76915588763f37804b446a0f5cf0e3cfe11b0596fa680bf" + }, + { + "bytes": 62715, + "path": "gcc-base-selected/libcpp/files.cc", + "sha256": "fc754c98510adae4af651de11b88e866490f71fb312fe001d0edc83ab4eec4d6" + }, + { + "bytes": 32504, + "path": "gcc-base-selected/libcpp/init.cc", + "sha256": "62513e415dc0072231b466d2027172758633ea6f64f43f6d58d92b7f0759769d" + }, + { + "bytes": 159800, + "path": "gcc-base-selected/libcpp/lex.cc", + "sha256": "aa757d3e37199621d4f5853b823ee154ce6ac3b5444e28f3bfd235e26233be86" + }, + { + "bytes": 23172, + "path": "gcc-base-selected/libcpp/pch.cc", + "sha256": "ee92685b7854baef6c206cdd9e4e4ff4536a4e911d6f35a4724f295a7371145f" + }, + { + "bytes": 4294, + "path": "gcc-debian-patch-inputs/debian/patches/0001-Ada-remove-conversions-with-C-struct-timeval-from-GN.diff", + "sha256": "55dfce012fa49a15c2a523e936976f5522eaa0fbeefb02e81c9057ff9494f159" + }, + { + "bytes": 4554, + "path": "gcc-debian-patch-inputs/debian/patches/0002-Ada-remove-C-conversions-with-C-struct-timespec-from.diff", + "sha256": "1fd7cab221966aafe8a988ec3293792391870a89bf6f56f138d79a744bc0dc0b" + }, + { + "bytes": 127291, + "path": "gcc-debian-patch-inputs/debian/patches/0003-Ada-define-time_t-timeval-timespec-C-types-in-a-sing.diff", + "sha256": "1313baa61eaa952f3f56bb1aa8868f5bc43d015f802a6022c5ae9445961ec97c" + }, + { + "bytes": 2189, + "path": "gcc-debian-patch-inputs/debian/patches/0003-Ada-remove-conversions-with-C-time_t-from-System.OS_.diff", + "sha256": "cf57baf090cda43ffda3652810df91031e45c023401eb3222966537dab5d3161" + }, + { + "bytes": 2087, + "path": "gcc-debian-patch-inputs/debian/patches/0005-Ada-import-nanosleep-from-System.OS_Primitives.Timed_.diff", + "sha256": "340eeab6cceba2fd1f7e42a1db96e8df2e2272cbeade11a6667875b8e57ced07" + }, + { + "bytes": 9481, + "path": "gcc-debian-patch-inputs/debian/patches/0006-Ada-select-64-bits-time-functions-from-GNU-libc-when-.diff", + "sha256": "3a2f2f419b85ed41101e0adfe101fcdae88bec5c7cced14e6ef6b96b8a7e185b" + }, + { + "bytes": 4994, + "path": "gcc-debian-patch-inputs/debian/patches/ada-749574.diff", + "sha256": "07820c8e27bd9ef993a4ba996fe97710403d671cddf48eb0d2e8abaa0c476f6e" + }, + { + "bytes": 2092, + "path": "gcc-debian-patch-inputs/debian/patches/ada-armel-libatomic.diff", + "sha256": "8d8c2444885aae6e94f4cf38cc31f852a82b3d9835759c5bebac095201fbd7c4" + }, + { + "bytes": 10800, + "path": "gcc-debian-patch-inputs/debian/patches/ada-gcc-name.diff", + "sha256": "fe7721c2677380a2f9c3aee86d930f78e8101fbaadccc35843fb218649dc3e1e" + }, + { + "bytes": 9635, + "path": "gcc-debian-patch-inputs/debian/patches/ada-gnattools-cross.diff", + "sha256": "115d50f0dade4b30613057a8c12d7c0e5830b27f35d6ebccdd787a545fac6167" + }, + { + "bytes": 2879, + "path": "gcc-debian-patch-inputs/debian/patches/ada-kfreebsd.diff", + "sha256": "99d1ce834579dc0f0a70956ff5e7465310e0bb97015868266711fd9aa1e79235" + }, + { + "bytes": 4459, + "path": "gcc-debian-patch-inputs/debian/patches/ada-lib-info-source-date-epoch.diff", + "sha256": "c7ad83b8a26d88ba491901243aa370634b5ddc56d3620e64e2e902b4f8376b7c" + }, + { + "bytes": 6044, + "path": "gcc-debian-patch-inputs/debian/patches/ada-link-lib.diff", + "sha256": "64dd337dda96bf73e43919c1f2e3eddc8c7080866263fe2294cf97f7c6a09214" + }, + { + "bytes": 902, + "path": "gcc-debian-patch-inputs/debian/patches/ada-nobiarch-check.diff", + "sha256": "6b756ea5f28badaa6fcabe128458cad2ec36659e9fa59fc05ee83614ed60eac0" + }, + { + "bytes": 327, + "path": "gcc-debian-patch-inputs/debian/patches/ada-perl-shebang.diff", + "sha256": "b7440ca466305c0385d2e53f1ded7e004aa9ea9ad7aa54826c5a3c872e9d4b98" + }, + { + "bytes": 15733, + "path": "gcc-debian-patch-inputs/debian/patches/ada-sjlj.diff", + "sha256": "be3ff090488c08ad9dd4a95eab739785f562eb0923a43734d736dcdc874cda22" + }, + { + "bytes": 2233, + "path": "gcc-debian-patch-inputs/debian/patches/ada-verbose.diff", + "sha256": "08d15a9726f9f4d2edaaf4ed1466869b513d93da763d8bdd2d13a7fd6ee31c3f" + }, + { + "bytes": 1087, + "path": "gcc-debian-patch-inputs/debian/patches/alpha-ieee-doc.diff", + "sha256": "fb9fc660453dfc8e8d0f92e9b6e3eca15e39b29a4b377053a1646e1fd1306492" + }, + { + "bytes": 504, + "path": "gcc-debian-patch-inputs/debian/patches/alpha-ieee.diff", + "sha256": "899835f011abb832f52bbb9cc6f6f4f4466d2c47439a4fcbe8d669764a0cdb36" + }, + { + "bytes": 815, + "path": "gcc-debian-patch-inputs/debian/patches/alpha-no-ev4-directive.diff", + "sha256": "b0e65e8eb6acdf3a0fdf5c64945bea749980ecbbb0547ce6ceae134802df7133" + }, + { + "bytes": 783, + "path": "gcc-debian-patch-inputs/debian/patches/arc-stddef.diff", + "sha256": "47ca9b5f7899e885777ce3eac30f838be686ef221d51f974db981f363a8a7acc" + }, + { + "bytes": 2704, + "path": "gcc-debian-patch-inputs/debian/patches/arm-multilib-defaults.diff", + "sha256": "b030153b1b38940e09b0119a0f9a66f2cf443e534e73a053eeab0e183f355634" + }, + { + "bytes": 1177, + "path": "gcc-debian-patch-inputs/debian/patches/arm-multilib-soft-cross.diff", + "sha256": "614e198f0af1b9fa904185fa2d4a6d99f4227e7c1fb3e7a18267d7830c565062" + }, + { + "bytes": 1204, + "path": "gcc-debian-patch-inputs/debian/patches/arm-multilib-soft-float.diff", + "sha256": "194fe207ec6c38e0fbc7bf178dba2f4eee22e25609f083863438bec7482246f1" + }, + { + "bytes": 1088, + "path": "gcc-debian-patch-inputs/debian/patches/arm-multilib-soft.diff", + "sha256": "6ce4a4337635b4906cdd29e8c12886055920dce9d6c017a0373efb377b9adf25" + }, + { + "bytes": 1241, + "path": "gcc-debian-patch-inputs/debian/patches/arm-multilib-softfp-cross.diff", + "sha256": "0dc80d8deb83b4214b526e25369ac911c8fb3156b36be481a63e3c5649a09f85" + }, + { + "bytes": 1261, + "path": "gcc-debian-patch-inputs/debian/patches/arm-multilib-softfp.diff", + "sha256": "4813ad4a730f793c747719819e599bb07a67e13b3a2745e5d337356ce5b3bb0b" + }, + { + "bytes": 999, + "path": "gcc-debian-patch-inputs/debian/patches/asan-allocator-base.diff", + "sha256": "5368ebc426150e65d29b7185c91bba5be1804a3c9909ad47e489e6e42cbd2c44" + }, + { + "bytes": 1234, + "path": "gcc-debian-patch-inputs/debian/patches/bootstrap-no-unneeded-libs.diff", + "sha256": "992812bf94a94fcf122b099ca5c88d3a130d0acf10906be35ab1fa0d78288609" + }, + { + "bytes": 768, + "path": "gcc-debian-patch-inputs/debian/patches/canonical-cpppath.diff", + "sha256": "4bf530e452c8d13c6199cb191d0ce94f3ae44f2b28cbaf06c0739812c4528bb4" + }, + { + "bytes": 1667, + "path": "gcc-debian-patch-inputs/debian/patches/config-ml.diff", + "sha256": "243bcbf1148ebc5ec860bbea0dec588fffab35692a0700723becc58e7e89f729" + }, + { + "bytes": 4537, + "path": "gcc-debian-patch-inputs/debian/patches/cross-biarch.diff", + "sha256": "4539a027bc28dea101f968f4260d55f596ac86f35e19f43d99090d09b3e8cb37" + }, + { + "bytes": 1758, + "path": "gcc-debian-patch-inputs/debian/patches/cross-fixes.diff", + "sha256": "55bfa5116e4e4aaf0f19cd2ccc39a0e2651dd188d3aa4163520fdd6f09388226" + }, + { + "bytes": 22890, + "path": "gcc-debian-patch-inputs/debian/patches/cross-install-location.diff", + "sha256": "9e943d2ea5dbabe60ee30a3cd08384874ce7c933ed233018871dbb568275eeb3" + }, + { + "bytes": 580, + "path": "gcc-debian-patch-inputs/debian/patches/cross-no-locale-include.diff", + "sha256": "f0fcb28e5324f14e2ebf68a5e0e750e79158f559cf4735c0df599d1b8acf2187" + }, + { + "bytes": 2436, + "path": "gcc-debian-patch-inputs/debian/patches/cuda-float128.diff", + "sha256": "bb5b97c0061471ca5a4f15e42bcc2a0de7ca77792f1a14d07de8fcbe50c6ef75" + }, + { + "bytes": 529, + "path": "gcc-debian-patch-inputs/debian/patches/disable-gdc-tests.diff", + "sha256": "2857ba64270cb7b5d7cc24c44fff55338cbb407ed3bfa939bffdefb21bf0027b" + }, + { + "bytes": 541, + "path": "gcc-debian-patch-inputs/debian/patches/dwarf5-revert-default-doc.diff", + "sha256": "3a292cc57f441d03db9bb02218c739eede3d15fb34be24572118c8881b346561" + }, + { + "bytes": 886, + "path": "gcc-debian-patch-inputs/debian/patches/dwarf5-revert-default.diff", + "sha256": "99d69adaed301f2e745eebce16e5c5ec996a963ba14142dff56bd05debc83814" + }, + { + "bytes": 5131, + "path": "gcc-debian-patch-inputs/debian/patches/g++-multiarch-incdir.diff", + "sha256": "bc30caf1d10804375e6104e004d658fb2df1857cbab55871d715d81c1b6ce049" + }, + { + "bytes": 1164, + "path": "gcc-debian-patch-inputs/debian/patches/gcc-arm-disable-guality-tests.diff", + "sha256": "24b87b8c95ee7074ccc01dfe982f5b37474b96d6820ad50b2441b69c28b3d504" + }, + { + "bytes": 4492, + "path": "gcc-debian-patch-inputs/debian/patches/gcc-as-needed-gold.diff", + "sha256": "8bb7658a5fef8d262535b4507295bfd9f62fa973a27ec08e2a8be6650ae0d70d" + }, + { + "bytes": 11789, + "path": "gcc-debian-patch-inputs/debian/patches/gcc-as-needed.diff", + "sha256": "f2145cce7b9633be112cb7961f92c85434cf7cca28a93cc9ce4b038ff1c0bbc4" + }, + { + "bytes": 592, + "path": "gcc-debian-patch-inputs/debian/patches/gcc-auto-build.diff", + "sha256": "183ec477fec9aa8a96d655e1b19d9842b3fdc3640b4c29528466772ca0f635a3" + }, + { + "bytes": 3428, + "path": "gcc-debian-patch-inputs/debian/patches/gcc-distro-specs-ubuntu-doc.diff", + "sha256": "43d0af5d8ac2c6db9d0d77d4ada0f74cac928fbcbb9bd4caf4b5805f3cd4d45b" + }, + { + "bytes": 17113, + "path": "gcc-debian-patch-inputs/debian/patches/gcc-distro-specs.diff", + "sha256": "22e7b3c4e7a3437c456bae439501f97c560460b46670700d9e09aafa032ef072" + }, + { + "bytes": 1111, + "path": "gcc-debian-patch-inputs/debian/patches/gcc-driver-extra-langs.diff", + "sha256": "ac5a6a7bf051708f917c59d9736b83cc65740168bc240147f94af67d13ad272d" + }, + { + "bytes": 4196, + "path": "gcc-debian-patch-inputs/debian/patches/gcc-foffload-default.diff", + "sha256": "e1bd3bfe68414470018d4f24ec0d0af3bab685901b103b70cd40490e874d7aaf" + }, + { + "bytes": 2090, + "path": "gcc-debian-patch-inputs/debian/patches/gcc-force-cross-layout.diff", + "sha256": "2d71d1b68a28e5980cfb55a49aab1321dac31756dcfa2c95438c306b3f140aac" + }, + { + "bytes": 1741, + "path": "gcc-debian-patch-inputs/debian/patches/gcc-gfdl-build.diff", + "sha256": "6a9344c1498dfa2cdb47e02bac1991e2e120d277ceddd06c6da62a371354df8a" + }, + { + "bytes": 5837, + "path": "gcc-debian-patch-inputs/debian/patches/gcc-hash-style-gnu.diff", + "sha256": "b994015da754fdc89c4654181d4ba26fa4d63cf89ae1d0b0b2322cd6eeee0aa0" + }, + { + "bytes": 1177, + "path": "gcc-debian-patch-inputs/debian/patches/gcc-ice-apport.diff", + "sha256": "89c0a21abc34c5f320a32cc0f07ecc46a6d9ebb9e0656e560b103530f594a841" + }, + { + "bytes": 3388, + "path": "gcc-debian-patch-inputs/debian/patches/gcc-ice-dump.diff", + "sha256": "530cdb9a70740c8c3d6029ece09205cd92b6dab3676530cbd4dfbd1b57587e36" + }, + { + "bytes": 11141, + "path": "gcc-debian-patch-inputs/debian/patches/gcc-multiarch.diff", + "sha256": "18022b0748f43bf018eea1916b4f11bca68daad7ce8ecf076e4e103a1acba0e8" + }, + { + "bytes": 5721, + "path": "gcc-debian-patch-inputs/debian/patches/gcc-multilib-multiarch.diff", + "sha256": "b5d6ba4e2831fd8f4614381ef1da42e38fb3744e0e3782d5c1e650b192ab4837" + }, + { + "bytes": 1366, + "path": "gcc-debian-patch-inputs/debian/patches/gcc-search-prefixed-as-ld.diff", + "sha256": "7ec5fb60d1e42c346a2381f10c7ce561a9ccb2ec74e45807c83328f4f81a4090" + }, + { + "bytes": 791, + "path": "gcc-debian-patch-inputs/debian/patches/gcc-target-include-asm.diff", + "sha256": "d5162f826158aee096e1f699e6cce6a8adf74291cf28c5dfe038dae5d16da849" + }, + { + "bytes": 2712, + "path": "gcc-debian-patch-inputs/debian/patches/gcc-textdomain.diff", + "sha256": "85f819e014b708635e695002fb323da73ea72996de8e4c4fa3fc308e3e6300dd" + }, + { + "bytes": 358, + "path": "gcc-debian-patch-inputs/debian/patches/gcc-verbose-lto-link.diff", + "sha256": "357e6581ae291ee102bbcaa4dd9df10e86f89e424d1e5be210b621183d2745fa" + }, + { + "bytes": 605, + "path": "gcc-debian-patch-inputs/debian/patches/gcc-vhdl.diff", + "sha256": "af8f5448ab8487d6596b10211f073cd56412db49f293e8a3ebf76cf184939ff5" + }, + { + "bytes": 583, + "path": "gcc-debian-patch-inputs/debian/patches/gccrs-bootstrap-mipsel.diff", + "sha256": "f665d2a06c95f3252a67abf581e653ef65169a578437746bedd1fcee638cae0b" + }, + { + "bytes": 594, + "path": "gcc-debian-patch-inputs/debian/patches/gdc-dynamic-link-phobos.diff", + "sha256": "21288b8c5b6444caae885cc000220078009cf134a129f1ab5c03402bdfc57b65" + }, + { + "bytes": 492, + "path": "gcc-debian-patch-inputs/debian/patches/gdc-multiarch.diff", + "sha256": "9b2fe79af02c72bc5b8f2ae7c7d593699dd5d94d9d2b59a1c15494d9543f3dfb" + }, + { + "bytes": 1285, + "path": "gcc-debian-patch-inputs/debian/patches/gdc-texinfo.diff", + "sha256": "14d8c9d15e0126e2bda8f2fe246529962b62bb8a6b5fd31702b37907a5fac924" + }, + { + "bytes": 1766, + "path": "gcc-debian-patch-inputs/debian/patches/git-doc-updates.diff", + "sha256": "8430cab8bf949900c0db75f6a4cbd3ab7f1f1fe7d7d170da9c64da64c99689aa" + }, + { + "bytes": 464763, + "path": "gcc-debian-patch-inputs/debian/patches/git-updates.diff", + "sha256": "d4ff0b3be1a4630f8e2ee8d1c631bc7fe1272dc71a9a4816fc044fa96e063eb4" + }, + { + "bytes": 616, + "path": "gcc-debian-patch-inputs/debian/patches/gm2-bootstrap-compare.diff", + "sha256": "89cd05a772150cffe1f9a74db27c1556460390f84d92e9c7dd50688f8b7db911" + }, + { + "bytes": 711, + "path": "gcc-debian-patch-inputs/debian/patches/gm2-texinfo.diff", + "sha256": "e142f747b874b03f009fb7a43b695f702569dffba3527f6b47a7fd32fc9a1ba4" + }, + { + "bytes": 507, + "path": "gcc-debian-patch-inputs/debian/patches/go-testsuite.diff", + "sha256": "664fde089be949febea33e4b7fffcdaeaa4cb5c753f600fb4ec30694e3698a4e" + }, + { + "bytes": 348, + "path": "gcc-debian-patch-inputs/debian/patches/hppa64-libgcov-fallback.diff", + "sha256": "24472fb0f01d25d6e5a16de7f49a26a43af9ebd9f95d4ef0879c94f26b475428" + }, + { + "bytes": 4911, + "path": "gcc-debian-patch-inputs/debian/patches/hurd-amd64.diff", + "sha256": "8975d47d0ae92526ac4c569ab9b454baeca7a3b77a326bd62170ce796a11883f" + }, + { + "bytes": 649, + "path": "gcc-debian-patch-inputs/debian/patches/hurd-changes.diff", + "sha256": "468a5006bb9c09228a5b3cf8f6f27f26ed9ed5bf8c05062b905582276a5a7da2" + }, + { + "bytes": 738, + "path": "gcc-debian-patch-inputs/debian/patches/hurd-multiarch.diff", + "sha256": "b2b7ab65b3ecbc33b0856afc818cd31c71ba2072fa70a0c3822406d71796dfdd" + }, + { + "bytes": 1264, + "path": "gcc-debian-patch-inputs/debian/patches/hurd-multilib-multiarch.diff", + "sha256": "af27525094757fdf1e207dc94721a6614d6ec01edb0469d3d7dceb5d9c52d2cb" + }, + { + "bytes": 517, + "path": "gcc-debian-patch-inputs/debian/patches/ia64-disable-selective-scheduling.diff", + "sha256": "54a060fdc9fa670594dd7ea8861a54367fc0fd87880b5286cb586f9df6087928" + }, + { + "bytes": 1585, + "path": "gcc-debian-patch-inputs/debian/patches/ignore-pie-specs-when-not-enabled.diff", + "sha256": "0b0f6143314c43c42bf0393932dd969d747c539be5f4045247e7e7d9c492553e" + }, + { + "bytes": 1213, + "path": "gcc-debian-patch-inputs/debian/patches/kfreebsd-decimal-float.diff", + "sha256": "ed05fbba7ee04ac36cb128652c907a616dac38afd63c9eac6e6237b776e9a2dd" + }, + { + "bytes": 5174, + "path": "gcc-debian-patch-inputs/debian/patches/libasan-sparc.diff", + "sha256": "31259c11930356abef803c5a3d3f247d4aa8a6fd3881a44d832c176c218c375e" + }, + { + "bytes": 1107, + "path": "gcc-debian-patch-inputs/debian/patches/libffi-race-condition.diff", + "sha256": "abb665a36ea6f96eab7eb3028afbc06f787775a1dfc8aed48fbcae85ca2f6ebf" + }, + { + "bytes": 388, + "path": "gcc-debian-patch-inputs/debian/patches/libffi-ro-eh_frame_sect.diff", + "sha256": "88df2bf9a652bda7df674f552c34449092eb07bad0e642e439a8a567511ab17a" + }, + { + "bytes": 913, + "path": "gcc-debian-patch-inputs/debian/patches/libgo-cleanfiles.diff", + "sha256": "01a23227ec7c4f6d30cdde7d3dddd4313643962716027dfd3175d44c883045f0" + }, + { + "bytes": 1043, + "path": "gcc-debian-patch-inputs/debian/patches/libgo-hurd-hack.diff", + "sha256": "fea8ff97fe411f17f3ab24d0926aa484ee49402e95e37b984b30bbaf6542f84a" + }, + { + "bytes": 292, + "path": "gcc-debian-patch-inputs/debian/patches/libgo-revert-timeout-exp.diff", + "sha256": "c7fc5e583f8d8c722f7cfddf837b94c0b45addf16efa0e7c47aa18309dbcc63c" + }, + { + "bytes": 675, + "path": "gcc-debian-patch-inputs/debian/patches/libgo-setcontext-config.diff", + "sha256": "6814b069b0118d4b6235af79e2238cbd6fa85ab43afba85c69a73717e170ea9a" + }, + { + "bytes": 2413, + "path": "gcc-debian-patch-inputs/debian/patches/libgo-testsuite.diff", + "sha256": "9fcd37d1b54851ba065acc437591538caac227c466b960170934924f50a9d92d" + }, + { + "bytes": 292, + "path": "gcc-debian-patch-inputs/debian/patches/libgomp-kfreebsd-testsuite.diff", + "sha256": "9fc54fd88488d66e54678b063593eb559559b2e6dd2445b17ca68e7bdb0141b3" + }, + { + "bytes": 904, + "path": "gcc-debian-patch-inputs/debian/patches/libgomp-omp_h-multilib.diff", + "sha256": "87fee448f135273b765570217687a579979e5eb03cda3d3301b64c4ec7406409" + }, + { + "bytes": 14327, + "path": "gcc-debian-patch-inputs/debian/patches/libiberty-sha1-1.diff", + "sha256": "f1420469f9259ce9ba031636c937a82e94ac23a8b3aaf84e00be37f9e4f98274" + }, + { + "bytes": 7283, + "path": "gcc-debian-patch-inputs/debian/patches/libiberty-sha1-2.diff", + "sha256": "217276154f41d9b30dbfacd4d367b637a3b2e9b1e57d45c6a82e6aa18ef846e2" + }, + { + "bytes": 465, + "path": "gcc-debian-patch-inputs/debian/patches/libitm-no-fortify-source.diff", + "sha256": "01ee6ba95ee2c4ecfdbeef56fd61188153f6b80471577f37deb735a81491c1f2" + }, + { + "bytes": 2141, + "path": "gcc-debian-patch-inputs/debian/patches/libphobos-zlib.diff", + "sha256": "84e8c1468fcf2dc5dafce2a3b2b926975c98e0b50449f0da3f6825f8b0dfef01" + }, + { + "bytes": 5689, + "path": "gcc-debian-patch-inputs/debian/patches/libsanitizer-no-crypt.diff", + "sha256": "7f84a0a496cfb96923d297070876aed8b3d54f7a6bc587c69a1a8dd93448e64e" + }, + { + "bytes": 792, + "path": "gcc-debian-patch-inputs/debian/patches/libsanitizer-timebits.diff", + "sha256": "6e7fbbbdb968bc88743e46e1f46388288b91b2dde6cbe30b0efdca50096ab252" + }, + { + "bytes": 2356, + "path": "gcc-debian-patch-inputs/debian/patches/libstdc++-doclink.diff", + "sha256": "68a7126e13097fd072867a7a0b96ce47cb05d2dc35c5c6412648b418d0f9e222" + }, + { + "bytes": 565, + "path": "gcc-debian-patch-inputs/debian/patches/libstdc++-doxygen-SOURCE_DATE_EPOCH.diff", + "sha256": "798b86ca29d0fc1736dc70f0258ce4b8d8844848098be2ec3d9ed65127056cca" + }, + { + "bytes": 1741, + "path": "gcc-debian-patch-inputs/debian/patches/libstdc++-hurd.diff", + "sha256": "99990061a3f17ff633ea01678930f5dc4b5f41affee8fe880ec7178f74b8a36d" + }, + { + "bytes": 2587, + "path": "gcc-debian-patch-inputs/debian/patches/libstdc++-man-3cxx.diff", + "sha256": "6e6e66eba28f090b549eeb5f9391de2f64cd2de88473731011805a3b187eb76f" + }, + { + "bytes": 513, + "path": "gcc-debian-patch-inputs/debian/patches/libstdc++-no-testsuite.diff", + "sha256": "fdf48c99cddf3de82d5722d6b4e4f3c53504a723452da98c62ce5814ab00f459" + }, + { + "bytes": 1490, + "path": "gcc-debian-patch-inputs/debian/patches/libstdc++-nothumb-check.diff", + "sha256": "c8775e9772f5dc83dad4d30c57f51a3bd61d318871578657d8e1eaa8a7b2a006" + }, + { + "bytes": 3765, + "path": "gcc-debian-patch-inputs/debian/patches/libstdc++-pic.diff", + "sha256": "1d9c2a8874585cc3beb5ec93795974345d3e0c81a6f2362bf5d773fbb622b1d0" + }, + { + "bytes": 819, + "path": "gcc-debian-patch-inputs/debian/patches/libstdc++-pythondir.diff", + "sha256": "dc8c35675108db2ae50e2f5c8212e6dea3954aabb2cb64241ad6f92f29185f37" + }, + { + "bytes": 2574, + "path": "gcc-debian-patch-inputs/debian/patches/libstdc++-test-installed.diff", + "sha256": "c8a2cbc73e22874f1d2acedb905b94c32b6e4ebd6bf9fde50c3c6ac952e3a505" + }, + { + "bytes": 905, + "path": "gcc-debian-patch-inputs/debian/patches/musl-ssp.diff", + "sha256": "b5aa722bf90ef419ab9682998b5eebba2d7fc1f4065359e0e48bd8b231628fa4" + }, + { + "bytes": 13055, + "path": "gcc-debian-patch-inputs/debian/patches/newlib-amdgcn-locks.diff", + "sha256": "b822b4d0b1490c89d5aa50b4ed4cb7d3553e57442064d046422abd10ca98d8e6" + }, + { + "bytes": 3266, + "path": "gcc-debian-patch-inputs/debian/patches/note-gnu-stack.diff", + "sha256": "8339552b0d1ffee7e60f330ac7aff380cd1615de4b549bd2d3f1949e3164ba9b" + }, + { + "bytes": 5506, + "path": "gcc-debian-patch-inputs/debian/patches/pr100067-revert.diff", + "sha256": "d7c086be304a34adc0fc375a108f9eec48ca03ffa730cbe4dac0c435bcc5aeae" + }, + { + "bytes": 478, + "path": "gcc-debian-patch-inputs/debian/patches/pr104290-followup.diff", + "sha256": "7f5f7923ba318ed6d519d2a46ad0e4f48d164aaca6595edf3f78db2f5ac85fd9" + }, + { + "bytes": 370, + "path": "gcc-debian-patch-inputs/debian/patches/pr107475.diff", + "sha256": "b4cc88cc20723ca6b6a1b0fdeb9708c5bc5a838f450b7dd3f2583452dc3a0bd6" + }, + { + "bytes": 3661, + "path": "gcc-debian-patch-inputs/debian/patches/pr110934.diff", + "sha256": "632225848c2a95180b6caccf8ef2865a4457a09b5147810758ffa2a4e9c90105" + }, + { + "bytes": 2117, + "path": "gcc-debian-patch-inputs/debian/patches/pr113030.diff", + "sha256": "e05596d8340161aac67919d3585d81261c3808b50aa7ce35497a18616c504199" + }, + { + "bytes": 2212, + "path": "gcc-debian-patch-inputs/debian/patches/pr11897.diff", + "sha256": "c0d6b4ea127e970b3f6771ca260ffe6376c50931dbbe63e48fa33501816b69a5" + }, + { + "bytes": 3067, + "path": "gcc-debian-patch-inputs/debian/patches/pr39491.diff", + "sha256": "063b444c5934839c567ca5c6bed3b4f261fb0b1032493de41a26d60e4da90387" + }, + { + "bytes": 875, + "path": "gcc-debian-patch-inputs/debian/patches/pr66368.diff", + "sha256": "bd13defa60e4720dc4af31f6e754809b0fddf4cc715ac52d0af4390860d37872" + }, + { + "bytes": 1197, + "path": "gcc-debian-patch-inputs/debian/patches/pr67590.diff", + "sha256": "fbabda522ec79a5c479ccd6c609897545cd9fbf26c48174fab525102837a1cee" + }, + { + "bytes": 941, + "path": "gcc-debian-patch-inputs/debian/patches/pr67899.diff", + "sha256": "dc101ca9dcffb64760e4eaf3f17f031d8f68a38ac42c770ef696c7ed179c1b98" + }, + { + "bytes": 722, + "path": "gcc-debian-patch-inputs/debian/patches/pr79724-revert.diff", + "sha256": "579eb20f3962ce2d0994cf995e4ed4857af269e5293855575e42e22f2adfded2" + }, + { + "bytes": 8647, + "path": "gcc-debian-patch-inputs/debian/patches/pr81829.diff", + "sha256": "b7aeb12d9fe1f4707b322c04acc7495f45b53aeecc84e2164df7d53729a739a0" + }, + { + "bytes": 1684, + "path": "gcc-debian-patch-inputs/debian/patches/pr87808.diff", + "sha256": "fce0bbfd3154f16c28f957a46fb71c59321e64f0ce19c5d1c61e3c771b5d1506" + }, + { + "bytes": 1418, + "path": "gcc-debian-patch-inputs/debian/patches/pr88552.diff", + "sha256": "a143fb39e76dae769cd65ab63ab9ce5a17b0775916ed62da54653ca639291fc7" + }, + { + "bytes": 2042, + "path": "gcc-debian-patch-inputs/debian/patches/pr94253.diff", + "sha256": "90eb3d06db3abb4e1e40f20b4cdf88ca71ad72f6ecdae8bbb2fd42a8fb8b99ff" + }, + { + "bytes": 1366, + "path": "gcc-debian-patch-inputs/debian/patches/pr99832-distro.diff", + "sha256": "3c6f7a52bacdedb4c235d3f56761fecabd47afa050e792fbb205d29bf0c2e69f" + }, + { + "bytes": 26988, + "path": "gcc-debian-patch-inputs/debian/patches/rename-info-files.diff", + "sha256": "e28ad2ad80a9141c1883936abe5d22c90e409a23a2d6f5728db168aaa610cc25" + }, + { + "bytes": 744, + "path": "gcc-debian-patch-inputs/debian/patches/rust-enabled.diff", + "sha256": "3587254473e9f0b3191cc8ca66fcb546f61735cef968d5003b4623ddbdbf8360" + }, + { + "bytes": 844, + "path": "gcc-debian-patch-inputs/debian/patches/skip-bootstrap-multilib.diff", + "sha256": "3f77d1bb0f40f9cb7afcfa15449992753d8801e6c3c538f7526177c2482cb3c7" + }, + { + "bytes": 1391, + "path": "gcc-debian-patch-inputs/debian/patches/sparc64-biarch-long-double-128.diff", + "sha256": "beb10c84279c04656addab2ef688fb2e4310fee4d2f270789cb4a89e6df972ac" + }, + { + "bytes": 1117, + "path": "gcc-debian-patch-inputs/debian/patches/sys-auxv-header.diff", + "sha256": "bb2b1210ff1bb8d73988bd657ed4121ac4335d1e433fb1dd4416deb8a90a6615" + }, + { + "bytes": 575, + "path": "gcc-debian-patch-inputs/debian/patches/t-libunwind-elf-Wl-z-defs.diff", + "sha256": "a039ff99ee9c205319f670deaa44e78abaa73638cb3ddea14423aa9071d8518d" + }, + { + "bytes": 741, + "path": "gcc-debian-patch-inputs/debian/patches/testsuite-glibc-warnings.diff", + "sha256": "30d9f0633230db9b013950c11be9e98692b9c76debb802e1e0cfbcffbb75ba77" + }, + { + "bytes": 11357, + "path": "gcc-debian-patch-inputs/debian/patches/testsuite-hardening-format.diff", + "sha256": "91fc710ac3cded86a966c4707843521196c49610c79029dc6f34740f87ea2658" + }, + { + "bytes": 23599, + "path": "gcc-debian-patch-inputs/debian/patches/testsuite-hardening-printf-types.diff", + "sha256": "39acd6e24c8a86cb2f70a94b71fce0f540f1070f22a411f65569de787f6fd6f0" + }, + { + "bytes": 4558, + "path": "gcc-debian-patch-inputs/debian/patches/testsuite-hardening-updates.diff", + "sha256": "3265692e734290b939b0b37794d3ec59a1ee248ae8994a8ec6bd617798473377" + }, + { + "bytes": 31074, + "path": "gcc-debian-patch-inputs/debian/patches/toplevel-add-gprofng.diff", + "sha256": "999132b3927bf84f6f066dfa7c38ca2b4fa466d11622d69edebd982241af45b1" + }, + { + "bytes": 2679, + "path": "gcc-debian-patch-inputs/debian/patches/toplevel-add-libsframe.diff", + "sha256": "9bad85b06d6ea731aef97153220fa36a068f58c35d6cd92efedd0dee884e2787" + }, + { + "bytes": 12473, + "path": "gcc-debian-patch-inputs/debian/rules.patch", + "sha256": "6c6d9dc472ee7082c5658030c812436668ffbb99f76966a6cf9081b03732e8dc" + }, + { + "bytes": 1727, + "path": "../evidence/EMBEDDED-CONFIGURATION-v1.json", + "sha256": "b02f8530e592eddeac5f86a2fb3a8ea80f25ac0e8ab2945fccb64a665b18d4cc" + } + ], + "schema": "c05-gcc-rule-sourcepins-v1", + "scope": "Exact data inputs; none executed or imported. Source projection is not installed build equivalence." +} diff --git a/research/h25-c05-v03-input-constructors/implementation/c05_gcc_rules_tests_v1.py b/research/h25-c05-v03-input-constructors/implementation/c05_gcc_rules_tests_v1.py new file mode 100644 index 0000000000..1d8742eaaa --- /dev/null +++ b/research/h25-c05-v03-input-constructors/implementation/c05_gcc_rules_tests_v1.py @@ -0,0 +1,257 @@ +"""Independent finite controls for newly authored passive GCC source helpers. + +Run only this new file with python3 -B -S. No compiler, package scripts, original +Root/provider/module, diagnostics or target subprocess is launched. +""" + +import itertools +import json +import unittest +from pathlib import Path + +import c05_gcc_rules_v1 as rules + + +class MakeDataControls(unittest.TestCase): + def test_small_exhaustive_branch_oracle(self): + source = """debian_patches = base +hardening_patches = +ifeq ($(a),yes) + debian_patches += alpha + ifneq ($(b),yes) + debian_patches += alpha-not-beta + else ifeq ($(c),yes) + debian_patches += alpha-beta-gamma + else + debian_patches += alpha-beta-not-gamma + endif +else ifneq ($(c),yes) + debian_patches += not-alpha-not-gamma +else + debian_patches += not-alpha-gamma +endif +""" + for a, b, c in itertools.product((False, True), repeat=3): + with self.subTest(a=a, b=b, c=c): + expected = ["base.diff"] + if a: + expected.append("alpha.diff") + if not b: expected.append("alpha-not-beta.diff") + elif c: expected.append("alpha-beta-gamma.diff") + else: expected.append("alpha-beta-not-gamma.diff") + elif not c: expected.append("not-alpha-not-gamma.diff") + else: expected.append("not-alpha-gamma.diff") + values = dict(zip(("a", "b", "c"), ("yes" if x else "no" for x in (a,b,c)))) + values["trunk_build"] = "" + result = rules.select_patch_data(source, values) + self.assertEqual(result["definitely_selected"], expected) + self.assertEqual(result["conditional"], []) + + def test_unknown_is_not_false(self): + source = """debian_patches = base +hardening_patches = +ifeq ($(missing),yes) + debian_patches += possible-a +else + debian_patches += possible-b +endif +""" + result = rules.select_patch_data(source, {"trunk_build": ""}) + self.assertEqual(result["definitely_selected"], ["base.diff"]) + self.assertEqual([x["patch"] for x in result["conditional"]], + ["possible-a.diff", "possible-b.diff"]) + + def test_unknown_reset_refused(self): + source = """debian_patches = base +ifeq ($(missing),yes) + debian_patches = replacement +endif +""" + with self.assertRaisesRegex(rules.UnsupportedConfiguration, "unresolved patch-list reset"): + rules.select_patch_data(source, {"trunk_build": ""}) + + def test_make_shell_is_data_frontier(self): + with self.assertRaisesRegex(rules.UnknownMakeValue, "unsupported make function: shell"): + rules.expand_make_data("$(shell printf should-never-execute)", {}) + self.assertEqual(rules.expand_make_data("$(filter x86_64-%,x86_64-linux-gnu i686-linux-gnu)", {}), + "x86_64-linux-gnu") + self.assertEqual(rules.expand_make_data("$(if $(findstring gcc-13,$(pkg)),native,$(unknown))", + {"pkg": "gcc-13"}), "native") + + def test_unknown_language_context_stays_frontier(self): + with self.assertRaises(rules.UnknownMakeValue): + rules.expand_make_data("$(target)", {}) + + +class ExactPatchControls(unittest.TestCase): + def test_trailing_no_newline_marker_is_refused(self): + patch = b'--- a/src/gcc/example.cc\n+++ b/src/gcc/example.cc\n@@ -1 +1 @@\n-old\n+new\n\\ No newline at end of file\n' + with self.assertRaisesRegex(rules.UnsupportedConfiguration,'non-LF patch'): + rules.project_patch(b'old\n',patch,'gcc/example.cc') + + PATCH = b"--- a/src/gcc/example.cc\n+++ b/src/gcc/example.cc\n@@ -2,3 +2,4 @@\n left\n-old\n+new\n+more\n right\n" + + def test_exact_projection_and_offset_oracle(self): + base = b"heading\nleft\nold\nright\ntrailer\n" + expected = b"heading\nleft\nnew\nmore\nright\ntrailer\n" + for prefix in (b"", b"unrelated\n", b"one\ntwo\n"): + with self.subTest(prefix=prefix): + result, receipt = rules.project_patch(prefix + base, self.PATCH, "gcc/example.cc") + self.assertEqual(result, prefix + expected) + self.assertEqual(receipt[0]["actual_old_line"], 2 + prefix.count(b"\n")) + + def test_changed_context_is_not_repaired(self): + with self.assertRaisesRegex(rules.UnsupportedConfiguration, "nonunique/missing exact patch context"): + rules.project_patch(b"heading\nleft \nold\nright\n", self.PATCH, "gcc/example.cc") + + def test_ambiguous_relocation_rejected(self): + base = b"heading\nelsewhere\nleft\nold\nright\nleft\nold\nright\n" + with self.assertRaisesRegex(rules.UnsupportedConfiguration, "nonunique/missing exact patch context"): + rules.project_patch(base, self.PATCH, "gcc/example.cc") + + def test_unrelated_target_not_transformed(self): + base = b"unchanged\n" + self.assertEqual(rules.project_patch(base, self.PATCH, "gcc/another.cc"), (base, [])) + + def test_truncated_hunk_rejected(self): + with self.assertRaisesRegex(rules.UnsupportedConfiguration, "hunk count"): + rules.project_patch(b"heading\nleft\nold\nright\n", self.PATCH.rsplit(b" right",1)[0], + "gcc/example.cc") + + +class SourceAndConfigurationControls(unittest.TestCase): + @classmethod + def setUpClass(cls): + cls.corpus = rules.load_pinned_sources(Path(__file__).parent.parent / "source-artifacts") + cls.command = [rules.COMPILER, *rules.FIXED_OPTIONS, + "/finite-fixture/stage/original-role.c", "-o", "/finite-fixture/stage/fresh.so"] + cls.cwd = "/finite-fixture/stage" + cls.model = rules.construct_fixed_rule_model(cls.corpus, cls.command, + rules.NATIVE_ENVIRONMENT, cls.cwd) + + def test_source_identity_mutation_rejected(self): + mutated = dict(self.corpus) + key = rules.BASE + "gcc/incpath.cc" + mutated[key] = mutated[key].replace(b"remove_duplicates", b"remove_duplicateX", 1) + with self.assertRaisesRegex(rules.UnsupportedConfiguration, "source content identity"): + rules.verify_source_bytes(mutated) + + def test_injected_source_or_chain_rejected(self): + injected = dict(self.corpus) + injected["authoritative-effective-chain"] = b"complete=true" + with self.assertRaisesRegex(rules.UnsupportedConfiguration, "exact pinned key set"): + rules.verify_source_bytes(injected) + + def test_all_source_references_locate_real_physical_lines(self): + for reference in self.model["source_evidence"].values(): + with self.subTest(path=reference["path"], line=reference["line"]): + data = self.corpus[reference["path"]] + self.assertEqual(rules.sha256(data), reference["sha256"]) + # GCC source contains form-feed page separators. Physical source + # references count LF bytes, not Python's broader splitlines(). + self.assertIn(reference["anchor"], data.decode().split("\n")[reference["line"] - 1]) + generator = self.corpus[rules.PATCH_BASE + "rules.patch"].decode().split("\n") + for record in self.model["conditional_distro_defines"]["definite_under_build_values"].values(): + self.assertIn(record["directive"], generator[record["line"] - 1]) + + def test_automatic_specs_independent_source_control(self): + text = self.corpus[rules.BASE + "gcc/gcc.cc"].decode() + start = text.index("driver::set_up_specs () const") + body = text[start:text.index("/* Process any configure-time defaults", start)] + first = body.index('find_a_file (&startfile_prefixes, "specs", R_OK, true)') + second = body.index("if (access (specs_file, R_OK) == 0)") + self.assertLess(first, second) + self.assertGreaterEqual(body.count("read_specs (specs_file, true, false)"), 2) + self.assertNotIn("-specs", self.command) + self.assertEqual(len(self.model["automatic_specs_rules"]), 2) + self.assertFalse(self.model["automatic_specs_rules"][0]["ordered_candidates_proven"]) + + def test_pch_before_header_source_countermodel(self): + text = self.corpus[rules.BASE + "libcpp/files.cc"].decode() + start = text.index("find_file_in_dir (cpp_reader *pfile, _cpp_file *file, bool *invalid_pch,\n") + body = text[start:text.index("/*", text.index("if (open_file (file))", start))] + self.assertLess(body.index("if (pch_open_file"), body.index("if (open_file")) + # Two namespaces with identical ordinary header bytes can differ by a + # usable .gch. The source tries that witness first in the eligible state. + ordinary = {"/usr/include/python3.12/Python.h": b"ordinary header"} + changed = dict(ordinary, **{"/usr/include/python3.12/Python.h.gch": b"candidate PCH"}) + self.assertEqual(ordinary["/usr/include/python3.12/Python.h"], + changed["/usr/include/python3.12/Python.h"]) + self.assertNotEqual(set(ordinary), set(changed)) + self.assertTrue(self.model["pch_rule"]["before_normal_header"]) + self.assertFalse(self.model["pch_rule"]["observed"]) + + def test_patched_source_independent_postimage_controls(self): + for target, needles in { + "gcc/gcc.cc": [b'prefix_info.name = (const char *) prefixed_name;', b'#include "distro-defaults.h"'], + "gcc/incpath.cc": [b"char *rp = lrealpath (str);"], + "gcc/config/i386/t-linux64": [b"m64=../lib$(call if_multiarch,:x86_64-linux-gnu)"], + }.items(): + data = self.corpus[rules.BASE + target] + record = next(x for x in self.model["definite_patch_projection"] if x["target"] == target) + for patch in record["patches"]: + data, receipt = rules.project_patch(data, + self.corpus[rules.PATCH_BASE + "patches/" + patch["patch"]], target) + self.assertTrue(all(h["exact_context"] for h in receipt)) + self.assertEqual(rules.sha256(data), record["definite_patch_projection_sha256"]) + for needle in needles: self.assertIn(needle, data) + + def test_glibc_automatic_preinclude_source(self): + source = self.corpus[rules.BASE + "gcc/config/glibc-c.cc"].decode() + self.assertIn('#define TARGET_C_PREINCLUDE glibc_c_preinclude', source) + self.assertIn('return "stdc-predef.h";', source) + self.assertEqual(self.model["automatic_preinclude"]["name"], "stdc-predef.h") + self.assertFalse(self.model["automatic_preinclude"]["effective"]) + + def test_ubuntu_generator_branch_controls(self): + text = self.corpus[rules.PATCH_BASE + "rules.patch"].decode() + values = rules._fixed_build_values(self.corpus) + noble = rules.derive_distro_defines(text, values) + jammy = rules.derive_distro_defines(text, dict(values, distrelease="jammy")) + first = noble["definite_under_build_values"]["DIST_DEFAULT_FORTIFY_SOURCE"]["directive"] + second = jammy["definite_under_build_values"]["DIST_DEFAULT_FORTIFY_SOURCE"]["directive"] + self.assertEqual(first.rsplit(" ", 1)[1], "3") + self.assertEqual(second.rsplit(" ", 1)[1], "2") + self.assertTrue(any("DIST_DEFAULT_SSP " in x["directive"] for x in noble["conditional"])) + + def test_command_environment_and_stage_mutations_rejected(self): + for index, value in [(0, "/usr/bin/gcc"), (4, "-O2"), (5, "-std=gnu11"), + (9, "-I/tmp"), (10, "/outside.c"), (11, "--output")]: + changed = list(self.command); changed[index] = value + with self.subTest(index=index): + with self.assertRaises(rules.UnsupportedConfiguration): + rules._validate_command(changed, rules.NATIVE_ENVIRONMENT, self.cwd) + for environment in [dict(rules.NATIVE_ENVIRONMENT, CPATH="/tmp"), + dict(rules.NATIVE_ENVIRONMENT, PATH="/usr/local/bin:/usr/bin:/bin")]: + with self.assertRaises(rules.UnsupportedConfiguration): + rules._validate_command(self.command, environment, self.cwd) + with self.assertRaises(rules.UnsupportedConfiguration): + rules._validate_command(self.command, rules.NATIVE_ENVIRONMENT, "/finite-fixture/../stage") + + def test_native_bytes_environment_supported(self): + environment = {key.encode(): value.encode() for key,value in rules.NATIVE_ENVIRONMENT.items()} + rules._validate_command(self.command, environment, self.cwd) + + def test_effective_constructor_refuses_even_positive_model(self): + claimed = dict(self.model, full_C05=True, execution_ready=True, + effective_include_chain_proven=True, frontier=[]) + self.assertTrue(claimed["full_C05"]) + with self.assertRaises(rules.IncompleteConfiguration) as caught: + rules.construct_effective_configuration(self.corpus, self.command, + rules.NATIVE_ENVIRONMENT, self.cwd) + self.assertFalse(caught.exception.model["full_C05"]) + self.assertTrue(caught.exception.model["frontier"]) + + def test_no_original_credit_or_caps_changed(self): + self.assertFalse(self.model["full_C05"]) + self.assertFalse(self.model["full_V03"]) + self.assertFalse(self.model["original_target_executed"]) + self.assertEqual(self.model["new_scientific_activity_credit"], 0) + self.assertEqual(self.model["original_caps"]["rows"], 512) + self.assertEqual(self.model["original_caps"]["file_bytes"], 67108864) + self.assertEqual(self.model["original_caps"]["capture_bytes"], 268435456) + self.assertEqual(self.model["physical_costs"], "OPEN_NOT_ZERO") + + +if __name__ == "__main__": + unittest.main(verbosity=2) diff --git a/research/h25-c05-v03-input-constructors/implementation/c05_gcc_rules_v1.py b/research/h25-c05-v03-input-constructors/implementation/c05_gcc_rules_v1.py new file mode 100644 index 0000000000..599daeec73 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/implementation/c05_gcc_rules_v1.py @@ -0,0 +1,586 @@ +"""Bounded, passive source derivation for one original GCC command shape. + +This module neither imports archived code nor executes GCC, make, patch, shell +recipes, native targets or diagnostics. It derives a *conditional source model*. +An effective configuration is deliberately unavailable until its named frontier +is closed. Source identity is not a reproducible-build or installed-semantics +proof. All public results retain full_C05=False and execution_ready=False. +""" + +from __future__ import annotations + +import hashlib +import json +import posixpath +import re +import shlex +from pathlib import Path +from typing import Mapping, Sequence + + +PINSET_SHA256 = "5564d0d2b47a5803c96b3767d838676e8f2427089e3b02cda1b1e62430a3c24d" +PINSET_NAME = "c05_gcc_rules_sourcepins_v1.json" +COMPILER = "/usr/bin/x86_64-linux-gnu-gcc-13" +COMPILER_SHA256 = "1b99826121ae6682a634e5efe09bd3e3df58ce58e0b28f849114ab5b89139c26" +FIXED_OPTIONS = ("-nostartfiles", "-shared", "-fPIC", "-O3", "-std=c11", + "-Wall", "-Wextra", "-Werror", "-I/usr/include/python3.12") +NATIVE_ENVIRONMENT = { + "PATH": "/usr/bin:/bin", "PYTHONHASHSEED": "0", "LANG": "C.UTF-8", + "LC_ALL": "C.UTF-8", "TZ": "UTC", "PYTHONDONTWRITEBYTECODE": "1", +} +BASE = "gcc-base-selected/" +PACKAGING = "gcc-13_13.3.0-6ubuntu2~24.04.1-selected/debian/" +PATCH_BASE = "gcc-debian-patch-inputs/debian/" +MAX_SOURCE_FILE = 4 * 1024 * 1024 +MAX_SOURCE_TOTAL = 16 * 1024 * 1024 +ORIGINAL_CAPS = {"rows": 512, "file_bytes": 64 * 1024 * 1024, + "capture_bytes": 256 * 1024 * 1024, + "depth": 24, "nodes": 65536, "string": 8192, + "aggregate_text": 524288, "sequence_or_mapping": 1024, + "raw_record_bytes": 1048576} + + +class UnsupportedConfiguration(ValueError): + """The supplied configuration is outside the single supported source scope.""" + + +class IncompleteConfiguration(UnsupportedConfiguration): + def __init__(self, model: dict): + self.model = model + super().__init__("effective configuration unproved: " + ", ".join( + item["id"] for item in model["frontier"])) + + +class UnknownMakeValue(ValueError): + pass + + +def sha256(data: bytes) -> str: + return hashlib.sha256(data).hexdigest() + + +def pinned_manifest() -> dict: + raw = Path(__file__).with_name(PINSET_NAME).read_bytes() + if sha256(raw) != PINSET_SHA256: + raise UnsupportedConfiguration("source pinset identity mismatch") + data = json.loads(raw) + if data["schema"] != "c05-gcc-rule-sourcepins-v1": + raise UnsupportedConfiguration("unsupported source pinset schema") + return data + + +def verify_source_bytes(corpus: Mapping[str, bytes]) -> None: + expected = {item["path"]: item for item in pinned_manifest()["files"]} + if set(corpus) != set(expected): + raise UnsupportedConfiguration("source corpus must match exact pinned key set") + total = 0 + for name, value in corpus.items(): + if type(value) is not bytes or len(value) > MAX_SOURCE_FILE: + raise UnsupportedConfiguration("source type/size: " + name) + total += len(value) + if (total > MAX_SOURCE_TOTAL or len(value) != expected[name]["bytes"] + or sha256(value) != expected[name]["sha256"]): + raise UnsupportedConfiguration("source content identity/size: " + name) + + +def load_pinned_sources(source_artifacts: str | Path) -> dict[str, bytes]: + """Read only the 162 explicitly pinned data files; no discovery or import.""" + root = Path(source_artifacts) + corpus = {} + for item in pinned_manifest()["files"]: + path = root / item["path"] + with path.open("rb") as stream: + corpus[item["path"]] = stream.read(item["bytes"] + 1) + verify_source_bytes(corpus) + return corpus + + +def _text(corpus: Mapping[str, bytes], name: str) -> str: + return corpus[name].decode("utf-8", "strict") + + +def source_ref(corpus: Mapping[str, bytes], name: str, needle: str) -> dict: + text = _text(corpus, name) + if needle not in text: + raise UnsupportedConfiguration("missing source anchor: " + name + ": " + needle) + index = text.index(needle) + return {"path": name, "sha256": sha256(corpus[name]), + "line": text[:index].count("\n") + 1, "anchor": needle} + + +def _split_arguments(text: str) -> list[str]: + """Split commas outside nested $(...), without interpreting any recipe.""" + result, start, depth = [], 0, 0 + for index, char in enumerate(text): + if char == "(": + depth += 1 + elif char == ")": + depth -= 1 + if depth < 0: + raise UnsupportedConfiguration("unbalanced make expression") + elif char == "," and depth == 0: + result.append(text[start:index]) + start = index + 1 + if depth: + raise UnsupportedConfiguration("unbalanced make expression") + result.append(text[start:]) + return result + + +def expand_make_data(text: str, values: Mapping[str, str], depth: int = 0) -> str: + """Tiny rejecting data evaluator: variables, filter, findstring, if only. + + Unknown variables stay unknown; $(shell ...) is never executed or treated as + empty. This is not GNU make and does not claim to evaluate package recipes. + """ + if depth > 24 or len(text) > 8192: + raise UnsupportedConfiguration("make expression bound") + output, index = [], 0 + while index < len(text): + if text[index] != "$": + output.append(text[index]); index += 1; continue + if not text.startswith("$(", index): + raise UnknownMakeValue("unsupported dollar expression: " + text[index:]) + end, level = index + 2, 1 + while end < len(text) and level: + if text[end] == "(": level += 1 + elif text[end] == ")": level -= 1 + end += 1 + if level: + raise UnsupportedConfiguration("unbalanced make expression") + inner = text[index + 2:end - 1] + head = re.match(r"([A-Za-z_][\w-]*)(?:\s+)(.*)\Z", inner, re.S) + if not head: + if inner not in values: + raise UnknownMakeValue(inner) + value = values[inner] + else: + function, arguments = head.groups() + parts = _split_arguments(arguments) + if function == "if": + if len(parts) not in (2, 3): + raise UnsupportedConfiguration("make if arity") + condition = expand_make_data(parts[0], values, depth + 1).strip() + selected = parts[1] if condition else (parts[2] if len(parts) == 3 else "") + value = expand_make_data(selected, values, depth + 1) + elif function in ("findstring", "filter") and len(parts) == 2: + left, right = (expand_make_data(p, values, depth + 1) for p in parts) + if function == "findstring": + value = left if left in right else "" + else: + patterns = left.split() + def matches(word: str, pattern: str) -> bool: + # GNU make filter permits one percent wildcard. + if pattern.count("%") > 1: + raise UnknownMakeValue("multiple filter percent wildcards") + return bool(re.fullmatch(re.escape(pattern).replace("%", ".*"), word)) + value = " ".join(w for w in right.split() + if any(matches(w, p) for p in patterns)) + else: + raise UnknownMakeValue("unsupported make function: " + function) + output.append(value); index = end + return "".join(output) + + +def _condition(text: str, values: Mapping[str, str]) -> bool | None: + match = re.fullmatch(r"(ifeq|ifneq)\s*\((.*)\)", text) + if not match: + raise UnsupportedConfiguration("unsupported conditional: " + text) + arguments = _split_arguments(match[2]) + if len(arguments) != 2: + raise UnsupportedConfiguration("conditional arity") + try: + # Make strips whitespace around parenthesized conditional operands. + left, right = (expand_make_data(a.strip(), values) for a in arguments) + except UnknownMakeValue: + return None + equal = left == right + return equal if match[1] == "ifeq" else not equal + + +def _and(a: bool | None, b: bool | None) -> bool | None: + return False if a is False or b is False else (True if a is True and b is True else None) + + +def _or(a: bool | None, b: bool | None) -> bool | None: + return True if a is True or b is True else (False if a is False and b is False else None) + + +def _not(value: bool | None) -> bool | None: + return None if value is None else not value + + +def _logical_lines(text: str): + pending, start = "", 0 + for number, line in enumerate(text.splitlines(), 1): + if not pending: start = number + if line.rstrip().endswith("\\"): + pending += line.rstrip()[:-1] + " " + else: + yield start, pending + line + pending = "" + if pending: + raise UnsupportedConfiguration("unterminated make continuation") + + +def _annotated_lines(text: str, values: Mapping[str, str]): + """Yield recipe/data lines with three-valued conditional provenance.""" + stack, active = [], True + for number, raw in _logical_lines(text): + line = raw.strip() + if not line or line.startswith("#"): + continue + if line.startswith(("ifeq", "ifneq")): + result = _condition(line, values) if active is not False else False + stack.append({"parent": active, "taken": result, + "expression": line, "result": result}) + active = _and(active, result) + elif line == "else" or line.startswith("else if") or line.startswith("else #"): + if not stack: + raise UnsupportedConfiguration("unmatched else") + frame = stack[-1] + tail = line[4:].strip() + test = _condition(tail, values) if tail.startswith("if") else True + active = _and(frame["parent"], _and(_not(frame["taken"]), test)) + frame["taken"] = _or(frame["taken"], test) + frame["expression"] = line + frame["result"] = active + elif line.startswith("endif"): + if not stack: + raise UnsupportedConfiguration("unmatched endif") + active = stack.pop()["parent"] + else: + conditions = [{"expression": f["expression"], "value": f["result"]} + for f in stack] + yield number, raw, active, conditions + if stack: + raise UnsupportedConfiguration("unterminated condition") + + +def select_patch_data(text: str, values: Mapping[str, str]) -> dict: + """Read the declarative patch-selection prefix, stopping before recipes.""" + prefix = text.split("series_stamp =", 1)[0] + definite = {"debian_patches": [], "hardening_patches": []} + conditional, records = [], [] + for number, raw, active, conditions in _annotated_lines(prefix, values): + match = re.fullmatch(r"\s*(debian_patches|hardening_patches)\s*(\+?=)\s*(.*)", raw) + if not match or active is False: + continue + variable, operator, expression = match.groups() + try: + names = expand_make_data(expression.strip(), values).split() + except UnknownMakeValue as error: + conditional.append({"expression": expression, "reason": str(error), + "line": number, "conditions": conditions}) + continue + if operator == "=" and active is not True: + raise UnsupportedConfiguration("unresolved patch-list reset") + if operator == "=": definite[variable] = [] + for name in names: + if not re.fullmatch(r"[\w+.\-]+", name): + raise UnsupportedConfiguration("unsupported patch name") + record = {"patch": name + ".diff", "line": number, + "selected": active, "list": variable, "conditions": conditions} + records.append(record) + if active is True: definite[variable].append(name + ".diff") + else: conditional.append(record) + # rules.patch appends hardening only for non-trunk builds. + if values.get("trunk_build") == "yes": + hardening = [] + elif "trunk_build" in values: + hardening = definite["hardening_patches"] + else: + raise UnsupportedConfiguration("unknown trunk build") + return {"definitely_selected": definite["debian_patches"] + hardening, + "conditional": conditional, "records": records, + "executed_make": False} + + +def _patch_target(path: str) -> str: + path = path.split("\t", 1)[0].split(" ", 1)[0] + for prefix in ("a/", "b/"): + if path.startswith(prefix): path = path[len(prefix):] + if path.startswith("src/"): path = path[4:] + return path + + +def patch_targets(patch: bytes) -> list[str]: + return list(dict.fromkeys(_patch_target(line[4:]) + for line in patch.decode().splitlines() if line.startswith("+++ "))) + + +def project_patch(base: bytes, patch: bytes, target: str) -> tuple[bytes, list[dict]]: + """Apply only exact textual hunks to an in-memory selected file. + + Unique exact context relocation is permitted and recorded. No fuzz, + whitespace repair, patch process, source mutation or generated code runs. + """ + lines = base.splitlines(keepends=True) + patch_lines = patch.splitlines(keepends=True) + index, current, displacement, receipt = 0, None, 0, [] + while index < len(patch_lines): + raw = patch_lines[index] + if current == target and raw.startswith(b"\\ No newline at end of file"): + raise UnsupportedConfiguration("non-LF patch hunk unsupported") + if raw.startswith(b"+++ "): + current = _patch_target(raw[4:].decode().rstrip("\r\n")) + match = re.match(rb"@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@", raw) + if match is None or current != target: + index += 1; continue + old_start, old_count, new_start, new_count = ( + int(match[1]), int(match[2] or b"1"), int(match[3]), int(match[4] or b"1")) + before, after = [], [] + index += 1 + while index < len(patch_lines) and (len(before) < old_count or len(after) < new_count): + line = patch_lines[index] + if line.startswith(b" "): before.append(line[1:]); after.append(line[1:]) + elif line.startswith(b"-"): before.append(line[1:]) + elif line.startswith(b"+"): after.append(line[1:]) + elif line.startswith(b"\\ No newline at end of file"): + raise UnsupportedConfiguration("non-LF patch hunk unsupported") + else: raise UnsupportedConfiguration("malformed hunk body") + index += 1 + if len(before) != old_count or len(after) != new_count or not before: + raise UnsupportedConfiguration("hunk count or insertion-only frontier") + expected = old_start - 1 + displacement + if lines[expected:expected + len(before)] == before: + location = expected + else: + matches = [i for i in range(len(lines) - len(before) + 1) + if lines[i:i + len(before)] == before] + if len(matches) != 1: + raise UnsupportedConfiguration("nonunique/missing exact patch context: " + target) + location = matches[0] + lines[location:location + len(before)] = after + receipt.append({"old_line": old_start, "new_line": new_start, + "actual_old_line": location + 1, "old_count": old_count, + "new_count": new_count, "exact_context": True}) + displacement = location - (old_start - 1) + new_count - old_count + return b"".join(lines), receipt + + +def _fixed_build_values(corpus: Mapping[str, bytes]) -> dict[str, str]: + build = json.loads(corpus["gcc-13-x86-64-linux-gnu-BUILD-v1.json"]) + embedded = json.loads(corpus["../evidence/EMBEDDED-CONFIGURATION-v1.json"]) + if (build.get("source_package_name") != "gcc-13" + or build.get("source_package_version") != "13.3.0-6ubuntu2~24.04.1" + or build.get("arch_tag") != "amd64" + or not build.get("distro_series_link", "").endswith("/noble") + or embedded.get("path") != COMPILER or embedded.get("sha256") != COMPILER_SHA256 + or len(embedded.get("matches", [])) != 1): + raise UnsupportedConfiguration("fixed build/configuration metadata mismatch") + tokens = shlex.split(embedded["matches"][0]) + required = ("--prefix=/usr", "--libdir=/usr/lib", "--libexecdir=/usr/libexec", + "--program-prefix=x86_64-linux-gnu-", "--program-suffix=-13", + "--enable-multiarch", "--enable-multilib", "--enable-default-pie", + "--with-abi=m64", "--with-gcc-major-version-only", + "--with-multilib-list=m32,m64,mx32", "--build=x86_64-linux-gnu", + "--host=x86_64-linux-gnu", "--target=x86_64-linux-gnu") + if any(tokens.count(token) != 1 for token in required): + raise UnsupportedConfiguration("unsupported configure metadata") + # Values below follow metadata + native build premise + named rules.defs + # branches. Unproved optional language/build overrides stay UNKNOWN. + return {"PKGSOURCE": "gcc-13", "distrelease": "noble", "derivative": "Ubuntu", + "DEB_TARGET_ARCH": "amd64", "DEB_TARGET_ARCH_OS": "linux", + "build_type": "build-native", "DEB_CROSS": "", "single_package": "", + "trunk_build": "", "GFDL_INVARIANT_FREE": "no", + "with_multiarch_cxxheaders": "yes", "with_ada": "yes", + "multilib": "yes", "biarch64": "no", "biarchhfarchs": "", + "biarchsfarchs": "", "with_async_unwind": "yes", + "with_stack_clash": "yes", "with_cf_protection": "yes", + "with_timet64": "", "no_timet64_distreleases": + "jessy stretch buster bullseye bookworm precise trusty xenial bionic focal jammy kinetic lunar mantic"} + + +def derive_distro_defines(rules_patch: str, values: Mapping[str, str]) -> dict: + """Extract literal echo data from the named generator; do not execute it.""" + lines = rules_patch.splitlines() + start = next(i for i, line in enumerate(lines) + if ': # generate the distro-defaults.h header' in line) + end = next(i for i in range(start + 1, len(lines)) if lines[i].strip() == 'mv pxxx $@') + definite, conditional = {}, [] + for number, raw, active, conditions in _annotated_lines("\n".join(lines[start:end]), values): + for match in re.finditer(r"echo '?(#define\s+([A-Z0-9_]+)\s+[^';]+)'", raw): + # A recipe continuation can contain several echo statements. Locate + # each exact directive in the physical source rather than assigning + # every one the continuation's first line number. + physical_line = rules_patch[:rules_patch.index(match[1])].count("\n") + 1 + record = {"directive": match[1], "line": physical_line, "conditions": conditions} + if active is True: definite[match[2]] = record + elif active is None: conditional.append(record) + return {"definite_under_build_values": definite, "conditional": conditional, + "generated_header_observed": False, "executed_recipe": False} + + +def _validate_command(command: Sequence[str], environment: Mapping, cwd: str) -> None: + if (not isinstance(command, (list, tuple)) or len(command) != 13 + or any(type(v) is not str or "\0" in v for v in command) + or command[0] != COMPILER or tuple(command[1:10]) != FIXED_OPTIONS + or command[11] != "-o"): + raise UnsupportedConfiguration("unsupported original command shape/options") + if type(cwd) is not str or not cwd.startswith("/") or "\0" in cwd: + raise UnsupportedConfiguration("cwd must be an explicit absolute stage path") + if posixpath.normpath(cwd) != cwd or cwd == "/": + raise UnsupportedConfiguration("cwd must be a normalized non-root stage path") + for index in (10, 12): + path = command[index] + if not path.startswith(cwd + "/") or posixpath.normpath(path) != path: + raise UnsupportedConfiguration("source/output must be stage-bound absolute occurrences") + if not command[10].endswith(".c") or command[10] == command[12]: + raise UnsupportedConfiguration("unsupported source/output occurrence") + normalized = {} + for key, value in environment.items(): + if type(key) not in (str, bytes) or type(value) not in (str, bytes): + raise UnsupportedConfiguration("native environment type") + key = key.decode("ascii") if type(key) is bytes else key + value = value.decode("ascii") if type(value) is bytes else value + if key in normalized: raise UnsupportedConfiguration("duplicate normalized environment key") + normalized[key] = value + if normalized != NATIVE_ENVIRONMENT: + raise UnsupportedConfiguration("native environment must match the exact six-entry launch context") + + +def construct_fixed_rule_model(corpus: Mapping[str, bytes], command: Sequence[str], + native_environment: Mapping, cwd: str) -> dict: + """Construct source-derived candidates, never an admitted effective chain. + + The source/output occurrences are recorded, not authenticated as the six + originals. That binding remains the owning C05 constructor's obligation. + """ + verify_source_bytes(corpus) + _validate_command(command, native_environment, cwd) + values = _fixed_build_values(corpus) + selection = select_patch_data(_text(corpus, PATCH_BASE + "rules.patch"), values) + selection["scope"] = "Under the stated metadata-aligned fixed build values; unrecorded build overrides and conditional selections are not resolved." + projection, projection_frontier = [], [] + for name in sorted(k for k in corpus if k.startswith(BASE)): + target, data = name[len(BASE):], corpus[name] + applied = [] + for patch in selection["definitely_selected"]: + key = PATCH_BASE + "patches/" + patch + if key not in corpus: + projection_frontier.append({"patch": patch, "reason": "selected patch bytes missing"}) + continue + if target not in patch_targets(corpus[key]): continue + try: + result, receipt = project_patch(data, corpus[key], target) + except UnsupportedConfiguration as error: + projection_frontier.append({"target": target, "patch": patch, "reason": str(error)}) + # Later hunks no longer have a known predecessor; do not repair. + break + data = result + applied.append({"patch": patch, "patch_sha256": sha256(corpus[key]), "hunks": receipt}) + projection.append({"target": target, "base_sha256": sha256(corpus[name]), + "definite_patch_projection_sha256": sha256(data), "patches": applied, + "installed_applied_equivalence_proven": False}) + refs = { + "defaults": source_ref(corpus, BASE + "gcc/cppdefault.cc", "const struct default_include cpp_include_defaults[]"), + "preprocessor_defines": source_ref(corpus, BASE + "gcc/Makefile.in", "PREPROCESSOR_DEFINES ="), + "directory_identity": source_ref(corpus, BASE + "gcc/incpath.cc", "remove_duplicates (cpp_reader"), + "chain_merge": source_ref(corpus, BASE + "gcc/incpath.cc", "merge_include_chains (const char *sysroot"), + "automatic_specs": source_ref(corpus, BASE + "gcc/gcc.cc", 'find_a_file (&startfile_prefixes, "specs", R_OK, true)'), + "override_specs": source_ref(corpus, BASE + "gcc/gcc.cc", "strcat (specs_file, spec_machine_suffix);"), + "environment_rebuild": source_ref(corpus, BASE + "gcc/gcc.cc", 'putenv_from_prefixes (&exec_prefixes, "COMPILER_PATH", false)'), + "relocation": source_ref(corpus, BASE + "gcc/gcc.cc", "gcc_exec_prefix = get_relative_prefix"), + "pch": source_ref(corpus, BASE + "libcpp/files.cc", 'static const char extension[] = ".gch";'), + "pch_order": source_ref(corpus, BASE + "libcpp/files.cc", "if (pch_open_file (pfile, file, invalid_pch))"), + "preinclude": source_ref(corpus, BASE + "gcc/config/glibc-c.cc", 'return "stdc-predef.h";'), + "preinclude_condition": source_ref(corpus, BASE + "gcc/c-family/c-opts.cc", "if (flag_hosted && std_inc && !cpp_opts->preprocessed)"), + "prefixed_as_ld": source_ref(corpus, PATCH_BASE + "patches/gcc-search-prefixed-as-ld.diff", "/* search for the -as / -ld first. */"), + "canonical_paths": source_ref(corpus, PATCH_BASE + "patches/canonical-cpppath.diff", "char *rp = lrealpath (str);"), + "multiarch": source_ref(corpus, PATCH_BASE + "patches/gcc-multiarch.diff", "MULTIARCH_DIRNAME = $(call if_multiarch,x86_64-linux-gnu)"), + "multilib": source_ref(corpus, PATCH_BASE + "patches/gcc-multilib-multiarch.diff", "MULTILIB_OSDIRNAMES = m64=../lib$(call if_multiarch,:x86_64-linux-gnu)"), + "distro_generator": source_ref(corpus, PATCH_BASE + "rules.patch", ": # generate the distro-defaults.h header"), + "link_emulation": source_ref(corpus, BASE + "gcc/config/i386/linux64.h", '#define GNU_USER_LINK_EMULATION64 "elf_x86_64"'), + "startfiles_condition": source_ref(corpus, BASE + "gcc/gcc.cc", "%{!nostdlib:%{!r:%{!nostartfiles:%S}}}"), + "libc_selection": source_ref(corpus, BASE + "gcc/config/gnu-user.h", "#define LIB_SPEC GNU_USER_TARGET_LIB_SPEC"), + "build_native": source_ref(corpus, PACKAGING + "rules.defs", "build_type = build-native"), + "multiarch_cxx_branch": source_ref(corpus, PACKAGING + "rules.defs", "with_multiarch_cxxheaders := yes"), + "ubuntu_gfdl": source_ref(corpus, PACKAGING + "rules.defs", "GFDL_INVARIANT_FREE := no"), + "installed_layout": source_ref(corpus, PACKAGING + "rules2", "gcc_lexec_dir\t= $(libexecdir)/$(gcc_subdir_name)/$(TARGET_ALIAS)/$(versiondir)"), + } + target, version = "x86_64-linux-gnu", "13" + libsubdir = "/usr/lib/gcc/" + target + "/" + version + libexecsubdir = "/usr/libexec/gcc/" + target + "/" + version + include_templates = [ + ("bracket", "/usr/include/python3.12", "explicit -I", False), + ("system", libsubdir + "/include", "GCC_INCLUDE_DIR", False), + ("system", "/usr/local/include/" + target, "LOCAL_INCLUDE_DIR + multiarch", True), + ("system", "/usr/local/include", "LOCAL_INCLUDE_DIR", True), + ("system", libsubdir + "/include-fixed/" + target, "FIXED_INCLUDE_DIR + multiarch", False), + ("system", libsubdir + "/include-fixed", "FIXED_INCLUDE_DIR", False), + ("system", "/usr/" + target + "/include", "TOOL_INCLUDE_DIR", False), + ("system", "/usr/include/" + target, "NATIVE_SYSTEM_HEADER_DIR + multiarch", True), + ("system", "/usr/include", "NATIVE_SYSTEM_HEADER_DIR", True), + ] + candidates = [{"chain": chain, "path": path, "rule": rule, "add_sysroot": sysroot, + "effective": False} for chain, path, rule, sysroot in include_templates] + frontier = [ + {"id": "GCC_GENERATED_CONFIGURATION_AND_BUILD_CORRESPONDENCE", + "needed": "Exact applied config.h/auto-host.h/tm.h/options.h/specs.h/multilib.h, generated distro-defaults.h and configured Makefile substitutions or an equivalent complete source derivation tied to the pinned installed driver/cc1/collect2 bytes."}, + {"id": "GCC_COMPLETE_TARGET_AND_RELOCATION_RULES", + "needed": "All selected tm_file headers and hooks, gcc/prefix.cc update_path, libiberty make_relative_prefix/lrealpath, target/default options; literal argv prefix alone does not decide runtime relocation/aliases."}, + {"id": "GCC_AUTOMATIC_AND_TRANSITIVE_SPECS_LOOKUPS", + "needed": "Actual ordered startfile-prefix specs lookups, independent standard_exec_prefix/target/specs lookup, selected contents and every reached specs include/function edge, with genuine errors."}, + {"id": "GCC_INCLUDE_DIRECTORY_IDENTITIES_AND_LOOKUPS", + "needed": "Actual stat errors, canonical paths, device/inode aliases, GCC directory deduplication and target include hooks before calling any template an effective chain."}, + {"id": "GCC_PCH_CONTENT_VALIDATION_AND_ORDER", + "needed": "Actual eligible .gch existence/type, readdir order and members, exact gcc/c-family/c-pch.cc validity rules and full selected PCH content dependencies."}, + {"id": "GCC_INITIAL_MACROS_AND_HEADER_CLOSURE", + "needed": "Applied option/target builtins, automatic stdc-predef.h and recursive file-producing preprocessing rules; generator defaults may be affected by external specs."}, + {"id": "GCC_SUBPROGRAM_COLLECT2_AND_LINK_INPUT_SELECTION", + "needed": "Exact exec/startfile prefix construction/expansion and access results, collect2 configured alternatives, subordinate environment and actual binutils/loader closure."}, + {"id": "C05_ORIGINAL_BINDING_NAMESPACE_INTERVAL_AND_CAPS", + "needed": "Authenticated six original path occurrences, actual content/negative lookup custody, namespace stability interval, owning process integration and fit under every unchanged original cap."}, + ] + if projection_frontier: + frontier.insert(0, {"id": "EXACT_TEXTUAL_PATCH_PROJECTION", "needed": projection_frontier}) + if selection["conditional"]: + frontier.insert(0, {"id": "GCC_CONDITIONAL_PATCH_SELECTION_AND_BUILD_OVERRIDES", + "needed": selection["conditional"]}) + return { + "schema": "c05-fixed-gcc-rule-model-v1", "full_C05": False, "full_V03": False, + "execution_ready": False, "effective_include_chain_proven": False, + "installed_applied_equivalence_proven": False, + "source_pinset_sha256": PINSET_SHA256, "compiler": COMPILER, + "compiler_sha256": COMPILER_SHA256, "command": list(command), "cwd": cwd, + "native_launch_environment": dict(NATIVE_ENVIRONMENT), + "original_occurrence_binding_proven": False, + "fixed_build_values": values, "build_values_override_absence_proven": False, + "patch_selection": selection, "definite_patch_projection": projection, + "conditional_distro_defines": derive_distro_defines(_text(corpus, PATCH_BASE + "rules.patch"), values), + "configuration_recipe": {"prefix": "/usr", "libdir": "/usr/lib", + "libexecdir": "/usr/libexec", "libsubdir": libsubdir, + "libexecsubdir": libexecsubdir, "target": target, "version": version, + "default_abi": "m64", "default_multiarch": target, + "default_os_multilib": "../lib", "default_pie": True, + "authoritative_generated_configuration": False}, + "include_templates_before_relocation_hooks_canonicalization_and_dedup": candidates, + "quote_source_directory_rule": "Search including file's directory first unless the exact include mechanism disables it; source and alias identity still required.", + "automatic_preinclude": {"name": "stdc-predef.h", "condition": "hosted && std_inc && !preprocessed with selected glibc targetcm", "effective": False}, + "automatic_specs_rules": [ + {"rule": "find_a_file(startfile_prefixes, specs, R_OK, do_multi=true)", "ordered_candidates_proven": False}, + {"rule": "independent access(STANDARD_EXEC_PREFIX + target/ + specs, R_OK)", + "configured_candidate": "/usr/lib/gcc/x86_64-linux-gnu/specs", "observed": False}], + "pch_rule": {"candidate": "consequential-header-path + .gch", "before_normal_header": True, + "eligibility": "first non-implicit-preinclude include and enabled valid_pch callback", + "directory_members": "readdir order, excluding . and .., until first valid candidate", "observed": False}, + "subprogram_root_templates": [libexecsubdir, libsubdir, "/usr/" + target + "/bin", "/usr/bin", "/bin"], + "subprogram_templates_are_complete_or_ordered": False, + "prefixed_as_ld_rule": "At each GCC file_at_path prefix, try x86_64-linux-gnu-as/ld before unprefixed as/ld; collect2 has its own configured search.", + "builtin_shared_link_recipe": {"emulation_candidate": "elf_x86_64", + "nostartfiles_suppresses": "startfile/endfile specs, not all standard libraries", + "dynamic_interpreter_for_shared_output": "GNU_USER_TARGET_LINK_SPEC guards the dynamic-linker option with !shared; toolchain ELF loading is a separate closure.", + "applied_effective_recipe_proven": False}, + "subordinate_environment_rule": "GCC may create GCC_EXEC_PREFIX and rebuilds COMPILER_PATH and LIBRARY_PATH from filtered configured prefix lists; launch-time absence is not subprocess absence.", + "source_evidence": refs, "frontier": frontier, "original_caps": dict(ORIGINAL_CAPS), + "original_target_executed": False, "new_scientific_activity_credit": 0, + "recorded_policy_debit_seconds": "94.550533479/2400", "physical_costs": "OPEN_NOT_ZERO", + } + + +def construct_effective_configuration(corpus: Mapping[str, bytes], command: Sequence[str], + native_environment: Mapping, cwd: str) -> dict: + """Fail closed: no caller-supplied chain or completeness boolean is trusted.""" + model = construct_fixed_rule_model(corpus, command, native_environment, cwd) + raise IncompleteConfiguration(model) diff --git a/research/h25-c05-v03-input-constructors/implementation/c05_header_edges_derivation_v1.md b/research/h25-c05-v03-input-constructors/implementation/c05_header_edges_derivation_v1.md new file mode 100644 index 0000000000..cca02f07a1 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/implementation/c05_header_edges_derivation_v1.md @@ -0,0 +1,67 @@ +# C05 literal header edge construction, v1 + +This is a new pure implementation increment. `full_C05=false` and `full_V03=false` remain unconditional. No original compiler, Root, provider, helper, archived module, native control, subprocess, build, or scientific workload was executed. There is no original activity or runtime qualification credit. + +## Input and output contract + +`extract_header_edges(data, SourceOccurrence(...))` takes immutable bytes and checks their exact declared SHA256 and size. The occurrence has an absolute logical pathname, a distinct occurrence identifier, acquisition provenance, and the exact originating search-position identity when known. Equal-byte occurrences remain distinct. An optional `is_primary_source` premise records whether GCC's primary-source `#include_next` override applies. A byte hash authenticates those supplied bytes; it does not itself authenticate their pathname, alias, originating position, ownership or observation interval. Output explicitly says so. + +The extractor returns literal `include`, `include_next`, `__has_include` and `__has_include_next` requests, unsupported frontier records, and separate lexical diagnostics. Filename and directive physical line numbers are distinct when splicing separates them. Every syntactically present conditional branch is scanned without evaluating guards. This yields a potential edge superset. It asserts neither that a request executes nor that it succeeds. A `lookup_only` probe does not entail header-content consumption. + +An empty unsupported frontier means that the bytes lie in the supported lexical language under the premises below. It is not a transitive-header certificate. The caller still must process every discovered selected header occurrence, including each distinct `include_next` origin; supply the exact configured search relation; resolve negative lookups and aliases; account for PCH; and meet namespace/currentness obligations. + +## Supported-language theorem and premises + +For a family of authenticated source occurrences, assume: + +1. The exact strict-C11 GCC frontend uses the selected source's ASCII-compatible input conversion, trigraph table, phase ordering and directive recognition semantics; exact Ubuntu applied-source correspondence remains a separate obligation. +2. Initial builtin and command-line macro state introduces no file-producing operator, nonliteral include operand, pragma, or assembler construct outside the scanned input family. Relevant configured preincludes and macro inputs are independently expanded into that family. +3. Every reachable occurrence has an empty unsupported frontier, and any caller-supplied external macro replacement lists satisfy the same special-operator/paste restrictions. +4. The compiler recognizes file-producing preprocessing operations only through the source forms covered below; other toolchain phases are independently covered by their own rules. + +Then every header-lookup spelling arising through a supported literal include directive or literal probe in an executed guard is among the extracted requests for its occurrence. Proof: phase 1 converts trigraphs before phase 2 removes escaped newlines, including within comments and strings. The lexical scan excludes comments, character constants and ordinary string literals from directive/operator recognition, while respecting header-name contexts. A directive name is lexed without macro expansion. Every source directive that can load a header therefore appears in the scan. Its filename is either the literal that is emitted or an explicit frontier. Both arms of every conditional are visited, so guard values cannot hide an active literal directive. Macro expansion cannot create a new preprocessing directive. A special builtin produced by macro expansion must either already occur as a literal identifier in a replacement/input token stream, in which case it is scanned, or be assembled by token pasting. Paste assessment either proves its fixed fragments cannot make any special file operator or creates an explicit frontier. + +The restricted header spelling alphabet is ASCII letters, digits, underscore, dot, slash, plus and hyphen. No filename is unescaped, lexically normalized, resolved, or opened. In particular `..` and absolute names retain their literal spelling; namespace resolution belongs to the caller. Other spellings are reported explicitly. Valid UTF-8 multibyte bytes in comments and ordinary string/character literals cannot introduce ASCII syntax under the input-conversion premise; bytes outside those contexts create a frontier. + +The ordinary lexical language supports block/line comments, escaped characters in ordinary strings/chars, multiline block comments inside directives, strict-C11 trigraphs, direct backslash-newline splicing, CRLF/bare-CR line endings, `#` and `%:` directives, literal includes and literal probes. Macro-computed include/probe operands, unknown directives, malformed lexical/conditional forms, relevant pragma forms, `_Pragma`, assembler tokens, non-ASCII/UCN identifiers, and GCC whitespace-before-newline splice extensions create explicit frontiers. Missing final newline is deliberately unsupported despite GCC's recovery behavior. + +`#pragma once` and `#pragma GCC system_header` are supported as non-file-producing diagnostics: selected libcpp bodies change once/system-header state and do not load an extra file. Conservative traversal may visit additional skipped content. Other pragmas remain unproved rather than being assumed irrelevant. Literal `_Pragma` and assembler tokens are conservatively refused even when their actual use might only alter warnings or symbol labels. A frontier is a missing supported-language argument, not evidence that its form actually caused an omitted file read. + +## Token pasting refinement + +The first broad census conservatively refused every `##`, dollar identifier, pragma and conditional nesting beyond 24. It is retained unchanged in `c05_header_edges_corpus_summary_v1.json` and `c05_header_edges_corpus_v1_000.json` through `_002.json`. Its 988 forms in 145 occurrences are historical diagnostics, not a demonstrated set of file dependencies. + +The refined scanner distinguishes token pasting that could synthesize a special operator from pasting whose fixed fragments make that impossible. For each contiguous paste chain in a macro definition it treats formal parameters as arbitrary fragments, including empty placemarkers, and fixed adjacent tokens as their literal spelling. It overapproximates possible concatenations by a regular expression. For every completed left paste prefix, if that expression cannot equal `_Pragma`, `__has_include`, `__has_include_next`, `asm`, `__asm` or `__asm__`, the chain is a diagnostic. Otherwise it is an unsupported potential synthesized-file-operator frontier. This analysis deliberately overapproximates actual argument validity and correlations. + +For example, `__GLIBC_USE_ ## F` cannot make any listed identifier; it does not obstruct the header edge theorem. `a ## b` can. The discriminating fixture defines `CAT(a,b) a##b` and uses `CAT(__has_,include)("hidden.h")` in a guard. Removing all token-paste frontiers without an equivalent argument would miss this potential lookup. Unscanned initial macro definitions and exact builtin recognition remain premises. + +GCC's default `dollars_in_ident=1` permits dollar identifiers. They cannot introduce a different ASCII special operator by themselves, so they are diagnostics rather than header-edge frontiers. The acquired package corpus includes a Fortran include with `!GCC$` forms; the corpus scan does not assert that this file is reachable in the original C11 commands. + +## Source argument + +All source references below are selected upstream GCC 13.3.0 base bytes retained under `source-artifacts/gcc-base-selected/libcpp/`. They do not independently discharge exact Ubuntu patch/configuration applicability. Sizes and SHA256 identities appear in the refined corpus summary and the named macro-source identity record. + +- `init.cc:64-69` supplies all nine trigraph replacements; the language table at `106-115` enables trigraphs for STDC11; `139-155` installs those options. `216` enables dollar identifiers. `434-438` registers include probes and `_Pragma` builtins. +- `lex.cc:936-1078`, `_cpp_clean_line`, performs trigraph conversion and escaped newline handling, normalizes CRLF/bare CR, and recognizes the whitespace-splice extension. The implementation flags that extension explicitly rather than treating it as ordinary supported C11. `1828-1915` supports block and line comment behavior, including cleaning lines inside multiline comments. `2808-2900`, `lex_string`, distinguishes strings/chars/header names and makes include-context terminators unescapable. +- `directives.cc:436-490`, `_cpp_handle_directive`, obtains a directive name using `_cpp_lex_token`. `773-833`, `parse_include`, explicitly permits filename macro expansion and copies header spelling; this implementation handles direct literals and refuses computed operands. `839-885` stacks the include; `895-923` distinguishes include/import/include-next, including primary-source include-next fallback. `1584-1593` handles once; `1748-1761` handles system-header; `1765-1790` demonstrates dependency pragmas can inspect another file. `1843-2015` processes `_Pragma` strings. +- `files.cc:1028-1064`, `search_path_head`, uses current `file->dir->next` for include-next, normal behavior for no-search-path/absolute origins, and different quote/angle heads. `2140-2154` routes header probes through that same search operation and preserves the distinction `err_no != ENOENT`, so the planner never collapses all errors into absence. +- `files.cc:275-350` appends `.gch`, may inspect a directory of PCH candidates and validates candidates. `377-432` intercepts ordinary opens through PCH handling. `pch.cc` is retained as supplementary PCH source, but this implementation does not parse or validate PCH inputs. +- `charset.cc:63-81` defines the internal ASCII-compatible source charset on this target; `2834-2945` covers input conversion/BOM handling. BOM/non-ASCII syntax is not silently adopted by this restricted scanner. + +`macro.cc:388-448` parses literal probe operands and routes include-next probes directly through `IT_INCLUDE_NEXT`, without the primary-source directive override; `927-985` spells/concatenates adjacent tokens, lexes the result from stage 3, and retains the successful left spelling on failure; `995-1065` completes paste chains in order. `1903-1945` uses unexpanded arguments adjacent to pastes, and expands arguments before ordinary insertion only when they are neither stringified nor pasted. These bodies corroborate the fixed-fragment overapproximation. The exact passive copy identity is `c05_header_edges_macro_source_v1.json`. + +## Search planning and remaining closure obligations + +`plan_literal_candidates` accepts `ConfiguredSearchPremise` containing exact head/successor position identities. These are caller premises, never a supplied completeness verdict. It preserves order and includes the source directory for ordinary quoted lookups when required. Include-next uses the actual originating position, even if directory strings repeat; primary-source include-next uses normal search. Absolute header spelling bypasses directory concatenation. Every candidate carries an unresolved `.gch` obligation. No lookup is performed and no candidate is declared present, absent, canonical, deduplicated or selected. The supplied chains must already reflect exact configured rules, aliases and identity deduplication. `full_C05` stays false. + +The limits are original caps: 512 edge/frontier/diagnostic rows per extraction, 64 MiB per input file, 256 MiB per capture, plain depth 24, 65,536 nodes, 8192 characters per string, 524,288 aggregate text, 1024 entries per sequence/mapping, and 1 MiB raw records. Plain-value limits are checked by `validate_plain`. A row overflow creates an explicit incomplete-frontier record; plain serialization overflow refuses rather than silently truncating. This module does not measure or certify an actual custody capture. The passive diagnostic corpus is 829 occurrences and therefore is not claimed as one admissible 512-row C05 inventory; its reports are divided into independently bounded plain records. + +The actual reached subset, configured search roots/defaults/builtins, observed names and errors, PCH candidate contents/validation, directory-identity deduplication, alias handling, immutable namespace mechanism and owning-parent/currentness interval remain integration work. Other driver/assembler/linker/loader inputs remain under their separate constructors. No generic worklist or caller `complete=true` flag is accepted as a proof of `W(D,Gamma) subset I`. + +## Verified diagnostic results + +The final refined passive scan authenticated all 829 acquired occurrences (6,208,998 bytes), extracted 1,452 literal requests, and preserved exactly 20 requests across the six original occurrences with no unsupported form in those six. The final refined corpus has 557 conservative frontier forms in 121 occurrences. Counts: 417 unproved pragma forms, 111 assembler forms, 20 potentially synthesized operators, 8 `_Pragma` forms and 1 missing final newline. Every form is located by retained-file identity, logical pathname, physical line and exact original byte-line spelling in the four `c05_header_edges_refined_corpus_v1_*.json` chunks. These are potential syntax obligations, not 557 demonstrated file reads. No macro-computed filename occurs in these acquired bytes under this scan; that observation alone does not discharge the unacquired reached subset. + +Concrete examples include `/usr/include/x86_64-linux-gnu/sys/cdefs.h:131` (`#define __CONCAT(x,y) x ## y`), its line 653 (`# define __glibc_macro_warning1(message) _Pragma (#message)`), and `/usr/include/python3.12/pyport.h:341` (`#define _Py_COMP_DIAG_PUSH _Pragma("GCC diagnostic push")`). The last forms may be provably non-file-producing with a separate pragma expansion/registration argument; this implementation does not silently adopt that argument. `/usr/include/features.h:188` is now a proven non-file-operator paste diagnostic under the stated paste theorem, not a frontier. + +The fresh standard-library fixture suite contains 33 passing tests. It imports only the adjacent new extractor. It checks inactive branches, comment/string/character masking, multiline block comments inside directives, trigraph-before-splice semantics, literal probes and presence tests, computed filename and builtin alias refusals, safe/unsafe paste discrimination, later paste failures, explicit VA_OPT refusal, source byte authentication, equal-byte occurrence identity, row/plain caps, quote/angle order, include-next origin identity, primary-source fallback, absolute-name preservation and unresolved PCH obligations. The final saved test log and receipt pin the exact files. diff --git a/research/h25-c05-v03-input-constructors/implementation/c05_header_edges_macro_source_v1.json b/research/h25-c05-v03-input-constructors/implementation/c05_header_edges_macro_source_v1.json new file mode 100644 index 0000000000..579aa87629 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/implementation/c05_header_edges_macro_source_v1.json @@ -0,0 +1,13 @@ +{ + "schema": "c05-header-edges-named-base-source-copy-v1", + "archive": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-13.3.0.tar.xz", + "archive_sha256": "0845e9621c9543a13f484e94584a49ffc0129970e9914624235fc1d061a0c083", + "member": "gcc-13.3.0/libcpp/macro.cc", + "member_headers_examined": 26963, + "target": "outputs/c05-v03-completion-20261102T055710Z/source-artifacts/gcc-base-selected/libcpp/macro.cc", + "bytes": 128781, + "sha256": "f196d4a1ea9f9dc7dceb04d365ea14eae90d76d419d5a001c36009857a3036d4", + "passive_tar_read_only": true, + "source_execution": false, + "exact_Ubuntu_patch_application_proven": false +} diff --git a/research/h25-c05-v03-input-constructors/implementation/c05_header_edges_test_v1.py b/research/h25-c05-v03-input-constructors/implementation/c05_header_edges_test_v1.py new file mode 100644 index 0000000000..71a45c2e8b --- /dev/null +++ b/research/h25-c05-v03-input-constructors/implementation/c05_header_edges_test_v1.py @@ -0,0 +1,216 @@ +"""Fresh synthetic fixtures only; imports only the adjacent newly written module.""" +import hashlib +import unittest +from c05_header_edges_v1 import ( + ConfiguredSearchPremise, EdgeError, SearchPosition, SourceOccurrence, + extract_header_edges, plan_literal_candidates, validate_plain, +) + + +def source(data, origin=None, name="/fixture/source.c", occurrence="fixture"): + return SourceOccurrence(occurrence, name, hashlib.sha256(data).hexdigest(), + len(data), "fresh synthetic fixture bytes", origin) + + +def scan(text, origin=None): + data = text.encode("ascii") + return extract_header_edges(data, source(data, origin)) + + +class LiteralEdges(unittest.TestCase): + def test_multitoken_argument_splits_paste_chain(self): + out = scan('#define P(a) 0 ## a ## include\n#if P(0 || __has_)("hidden.h")\n#endif\n') + self.assertFalse(out['supported_language_scan']) + self.assertIn('potential_synthesized_file_operator',self.codes(out)) + + def names(self, result): + return [(x["kind"], x["filename"]) for x in result["edges"]] + + def codes(self, result): + return {x["code"] for x in result["unsupported_frontier"]} + + def test_all_branches_includes(self): + out = scan('#if 0\n#include \n#else\n#include "active.h"\n#endif\n') + self.assertEqual(self.names(out), [("include", "inactive.h"), ("include", "active.h")]) + self.assertTrue(out["supported_language_scan"]) + self.assertFalse(out["full_C05"]) + + def test_comments_strings_chars_are_not_directives(self): + out = scan('/* #include */\n// #include \nchar *s = "#include ";\nchar q = \'"\';\n#include /*x*/ \n') + self.assertEqual(self.names(out), [("include", "good.h")]) + self.assertTrue(out["supported_language_scan"]) + + def test_spliced_line_comment(self): + out = scan('// masked\\\n#include \n#include \n') + self.assertEqual(self.names(out), [("include", "good.h")]) + + def test_phase1_before_phase2_and_comment(self): + out = scan('??=inc??/\nlude \n// hidden??/\n#include \n') + self.assertEqual(self.names(out), [("include", "yes.h")]) + self.assertEqual(out["edges"][0]["physical_line"], 2) + self.assertEqual(out["edges"][0]["directive_physical_line"], 1) + + def test_literal_probes_and_presence_tests(self): + out = scan('#if defined(__has_include) && __has_include /*c*/ ()\n#endif\n#ifdef __has_include\n#endif\n#if __has_include_next("y.h")\n#endif\n') + self.assertEqual(self.names(out), [("__has_include", "x.h"), ("__has_include_next", "y.h")]) + self.assertTrue(out["supported_language_scan"]) + + def test_computed_includes_and_probes_stop(self): + out = scan('#define HEADER "x.h"\n#include HEADER\n#if __has_include(HEADER)\n#endif\n') + self.assertEqual(self.names(out), []) + self.assertEqual(self.codes(out), {"macro_computed_or_malformed_include", "macro_computed_or_nonliteral_has_include"}) + self.assertFalse(out["supported_language_scan"]) + + def test_probe_macro_alias_and_paste_stop(self): + out = scan('#define H __has_include\n#define C(a,b) a ## b\n#define D(a,b) a %:%: b\n') + self.assertIn("macro_computed_or_nonliteral_has_include", self.codes(out)) + self.assertEqual(sum(x["code"] == "potential_synthesized_file_operator" for x in out["unsupported_frontier"]), 2) + + def test_fixed_prefix_paste_is_diagnostic(self): + out = scan('#define __GLIBC_USE(F) __GLIBC_USE_ ## F\n#include \n') + self.assertTrue(out["supported_language_scan"]) + self.assertEqual(out["lexical_diagnostics"][0]["code"], "non_file_operator_token_paste") + + def test_paste_can_hide_has_include(self): + out = scan('#define CAT(a,b) a##b\n#if CAT(__has_,include)("hidden.h")\n#endif\n') + self.assertFalse(out["supported_language_scan"]) + self.assertIn("potential_synthesized_file_operator", self.codes(out)) + + def test_failed_later_paste_does_not_hide_operator(self): + out = scan('#define X(a,b) a ## b ## +\n') + self.assertIn("potential_synthesized_file_operator", self.codes(out)) + + def test_va_opt_is_explicit_frontier(self): + out = scan('#define X(...) __VA_OPT__(__has_) ## include\n') + self.assertIn("unsupported_macro_va_opt", self.codes(out)) + + def test_paste_fixed_suffix_blocks_target(self): + self.assertTrue(scan('#define F(a,b) a ## _suffix ## b\n')["supported_language_scan"]) + + def test_safe_pragmas_and_dollar_are_diagnostics(self): + out = scan('#pragma once\n#pragma GCC system_header\nint name$;\n') + self.assertTrue(out["supported_language_scan"]) + self.assertEqual(len(out["lexical_diagnostics"]), 3) + + def test_digraph_directive(self): + self.assertEqual(self.names(scan('%:include \n')), [("include", "yes.h")]) + + def test_multiline_comment_inside_directive(self): + out = scan('# /*x\ny*/ include /*a\nb*/ \n') + self.assertEqual(self.names(out), [("include", "yes.h")]) + self.assertTrue(out["supported_language_scan"]) + self.assertEqual(out["edges"][0]["physical_line"], 3) + + def test_header_comment_text_is_not_removed(self): + out = scan('#include \n') + self.assertEqual(out["edges"], []) + self.assertIn("unsupported_header_spelling", self.codes(out)) + + def test_extensions_pragmas_and_asm_stop(self): + out = scan('#include \\ \t\n \n#pragma GCC dependency "other.h"\n_Pragma("once")\n__asm__(".incbin file");\n') + self.assertEqual(self.names(out), [("include", "x.h")]) + self.assertTrue({"gcc_whitespace_splice_extension", "unsupported_pragma", "unsupported_Pragma", "unsupported_assembler_construct"} <= self.codes(out)) + + def test_crlf_and_bare_cr(self): + out = scan('#include \r\n#include \r') + self.assertEqual(self.names(out), [("include", "a.h"), ("include", "b.h")]) + self.assertTrue(out["supported_language_scan"]) + + def test_quote_filename_backslash_not_unescaped(self): + self.assertIn("unsupported_header_spelling", self.codes(scan('#include "a\\b.h"\n'))) + + def test_unterminated_frontiers(self): + for text, code in [('"\n', "unterminated_string_or_char"), ('"x\\"\n', "unterminated_string_or_char"), ('/*x\n', "unterminated_block_comment"), ('#if 1\n', "unterminated_conditional"), ('#endif\n', "malformed_conditional_nesting"), ('#include \n' + a = extract_header_edges(data, source(data, occurrence="first")) + b = extract_header_edges(data, source(data, occurrence="second")) + self.assertNotEqual(a["source"]["occurrence_id"], b["source"]["occurrence_id"]) + self.assertEqual(a["source"]["sha256"], b["source"]["sha256"]) + + def test_authentication_rejects(self): + data = b'#include \n' + with self.assertRaises(EdgeError): + extract_header_edges(data + b' ', source(data)) + with self.assertRaises(EdgeError): + extract_header_edges(data, SourceOccurrence("x", "/x", "0" * 64, len(data), "fixture")) + + def test_row_cap_is_explicit(self): + out = scan('#include \n' * 600) + self.assertLessEqual(len(out["edges"]) + len(out["unsupported_frontier"]), 512) + self.assertIn("representation_row_cap", self.codes(out)) + self.assertFalse(out["supported_language_scan"]) + + def test_plain_caps(self): + for item in ([0] * 1025, "x" * 8193, {1: "x"}): + with self.subTest(kind=type(item).__name__), self.assertRaises(EdgeError): + validate_plain(item) + + +class SearchOrder(unittest.TestCase): + rules = ConfiguredSearchPremise( + (SearchPosition("q", "/q", "a"), SearchPosition("a", "/a", "b"), + SearchPosition("b", "/b", None)), "q", "a", "q", False, + "unverified fresh synthetic configuration") + + def edge(self, kind="include_next", delimiter="angle"): + return {"kind": kind, "filename": "x.h", "delimiter": delimiter} + + def plan(self, origin, kind="include_next", delimiter="angle"): + data = b'fixture\n' + return plan_literal_candidates(self.edge(kind, delimiter), source(data, origin), self.rules) + + def paths(self, result): + return [x["pathname"] for x in result["candidates"]] + + def test_next_uses_origin_position(self): + self.assertEqual(self.paths(self.plan("q")), ["/a/x.h", "/b/x.h"]) + self.assertEqual(self.paths(self.plan("a")), ["/b/x.h"]) + self.assertEqual(self.paths(self.plan("b")), []) + + def test_primary_include_next_uses_normal_start(self): + data = b"fixture\n" + occurrence = SourceOccurrence("primary", "/fixture/main.c", hashlib.sha256(data).hexdigest(), len(data), "fixture", "a", True) + out = plan_literal_candidates(self.edge(), occurrence, self.rules) + self.assertEqual(self.paths(out), ["/a/x.h", "/b/x.h"]) + + def test_next_quote_does_not_restart_at_source_directory(self): + self.assertEqual(self.paths(self.plan("a", delimiter="quote")), ["/b/x.h"]) + + def test_absolute_origin_falls_back_to_normal(self): + self.assertEqual(self.paths(self.plan(None)), ["/a/x.h", "/b/x.h"]) + self.assertEqual(self.paths(self.plan(None, delimiter="quote")), ["/fixture/x.h", "/q/x.h", "/a/x.h", "/b/x.h"]) + + def test_duplicate_directory_strings_do_not_erase_origins(self): + rules = ConfiguredSearchPremise((SearchPosition("one", "/same", "two"), SearchPosition("two", "/same", None)), "one", "one", "one", False, "fixture; intentionally unverified chain") + out = plan_literal_candidates(self.edge(), source(b'x', "one"), rules) + self.assertEqual(out["candidates"][0]["position"], "two") + self.assertFalse(out["configured_rules_verified"]) + + def test_missing_origin_rejected(self): + with self.assertRaises(EdgeError): + self.plan("missing") + + def test_pch_obligation_is_not_absence(self): + out = self.plan("a") + self.assertEqual(out["candidates"][0]["pch_pathname_obligation"], "/b/x.h.gch") + self.assertFalse(out["pch_behaviour_resolved"]) + self.assertFalse(out["namespace_observed"]) + self.assertFalse(out["full_C05"]) + + def test_absolute_spelling_preserved(self): + edge = {"kind": "include", "filename": "/exact/../x.h", "delimiter": "quote"} + out = plan_literal_candidates(edge, source(b'x'), self.rules) + self.assertEqual(self.paths(out), ["/exact/../x.h"]) + + def test_cycles_rejected(self): + rules = ConfiguredSearchPremise((SearchPosition("x", "/x", "x"),), "x", "x", "x", False, "fixture") + with self.assertRaises(EdgeError): + plan_literal_candidates(self.edge("include"), source(b'x'), rules) + + +if __name__ == "__main__": + unittest.main(verbosity=2) diff --git a/research/h25-c05-v03-input-constructors/implementation/c05_header_edges_v1.py b/research/h25-c05-v03-input-constructors/implementation/c05_header_edges_v1.py new file mode 100644 index 0000000000..d36c519ec5 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/implementation/c05_header_edges_v1.py @@ -0,0 +1,525 @@ +"""Pure conservative literal-header edges for C05; never an inventory admission. + +No filesystem, subprocess, compiler, archive or original-code execution occurs here. +Input hash/size authentication binds bytes to a claimed source occurrence; it does +not authenticate that occurrence's pathname, search origin, or acquisition interval. +See c05_header_edges_derivation_v1.md for the conditional soundness contract. +""" +from __future__ import annotations + +from bisect import bisect_right +from dataclasses import dataclass +import hashlib +import json +import re + +MAX_FILE_BYTES = 64 * 1024 * 1024 +MAX_CAPTURE_BYTES = 256 * 1024 * 1024 +MAX_ROWS = 512 +MAX_DEPTH = 24 +MAX_NODES = 65536 +MAX_STRING = 8192 +MAX_TEXT = 524288 +MAX_CONTAINER = 1024 +MAX_RAW = 1048576 +_TRIGRAPHS = dict(zip("=/'()!<>-", "#\\^[]|{}~")) +_IDENT = re.compile(r"[A-Za-z_$][A-Za-z_0-9$]*") +_HEADER = re.compile(r"[A-Za-z_0-9./+\-]+\Z") +_DIRECTIVES = frozenset(("define", "undef", "if", "ifdef", "ifndef", "elif", + "else", "endif", "error", "warning", "line")) +_PROBES = frozenset(("__has_include", "__has_include_next")) +_ASM = frozenset(("asm", "__asm", "__asm__")) + + +class EdgeError(ValueError): + """Invalid authentication, provenance shape, or configured-rule premise.""" + + +def validate_plain(value): + """Check the original plain-value representation caps before serialization.""" + count = text = 0 + def visit(item, depth): + nonlocal count, text + count += 1 + if depth > MAX_DEPTH or count > MAX_NODES: + raise EdgeError("plain depth/node cap") + if item is None or type(item) in (bool, int): + return + if type(item) is str: + if len(item) > MAX_STRING: + raise EdgeError("plain string cap") + text += len(item) + if text > MAX_TEXT: + raise EdgeError("plain aggregate text cap") + return + if type(item) in (list, tuple): + if len(item) > MAX_CONTAINER: + raise EdgeError("plain sequence cap") + for child in item: + visit(child, depth + 1) + return + if type(item) is dict: + if len(item) > MAX_CONTAINER: + raise EdgeError("plain mapping cap") + for key, child in item.items(): + if type(key) is not str: + raise EdgeError("plain non-string key") + visit(key, depth + 1) + visit(child, depth + 1) + return + raise EdgeError("non-plain value") + visit(value, 0) + if len(json.dumps(value, ensure_ascii=True, separators=(",", ":")).encode()) > MAX_RAW: + raise EdgeError("raw record cap") + return {"nodes": count, "text_characters": text} + + +@dataclass(frozen=True) +class SourceOccurrence: + occurrence_id: str + logical_path: str + expected_sha256: str + expected_size: int + acquisition_provenance: str + # A position identity is consequential even when two positions have equal + # directory strings. None is explicitly the libcpp no_search_path premise. + origin_position: str | None = None + is_primary_source: bool = False + + def checked(self, data): + if type(data) is not bytes or len(data) > MAX_FILE_BYTES: + raise EdgeError("source bytes/type/per-file cap") + if type(self.expected_size) is not int or self.expected_size != len(data): + raise EdgeError("source size authentication mismatch") + if type(self.expected_sha256) is not str or not re.fullmatch(r"[0-9a-f]{64}", self.expected_sha256): + raise EdgeError("invalid expected sha256") + if hashlib.sha256(data).hexdigest() != self.expected_sha256: + raise EdgeError("source sha256 authentication mismatch") + for value in (self.occurrence_id, self.logical_path, self.acquisition_provenance): + if type(value) is not str or not value or len(value) > MAX_STRING or "\0" in value: + raise EdgeError("invalid occurrence provenance") + if not self.logical_path.startswith("/"): + raise EdgeError("source logical path must be absolute") + if type(self.is_primary_source) is not bool: + raise EdgeError("invalid primary-source premise") + if self.origin_position is not None and ( + type(self.origin_position) is not str or not self.origin_position + or len(self.origin_position) > MAX_STRING): + raise EdgeError("invalid origin position") + + +@dataclass(frozen=True) +class _Token: + kind: str + value: str + line: int + column: int + + +def extract_header_edges(data: bytes, source: SourceOccurrence): + """Return literal lookup requests and explicit unsupported forms. + + Every conditional branch is visited. An empty frontier certifies only this + restricted lexical scan, subject to its stated language/source premises. + It does not establish actual activity, lookup success, closure or W subset I. + Header spelling is copied, never unescaped, normalized, resolved or opened. + """ + source.checked(data) + edges, frontier, diagnostics = [], [], [] + overflow = False + + def add_frontier(code, line, form, detail=""): + nonlocal overflow + if len(edges) + len(frontier) + len(diagnostics) >= MAX_ROWS - 1: + overflow = True + return + # Preserve exact forms within the original string cap; an overlong form + # creates its own explicit frontier rather than a silent truncation. + if len(form) > MAX_STRING: + code, detail = "overlong_source_form", "form sha256=" + hashlib.sha256(form.encode("latin1")).hexdigest() + form = "" + item = {"code": code, "physical_line": line, "form": form, "detail": detail} + if item not in frontier: + frontier.append(item) + + def diagnostic(code, line, form, detail=""): + nonlocal overflow + if len(edges) + len(frontier) + len(diagnostics) >= MAX_ROWS - 1: + overflow = True + return + if len(form) > MAX_STRING: + add_frontier("overlong_source_form", line, form) + return + item = {"code": code, "physical_line": line, "form": form, "detail": detail} + if item not in diagnostics: + diagnostics.append(item) + + def paste_assessment(tokens, directive): + # Adjacent-## operands are not macro-expanded before concatenation. + # Treat formal arguments as arbitrary fragments (including empty + # placemarkers); fixed tokens retain their spelling. This overapproximates + # every concatenation and can prove impossible dangerous identifiers. + if directive != "define" or len(tokens) < 3: + return {} + params, body_start = set(), 3 + if len(tokens) > 3 and tokens[3].value == "(": + close = next((n for n in range(4, len(tokens)) if tokens[n].value == ")"), None) + if close is None: + return {} + params = {t.value for t in tokens[4:close] if t.kind == "id"} + if any(t.value == "." for t in tokens[4:close]): + params.add("__VA_ARGS__") + body_start = close + 1 + answers = {} + targets = ("_Pragma", "__has_include", "__has_include_next", "asm", "__asm", "__asm__") + for index in range(body_start, len(tokens)): + if tokens[index].value != "##": + continue + left, right = index - 1, index + 1 + while left >= body_start + 2 and tokens[left - 1].value == "##": + left -= 2 + while right + 2 < len(tokens) and tokens[right + 1].value == "##": + right += 2 + if left < body_start or right >= len(tokens): + answers[index] = (False, "malformed paste operands") + continue + operands = tokens[left:right + 1:2] + # A formal argument can contain several preprocessing tokens. An + # interior argument can split this apparent chain into independent + # real paste chains, so fixed outer fragments prove no exclusion. + if any(t.value in params for t in operands[1:-1]): + answers[index] = (False, "interior macro argument may split paste chains") + continue + fragments = [".*" if t.value in params else re.escape(t.value) for t in operands] + # GCC may retain a successful left prefix if a later paste fails. + # Inspect every completed paste prefix, not only the final chain. + patterns = ["".join(fragments[:n]) for n in range(2, len(fragments) + 1)] + possible = [target for target in targets if any(re.fullmatch(pattern, target) for pattern in patterns)] + answers[index] = (not possible, "fixed-fragment paste cannot form file operators" if not possible + else "may synthesize " + ",".join(possible)) + return answers + + def add_edge(kind, token, depth): + nonlocal overflow + spelling = token.value[1:-1] + if not spelling or not _HEADER.fullmatch(spelling): + add_frontier("unsupported_header_spelling", token.line, token.value, + "supported filenames contain only ASCII letters, digits, underscore, dot, slash, plus and hyphen") + return + if len(spelling) > MAX_STRING: + add_frontier("overlong_header_spelling", token.line, "") + return + if len(edges) + len(frontier) + len(diagnostics) >= MAX_ROWS - 1: + overflow = True + return + edges.append({"kind": kind, "filename": spelling, + "delimiter": "quote" if token.value[0] == '"' else "angle", + "physical_line": token.line, "directive_physical_line": at, "phase2_column": token.column, + "conditional_depth": depth, + "origin_position": source.origin_position, + "lookup_only": kind in _PROBES}) + + # Phase 1: Unix GCC input newline normalization and the strict-C11 table. + # Latin1 is byte-preserving, not a claim that GCC's input charset is Latin1. + # Non-ASCII outside comments/string/char tokens is an unsupported frontier. + raw = data.decode("latin1").replace("\r\n", "\n").replace("\r", "\n") + physical = raw.split("\n") + if data and not raw.endswith("\n"): + add_frontier("missing_final_newline", len(physical), physical[-1]) + logical = [] + parts, starts, numbers = [], [], [] + offset = 0 + for line_number, physical_line in enumerate(physical, 1): + if line_number == len(physical) and not physical_line: + continue + line = re.sub(r"\?\?([=/\x27()!<>-])", lambda m: _TRIGRAPHS[m[1]], physical_line) + starts.append(offset) + numbers.append(line_number) + has_newline = line_number < len(physical) + splice = has_newline and line.endswith("\\") + extension = has_newline and bool(re.search(r"\\[ \t\v\f]+$", line)) + if extension: + add_frontier("gcc_whitespace_splice_extension", line_number, physical_line) + # Best-effort discovery follows the extension, without claiming it + # belongs to the supported language. + line = line.rstrip(" \t\v\f") + splice = True + if splice: + line = line[:-1] + parts.append(line) + offset += len(line) + if not splice: + logical.append(("".join(parts), tuple(starts), tuple(numbers))) + parts, starts, numbers, offset = [], [], [], 0 + if parts: + logical.append(("".join(parts), tuple(starts), tuple(numbers))) + add_frontier("splice_at_eof", numbers[-1], parts[-1]) + + block_comment = False + block_start = 0 + conditionals = [] + carried_tokens, carried_form = [], "" + for line, starts, numbers in logical: + def physical_at(index): + return numbers[max(0, bisect_right(starts, index) - 1)] + tokens = carried_tokens + combined_form = carried_form + line + carried_tokens, carried_form = [], "" + i = 0 + while i < len(line): + if block_comment: + end = line.find("*/", i) + if end < 0: + break + block_comment, i = False, end + 2 + continue + c = line[i] + if c in " \t\v\f": + i += 1 + continue + if line.startswith("//", i): + break + if line.startswith("/*", i): + block_comment, block_start, i = True, physical_at(i), i + 2 + continue + where = physical_at(i) + direct_header = (len(tokens) == 2 and tokens[0].value == "#" + and tokens[1].value in ("include", "include_next", "import")) + probe_header = (len(tokens) >= 2 and tokens[-2].value in _PROBES + and tokens[-1].value == "(") + if c in '<"' and (direct_header or probe_header): + closer = '>' if c == '<' else '"' + end = line.find(closer, i + 1) + if end < 0: + add_frontier("unterminated_header", where, line[i:]) + tokens.append(_Token("bad", line[i:], where, i + 1)) + break + tokens.append(_Token("header", line[i:end + 1], where, i + 1)) + i = end + 1 + continue + if c in '\"\x27': + end = i + 1 + closed = False + while end < len(line): + if line[end] == "\\": + end += 2 + elif line[end] == c: + end += 1 + closed = True + break + else: + end += 1 + if not closed: + add_frontier("unterminated_string_or_char", where, line[i:]) + tokens.append(_Token("string" if c == '"' else "char", line[i:end], where, i + 1)) + i = end + continue + match = _IDENT.match(line, i) + if match: + value = match[0] + tokens.append(_Token("id", value, where, i + 1)) + if "$" in value: + diagnostic("dollar_identifier_extension", where, value, "GCC init.cc enables dollars_in_ident; no file operator is introduced") + i = match.end() + continue + if ord(c) >= 128 or c == "\0": + add_frontier("unsupported_source_encoding_or_nul", where, line[i:i+16]) + if c == "\\": + add_frontier("unhandled_backslash_or_ucn", where, line[i:i+16]) + value = "%:%:" if line.startswith("%:%:", i) else ( + "##" if line.startswith("##", i) else "%:" if line.startswith("%:", i) else c) + tokens.append(_Token("punct", "##" if value == "%:%:" else "#" if value == "%:" else value, + where, i + 1)) + i += len(value) + if block_comment: + carried_tokens, carried_form = tokens, combined_form + "\n" + continue + if not tokens: + continue + directive = tokens[1].value if len(tokens) > 1 and tokens[0].value == "#" else None + tail = tokens[2:] if directive is not None else tokens + form = combined_form + at = tokens[0].line + depth = len(conditionals) + if directive in ("include", "include_next"): + if len(tail) == 1 and tail[0].kind == "header": + add_edge(directive, tail[0], depth) + else: + add_frontier("macro_computed_or_malformed_include", at, form) + elif directive == "pragma" and [t.value for t in tail] in (["once"], ["GCC", "system_header"]): + diagnostic("non_file_producing_pragma", at, form, + "libcpp once/system_header state changes add no file input; all-branch traversal overapproximates skipped contents") + elif directive in ("pragma", "import", "embed"): + add_frontier("unsupported_" + directive, at, form, + "pragma/import/embed semantics are outside this extractor") + elif directive is not None and directive not in _DIRECTIVES: + # Null '#' directives are supported; numeric linemarkers and + # unknown directives have unproved extension semantics. + add_frontier("unknown_directive", at, form) + if directive in ("if", "ifdef", "ifndef"): + conditionals.append(False) + elif directive in ("elif", "else"): + if not conditionals or conditionals[-1]: + add_frontier("malformed_conditional_nesting", at, form) + elif directive == "else": + conditionals[-1] = True + elif directive == "endif": + if not conditionals: + add_frontier("malformed_conditional_nesting", at, form) + else: + conditionals.pop() + # Literal special operators are caught in replacement lists too. Safe + # paste chains are diagnostic; unconstrained chains remain a frontier. + pastes = paste_assessment(tokens, directive) + for index, token in enumerate(tokens): + if token.kind != "id" and token.value != "##": + continue + value = token.value + if value == "##": + safe, explanation = pastes.get(index, (False, "paste outside supported macro definition")) + if safe: + diagnostic("non_file_operator_token_paste", token.line, form, explanation) + else: + add_frontier("potential_synthesized_file_operator", token.line, form, explanation) + elif value == "__VA_OPT__": + add_frontier("unsupported_macro_va_opt", token.line, form) + elif value == "_Pragma": + add_frontier("unsupported_Pragma", token.line, form) + elif value in _ASM: + add_frontier("unsupported_assembler_construct", token.line, form) + elif value in _PROBES: + before = tokens[max(0, index - 2):index] + # Presence tests do not perform a filename lookup. + if directive in ("ifdef", "ifndef") or ( + before and before[-1].value == "defined") or ( + len(before) == 2 and before[0].value == "defined" and before[1].value == "("): + continue + valid_context = directive in ("if", "elif") + suffix = tokens[index + 1:index + 5] + if valid_context and len(suffix) >= 3 and suffix[0].value == "(" and suffix[1].kind == "header" and suffix[2].value == ")": + add_edge(value, suffix[1], depth) + else: + add_frontier("macro_computed_or_nonliteral_has_include", token.line, form) + if block_comment: + add_frontier("unterminated_block_comment", block_start, "") + if conditionals: + add_frontier("unterminated_conditional", 0, "", str(len(conditionals))) + if overflow: + frontier.append({"code": "representation_row_cap", "physical_line": 0, + "form": "", "detail": "additional discoveries not represented; extraction is incomplete"}) + result = { + "schema": "c05-literal-header-edges-v1", "source": { + "occurrence_id": source.occurrence_id, "logical_path": source.logical_path, + "sha256": source.expected_sha256, "bytes": len(data), + "acquisition_provenance": source.acquisition_provenance, + "origin_position": source.origin_position, + "is_primary_source": source.is_primary_source}, + "edges": edges, "unsupported_frontier": frontier, "lexical_diagnostics": diagnostics, + "supported_language_scan": not frontier, + "all_conditional_branches_scanned": not overflow, + "path_and_origin_authenticated": False, + "configured_search_rules_discharged": False, + "pch_namespace_discharged": False, + "full_C05": False, + } + validate_plain(result) + return result + + +@dataclass(frozen=True) +class SearchPosition: + identity: str + directory: str + successor: str | None + + +@dataclass(frozen=True) +class ConfiguredSearchPremise: + """Caller-supplied rule premises; none are certified by this module. + + Positions must describe GCC's identity-deduplicated chain. quote_head and + bracket_head denote exact configured heads; source_dir_successor is the + exact successor of make_cpp_dir for a source-directory quoted lookup. + """ + positions: tuple[SearchPosition, ...] + quote_head: str | None + bracket_head: str | None + source_dir_successor: str | None + quote_ignores_source_dir: bool + rule_provenance: str + + +def plan_literal_candidates(edge, source: SourceOccurrence, rules: ConfiguredSearchPremise): + """Plan names in caller-premised order, including unresolved PCH names. + + Performs no lookup and accepts no supplied completeness verdict. Returned + order is conditional on the caller's rules and source origin being correct. + It deliberately cannot establish absence, aliases, selection or closure. + """ + validate_plain(edge) + if type(edge) is not dict: + raise EdgeError("edge must be a plain mapping") + if edge.get("kind") not in ("include", "include_next", "__has_include", "__has_include_next"): + raise EdgeError("not a supported literal edge") + filename = edge.get("filename") + if type(filename) is not str or not _HEADER.fullmatch(filename): + raise EdgeError("invalid literal filename") + if edge.get("delimiter") not in ("angle", "quote"): + raise EdgeError("invalid header delimiter") + if type(rules.quote_ignores_source_dir) is not bool: + raise EdgeError("invalid configured quote-search flag") + if len(rules.positions) > MAX_CONTAINER or not rules.rule_provenance: + raise EdgeError("invalid configured-rule premise") + positions = {} + for position in rules.positions: + if (position.identity in positions or not position.identity + or not position.directory.startswith("/") or "\0" in position.directory): + raise EdgeError("invalid or duplicate position identity") + positions[position.identity] = position + for value in (rules.quote_head, rules.bracket_head, rules.source_dir_successor, + *(p.successor for p in rules.positions)): + if value is not None and value not in positions: + raise EdgeError("configured chain references missing position") + next_kind = edge["kind"] in ("include_next", "__has_include_next") + # directives.cc::do_include_next converts primary-source #include_next + # to an ordinary include before search_path_head. The has-include-next + # builtin remains a separately stated configured-context premise. + if edge["kind"] == "include_next" and source.is_primary_source: + next_kind = False + planned = [] + head = None + if filename.startswith("/"): + planned.append(("absolute", filename)) + elif next_kind and source.origin_position is not None: + if source.origin_position not in positions: + raise EdgeError("include_next source origin missing from configured chain") + head = positions[source.origin_position].successor + elif edge["delimiter"] == "angle": + head = rules.bracket_head + elif rules.quote_ignores_source_dir: + head = rules.quote_head + else: + parent = source.logical_path.rsplit("/", 1)[0] or "/" + planned.append(("source-directory", parent.rstrip("/") + "/" + filename)) + head = rules.source_dir_successor + seen = set() + while head is not None: + if head in seen: + raise EdgeError("configured search chain cycle") + seen.add(head) + pos = positions[head] + planned.append((pos.identity, pos.directory.rstrip("/") + "/" + filename)) + if len(planned) > MAX_ROWS: + raise EdgeError("candidate row cap") + head = pos.successor + result = {"schema": "c05-premised-header-candidates-v1", + "source_occurrence": source.occurrence_id, "origin_position": source.origin_position, + "is_primary_source": source.is_primary_source, + "edge": edge, "rule_provenance": rules.rule_provenance, + "candidates": [{"position": slot, "pathname": path, + "pch_pathname_obligation": path + ".gch"} + for slot, path in planned], + "configured_rules_verified": False, "namespace_observed": False, + "pch_behaviour_resolved": False, "full_C05": False} + validate_plain(result) + return result diff --git a/research/h25-c05-v03-input-constructors/implementation/v03_fixture_constructor_v1.py b/research/h25-c05-v03-input-constructors/implementation/v03_fixture_constructor_v1.py new file mode 100644 index 0000000000..30ffe7a267 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/implementation/v03_fixture_constructor_v1.py @@ -0,0 +1,230 @@ +"""Pure V03 fixtures for the selected genuine-Root input-prefix driver. + +This file creates DATA, never files, imports, subprocesses or admissions. +Its baseline parameter must come from the independently reviewed C05/stage +constructor. Shape or equality checks here do not establish C05 completeness. +The future fixture installer writes each case BEFORE sealing its own stage. +The outer stage pins describe the actual mutant; the child oracle stays fixed. +""" +import hashlib + +ROLES = ('pyinit_failure', 'exec_failure') +NAMES = ('dict_probe_fields_v1.c', 'field_service_v1.h', + 'field_loader_snapshot_v1.h') +C_PIN = ('e0188999d41a9ab26e8d3d5c37b18b2238b3af21b1db90895f01f7be76d50b65', 17806) +L_PIN = ('bf7ab049cea89c0a882b279e35b1383ac8f99b66aa4b9b8e1ca22eb9c24c5a8d', 19495) +PINS = (C_PIN, + ('7656cd37503986459c4133643372fec13d3e5ad5553881f0bf0343a9a3e11abd', 17354), + L_PIN, C_PIN, + ('f5066831bd812e7e88fb971ba0e7ca86dbef91fc40a1a68c17b040ce474cd880', 17040), + L_PIN) +FIELDS = ('sha256', 'bytes', 'mode') +LITERAL = 'Variant reviewed source/header differs' +CUSTODY = 'Variant current source closure differs' +INVENTORY = 'Variant role file omitted from closure' + + +def need(condition, message): + if not condition: + raise ValueError(message) + + +def _copy(value, depth=0, budget=None): + if budget is None: + budget = [0, 0] + budget[0] += 1 + need(depth <= 24 and budget[0] <= 65536, 'fixture input tree bound') + kind = type(value) + if value is None or kind is bool: + return value + if kind is int: + need(-(1 << 64) <= value < (1 << 64), 'fixture integer bound') + return value + if kind is str: + budget[1] += len(value) + need(len(value) <= 8192 and budget[1] <= 524288, 'fixture text bound') + return value + if kind is list or kind is tuple: + need(len(value) <= 1024, 'fixture input sequence bound') + return [_copy(item, depth + 1, budget) for item in value] + if kind is dict: + need(len(value) <= 1024 and all(type(k) is str for k in value), + 'fixture input mapping domain') + for key in value: + _copy(key, depth + 1, budget) + return {k: _copy(value[k], depth + 1, budget) for k in value} + raise ValueError('fixture input must be an exact native plain tree') + + +def _relative(index): + return 'areas/field-negative-variants-v1/' + ROLES[index // 3] + '/' + NAMES[index % 3] + + +def _metadata(configuration, index): + role = configuration['roles'][index // 3] + return role['source'] if index % 3 == 0 else role['source_headers'][NAMES[index % 3]] + + +def _changed(field, value): + if field == 'sha256': + return ('0' if value[0] != '0' else '1') + value[1:] + if field == 'bytes': + return value + 1 + return 0o400 + + +def case_specs(): + """A conservative, explicitly proposed finite interpretation of V03. + + Both Python profiles apply to every returned case. These generated counts + are not asserted to have appeared in the original one-sentence recipe. + """ + rows = [('intact', -1, -1, '')] + for index in range(6): + rows += [('physical-byte', index, -1, ''), + ('physical-mode', index, -1, '')] + for field in FIELDS: + rows += [('literal-metadata', index, -1, field), + ('inventory-metadata', index, -1, field)] + for left in range(6): + for right in range(left + 1, 6): + rows += [('physical-swap', left, right, ''), + ('equal-mode-swap', left, right, '')] + rows += [('role-order', -1, -1, ''), + ('role-path', 0, 3, ''), ('role-path', 3, 0, ''), + ('header-label-swap', 1, 2, ''), + ('header-label-swap', 4, 5, ''), + ('equal-c-metadata-swap', 0, 3, ''), + ('equal-loader-metadata-swap', 2, 5, ''), + ('service-metadata-swap', 1, 4, ''), + ('literal-before-physical', 0, 4, 'sha256'), + ('earlier-preflight-before-physical', 0, -1, '')] + return tuple(rows) + + +def construct_case(baseline_configuration, payloads, stage, spec): + """Return the exact child plan, six physical payloads and parent oracle. + + `payloads` is the six original occurrences in P(C,H,L), E(C,H,L) order. + This verifies their original byte pins, without executing their contents. + `baseline_configuration` is the complete independent C05 successor input; + this function neither constructs missing C05 facts nor approves any gate. + """ + need(type(stage) is str and 1 < len(stage) <= 4096 and stage.startswith('/') and + all(32 <= ord(c) < 127 for c in stage) and + all(p not in ('', '.', '..') for p in stage.split('/')[1:]), + 'canonical absolute stage required') + need(type(payloads) is tuple and len(payloads) == 6, 'six payload occurrences required') + for raw, (digest, size) in zip(payloads, PINS): + need(type(raw) is bytes and len(raw) == size and + hashlib.sha256(raw).hexdigest() == digest, 'original fixture bytes differ') + need(type(spec) is tuple and len(spec) == 4 and type(spec[0]) is str and + type(spec[1]) is int and type(spec[2]) is int and type(spec[3]) is str and + spec in case_specs(), 'unknown finite V03 case') + plan = _copy(baseline_configuration) + need(type(plan) is dict and type(plan.get('roles')) is list and + len(plan['roles']) == 2 and + [r['role'] for r in plan['roles']] == list(ROLES), 'baseline role order differs') + inventory = plan['source_files'] + need(type(inventory) is list and 1 <= len(inventory) <= 512, + 'original source_files count differs') + by_path, declared_total = {}, 0 + for row in inventory: + need(type(row) is dict and set(row) == {'path', 'sha256', 'bytes', 'mode'} and + type(row['path']) is str and row['path'] not in by_path, + 'baseline source row or duplicate path differs') + need(type(row['sha256']) is str and len(row['sha256']) == 64 and + all(c in '0123456789abcdef' for c in row['sha256']) and + type(row['bytes']) is int and 0 <= row['bytes'] <= 67108864 and + type(row['mode']) is int and 0 <= row['mode'] <= 0o7777, + 'baseline source pin domain differs') + declared_total += row['bytes'] + need(declared_total <= 268435456, 'baseline declared custody byte bound') + by_path[row['path']] = row + preflight = plan['expected_preflight'] + need(type(preflight) is dict and set(preflight) == { + 'schema', 'authenticated_files', 'native_private_access', 'cached_admission'} and + type(preflight['schema']) is str and + preflight['schema'] == 'h25-public-runtime-preflight-v2' and + type(preflight['authenticated_files']) is int and + preflight['authenticated_files'] == 217 and + preflight['native_private_access'] is False and + preflight['cached_admission'] is False, + 'independent original preflight expectation differs') + for index, (digest, size) in enumerate(PINS): + role = plan['roles'][index // 3] + need(role['source_path'] == stage + '/' + _relative(3 * (index // 3)), + 'baseline role source path differs') + expected = {'sha256': digest, 'bytes': size, 'mode': 0o444} + need(_metadata(plan, index) == expected, 'baseline literal metadata differs') + need(by_path.get(stage + '/' + _relative(index)) == + {'path': stage + '/' + _relative(index), **expected}, + 'baseline source_files literal differs') + bodies, modes = list(payloads), [0o444] * 6 + kind, left, right, field = spec + message, terminal, is_v03 = None, None, True + if kind == 'physical-byte': + bodies[left] = bytes((bodies[left][0] ^ 1,)) + bodies[left][1:] + message, terminal = CUSTODY, '_vcheck_custody' + elif kind == 'physical-mode': + modes[left] = 0o400 + message, terminal = CUSTODY, '_vcheck_custody' + elif kind == 'literal-metadata': + row = _metadata(plan, left) + row[field] = _changed(field, row[field]) + message, terminal = LITERAL, '_vcheck_literal_sources' + elif kind == 'inventory-metadata': + row = by_path[stage + '/' + _relative(left)] + row[field] = _changed(field, row[field]) + message, terminal = INVENTORY, '_vcheck_literal_sources' + elif kind == 'physical-swap': + bodies[left], bodies[right] = bodies[right], bodies[left] + # Derived from independent original pins, never child return values. + if PINS[left] != PINS[right]: + message, terminal = CUSTODY, '_vcheck_custody' + elif kind == 'equal-mode-swap': + modes[left], modes[right] = modes[right], modes[left] + elif kind == 'role-order': + plan['roles'].reverse() + message, terminal = 'Variant literal configuration differs', '_v03_original_input_prefix' + elif kind == 'role-path': + plan['roles'][left // 3]['source_path'] = stage + '/' + _relative(right) + message, terminal = 'Variant source role path differs', '_vcheck_literal_sources' + elif kind in ('header-label-swap', 'equal-c-metadata-swap', + 'equal-loader-metadata-swap', 'service-metadata-swap'): + first, second = _metadata(plan, left), _metadata(plan, right) + old_first, old_second = dict(first), dict(second) + first.clear() + first.update(old_second) + second.clear() + second.update(old_first) + if PINS[left] != PINS[right]: + message, terminal = LITERAL, '_vcheck_literal_sources' + elif kind == 'literal-before-physical': + row = _metadata(plan, left) + row[field] = _changed(field, row[field]) + bodies[right] = bytes((bodies[right][0] ^ 1,)) + bodies[right][1:] + message, terminal = LITERAL, '_vcheck_literal_sources' + elif kind == 'earlier-preflight-before-physical': + plan['expected_preflight']['authenticated_files'] = 216 + bodies[left] = bytes((bodies[left][0] ^ 1,)) + bodies[left][1:] + message, terminal = 'Variant original preflight differs', '_v03_original_input_prefix' + is_v03 = False # Deliberate earlier refusal must NOT earn V03 credit. + else: + need(kind == 'intact', 'unimplemented finite V03 case') + return { + 'case': spec, + 'child_configuration': plan, + 'physical_files': tuple((stage + '/' + _relative(i), bodies[i], modes[i]) + for i in range(6)), + 'parent_expectation': { + 'outcome': 'PREFIX_RETURN' if message is None else 'EXACT_SOURCE_REFUSAL', + 'exception_type': None if message is None else 'RuntimeError', + 'message': message, 'terminal_function': terminal, + 'v03_discriminator': is_v03, + 'compiler_launches': 0, 'candidate_image_loads': 0, + 'complete_raw_and_owned_terminal_required': True, + }, + 'c05_completeness_established_here': False, + 'source_admitted': False, 'execution_admitted': False, + } diff --git a/research/h25-c05-v03-input-constructors/implementation/v03_integrated_constructor_v1.py b/research/h25-c05-v03-input-constructors/implementation/v03_integrated_constructor_v1.py new file mode 100644 index 0000000000..15c56b7dd1 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/implementation/v03_integrated_constructor_v1.py @@ -0,0 +1,130 @@ +"""Pure authoring support for the proposed genuine-Root V03 prefix route. + +No original module is imported or executed. Output is a source draft with +all eight original admission/configuration literals still None. The selected +prefix requires independent review as V03 source-gate coverage, and is not V01. +""" +import ast +import hashlib + +ROOT_SHA = 'f5a2d33f2b4d3651f214156a0e7094c2bb516ce2d5ab7698d18c11f98f35dee0' +PROVIDER_SHA = '9cbb7368f89e71d1e6cc46db5dc77efed3e03ed2a801c98c88fe316e4d9f3ef2' +VARIANT_SHA = 'cdb1479253358508088f8aa0e1e92e6c75ffcc127e54552698598a02de061254' +NATIVE_ENV = { + b'PATH': b'/usr/bin:/bin', b'PYTHONHASHSEED': b'0', + b'LANG': b'C.UTF-8', b'LC_ALL': b'C.UTF-8', b'TZ': b'UTC', + b'PYTHONDONTWRITEBYTECODE': b'1', +} +GATES = ('VARIANT_CONFIGURATION', 'VARIANT_SOURCE_REVIEW', + 'VARIANT_STAGE_ADMISSION', 'VARIANT_NATIVE_PROFILE', + 'VARIANT_HEADER_ADMISSION', 'VARIANT_COMMAND_ADMISSION', + 'VARIANT_FUNDING', 'VARIANT_EXECUTION') +TAIL = b'''try: + _variant_main() +except BaseException as _variant_error: + _VARIANT_TERMINAL_ERROR[0] = _variant_error + raise +''' +CONTROL_TAIL = b'''_V03_RESULT = [None] +try: + _V03_RESULT[0] = _v03_original_input_prefix() + _vroot(_INITIAL_OUTPUT + '/v03-root-after.raw.json') + _vraw(_INITIAL_OUTPUT + '/v03-input-result.raw.json', { + 'schema': 'h25-v03-input-prefix-result-v1', + 'status': 'ORIGINAL_INPUT_PREFIX_RETURNED', + 'binding': _V03_RESULT[0], + 'whole_variant_producer_completed': False, + 'runtime_qualified': False}) +except BaseException as _v03_error: + _VARIANT_TERMINAL_ERROR[0] = _v03_error + # No diagnostic allocation or I/O after an inherited failure. The genuine + # parent retains its raw stderr stream and owned terminal facts; absent or + # incomplete evidence is STOP, never a successful negative control. + raise +''' + + +def need(condition, message): + if not condition: + raise ValueError(message) + + +def absolute(path): + need(type(path) is str and 1 < len(path) <= 4096 and + path.startswith('/') and all(32 <= ord(c) < 127 for c in path) and + all(part not in ('', '.', '..') for part in path.split('/')[1:]), + 'canonical bounded absolute ASCII path required') + return path + + +def build_control_driver(original): + """Construct an unconfigured driver by a checked source transformation.""" + need(type(original) is bytes and len(original) == 41337 and + hashlib.sha256(original).hexdigest() == VARIANT_SHA, + 'exact original variant source required') + tree = ast.parse(original, feature_version=(3, 12)) + functions = [node for node in tree.body if isinstance(node, ast.FunctionDef) + and node.name == '_variant_main'] + need(len(functions) == 1, 'unique original main required') + function = functions[0] + lines = original.splitlines(keepends=True) + body = b''.join(lines[function.lineno - 1:function.end_lineno]) + cut = b' builds = []\n' + need(body.count(cut) == 1 and body.startswith(b'def _variant_main():\n'), + 'original prebuild boundary differs') + prefix = body.split(cut, 1)[0] + prefix = prefix.replace(b'def _variant_main():\n', + b'def _v03_original_input_prefix():\n', 1) + prefix += b' return binding\n\n\n' + need(original.endswith(TAIL) and original.count(TAIL) == 1, + 'original terminal entry differs') + result = original[:-len(TAIL)] + prefix + CONTROL_TAIL + need(len(result) <= 262144, 'genuine Root driver limit exceeded') + result_tree = ast.parse(result, feature_version=(3, 12)) + found = {} + for node in result_tree.body: + if isinstance(node, ast.Assign) and len(node.targets) == 1: + target = node.targets[0] + if isinstance(target, ast.Name) and target.id in GATES: + need(isinstance(node.value, ast.Constant) and + node.value.value is None, 'original gate was configured') + found[target.id] = None + need(set(found) == set(GATES), 'original gate census differs') + return result + + +def genuine_launch(stage, output, generation, nonce, mode, driver_bytes): + """Return launch DATA only. It is not stage/source/funding admission. + + CWD=stage is an explicit choice of this launch instance, allowed by the + original Root. It becomes part of Gamma and must enter C05 rule derivation. + The future parent must authenticate and own that exact stage and output + ancestor before actually passing these values to its genuine Popen route. + """ + absolute(stage) + absolute(output) + need(output != stage and not output.startswith(stage + '/'), + 'output must be outside the immutable stage') + need(type(generation) is str and 1 <= len(generation) <= 96 and + all(c in 'abcdefghijklmnopqrstuvwxyz0123456789-' for c in generation), + 'generation differs') + need(type(nonce) is str and len(nonce) == 64 and + all(c in '0123456789abcdef' for c in nonce), 'nonce differs') + need(type(mode) is str and mode in ('normal', 'optimized'), 'mode differs') + need(type(driver_bytes) is bytes and 0 < len(driver_bytes) <= 262144, + 'bounded reviewed driver bytes required') + integration = stage + '/integration' + command = ['/usr/bin/python3.12', '-S', '-s', '-P', '-B'] + if mode == 'optimized': + command.append('-O') + command += [integration + '/full_driver.py', + '--root-sha256', ROOT_SHA, + '--provider', integration + '/probe_binding_v3.py', PROVIDER_SHA, + '--driver', integration + '/v03_control_driver_v1.py', + hashlib.sha256(driver_bytes).hexdigest(), + '--integration', integration, '--', + '--output', output, '--generation', generation, + '--launch-nonce', nonce] + return {'command': command, 'env': dict(NATIVE_ENV), 'cwd': stage, + 'mode': mode, 'generation': generation, 'launch_nonce': nonce, + 'source_admitted': False, 'execution_admitted': False} diff --git a/research/h25-c05-v03-input-constructors/implementation/v03_source_refusal_observer_v1.py b/research/h25-c05-v03-input-constructors/implementation/v03_source_refusal_observer_v1.py new file mode 100644 index 0000000000..d03b4e14bd --- /dev/null +++ b/research/h25-c05-v03-input-constructors/implementation/v03_source_refusal_observer_v1.py @@ -0,0 +1,290 @@ +"""Pure source-location corroboration for parent-retained V03 stderr. + +This does not establish ownership, currentness, admission, or even that a child +ran. The genuine parent must supply its complete retained raw stderr after +actual owned termination, with independently authenticated driver/stage pins. +No result of this function by itself is a V03 PASS or a ParentCompletion. +""" +import ast +import hashlib +import json + +COMPONENT_LOG_BYTES = 2 * 1024 * 1024 +COMPONENT_RECORD_BYTES = 1048576 +ROOT_COUNTERS = ('load_calls', 'native_creations', 'native_execs', + 'activation_attempts', 'successful_bindings', + 'deactivation_attempts', 'cleanup_failures', + 'control_module_creations') + +MESSAGES = { + '_vcheck_literal_sources': ( + 'Variant source role path differs', + 'Variant reviewed source/header differs', + 'Variant role file omitted from closure'), + '_vcheck_custody': ('Variant current source closure differs',), + '_v03_original_input_prefix': ( + 'Variant literal configuration differs', + 'Variant original preflight differs'), +} + + +def source_site(driver_bytes, function, message): + """Derive the unique original logical-raise line without running code.""" + if (type(driver_bytes) is not bytes or not 0 < len(driver_bytes) <= 262144 or + type(function) is not str or type(message) is not str or + function not in MESSAGES or message not in MESSAGES[function]): + raise ValueError('bounded source and literal V03 refusal required') + tree = ast.parse(driver_bytes, feature_version=(3, 12)) + candidates = [node for node in tree.body + if isinstance(node, ast.FunctionDef) and node.name == function] + if len(candidates) != 1: + raise ValueError('unique actual control function required') + sites = [] + for node in ast.walk(candidates[0]): + if not isinstance(node, ast.Raise): + continue + value = node.exc + if (isinstance(value, ast.Call) and isinstance(value.func, ast.Name) and + value.func.id == 'RuntimeError' and len(value.args) == 1 and + not value.keywords and isinstance(value.args[0], ast.Constant) and + type(value.args[0].value) is str and value.args[0].value == message): + sites.append(node.lineno) + if len(sites) != 1: + raise ValueError('unique actual literal raise required') + return sites[0] + + +def corroborate_raw_refusal(driver_bytes, driver_path, stderr_raw, + function, message, original_log_bound): + """Recognize only the expected terminal logical source refusal. + + All exceptions from this checker mean incomplete verification. A False + return means different or insufficient raw evidence; never generic success. + The bound is the existing parent's independently fixed log limit, not a + newly increased allowance. This is terminal-site corroboration only: it + refuses conventional chaining but does not establish the middle frames or + complete traceback grammar. Use corroborate_complete_refusal as well before + accepting the proposed genuine-Root source-refusal route. + """ + if (type(driver_path) is not str or not 1 < len(driver_path) <= 4096 or + not driver_path.startswith('/') or + any(not 32 <= ord(c) < 127 for c in driver_path) or + type(original_log_bound) is not int or original_log_bound <= 0): + raise ValueError('actual source path and existing parent log limit required') + if (type(stderr_raw) is not bytes or + len(stderr_raw) > min(original_log_bound, COMPONENT_LOG_BYTES)): + return False + line_number = source_site(driver_bytes, function, message) + header = (' File "' + driver_path + '", line ' + str(line_number) + + ', in ' + function).encode('ascii') + ending = ('RuntimeError: ' + message + '\n').encode('ascii') + start = b'Traceback (most recent call last):\n' + if (not stderr_raw.startswith(start) or not stderr_raw.endswith(ending) or + stderr_raw.count(start) != 1 or + b'During handling of the above exception' in stderr_raw or + b'The above exception was the direct cause' in stderr_raw): + return False + frames = [line for line in stderr_raw.splitlines() if line.startswith(b' File "')] + return bool(frames) and frames[-1] == header + + +def _executed_calls(node, name): + """Find module/function-body calls without descending into new scopes.""" + result = [] + pending = list(ast.iter_child_nodes(node)) + while pending: + child = pending.pop() + if isinstance(child, (ast.FunctionDef, ast.AsyncFunctionDef, + ast.ClassDef, ast.Lambda)): + continue + if (isinstance(child, ast.Call) and isinstance(child.func, ast.Name) + and child.func.id == name): + result.append(child.lineno) + pending.extend(ast.iter_child_nodes(child)) + if len(result) != 1: + raise ValueError('unique actual source call required') + return result[0] + + +def corroborate_complete_refusal(driver_bytes, root_bytes, driver_path, + root_path, stderr_raw, function, message, + original_log_bound): + """Check the full standard traceback shape for the exact f5 Root route. + + This is a strict source-derived corroborator. It grants no ownership, + authenticity, currentness, error-delivery or admission credential. The parent + must separately authenticate the exact selected driver and complete streams. + Unavailable source lines, custom formatters, elision and nonstandard output + are refused, rather than silently accepted as complete original evidence. + """ + if not corroborate_raw_refusal(driver_bytes, driver_path, stderr_raw, + function, message, original_log_bound): + return False + if (type(root_bytes) is not bytes or len(root_bytes) != 38851 or + hashlib.sha256(root_bytes).hexdigest() != + 'f5a2d33f2b4d3651f214156a0e7094c2bb516ce2d5ab7698d18c11f98f35dee0' or + type(root_path) is not str or not 1 < len(root_path) <= 4096 or + not root_path.startswith('/') or root_path == driver_path or + any(not 32 <= ord(c) < 127 for c in root_path)): + raise ValueError('exact original Root bytes and distinct path required') + root_tree = ast.parse(root_bytes, feature_version=(3, 12)) + driver_tree = ast.parse(driver_bytes, feature_version=(3, 12)) + roots = [n for n in root_tree.body + if isinstance(n, ast.FunctionDef) and n.name == '_entry'] + prefixes = [n for n in driver_tree.body if isinstance(n, ast.FunctionDef) + and n.name == '_v03_original_input_prefix'] + if len(roots) != 1 or len(prefixes) != 1: + raise ValueError('unique actual Root entry and control prefix required') + terminal = source_site(driver_bytes, function, message) + expected = [(root_path, _executed_calls(root_tree, '_entry'), ''), + (root_path, _executed_calls(roots[0], '_EXEC'), '_entry'), + (driver_path, _executed_calls(driver_tree, + '_v03_original_input_prefix'), + '')] + if function != '_v03_original_input_prefix': + expected.append((driver_path, _executed_calls(prefixes[0], function), + '_v03_original_input_prefix')) + expected.append((driver_path, terminal, function)) + root_lines = root_bytes.decode('utf-8').splitlines() + driver_lines = driver_bytes.decode('utf-8').splitlines() + raw_lines = stderr_raw.splitlines(keepends=True) + position = 1 # The terminal corroborator already checked the initial header. + for path, line, frame in expected: + header = (' File "' + path + '", line ' + str(line) + ', in ' + + frame + '\n').encode('ascii') + source = root_lines if path == root_path else driver_lines + printed = (' ' + source[line - 1].strip() + '\n').encode('utf-8') + if (position + 1 >= len(raw_lines) or raw_lines[position] != header or + raw_lines[position + 1] != printed): + return False + position += 2 + # CPython may add a range indicator. It has no extra source authority. + if (position < len(raw_lines) and + raw_lines[position].startswith(b' ') and + raw_lines[position].strip(b' \n') and + all(c in b' ~^\n' for c in raw_lines[position]) and + b'^' in raw_lines[position]): + indicator = raw_lines[position].strip(b' \n') + # The standard formatter has one contiguous primary caret range. + first = indicator.find(b'^') + last = indicator.rfind(b'^') + if (any(c != 126 for c in indicator[:first]) or + any(c != 94 for c in indicator[first:last+1]) or + any(c != 126 for c in indicator[last+1:])): + return False + position += 1 + ending = ('RuntimeError: ' + message + '\n').encode('ascii') + return position == len(raw_lines) - 1 and raw_lines[position] == ending + + +def _no_noninteger(token): + raise ValueError('noninteger JSON number or constant') + + +def _integer(token): + if len(token) > 21: + raise ValueError('JSON integer length bound') + value = int(token) + if not -(1 << 64) <= value < (1 << 64): + raise ValueError('JSON integer domain') + return value + + +def _pairs(pairs): + if len(pairs) > 1024: + raise ValueError('JSON mapping bound') + result = {} + for key, value in pairs: + if key in result: + raise ValueError('duplicate JSON key') + result[key] = value + return result + + +def _tree(value, depth, budget): + budget[0] += 1 + if depth > 24 or budget[0] > 65536: + raise ValueError('JSON tree bound') + kind = type(value) + if value is None or kind is bool or kind is int: + return + if kind is str: + budget[1] += len(value) + if len(value) > 8192 or budget[1] > 524288: + raise ValueError('JSON text bound') + return + if kind is list: + if len(value) > 1024: + raise ValueError('JSON sequence bound') + for item in value: + _tree(item, depth + 1, budget) + return + if kind is dict: + for key in value: + _tree(key, depth + 1, budget) + _tree(value[key], depth + 1, budget) + return + raise ValueError('foreign JSON value') + + +def _decode(raw, original_record_bound): + if (type(original_record_bound) is not int or original_record_bound <= 0 or + type(raw) is not bytes or + not 0 < len(raw) <= min(original_record_bound, COMPONENT_RECORD_BYTES)): + raise ValueError('existing parent/raw component byte bound') + value = json.loads(raw.decode('ascii'), object_pairs_hook=_pairs, + parse_int=_integer, parse_float=_no_noninteger, + parse_constant=_no_noninteger) + _tree(value, 0, [0, 0]) + return value + + +def corroborate_positive(result_raw, root_after_raw, preflight_raw, + parent_binding, original_record_bound): + """Corroborate three complete raw records against independent launch data. + + A True result is ONLY these three checks. Original initial TCB/five-control/ + restoration records, custody-before, independent dependencies, parent source + continuity, domain ownership and terminal capture remain required elsewhere. + Limits here are additional component ceilings, never increased parent caps. + Decode resource/MemoryError failures propagate for parent first-error capture. + """ + if (type(parent_binding) is not dict or + any(type(k) is not str for k in parent_binding) or set(parent_binding) != { + 'mode', 'generation', 'launch_nonce'} or + any(type(v) is not str for v in parent_binding.values()) or + parent_binding['mode'] not in ('normal', 'optimized') or + not 1 <= len(parent_binding['generation']) <= 96 or + any(c not in 'abcdefghijklmnopqrstuvwxyz0123456789-' + for c in parent_binding['generation']) or + len(parent_binding['launch_nonce']) != 64 or + any(c not in '0123456789abcdef' for c in parent_binding['launch_nonce'])): + raise ValueError('independent actual parent launch binding required') + result = _decode(result_raw, original_record_bound) + counters = _decode(root_after_raw, original_record_bound) + preflight = _decode(preflight_raw, original_record_bound) + if (type(result) is not dict or set(result) != { + 'schema', 'status', 'binding', 'whole_variant_producer_completed', + 'runtime_qualified'} or + type(result['schema']) is not str or + result['schema'] != 'h25-v03-input-prefix-result-v1' or + type(result['status']) is not str or + result['status'] != 'ORIGINAL_INPUT_PREFIX_RETURNED' or + result['whole_variant_producer_completed'] is not False or + result['runtime_qualified'] is not False or + type(result['binding']) is not dict or + set(result['binding']) != set(parent_binding) or + any(type(result['binding'][k]) is not str or + result['binding'][k] != parent_binding[k] for k in parent_binding)): + return False + if (type(counters) is not dict or set(counters) != set(ROOT_COUNTERS) or + any(type(counters[k]) is not int or counters[k] != 0 for k in ROOT_COUNTERS)): + return False + return (type(preflight) is dict and set(preflight) == { + 'schema', 'authenticated_files', 'native_private_access', 'cached_admission'} and + type(preflight['schema']) is str and + preflight['schema'] == 'h25-public-runtime-preflight-v2' and + type(preflight['authenticated_files']) is int and + preflight['authenticated_files'] == 217 and + preflight['native_private_access'] is False and + preflight['cached_admission'] is False) diff --git a/research/h25-c05-v03-input-constructors/inputs/areas/field-negative-variants-v1/exec_failure/dict_probe_fields_v1.c.txt b/research/h25-c05-v03-input-constructors/inputs/areas/field-negative-variants-v1/exec_failure/dict_probe_fields_v1.c.txt new file mode 100644 index 0000000000..e06cd4f4b0 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/inputs/areas/field-negative-variants-v1/exec_failure/dict_probe_fields_v1.c.txt @@ -0,0 +1,456 @@ +/* Fresh dictionary collision-path metadata inspection. + * Source-derived from CPython 3.12.3 Objects/dictobject.c and private headers. + * See NOTICE-PSF.md and LICENSE-PSF.txt. No verdict or inspection result cache. + * SOURCE ONLY: parent compilation/execution gate is separate. + */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +#define Py_BUILD_CORE 1 +#define PY_SSIZE_T_CLEAN +#include +#include "internal/pycore_dict.h" +#include +#include +#include + +#if PY_VERSION_HEX != 0x030c03f0 +# error "This source admits only the authenticated CPython 3.12.3 header profile" +#endif +#if defined(Py_DEBUG) || defined(Py_TRACE_REFS) || defined(Py_GIL_DISABLED) +# error "Unsupported Python build profile" +#endif + +#define PROBE_SCHEMA 2 +#define PROBE_CAP 4096u +#define SHAPE_CAP 262144u +#define MAX_LOG2_SIZE 31u +#define PROBE_PERTURB_SHIFT 5u +_Static_assert(sizeof(void *) == 8, "pointer width"); +_Static_assert(sizeof(size_t) == 8, "size_t width"); +_Static_assert(sizeof(Py_ssize_t) == 8, "Py_ssize_t width"); +_Static_assert(sizeof(Py_hash_t) == 8, "hash width"); +_Static_assert(sizeof(long) == 8, "long width"); +_Static_assert(sizeof(PyDictObject) == 48, "dict object layout"); +_Static_assert(offsetof(PyDictObject, ma_keys) == 32, "dict keys offset"); +_Static_assert(offsetof(PyDictObject, ma_values) == 40, "dict values offset"); +_Static_assert(offsetof(PyDictKeysObject, dk_indices) == 32, "keys indices offset"); +_Static_assert(sizeof(PyDictKeyEntry) == 24, "general entry size"); +_Static_assert(DICT_MAX_WATCHERS == 8 && DICT_VERSION_MASK == 255, "watcher mask"); +_Static_assert(DKIX_EMPTY == -1 && DKIX_DUMMY == -2, "index sentinels"); + +typedef struct { + int armed; + int initialized; + int overflow; + int64_t interpreter_id; + hashfunc tuple_hash, long_hash, unicode_hash; + richcmpfunc tuple_compare, long_compare, unicode_compare; + destructor bool_dealloc; + PyMappingMethods *dict_mapping; + PySequenceMethods *dict_sequence; + binaryfunc dict_subscript; + objobjargproc dict_assign; + objobjproc dict_contains; + uint64_t calls, checks, safe, unsupported, empty_safe; + uint64_t slots, shape_items, hash_calls, matching_entries; + uint64_t bad_query, bad_layout, watched, bad_key, bad_value, budget; + uint64_t widths_seen; +} ProbeState; + +static void +add_count(ProbeState *state, uint64_t *counter, uint64_t amount) +{ + if (UINT64_MAX - *counter < amount) { + *counter = UINT64_MAX; + state->overflow = 1; + } + else { + *counter += amount; + } +} + +/* Public runtime/type metadata only; no dictionary private-field access. */ +static int +runtime_check(ProbeState *state) +{ + if (!state || !state->initialized || !PyGILState_Check() || + Py_Version != (unsigned long)PY_VERSION_HEX || + PyInterpreterState_GetID(PyThreadState_GetInterpreter(PyThreadState_Get())) != state->interpreter_id || + state->interpreter_id != 0 || + PyDict_Type.tp_basicsize != (Py_ssize_t)sizeof(PyDictObject) || + PyTuple_Type.tp_basicsize != (Py_ssize_t)offsetof(PyTupleObject, ob_item) || + PyTuple_Type.tp_itemsize != (Py_ssize_t)sizeof(PyObject *) || + PyTuple_Type.tp_hash != state->tuple_hash || + PyLong_Type.tp_hash != state->long_hash || + PyUnicode_Type.tp_hash != state->unicode_hash || + PyTuple_Type.tp_richcompare != state->tuple_compare || + PyLong_Type.tp_richcompare != state->long_compare || + PyUnicode_Type.tp_richcompare != state->unicode_compare || + PyBool_Type.tp_dealloc != state->bool_dealloc || + PyDict_Type.tp_as_mapping != state->dict_mapping || + PyDict_Type.tp_as_sequence != state->dict_sequence || + !state->dict_mapping || !state->dict_sequence || + state->dict_mapping->mp_subscript != state->dict_subscript || + state->dict_mapping->mp_ass_subscript != state->dict_assign || + state->dict_sequence->sq_contains != state->dict_contains) { + PyErr_SetString(PyExc_RuntimeError, "Probe public runtime/type profile changed"); + return -1; + } + add_count(state, &state->checks, 1); + return 0; +} + +static ProbeState * +checked_state(PyObject *module, int require_armed) +{ + ProbeState *state = (ProbeState *)PyModule_GetState(module); + if (runtime_check(state) < 0) + return NULL; + if (require_armed && !state->armed) { + PyErr_SetString(PyExc_RuntimeError, "Probe is not authenticated and active"); + return NULL; + } + return state; +} + +static int +shape_item(ProbeState *state, uint32_t *used) +{ + if (*used >= SHAPE_CAP) + return 0; + ++*used; + add_count(state, &state->shape_items, 1); + return 1; +} + +/* Return 1 safe, 0 unsupported shape, -1 exhausted shape budget. + * Depth is exactly the original schema; no recursive user dispatch. */ +static int +integer_tuple_contents(ProbeState *state, PyObject *part, uint32_t *used) +{ + /* Caller has charged part before any type/size inspection. */ + if (!part || !PyTuple_CheckExact(part)) + return 0; + Py_ssize_t n = PyTuple_GET_SIZE(part); + for (Py_ssize_t i = 0; i < n; ++i) { + if (!shape_item(state, used)) + return -1; + PyObject *value = PyTuple_GET_ITEM(part, i); + if (!value || !PyLong_CheckExact(value)) + return 0; + } + return 1; +} + +static int +integer_tuple(ProbeState *state, PyObject *part, uint32_t *used) +{ + if (!shape_item(state, used)) + return -1; + return integer_tuple_contents(state, part, used); +} + +static int +key_shape(ProbeState *state, PyObject *key, uint32_t *used) +{ + if (!shape_item(state, used)) + return -1; + if (!key || !PyTuple_CheckExact(key) || PyTuple_GET_SIZE(key) != 2) + return 0; + PyObject *first = PyTuple_GET_ITEM(key, 0); + PyObject *second = PyTuple_GET_ITEM(key, 1); + if (!first || !second) + return 0; + if (!shape_item(state, used)) + return -1; /* charge first before its first type inspection */ + if (PyUnicode_CheckExact(first)) { + if (PyUnicode_GET_LENGTH(first) != 5 || + PyUnicode_READ_CHAR(first, 0) != 'l' || + PyUnicode_READ_CHAR(first, 1) != 'a' || + PyUnicode_READ_CHAR(first, 2) != 'b' || + PyUnicode_READ_CHAR(first, 3) != 'e' || + PyUnicode_READ_CHAR(first, 4) != 'l') + return 0; + } + else { + int first_ok = integer_tuple_contents(state, first, used); + if (first_ok != 1) + return first_ok; + } + return integer_tuple(state, second, used); +} + +/* Width and i were bounded before entry. memcpy avoids alignment/aliasing + * assumptions beyond the authenticated header's byte-array layout. */ +static Py_ssize_t +read_index_bytes(const char *indices, size_t i, unsigned int width) +{ + const char *address = indices + i * width; + if (width == 1) { + int8_t value; + memcpy(&value, address, sizeof value); + return value; + } + if (width == 2) { + int16_t value; + memcpy(&value, address, sizeof value); + return value; + } + int32_t value; + memcpy(&value, address, sizeof value); + return value; +} + +static PyObject * +unsupported(ProbeState *state, uint64_t *reason) +{ + add_count(state, &state->unsupported, 1); + add_count(state, reason, 1); + Py_RETURN_NOTIMPLEMENTED; +} + +static PyObject * +probe_inspect(PyObject *module, PyObject *const *args, Py_ssize_t nargs) +{ + ProbeState *state = checked_state(module, 1); + if (!state) + return NULL; + if (nargs != 2) { + PyErr_SetString(PyExc_TypeError, "inspect requires exactly mapping and key"); + return NULL; + } + add_count(state, &state->calls, 1); + PyObject *mapping = args[0], *query = args[1]; + if (!PyDict_CheckExact(mapping)) + return unsupported(state, &state->bad_layout); + uint32_t used = 0; + int query_ok = key_shape(state, query, &used); + if (query_ok != 1) + return unsupported(state, query_ok < 0 ? &state->budget : &state->bad_query); + add_count(state, &state->hash_calls, 1); + Py_hash_t hash = PyObject_Hash(query); + if (hash == -1) + return NULL; /* exact schema cannot normally fail; preserve exception */ + + /* First private ABI access: frontend must have authenticated and armed us. */ + PyDictObject *dict = (PyDictObject *)mapping; + if (dict->ma_values != NULL || dict->ma_keys == NULL || dict->ma_used < 0) + return unsupported(state, &state->bad_layout); + if ((dict->ma_version_tag & DICT_VERSION_MASK) != 0) + return unsupported(state, &state->watched); + PyDictKeysObject *keys = dict->ma_keys; + + /* Independently reviewed empty bootstrap: authenticated field profile, + * not pointer identity. No entry address or entry/value read occurs. */ + if (keys->dk_kind == DICT_KEYS_UNICODE && dict->ma_used == 0 && + keys->dk_log2_size == 0 && keys->dk_log2_index_bytes == 0 && + keys->dk_version == 1 && keys->dk_usable == 0 && + keys->dk_nentries == 0 && keys->dk_refcnt == _Py_IMMORTAL_REFCNT) { + int8_t first_index; + add_count(state, &state->slots, 1); + memcpy(&first_index, keys->dk_indices, sizeof first_index); + if (first_index != DKIX_EMPTY) + return unsupported(state, &state->bad_layout); + add_count(state, &state->empty_safe, 1); + add_count(state, &state->safe, 1); + Py_RETURN_TRUE; + } + if (keys->dk_kind != DICT_KEYS_GENERAL || keys->dk_refcnt != 1) + return unsupported(state, &state->bad_layout); + unsigned int log_size = keys->dk_log2_size; + if (log_size < 3 || log_size > MAX_LOG2_SIZE) + return unsupported(state, &state->bad_layout); + unsigned int width_log = log_size < 8 ? 0 : (log_size < 16 ? 1 : 2); + unsigned int width = 1u << width_log; + unsigned int index_log = log_size + width_log; + if (keys->dk_log2_index_bytes != index_log || index_log >= sizeof(size_t) * 8) + return unsupported(state, &state->bad_layout); + size_t table_size = (size_t)1 << log_size; + size_t entry_capacity = (table_size * 2) / 3; + if (keys->dk_nentries < 0 || keys->dk_usable < 0 || + (size_t)keys->dk_nentries > entry_capacity || + (size_t)keys->dk_usable > entry_capacity - (size_t)keys->dk_nentries || + dict->ma_used > keys->dk_nentries) + return unsupported(state, &state->bad_layout); + PyDictKeyEntry *entries = (PyDictKeyEntry *)(keys->dk_indices + ((size_t)1 << index_log)); + size_t mask = table_size - 1; + size_t perturb = (size_t)hash; + size_t index = (size_t)hash & mask; + state->widths_seen |= width; + for (uint32_t visits = 0; visits < PROBE_CAP; ++visits) { + add_count(state, &state->slots, 1); + Py_ssize_t slot = read_index_bytes(keys->dk_indices, index, width); + if (slot == DKIX_EMPTY) { + add_count(state, &state->safe, 1); + Py_RETURN_TRUE; + } + if (slot != DKIX_DUMMY) { + if (slot < 0 || slot >= keys->dk_nentries) + return unsupported(state, &state->bad_layout); + PyDictKeyEntry *entry = &entries[slot]; + if (entry->me_hash == hash) { + add_count(state, &state->matching_entries, 1); + int key_ok = key_shape(state, entry->me_key, &used); + if (key_ok != 1) + return unsupported(state, key_ok < 0 ? &state->budget : &state->bad_key); + /* TYPE ONLY: no truth/equality, reference retention or answer use. */ + if (entry->me_value == NULL || !Py_IS_TYPE(entry->me_value, &PyBool_Type)) + return unsupported(state, &state->bad_value); + } + } + perturb >>= PROBE_PERTURB_SHIFT; + index = (index * 5 + perturb + 1) & mask; + } + return unsupported(state, &state->budget); +} + +static PyObject * +probe_check(PyObject *module, PyObject *unused) +{ + (void)unused; + if (!checked_state(module, 1)) + return NULL; + Py_RETURN_NONE; +} + +static PyObject * +probe_activate(PyObject *module, PyObject *unused) +{ + (void)unused; + ProbeState *state = checked_state(module, 0); + if (!state) + return NULL; + if (state->armed) { + PyErr_SetString(PyExc_RuntimeError, "Probe module already has an owner"); + return NULL; + } + state->armed = 1; + Py_RETURN_NONE; +} + +static PyObject * +probe_deactivate(PyObject *module, PyObject *unused) +{ + (void)unused; + ProbeState *state = (ProbeState *)PyModule_GetState(module); + if (!state) { + PyErr_SetString(PyExc_RuntimeError, "Probe module state missing"); + return NULL; + } + state->armed = 0; + Py_RETURN_NONE; +} + +static PyObject * +probe_profile(PyObject *module, PyObject *unused) +{ + (void)unused; + if (!checked_state(module, 0)) + return NULL; + return Py_BuildValue("(iiiiiiiiiiiiiii)", PROBE_SCHEMA, PY_VERSION_HEX, + (int)sizeof(void *), (int)sizeof(size_t), (int)sizeof(Py_hash_t), + (int)sizeof(PyDictObject), (int)offsetof(PyDictObject, ma_keys), + (int)offsetof(PyDictObject, ma_values), + (int)offsetof(PyDictKeysObject, dk_indices), (int)sizeof(PyDictKeyEntry), + DICT_MAX_WATCHERS, PROBE_PERTURB_SHIFT, MAX_LOG2_SIZE, PROBE_CAP, SHAPE_CAP); +} + +static PyObject * +probe_counters(PyObject *module, PyObject *unused) +{ + (void)unused; + ProbeState *state = checked_state(module, 1); + if (!state) + return NULL; + return Py_BuildValue("{s:K,s:K,s:K,s:K,s:K,s:K,s:K,s:K,s:K,s:K,s:K,s:K,s:K,s:K,s:K,s:K,s:i}", + "calls", (unsigned long long)state->calls, + "checks", (unsigned long long)state->checks, + "safe", (unsigned long long)state->safe, + "unsupported", (unsigned long long)state->unsupported, + "empty_safe", (unsigned long long)state->empty_safe, + "slots", (unsigned long long)state->slots, + "shape_items", (unsigned long long)state->shape_items, + "hash_calls", (unsigned long long)state->hash_calls, + "matching_entries", (unsigned long long)state->matching_entries, + "bad_query", (unsigned long long)state->bad_query, + "bad_layout", (unsigned long long)state->bad_layout, + "watched", (unsigned long long)state->watched, + "bad_key", (unsigned long long)state->bad_key, + "bad_value", (unsigned long long)state->bad_value, + "budget", (unsigned long long)state->budget, + "widths_seen", (unsigned long long)state->widths_seen, + "counter_overflow", state->overflow); +} + +static int +probe_exec(PyObject *module) +{ + ProbeState *state = (ProbeState *)PyModule_GetState(module); + if (!state) + return -1; + if (!PyGILState_Check() || Py_Version != (unsigned long)PY_VERSION_HEX || + PyDict_Type.tp_basicsize != (Py_ssize_t)sizeof(PyDictObject)) { + PyErr_SetString(PyExc_ImportError, "Probe unsupported public runtime profile"); + return -1; + } + state->interpreter_id = PyInterpreterState_GetID(PyThreadState_GetInterpreter(PyThreadState_Get())); + state->tuple_hash = PyTuple_Type.tp_hash; + state->long_hash = PyLong_Type.tp_hash; + state->unicode_hash = PyUnicode_Type.tp_hash; + state->tuple_compare = PyTuple_Type.tp_richcompare; + state->long_compare = PyLong_Type.tp_richcompare; + state->unicode_compare = PyUnicode_Type.tp_richcompare; + state->bool_dealloc = PyBool_Type.tp_dealloc; + state->dict_mapping = PyDict_Type.tp_as_mapping; + state->dict_sequence = PyDict_Type.tp_as_sequence; + if (!state->dict_mapping || !state->dict_sequence || !state->tuple_hash || + !state->long_hash || !state->unicode_hash || !state->tuple_compare || + !state->long_compare || !state->unicode_compare || !state->bool_dealloc) { + PyErr_SetString(PyExc_ImportError, "Probe public type slots missing"); + return -1; + } + state->dict_subscript = state->dict_mapping->mp_subscript; + state->dict_assign = state->dict_mapping->mp_ass_subscript; + state->dict_contains = state->dict_sequence->sq_contains; + state->initialized = 1; + return runtime_check(state); +} + +/* Additive bootstrap helpers; their state and entries never enter field reads. */ +static struct PyModuleDef probe_module; +#include "field_loader_snapshot_v1.h" + +static PyMethodDef probe_methods[] = { + {"inspect", (PyCFunction)(void(*)(void))probe_inspect, METH_FASTCALL, "Fresh callback-safety metadata: True or NotImplemented."}, + {"check", probe_check, METH_NOARGS, "Check public runtime and captured type slots."}, + {"profile", probe_profile, METH_NOARGS, "Public build/profile metadata; no dict inspection."}, + {"counters", probe_counters, METH_NOARGS, "Fresh bounded operational counters; never authority."}, + {"_activate", probe_activate, METH_NOARGS, "Provider lifecycle after authenticated loading."}, + {"_deactivate", probe_deactivate, METH_NOARGS, "Release this module's active owner."}, + {"_field_loader_maps", probe_field_loader_maps, METH_NOARGS, "Once-only bootstrap map inventory; no symbol resolution."}, + {"_field_loader_snapshot", probe_field_loader_snapshot, METH_O, "Once-only admitted main-scope symbol resolution."}, + {NULL, NULL, 0, NULL} +}; +static PyModuleDef_Slot probe_slots[] = { + {Py_mod_exec, probe_exec}, + {Py_mod_multiple_interpreters, Py_MOD_MULTIPLE_INTERPRETERS_NOT_SUPPORTED}, + {0, NULL} +}; +static struct PyModuleDef probe_module = { + PyModuleDef_HEAD_INIT, + "_h25_dict_probe", + "Fresh source-bound dictionary probe metadata, without answer retention.", + sizeof(ProbeState), + probe_methods, + probe_slots, + NULL, NULL, NULL +}; +PyMODINIT_FUNC +PyInit__h25_dict_probe(void) +{ + return PyModuleDef_Init(&probe_module); +} + +/* Separate multiphase service, sharing no ProbeState or counters. */ +#include "field_service_v1.h" diff --git a/research/h25-c05-v03-input-constructors/inputs/areas/field-negative-variants-v1/exec_failure/field_loader_snapshot_v1.h.txt b/research/h25-c05-v03-input-constructors/inputs/areas/field-negative-variants-v1/exec_failure/field_loader_snapshot_v1.h.txt new file mode 100644 index 0000000000..e59187ff62 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/inputs/areas/field-negative-variants-v1/exec_failure/field_loader_snapshot_v1.h.txt @@ -0,0 +1,495 @@ +/* Bootstrap-only loader evidence, never used by field_id. + * This is not a loader or global-provider authentication replacement. Root + * authenticates these original builtin entries and the admitted process/OS + * closure before use. After maps(), Root must authenticate actual inventory, + * all requested definitions/winners/versions and every permitted OS IFUNC + * resolver/result family BEFORE snapshot() invokes dlsym/dlvsym. + * No named dlopen, dlclose, new namespace, or Python callback is introduced. + * Main handle is deliberately retained through process exit, including errors. + */ +#ifndef H25_FIELD_LOADER_SNAPSHOT_V1_H +#define H25_FIELD_LOADER_SNAPSHOT_V1_H + +#include +#include +#include + +#define H25_MAP_CAP 128 +#define H25_MAP_NAME_CAP 1024 +#define H25_PHDR_CAP 64 +#define H25_SEGMENT_CAP 32 +#define H25_SYMBOL_CAP 512 +#define H25_SYMBOL_NAME_CAP 256 +_Static_assert(RTLD_NOW == 2 && RTLD_LOCAL == 0 && LM_ID_BASE == 0, + "loader flag and base-namespace profile"); + +typedef struct { + uint64_t lo, hi; + unsigned int flags; +} H25LoadSegment; +typedef struct { + uint64_t base, phdr; + char name[H25_MAP_NAME_CAP]; + size_t segment_count; + H25LoadSegment segments[H25_SEGMENT_CAP]; +} H25MapRecord; +typedef struct { + size_t count; + unsigned long long adds, subs; + int failed; + H25MapRecord maps[H25_MAP_CAP]; +} H25MapSnapshot; +typedef struct { + const char *name, *version; + int weak, requested_type; + uint64_t address, provider_base; + const char *provider_name; + int has_address_symbol, address_symbol_type; + uint64_t address_symbol_address; +} H25SymbolResult; +_Static_assert(sizeof(H25LoadSegment) == 24, "loader segment storage profile"); +_Static_assert(sizeof(H25MapRecord) == 1816, "loader map storage profile"); +_Static_assert(sizeof(H25MapSnapshot) == 232480, "loader snapshot storage profile"); +_Static_assert(sizeof(H25SymbolResult) == 64, "loader symbol storage profile"); + +/* All storage is local to this ELF. There are no Python roots here. Static + * bounded buffers avoid unbounded loader callbacks or large C stack frames. + * Serialized bootstrap and no concurrent load mutation are inherited gates. */ +static H25MapSnapshot h25_loader_baseline, h25_loader_before, h25_loader_after; +static H25SymbolResult h25_loader_symbols[H25_SYMBOL_CAP]; +static void *h25_loader_main_handle; +static int h25_loader_maps_attempted, h25_loader_maps_ready; +static int h25_loader_symbols_attempted; + +static int +h25_loader_error(const char *message) +{ + PyErr_SetString(PyExc_RuntimeError, message); + return -1; +} + +static int +h25_loader_copy_name(char *to, const char *from) +{ + if (!from) + return -1; + for (size_t i = 0; i < H25_MAP_NAME_CAP; ++i) { + unsigned char c = (unsigned char)from[i]; + if (c > 127) + return -1; + to[i] = (char)c; + if (c == 0) + return 0; + } + return -1; +} + +/* Only called by authenticated libc dl_iterate_phdr, never by Python. */ +static int +h25_loader_collect(struct dl_phdr_info *info, size_t size, void *opaque) +{ + H25MapSnapshot *out = (H25MapSnapshot *)opaque; + if (size < offsetof(struct dl_phdr_info, dlpi_subs) + sizeof(info->dlpi_subs) || + out->count >= H25_MAP_CAP || !info->dlpi_phdr || + info->dlpi_phnum == 0 || info->dlpi_phnum > H25_PHDR_CAP) { + out->failed = 1; + return 1; + } + if (!out->count) { + out->adds = info->dlpi_adds; + out->subs = info->dlpi_subs; + } + else if (out->adds != info->dlpi_adds || out->subs != info->dlpi_subs) { + out->failed = 1; + return 1; + } + H25MapRecord *record = &out->maps[out->count]; + record->base = (uint64_t)info->dlpi_addr; + record->phdr = (uint64_t)(uintptr_t)info->dlpi_phdr; + record->segment_count = 0; + if (h25_loader_copy_name(record->name, info->dlpi_name) < 0) { + out->failed = 1; + return 1; + } + for (size_t i = 0; i < info->dlpi_phnum; ++i) { + const ElfW(Phdr) *p = &info->dlpi_phdr[i]; + if (p->p_type != PT_LOAD) + continue; + if (!p->p_memsz || p->p_filesz > p->p_memsz || + record->segment_count >= H25_SEGMENT_CAP || + p->p_vaddr > UINT64_MAX - record->base || + p->p_memsz > UINT64_MAX - (record->base + p->p_vaddr) || + (p->p_flags & ~(PF_R | PF_W | PF_X))) { + out->failed = 1; + return 1; + } + H25LoadSegment *segment = &record->segments[record->segment_count++]; + segment->lo = record->base + p->p_vaddr; + segment->hi = segment->lo + p->p_memsz; + segment->flags = p->p_flags; + } + if (!record->segment_count) { + out->failed = 1; + return 1; + } + ++out->count; + return 0; +} + +static int +h25_loader_take_maps(H25MapSnapshot *out) +{ + out->count = 0; + out->adds = out->subs = 0; + out->failed = 0; + int result = dl_iterate_phdr(h25_loader_collect, out); + if (result || out->failed || !out->count) + return h25_loader_error("Native loader map bounds/profile rejected"); + return 0; +} + +static int +h25_loader_same_maps(const H25MapSnapshot *a, const H25MapSnapshot *b) +{ + if (a->count != b->count || a->adds != b->adds || a->subs != b->subs) + return 0; + for (size_t i = 0; i < a->count; ++i) { + const H25MapRecord *x = &a->maps[i], *y = &b->maps[i]; + if (x->base != y->base || x->phdr != y->phdr || + x->segment_count != y->segment_count || strcmp(x->name, y->name)) + return 0; + for (size_t j = 0; j < x->segment_count; ++j) { + if (x->segments[j].lo != y->segments[j].lo || + x->segments[j].hi != y->segments[j].hi || + x->segments[j].flags != y->segments[j].flags) + return 0; + } + } + return 1; +} + +static int +h25_loader_module_check(PyObject *module) +{ + if (!PyModule_CheckExact(module) || PyModule_GetDef(module) != &probe_module) + return h25_loader_error("Loader helper requires original production owner"); + ProbeState *state = (ProbeState *)PyModule_GetState(module); + if (!state || !state->initialized || !state->armed || !PyGILState_Check() || + Py_Version != (unsigned long)PY_VERSION_HEX || state->interpreter_id != 0 || + PyInterpreterState_GetID(PyThreadState_GetInterpreter(PyThreadState_Get())) != 0) + return h25_loader_error("Loader helper requires admitted active bootstrap"); + /* Original provider.guard already authenticated all original slots. Do not + * increment or repurpose the six original entries' metadata counters. */ + return 0; +} + +static int +h25_loader_namespace(void) +{ + Lmid_t namespace_id = (Lmid_t)-1; + struct link_map *main_map = NULL; + if (!h25_loader_main_handle || + dlinfo(h25_loader_main_handle, RTLD_DI_LMID, &namespace_id) != 0 || + namespace_id != LM_ID_BASE || + dlinfo(h25_loader_main_handle, RTLD_DI_LINKMAP, &main_map) != 0 || + !main_map || main_map->l_prev || !main_map->l_name || main_map->l_name[0]) + return h25_loader_error("Loader helper requires base main-program handle"); + if (!h25_loader_before.count || + h25_loader_before.maps[0].base != (uint64_t)main_map->l_addr || + h25_loader_before.maps[0].name[0]) + return h25_loader_error("Loader enumeration is not the admitted base namespace"); + return 0; +} + +static PyObject * +h25_loader_maps_tuple(const H25MapSnapshot *snapshot) +{ + PyObject *maps = PyTuple_New((Py_ssize_t)snapshot->count); + if (!maps) + return NULL; + for (size_t i = 0; i < snapshot->count; ++i) { + const H25MapRecord *record = &snapshot->maps[i]; + PyObject *segments = PyTuple_New((Py_ssize_t)record->segment_count); + if (!segments) { + Py_DECREF(maps); + return NULL; + } + for (size_t j = 0; j < record->segment_count; ++j) { + const H25LoadSegment *s = &record->segments[j]; + PyObject *segment = Py_BuildValue("(KKI)", + (unsigned long long)s->lo, (unsigned long long)s->hi, s->flags); + if (!segment) { + Py_DECREF(segments); + Py_DECREF(maps); + return NULL; + } + PyTuple_SET_ITEM(segments, (Py_ssize_t)j, segment); + } + PyObject *item = Py_BuildValue("(KKsO)", + (unsigned long long)record->base, (unsigned long long)record->phdr, + record->name, segments); + Py_DECREF(segments); + if (!item) { + Py_DECREF(maps); + return NULL; + } + PyTuple_SET_ITEM(maps, (Py_ssize_t)i, item); + } + return maps; +} + +static PyObject * +h25_loader_symbol_tuple(PyObject *requests, Py_ssize_t count) +{ + PyObject *results = PyTuple_New(count); + if (!results) + return NULL; + for (Py_ssize_t i = 0; i < count; ++i) { + H25SymbolResult *r = &h25_loader_symbols[i]; + PyObject *request = PyTuple_GET_ITEM(requests, i); + PyObject *provider = PyUnicode_FromString(r->provider_name ? r->provider_name : ""); + PyObject *address_type = r->has_address_symbol ? PyLong_FromLong(r->address_symbol_type) : Py_NewRef(Py_None); + PyObject *symbol_address = r->has_address_symbol ? PyLong_FromUnsignedLongLong(r->address_symbol_address) : Py_NewRef(Py_None); + if (!provider || !address_type || !symbol_address) { + Py_XDECREF(provider); Py_XDECREF(address_type); Py_XDECREF(symbol_address); + Py_DECREF(results); + return NULL; + } + PyObject *item = Py_BuildValue("(OOOOKKOOO)", + PyTuple_GET_ITEM(request, 0), PyTuple_GET_ITEM(request, 1), + PyTuple_GET_ITEM(request, 2), PyTuple_GET_ITEM(request, 3), + (unsigned long long)r->address, (unsigned long long)r->provider_base, + provider, address_type, symbol_address); + Py_DECREF(provider); Py_DECREF(address_type); Py_DECREF(symbol_address); + if (!item) { + Py_DECREF(results); + return NULL; + } + PyTuple_SET_ITEM(results, i, item); + } + return results; +} + +static PyObject * +h25_loader_result(PyObject *requests, Py_ssize_t count) +{ + PyObject *before = h25_loader_maps_tuple(&h25_loader_before); + if (!before) + return NULL; + PyObject *after = h25_loader_maps_tuple(&h25_loader_after); + if (!after) { + Py_DECREF(before); + return NULL; + } + PyObject *symbols = h25_loader_symbol_tuple(requests, count); + if (!symbols) { + Py_DECREF(before); Py_DECREF(after); + return NULL; + } + PyObject *result = Py_BuildValue("{s:s,s:i,s:i,s:s,s:O,s:O,s:O}", + "schema", "h25-native-provider-snapshot-v1", "namespace", 0, "flags", 2, + "scope", "retained-main-handle", "maps_before", before, "maps_after", after, + "symbol_results", symbols); + Py_DECREF(before); Py_DECREF(after); Py_DECREF(symbols); + return result; +} + +static PyObject * +probe_field_loader_maps(PyObject *module, PyObject *unused) +{ + (void)unused; + if (h25_loader_module_check(module) < 0) + return NULL; + if (h25_loader_maps_attempted) { + h25_loader_error("Loader map capture is single-use"); + return NULL; + } + h25_loader_maps_attempted = 1; + if (h25_loader_take_maps(&h25_loader_before) < 0) + return NULL; + /* glibc 2.39 dlfcn/dlopen.c selects BASE for NULL; dl-open.c names + * the main link map's searchlist as global scope. The existing main map + * is returned; no pathname/dependency load or scope promotion is asked. + * No dlclose occurs, even on error. Root must bill the retained handle. */ + h25_loader_main_handle = dlopen(NULL, RTLD_NOW | RTLD_LOCAL); + if (!h25_loader_main_handle) { + h25_loader_error("Retained main-program handle unavailable"); + return NULL; + } + if (h25_loader_namespace() < 0 || h25_loader_take_maps(&h25_loader_after) < 0) + return NULL; + if (!h25_loader_same_maps(&h25_loader_before, &h25_loader_after)) { + h25_loader_error("Main-program handle changed loaded maps"); + return NULL; + } + h25_loader_baseline = h25_loader_after; + PyObject *result = h25_loader_result(NULL, 0); + if (result) + h25_loader_maps_ready = 1; + return result; +} + +static int +h25_loader_ascii(PyObject *value, const char **out) +{ + if (!PyUnicode_CheckExact(value) || !PyUnicode_IS_ASCII(value) || + PyUnicode_GET_LENGTH(value) <= 0 || + PyUnicode_GET_LENGTH(value) >= H25_SYMBOL_NAME_CAP) + return h25_loader_error("Loader request name/version is not bounded exact ASCII"); + const char *data = (const char *)PyUnicode_1BYTE_DATA(value); + for (Py_ssize_t i = 0; i < PyUnicode_GET_LENGTH(value); ++i) { + if (!data[i]) + return h25_loader_error("Loader request name/version contains NUL"); + } + *out = data; + return 0; +} + +static int +h25_loader_requests(PyObject *requests, Py_ssize_t *count) +{ + if (!PyTuple_CheckExact(requests) || PyTuple_GET_SIZE(requests) > H25_SYMBOL_CAP) + return h25_loader_error("Loader requests require bounded exact tuple"); + *count = PyTuple_GET_SIZE(requests); + for (Py_ssize_t i = 0; i < *count; ++i) { + PyObject *request = PyTuple_GET_ITEM(requests, i); + if (!PyTuple_CheckExact(request) || PyTuple_GET_SIZE(request) != 4 || + !PyBool_Check(PyTuple_GET_ITEM(request, 2)) || + !PyLong_CheckExact(PyTuple_GET_ITEM(request, 3))) + return h25_loader_error("Loader request schema changed"); + H25SymbolResult *r = &h25_loader_symbols[i]; + r->name = r->version = r->provider_name = NULL; + r->address = r->provider_base = r->address_symbol_address = 0; + r->has_address_symbol = r->address_symbol_type = 0; + if (h25_loader_ascii(PyTuple_GET_ITEM(request, 0), &r->name) < 0) + return -1; + PyObject *version = PyTuple_GET_ITEM(request, 1); + if (version != Py_None && h25_loader_ascii(version, &r->version) < 0) + return -1; + r->weak = PyTuple_GET_ITEM(request, 2) == Py_True; + long symbol_type = PyLong_AsLong(PyTuple_GET_ITEM(request, 3)); + if (symbol_type == -1 && PyErr_Occurred()) + return -1; + if (symbol_type != STT_NOTYPE && symbol_type != STT_OBJECT && symbol_type != STT_FUNC) + return h25_loader_error("Loader request rejects unsupported import symbol kind"); + r->requested_type = (int)symbol_type; + for (Py_ssize_t j = 0; j < i; ++j) { + H25SymbolResult *previous = &h25_loader_symbols[j]; + if (!strcmp(r->name, previous->name) && + ((!r->version && !previous->version) || + (r->version && previous->version && !strcmp(r->version, previous->version)))) + return h25_loader_error("Loader requests contain duplicate symbol/version"); + } + } + return 0; +} + +static int +h25_loader_resolve(H25SymbolResult *result) +{ + (void)dlerror(); + /* Never RTLD_DEFAULT: that would use the ordinary caller DSO's local + * scope as well. The retained main handle searches the source-admitted + * base global scope. OS IFUNC authorization precedes this call in Root. */ + void *address = result->version ? + dlvsym(h25_loader_main_handle, result->name, result->version) : + dlsym(h25_loader_main_handle, result->name); + const char *error = dlerror(); + if (!address) { + if (!result->weak) + return h25_loader_error("Required strong global symbol did not resolve"); + if (!error) + return h25_loader_error("Resolved null symbol is outside unresolved-weak profile"); + /* Explicit unresolved weak zero. Root must match its admitted weak + * outcome. A strong symbol is never silently converted to weak zero. */ + return 0; + } + if (error) + return h25_loader_error("Loader symbol resolution returned inconsistent error"); + Dl_info info; + struct link_map *map = NULL; + if (!dladdr1(address, &info, (void **)&map, RTLD_DL_LINKMAP) || !map || !map->l_name) + return h25_loader_error("Resolved symbol has no admitted native provider map"); + size_t found = H25_MAP_CAP; + for (size_t i = 0; i < h25_loader_before.count; ++i) { + H25MapRecord *candidate = &h25_loader_before.maps[i]; + if (candidate->base == (uint64_t)map->l_addr && !strcmp(candidate->name, map->l_name)) { + if (found != H25_MAP_CAP) + return h25_loader_error("Resolved symbol provider map is ambiguous"); + found = i; + } + } + if (found == H25_MAP_CAP) + return h25_loader_error("Resolved symbol provider is absent from captured maps"); + H25MapRecord *provider = &h25_loader_before.maps[found]; + uint64_t location = (uint64_t)(uintptr_t)address; + int in_segment = 0; + for (size_t i = 0; i < provider->segment_count; ++i) { + if (location >= provider->segments[i].lo && location < provider->segments[i].hi) + in_segment = 1; + } + if (!in_segment) + return h25_loader_error("Resolved symbol is outside provider PT_LOAD ranges"); + result->address = location; + result->provider_base = provider->base; + result->provider_name = provider->name; + const ElfW(Sym) *address_symbol = NULL; + if (dladdr1(address, &info, (void **)&address_symbol, RTLD_DL_SYMENT) && + address_symbol && info.dli_saddr) { + result->has_address_symbol = 1; + result->address_symbol_type = ELF64_ST_TYPE(address_symbol->st_info); + result->address_symbol_address = (uint64_t)(uintptr_t)info.dli_saddr; + } + /* This last metadata describes only a nearest address symbol, potentially + * absent for hidden IFUNC implementation code. It is not a definition, + * resolver, binding or symbol-version assertion. */ + return 0; +} + +static void +h25_loader_forget_request_pointers(void) +{ + /* Request strings are borrowed only during the call, never retained. */ + for (size_t i = 0; i < H25_SYMBOL_CAP; ++i) { + h25_loader_symbols[i].name = NULL; + h25_loader_symbols[i].version = NULL; + h25_loader_symbols[i].provider_name = NULL; + } +} + +static PyObject * +probe_field_loader_snapshot(PyObject *module, PyObject *requests) +{ + if (h25_loader_module_check(module) < 0) + return NULL; + if (!h25_loader_maps_ready || h25_loader_symbols_attempted) { + h25_loader_error("Loader symbol capture requires successful maps and one attempt"); + return NULL; + } + h25_loader_symbols_attempted = 1; + Py_ssize_t count = 0; + PyObject *result = NULL; + if (h25_loader_requests(requests, &count) < 0 || + h25_loader_take_maps(&h25_loader_before) < 0 || h25_loader_namespace() < 0) + goto done; + if (!h25_loader_same_maps(&h25_loader_baseline, &h25_loader_before)) { + h25_loader_error("Loaded map history changed before symbol resolution"); + goto done; + } + for (Py_ssize_t i = 0; i < count; ++i) { + if (h25_loader_resolve(&h25_loader_symbols[i]) < 0) + goto done; + } + if (h25_loader_take_maps(&h25_loader_after) < 0) + goto done; + if (!h25_loader_same_maps(&h25_loader_before, &h25_loader_after)) { + h25_loader_error("Symbol resolution changed loaded maps"); + goto done; + } + result = h25_loader_result(requests, count); +done: + h25_loader_forget_request_pointers(); + return result; +} + +#endif diff --git a/research/h25-c05-v03-input-constructors/inputs/areas/field-negative-variants-v1/exec_failure/field_service_v1.h.txt b/research/h25-c05-v03-input-constructors/inputs/areas/field-negative-variants-v1/exec_failure/field_service_v1.h.txt new file mode 100644 index 0000000000..787f997883 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/inputs/areas/field-negative-variants-v1/exec_failure/field_service_v1.h.txt @@ -0,0 +1,423 @@ +/* Additive indexed field transport. SOURCE ONLY; no runtime admission. + * Original getter/id semantics: CPython 3.12.3 descrobject.c, funcobject.c, + * bltinmodule.c; attribution/license remain in the unchanged probe sources. + * No function-field structure access and no address-derived field IDs. + */ +#ifndef H25_FIELD_SERVICE_V1_H +#define H25_FIELD_SERVICE_V1_H + +#define H25_FIELD_MAGIC UINT64_C(0x4832354649454c44) +#define H25_FIELD_COUNT 7 +/* Concrete source-fixed pointer-table profile consumed by the separate ELF + * parser. These become compiler gates, not evidence of a current binary. */ +_Static_assert(sizeof(PyMethodDef) == 32, "field method table entry size"); +_Static_assert(sizeof(PyModuleDef) == 104, "field module definition size"); +_Static_assert(sizeof(PyModuleDef_Slot) == 16, "field module slot size"); +_Static_assert(offsetof(PyModuleDef, m_traverse) == 80, "module traverse offset"); +_Static_assert(offsetof(PyModuleDef, m_clear) == 88, "module clear offset"); +_Static_assert(offsetof(PyModuleDef, m_free) == 96, "module free offset"); +_Static_assert(offsetof(PyTypeObject, tp_dealloc) == 48, "context dealloc offset"); +_Static_assert(offsetof(PyTypeObject, tp_traverse) == 184, "context traverse offset"); +_Static_assert(offsetof(PyTypeObject, tp_clear) == 192, "context clear offset"); +enum { + H25_FIELD_UNBOUND = 0, H25_FIELD_BOUND = 1, H25_FIELD_CLOSING = 2, + H25_FIELD_CLOSED = 3, H25_FIELD_FAILED = 4 +}; + +typedef struct { + uint64_t magic; + int initialized, phase, bind_attempted, clear_pending, close_authorized; + int64_t interpreter_id; + Py_ssize_t active; + /* These are the only persistent Python roots. No targets or observations. */ + PyObject *getters[H25_FIELD_COUNT]; + PyObject *id0, *function_type, *close_token; +} H25FieldState; + +typedef struct { + PyObject_HEAD + H25FieldState state; +} H25FieldContext; +_Static_assert(sizeof(H25FieldState) == 128, "field primitive state size"); +_Static_assert(sizeof(H25FieldContext) == 144, "field fixture allocation size"); + +static struct PyModuleDef h25_field_module; +static PyTypeObject h25_field_context_type; +static unsigned int h25_field_context_created; +static int h25_field_exec_attempted; +#define H25_FIELD_CONTEXT_CAP 64u + +static H25FieldState * +h25_field_raw_state(PyObject *owner) +{ + if (Py_IS_TYPE(owner, &h25_field_context_type)) + return &((H25FieldContext *)owner)->state; + if (PyModule_CheckExact(owner) && PyModule_GetDef(owner) == &h25_field_module) + return (H25FieldState *)PyModule_GetState(owner); + return NULL; +} + +/* Clear each slot before decref. The token is an exact plain object, and the + * other roots are original builtin primitives, so cleanup adds no candidate + * finalizer. Keep token after logical close for authenticated idempotence. */ +static void +h25_field_drop_roots(H25FieldState *state, int drop_token) +{ + for (int i = 0; i < H25_FIELD_COUNT; ++i) + Py_CLEAR(state->getters[i]); + Py_CLEAR(state->id0); + Py_CLEAR(state->function_type); + if (drop_token) + Py_CLEAR(state->close_token); +} + +static H25FieldState * +h25_field_state(PyObject *module) +{ + H25FieldState *state = h25_field_raw_state(module); + if (!state) { + PyErr_SetString(PyExc_RuntimeError, "Field service owner changed"); + return NULL; + } + if (!state || !state->initialized || state->magic != H25_FIELD_MAGIC || + !PyGILState_Check() || Py_Version != (unsigned long)PY_VERSION_HEX || + state->interpreter_id != 0 || + PyInterpreterState_GetID(PyThreadState_GetInterpreter(PyThreadState_Get())) != state->interpreter_id || + state->active < 0 || state->phase < H25_FIELD_UNBOUND || + state->phase > H25_FIELD_FAILED) { + PyErr_SetString(PyExc_RuntimeError, "Field service native state unavailable"); + return NULL; + } + return state; +} + +static PyObject * +h25_field_bind(PyObject *module, PyObject *const *args, Py_ssize_t nargs) +{ + H25FieldState *state = h25_field_state(module); + if (!state) + return NULL; + if (state->bind_attempted || state->phase != H25_FIELD_UNBOUND || + state->active || state->clear_pending) { + PyErr_SetString(PyExc_RuntimeError, "Field primitive binding is single-use"); + return NULL; + } + /* Failed first binding is terminal; there is no partial registration. */ + state->bind_attempted = 1; + state->phase = H25_FIELD_FAILED; + if (nargs != 4 || !PyTuple_CheckExact(args[0]) || + PyTuple_GET_SIZE(args[0]) != H25_FIELD_COUNT || + !PyCFunction_CheckExact(args[1]) || + PyCFunction_GET_FLAGS(args[1]) != METH_O || + args[2] != (PyObject *)&PyFunction_Type || + !Py_IS_TYPE(args[3], &PyBaseObject_Type)) { + PyErr_SetString(PyExc_TypeError, "Field binding requires exact original primitive packet"); + return NULL; + } + for (int i = 0; i < H25_FIELD_COUNT; ++i) { + if (!Py_IS_TYPE(PyTuple_GET_ITEM(args[0], i), &_PyMethodWrapper_Type)) { + PyErr_SetString(PyExc_TypeError, "Field getter must be an original bound method-wrapper"); + return NULL; + } + } + /* Root authenticates each object's identity and descriptor ownership before + * this call. The native type checks above are not substitute provenance. */ + for (int i = 0; i < H25_FIELD_COUNT; ++i) + state->getters[i] = Py_NewRef(PyTuple_GET_ITEM(args[0], i)); + state->id0 = Py_NewRef(args[1]); + state->function_type = Py_NewRef(args[2]); + state->close_token = Py_NewRef(args[3]); + state->phase = H25_FIELD_BOUND; + Py_RETURN_NONE; +} + +static void +h25_field_leave(H25FieldState *state) +{ + /* Each successful enter has exactly one leave, with the GIL continuously + * held apart from original getter/id callbacks' own behavior. */ + --state->active; + if (state->active == 0) { + if (state->clear_pending) { + state->phase = H25_FIELD_FAILED; + h25_field_drop_roots(state, 1); + } + else if (state->phase == H25_FIELD_CLOSING) { + state->phase = H25_FIELD_CLOSED; + h25_field_drop_roots(state, 0); + } + } +} + +static PyObject * +h25_field_id(PyObject *module, PyObject *const *args, Py_ssize_t nargs) +{ + H25FieldState *state = h25_field_state(module); + if (!state) + return NULL; + if (nargs != 2 || !PyFunction_Check(args[0]) || !PyLong_CheckExact(args[1])) { + PyErr_SetString(PyExc_TypeError, "field_id requires exact function and integer index"); + return NULL; + } + long index = PyLong_AsLong(args[1]); + if (index == -1 && PyErr_Occurred()) + return NULL; + if (index < 0 || index >= H25_FIELD_COUNT) { + PyErr_SetString(PyExc_IndexError, "field_id index must be in 0..6"); + return NULL; + } + if ((state->phase == H25_FIELD_CLOSING || state->phase == H25_FIELD_CLOSED) && + state->close_authorized && state->close_token && !state->clear_pending) { + /* Exact None can never be an original builtin id result. Root must + * independently witness legitimate CLOSING/CLOSED before fallback. */ + Py_RETURN_NONE; + } + if (state->phase != H25_FIELD_BOUND || state->clear_pending || + !state->bind_attempted || state->close_authorized || !state->close_token || + !state->getters[index] || !state->id0 || + state->function_type != (PyObject *)&PyFunction_Type) { + PyErr_SetString(PyExc_RuntimeError, "Field service is not bound and active"); + return NULL; + } + if (state->active == PY_SSIZE_T_MAX) { + PyErr_SetString(PyExc_OverflowError, "Field service active-call bound exhausted"); + return NULL; + } + /* Acquire every call root before the first observable field event. Neither + * a legitimate close nor GC clear may release state while active != 0. */ + PyObject *owner = Py_NewRef(module); + PyObject *getter = Py_NewRef(state->getters[index]); + PyObject *id0 = Py_NewRef(state->id0); + PyObject *function_type = Py_NewRef(state->function_type); + ++state->active; + PyObject *getter_args[2] = {args[0], function_type}; + PyObject *temporary = PyObject_Vectorcall(getter, getter_args, 2, NULL); + PyObject *result = NULL; + PyObject *error = NULL; + if (temporary) { + /* The original builtin id is invoked even after a legitimate close + * inside the getter. No direct field read, pointer-ID shortcut, retry + * or other field lookup occurs here. */ + result = PyObject_CallOneArg(id0, temporary); + if (!result) + error = PyErr_GetRaisedException(); + /* This is the original expression's temporary-release point. An id + * audit may have detached the field, making this its last reference. + * Its finalizer must run BEFORE return/Python's expected comparison. */ + Py_DECREF(temporary); + } + else { + error = PyErr_GetRaisedException(); + } + h25_field_leave(state); + Py_DECREF(function_type); + Py_DECREF(id0); + Py_DECREF(getter); + /* No state access after owner DECREF. */ + Py_DECREF(owner); + if (!result) + PyErr_SetRaisedException(error); + return result; +} + +static PyObject * +h25_field_close(PyObject *module, PyObject *token) +{ + H25FieldState *state = h25_field_state(module); + if (!state) + return NULL; + if (!state->close_token || token != state->close_token || state->clear_pending || + (state->phase != H25_FIELD_BOUND && state->phase != H25_FIELD_CLOSING && + state->phase != H25_FIELD_CLOSED)) { + PyErr_SetString(PyExc_RuntimeError, "Field close lacks the original owner token"); + return NULL; + } + state->close_authorized = 1; + state->phase = state->active ? H25_FIELD_CLOSING : H25_FIELD_CLOSED; + if (!state->active) + h25_field_drop_roots(state, 0); + Py_RETURN_NONE; +} + +static PyObject * +h25_field_status(PyObject *module, PyObject *unused) +{ + (void)unused; + H25FieldState *state = h25_field_state(module); + if (!state) + return NULL; + return Py_BuildValue("(iiniL)", 1, state->phase, state->active, + state->bind_attempted, (long long)state->interpreter_id); +} + +static PyObject * +h25_field_abi(PyObject *module, PyObject *unused) +{ + (void)unused; + if (!h25_field_state(module)) + return NULL; + return Py_BuildValue("(iiiii)", 1, H25_FIELD_COUNT, PY_VERSION_HEX, + (int)sizeof(void *), 2); +} + +static int +h25_field_traverse(PyObject *module, visitproc visit, void *arg) +{ + H25FieldState *state = h25_field_raw_state(module); + if (!state) + return 0; + for (int i = 0; i < H25_FIELD_COUNT; ++i) + Py_VISIT(state->getters[i]); + Py_VISIT(state->id0); + Py_VISIT(state->function_type); + Py_VISIT(state->close_token); + return 0; +} + +static int +h25_field_clear(PyObject *module) +{ + H25FieldState *state = h25_field_raw_state(module); + if (!state) + return 0; + state->clear_pending = 1; + state->phase = H25_FIELD_FAILED; + if (!state->active) + h25_field_drop_roots(state, 1); + return 0; +} + +static void +h25_field_free(void *module) +{ + /* An active call owns a strong module reference, so module deallocation + * cannot occur during that call. clear remains separately safe/deferred. */ + (void)h25_field_clear((PyObject *)module); + H25FieldState *state = h25_field_raw_state((PyObject *)module); + if (state) + state->magic = 0; +} + +static void +h25_field_context_dealloc(PyObject *context) +{ + /* An active field owns its context just as it owns the primary module. */ + PyObject_GC_UnTrack(context); + (void)h25_field_clear(context); + ((H25FieldContext *)context)->state.magic = 0; + PyObject_GC_Del(context); +} + +static PyObject * +h25_field_new_context(PyObject *module, PyObject *unused) +{ + (void)unused; + if (!PyModule_CheckExact(module) || PyModule_GetDef(module) != &h25_field_module || + !h25_field_state(module)) { + if (!PyErr_Occurred()) + PyErr_SetString(PyExc_RuntimeError, "Field context factory requires original service module"); + return NULL; + } + if (h25_field_context_created >= H25_FIELD_CONTEXT_CAP) { + PyErr_SetString(PyExc_OverflowError, "Field fixture context bound exhausted"); + return NULL; + } + /* Count attempts, including allocation failure; no silent fixture retry. */ + ++h25_field_context_created; + H25FieldContext *context = PyObject_GC_New(H25FieldContext, &h25_field_context_type); + if (!context) + return NULL; + context->state = (H25FieldState){0}; + context->state.magic = H25_FIELD_MAGIC; + context->state.interpreter_id = 0; + context->state.initialized = 1; + context->state.phase = H25_FIELD_UNBOUND; + PyObject_GC_Track(context); + return (PyObject *)context; +} + +static int +h25_field_exec(PyObject *module) +{ + H25FieldState *state = (H25FieldState *)PyModule_GetState(module); + if (!state) + return -1; + if (h25_field_exec_attempted || state->initialized || !PyGILState_Check() || + Py_Version != (unsigned long)PY_VERSION_HEX) { + PyErr_SetString(PyExc_ImportError, "Field service initialization profile rejected"); + return -1; + } + h25_field_exec_attempted = 1; + int64_t interpreter_id = + PyInterpreterState_GetID(PyThreadState_GetInterpreter(PyThreadState_Get())); + if (interpreter_id != 0) { + PyErr_SetString(PyExc_ImportError, "Field service requires the original main interpreter"); + return -1; + } + if (PyType_Ready(&h25_field_context_type) < 0) + return -1; + state->magic = H25_FIELD_MAGIC; + state->interpreter_id = interpreter_id; + state->initialized = 1; + state->phase = H25_FIELD_UNBOUND; + /* H25_NEGATIVE_FIXTURE_EXEC_V1: the original successful initialization + * prefix and every earlier error return remain unchanged. Only this + * separate paid fixture replaces the original success endpoint. + */ + PyErr_SetString(PyExc_RuntimeError, + "H25 negative exec fixture: deliberate failure after original initialization"); + return -1; +} + +static PyMethodDef h25_field_methods[] = { + {"field_id", (PyCFunction)(void(*)(void))h25_field_id, METH_FASTCALL, "One original getter/id event pair, with original temporary disposal."}, + {"_bind_fields", (PyCFunction)(void(*)(void))h25_field_bind, METH_FASTCALL, "Bind the authenticated original primitive packet exactly once."}, + {"_close_fields", h25_field_close, METH_O, "Logical close with original private token; active field completes once."}, + {"_field_status", h25_field_status, METH_NOARGS, "Native phase and active count; no target observations."}, + {"_field_abi", h25_field_abi, METH_NOARGS, "Immutable indexed-field interface profile."}, + {"_new_field_context", h25_field_new_context, METH_NOARGS, "Create one independently bound fixture context in this same image."}, + {NULL, NULL, 0, NULL} +}; +/* Separate table deliberately omits the factory: fixtures cannot manufacture + * other fixtures or reach mutable module storage. Methods remain native + * immutable PyCFunction objects strongly owning their actual context. */ +static PyMethodDef h25_field_context_methods[] = { + {"field_id", (PyCFunction)(void(*)(void))h25_field_id, METH_FASTCALL, "One original getter/id event pair, with original temporary disposal."}, + {"_bind_fields", (PyCFunction)(void(*)(void))h25_field_bind, METH_FASTCALL, "Bind the authenticated original primitive packet exactly once."}, + {"_close_fields", h25_field_close, METH_O, "Logical close with original private token; active field completes once."}, + {"_field_status", h25_field_status, METH_NOARGS, "Native phase and active count; no target observations."}, + {"_field_abi", h25_field_abi, METH_NOARGS, "Immutable indexed-field interface profile."}, + {NULL, NULL, 0, NULL} +}; +static PyTypeObject h25_field_context_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "_h25_field_service_v1._FieldContext", + .tp_basicsize = sizeof(H25FieldContext), + .tp_dealloc = h25_field_context_dealloc, + .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_DISALLOW_INSTANTIATION, + .tp_traverse = h25_field_traverse, + .tp_clear = h25_field_clear, + .tp_methods = h25_field_context_methods, + .tp_doc = "One-shot fixture primitive owner; no dictionary, target roots or reload." +}; +static PyModuleDef_Slot h25_field_slots[] = { + {Py_mod_exec, h25_field_exec}, + {Py_mod_multiple_interpreters, Py_MOD_MULTIPLE_INTERPRETERS_NOT_SUPPORTED}, + {0, NULL} +}; +static struct PyModuleDef h25_field_module = { + PyModuleDef_HEAD_INIT, + "_h25_field_service_v1", + "Source-bound indexed original-primitive transport without target retention.", + sizeof(H25FieldState), + h25_field_methods, + h25_field_slots, + h25_field_traverse, h25_field_clear, h25_field_free +}; +PyMODINIT_FUNC +PyInit__h25_field_service_v1(void) +{ + return PyModuleDef_Init(&h25_field_module); +} + +#endif diff --git a/research/h25-c05-v03-input-constructors/inputs/areas/field-negative-variants-v1/pyinit_failure/dict_probe_fields_v1.c.txt b/research/h25-c05-v03-input-constructors/inputs/areas/field-negative-variants-v1/pyinit_failure/dict_probe_fields_v1.c.txt new file mode 100644 index 0000000000..e06cd4f4b0 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/inputs/areas/field-negative-variants-v1/pyinit_failure/dict_probe_fields_v1.c.txt @@ -0,0 +1,456 @@ +/* Fresh dictionary collision-path metadata inspection. + * Source-derived from CPython 3.12.3 Objects/dictobject.c and private headers. + * See NOTICE-PSF.md and LICENSE-PSF.txt. No verdict or inspection result cache. + * SOURCE ONLY: parent compilation/execution gate is separate. + */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +#define Py_BUILD_CORE 1 +#define PY_SSIZE_T_CLEAN +#include +#include "internal/pycore_dict.h" +#include +#include +#include + +#if PY_VERSION_HEX != 0x030c03f0 +# error "This source admits only the authenticated CPython 3.12.3 header profile" +#endif +#if defined(Py_DEBUG) || defined(Py_TRACE_REFS) || defined(Py_GIL_DISABLED) +# error "Unsupported Python build profile" +#endif + +#define PROBE_SCHEMA 2 +#define PROBE_CAP 4096u +#define SHAPE_CAP 262144u +#define MAX_LOG2_SIZE 31u +#define PROBE_PERTURB_SHIFT 5u +_Static_assert(sizeof(void *) == 8, "pointer width"); +_Static_assert(sizeof(size_t) == 8, "size_t width"); +_Static_assert(sizeof(Py_ssize_t) == 8, "Py_ssize_t width"); +_Static_assert(sizeof(Py_hash_t) == 8, "hash width"); +_Static_assert(sizeof(long) == 8, "long width"); +_Static_assert(sizeof(PyDictObject) == 48, "dict object layout"); +_Static_assert(offsetof(PyDictObject, ma_keys) == 32, "dict keys offset"); +_Static_assert(offsetof(PyDictObject, ma_values) == 40, "dict values offset"); +_Static_assert(offsetof(PyDictKeysObject, dk_indices) == 32, "keys indices offset"); +_Static_assert(sizeof(PyDictKeyEntry) == 24, "general entry size"); +_Static_assert(DICT_MAX_WATCHERS == 8 && DICT_VERSION_MASK == 255, "watcher mask"); +_Static_assert(DKIX_EMPTY == -1 && DKIX_DUMMY == -2, "index sentinels"); + +typedef struct { + int armed; + int initialized; + int overflow; + int64_t interpreter_id; + hashfunc tuple_hash, long_hash, unicode_hash; + richcmpfunc tuple_compare, long_compare, unicode_compare; + destructor bool_dealloc; + PyMappingMethods *dict_mapping; + PySequenceMethods *dict_sequence; + binaryfunc dict_subscript; + objobjargproc dict_assign; + objobjproc dict_contains; + uint64_t calls, checks, safe, unsupported, empty_safe; + uint64_t slots, shape_items, hash_calls, matching_entries; + uint64_t bad_query, bad_layout, watched, bad_key, bad_value, budget; + uint64_t widths_seen; +} ProbeState; + +static void +add_count(ProbeState *state, uint64_t *counter, uint64_t amount) +{ + if (UINT64_MAX - *counter < amount) { + *counter = UINT64_MAX; + state->overflow = 1; + } + else { + *counter += amount; + } +} + +/* Public runtime/type metadata only; no dictionary private-field access. */ +static int +runtime_check(ProbeState *state) +{ + if (!state || !state->initialized || !PyGILState_Check() || + Py_Version != (unsigned long)PY_VERSION_HEX || + PyInterpreterState_GetID(PyThreadState_GetInterpreter(PyThreadState_Get())) != state->interpreter_id || + state->interpreter_id != 0 || + PyDict_Type.tp_basicsize != (Py_ssize_t)sizeof(PyDictObject) || + PyTuple_Type.tp_basicsize != (Py_ssize_t)offsetof(PyTupleObject, ob_item) || + PyTuple_Type.tp_itemsize != (Py_ssize_t)sizeof(PyObject *) || + PyTuple_Type.tp_hash != state->tuple_hash || + PyLong_Type.tp_hash != state->long_hash || + PyUnicode_Type.tp_hash != state->unicode_hash || + PyTuple_Type.tp_richcompare != state->tuple_compare || + PyLong_Type.tp_richcompare != state->long_compare || + PyUnicode_Type.tp_richcompare != state->unicode_compare || + PyBool_Type.tp_dealloc != state->bool_dealloc || + PyDict_Type.tp_as_mapping != state->dict_mapping || + PyDict_Type.tp_as_sequence != state->dict_sequence || + !state->dict_mapping || !state->dict_sequence || + state->dict_mapping->mp_subscript != state->dict_subscript || + state->dict_mapping->mp_ass_subscript != state->dict_assign || + state->dict_sequence->sq_contains != state->dict_contains) { + PyErr_SetString(PyExc_RuntimeError, "Probe public runtime/type profile changed"); + return -1; + } + add_count(state, &state->checks, 1); + return 0; +} + +static ProbeState * +checked_state(PyObject *module, int require_armed) +{ + ProbeState *state = (ProbeState *)PyModule_GetState(module); + if (runtime_check(state) < 0) + return NULL; + if (require_armed && !state->armed) { + PyErr_SetString(PyExc_RuntimeError, "Probe is not authenticated and active"); + return NULL; + } + return state; +} + +static int +shape_item(ProbeState *state, uint32_t *used) +{ + if (*used >= SHAPE_CAP) + return 0; + ++*used; + add_count(state, &state->shape_items, 1); + return 1; +} + +/* Return 1 safe, 0 unsupported shape, -1 exhausted shape budget. + * Depth is exactly the original schema; no recursive user dispatch. */ +static int +integer_tuple_contents(ProbeState *state, PyObject *part, uint32_t *used) +{ + /* Caller has charged part before any type/size inspection. */ + if (!part || !PyTuple_CheckExact(part)) + return 0; + Py_ssize_t n = PyTuple_GET_SIZE(part); + for (Py_ssize_t i = 0; i < n; ++i) { + if (!shape_item(state, used)) + return -1; + PyObject *value = PyTuple_GET_ITEM(part, i); + if (!value || !PyLong_CheckExact(value)) + return 0; + } + return 1; +} + +static int +integer_tuple(ProbeState *state, PyObject *part, uint32_t *used) +{ + if (!shape_item(state, used)) + return -1; + return integer_tuple_contents(state, part, used); +} + +static int +key_shape(ProbeState *state, PyObject *key, uint32_t *used) +{ + if (!shape_item(state, used)) + return -1; + if (!key || !PyTuple_CheckExact(key) || PyTuple_GET_SIZE(key) != 2) + return 0; + PyObject *first = PyTuple_GET_ITEM(key, 0); + PyObject *second = PyTuple_GET_ITEM(key, 1); + if (!first || !second) + return 0; + if (!shape_item(state, used)) + return -1; /* charge first before its first type inspection */ + if (PyUnicode_CheckExact(first)) { + if (PyUnicode_GET_LENGTH(first) != 5 || + PyUnicode_READ_CHAR(first, 0) != 'l' || + PyUnicode_READ_CHAR(first, 1) != 'a' || + PyUnicode_READ_CHAR(first, 2) != 'b' || + PyUnicode_READ_CHAR(first, 3) != 'e' || + PyUnicode_READ_CHAR(first, 4) != 'l') + return 0; + } + else { + int first_ok = integer_tuple_contents(state, first, used); + if (first_ok != 1) + return first_ok; + } + return integer_tuple(state, second, used); +} + +/* Width and i were bounded before entry. memcpy avoids alignment/aliasing + * assumptions beyond the authenticated header's byte-array layout. */ +static Py_ssize_t +read_index_bytes(const char *indices, size_t i, unsigned int width) +{ + const char *address = indices + i * width; + if (width == 1) { + int8_t value; + memcpy(&value, address, sizeof value); + return value; + } + if (width == 2) { + int16_t value; + memcpy(&value, address, sizeof value); + return value; + } + int32_t value; + memcpy(&value, address, sizeof value); + return value; +} + +static PyObject * +unsupported(ProbeState *state, uint64_t *reason) +{ + add_count(state, &state->unsupported, 1); + add_count(state, reason, 1); + Py_RETURN_NOTIMPLEMENTED; +} + +static PyObject * +probe_inspect(PyObject *module, PyObject *const *args, Py_ssize_t nargs) +{ + ProbeState *state = checked_state(module, 1); + if (!state) + return NULL; + if (nargs != 2) { + PyErr_SetString(PyExc_TypeError, "inspect requires exactly mapping and key"); + return NULL; + } + add_count(state, &state->calls, 1); + PyObject *mapping = args[0], *query = args[1]; + if (!PyDict_CheckExact(mapping)) + return unsupported(state, &state->bad_layout); + uint32_t used = 0; + int query_ok = key_shape(state, query, &used); + if (query_ok != 1) + return unsupported(state, query_ok < 0 ? &state->budget : &state->bad_query); + add_count(state, &state->hash_calls, 1); + Py_hash_t hash = PyObject_Hash(query); + if (hash == -1) + return NULL; /* exact schema cannot normally fail; preserve exception */ + + /* First private ABI access: frontend must have authenticated and armed us. */ + PyDictObject *dict = (PyDictObject *)mapping; + if (dict->ma_values != NULL || dict->ma_keys == NULL || dict->ma_used < 0) + return unsupported(state, &state->bad_layout); + if ((dict->ma_version_tag & DICT_VERSION_MASK) != 0) + return unsupported(state, &state->watched); + PyDictKeysObject *keys = dict->ma_keys; + + /* Independently reviewed empty bootstrap: authenticated field profile, + * not pointer identity. No entry address or entry/value read occurs. */ + if (keys->dk_kind == DICT_KEYS_UNICODE && dict->ma_used == 0 && + keys->dk_log2_size == 0 && keys->dk_log2_index_bytes == 0 && + keys->dk_version == 1 && keys->dk_usable == 0 && + keys->dk_nentries == 0 && keys->dk_refcnt == _Py_IMMORTAL_REFCNT) { + int8_t first_index; + add_count(state, &state->slots, 1); + memcpy(&first_index, keys->dk_indices, sizeof first_index); + if (first_index != DKIX_EMPTY) + return unsupported(state, &state->bad_layout); + add_count(state, &state->empty_safe, 1); + add_count(state, &state->safe, 1); + Py_RETURN_TRUE; + } + if (keys->dk_kind != DICT_KEYS_GENERAL || keys->dk_refcnt != 1) + return unsupported(state, &state->bad_layout); + unsigned int log_size = keys->dk_log2_size; + if (log_size < 3 || log_size > MAX_LOG2_SIZE) + return unsupported(state, &state->bad_layout); + unsigned int width_log = log_size < 8 ? 0 : (log_size < 16 ? 1 : 2); + unsigned int width = 1u << width_log; + unsigned int index_log = log_size + width_log; + if (keys->dk_log2_index_bytes != index_log || index_log >= sizeof(size_t) * 8) + return unsupported(state, &state->bad_layout); + size_t table_size = (size_t)1 << log_size; + size_t entry_capacity = (table_size * 2) / 3; + if (keys->dk_nentries < 0 || keys->dk_usable < 0 || + (size_t)keys->dk_nentries > entry_capacity || + (size_t)keys->dk_usable > entry_capacity - (size_t)keys->dk_nentries || + dict->ma_used > keys->dk_nentries) + return unsupported(state, &state->bad_layout); + PyDictKeyEntry *entries = (PyDictKeyEntry *)(keys->dk_indices + ((size_t)1 << index_log)); + size_t mask = table_size - 1; + size_t perturb = (size_t)hash; + size_t index = (size_t)hash & mask; + state->widths_seen |= width; + for (uint32_t visits = 0; visits < PROBE_CAP; ++visits) { + add_count(state, &state->slots, 1); + Py_ssize_t slot = read_index_bytes(keys->dk_indices, index, width); + if (slot == DKIX_EMPTY) { + add_count(state, &state->safe, 1); + Py_RETURN_TRUE; + } + if (slot != DKIX_DUMMY) { + if (slot < 0 || slot >= keys->dk_nentries) + return unsupported(state, &state->bad_layout); + PyDictKeyEntry *entry = &entries[slot]; + if (entry->me_hash == hash) { + add_count(state, &state->matching_entries, 1); + int key_ok = key_shape(state, entry->me_key, &used); + if (key_ok != 1) + return unsupported(state, key_ok < 0 ? &state->budget : &state->bad_key); + /* TYPE ONLY: no truth/equality, reference retention or answer use. */ + if (entry->me_value == NULL || !Py_IS_TYPE(entry->me_value, &PyBool_Type)) + return unsupported(state, &state->bad_value); + } + } + perturb >>= PROBE_PERTURB_SHIFT; + index = (index * 5 + perturb + 1) & mask; + } + return unsupported(state, &state->budget); +} + +static PyObject * +probe_check(PyObject *module, PyObject *unused) +{ + (void)unused; + if (!checked_state(module, 1)) + return NULL; + Py_RETURN_NONE; +} + +static PyObject * +probe_activate(PyObject *module, PyObject *unused) +{ + (void)unused; + ProbeState *state = checked_state(module, 0); + if (!state) + return NULL; + if (state->armed) { + PyErr_SetString(PyExc_RuntimeError, "Probe module already has an owner"); + return NULL; + } + state->armed = 1; + Py_RETURN_NONE; +} + +static PyObject * +probe_deactivate(PyObject *module, PyObject *unused) +{ + (void)unused; + ProbeState *state = (ProbeState *)PyModule_GetState(module); + if (!state) { + PyErr_SetString(PyExc_RuntimeError, "Probe module state missing"); + return NULL; + } + state->armed = 0; + Py_RETURN_NONE; +} + +static PyObject * +probe_profile(PyObject *module, PyObject *unused) +{ + (void)unused; + if (!checked_state(module, 0)) + return NULL; + return Py_BuildValue("(iiiiiiiiiiiiiii)", PROBE_SCHEMA, PY_VERSION_HEX, + (int)sizeof(void *), (int)sizeof(size_t), (int)sizeof(Py_hash_t), + (int)sizeof(PyDictObject), (int)offsetof(PyDictObject, ma_keys), + (int)offsetof(PyDictObject, ma_values), + (int)offsetof(PyDictKeysObject, dk_indices), (int)sizeof(PyDictKeyEntry), + DICT_MAX_WATCHERS, PROBE_PERTURB_SHIFT, MAX_LOG2_SIZE, PROBE_CAP, SHAPE_CAP); +} + +static PyObject * +probe_counters(PyObject *module, PyObject *unused) +{ + (void)unused; + ProbeState *state = checked_state(module, 1); + if (!state) + return NULL; + return Py_BuildValue("{s:K,s:K,s:K,s:K,s:K,s:K,s:K,s:K,s:K,s:K,s:K,s:K,s:K,s:K,s:K,s:K,s:i}", + "calls", (unsigned long long)state->calls, + "checks", (unsigned long long)state->checks, + "safe", (unsigned long long)state->safe, + "unsupported", (unsigned long long)state->unsupported, + "empty_safe", (unsigned long long)state->empty_safe, + "slots", (unsigned long long)state->slots, + "shape_items", (unsigned long long)state->shape_items, + "hash_calls", (unsigned long long)state->hash_calls, + "matching_entries", (unsigned long long)state->matching_entries, + "bad_query", (unsigned long long)state->bad_query, + "bad_layout", (unsigned long long)state->bad_layout, + "watched", (unsigned long long)state->watched, + "bad_key", (unsigned long long)state->bad_key, + "bad_value", (unsigned long long)state->bad_value, + "budget", (unsigned long long)state->budget, + "widths_seen", (unsigned long long)state->widths_seen, + "counter_overflow", state->overflow); +} + +static int +probe_exec(PyObject *module) +{ + ProbeState *state = (ProbeState *)PyModule_GetState(module); + if (!state) + return -1; + if (!PyGILState_Check() || Py_Version != (unsigned long)PY_VERSION_HEX || + PyDict_Type.tp_basicsize != (Py_ssize_t)sizeof(PyDictObject)) { + PyErr_SetString(PyExc_ImportError, "Probe unsupported public runtime profile"); + return -1; + } + state->interpreter_id = PyInterpreterState_GetID(PyThreadState_GetInterpreter(PyThreadState_Get())); + state->tuple_hash = PyTuple_Type.tp_hash; + state->long_hash = PyLong_Type.tp_hash; + state->unicode_hash = PyUnicode_Type.tp_hash; + state->tuple_compare = PyTuple_Type.tp_richcompare; + state->long_compare = PyLong_Type.tp_richcompare; + state->unicode_compare = PyUnicode_Type.tp_richcompare; + state->bool_dealloc = PyBool_Type.tp_dealloc; + state->dict_mapping = PyDict_Type.tp_as_mapping; + state->dict_sequence = PyDict_Type.tp_as_sequence; + if (!state->dict_mapping || !state->dict_sequence || !state->tuple_hash || + !state->long_hash || !state->unicode_hash || !state->tuple_compare || + !state->long_compare || !state->unicode_compare || !state->bool_dealloc) { + PyErr_SetString(PyExc_ImportError, "Probe public type slots missing"); + return -1; + } + state->dict_subscript = state->dict_mapping->mp_subscript; + state->dict_assign = state->dict_mapping->mp_ass_subscript; + state->dict_contains = state->dict_sequence->sq_contains; + state->initialized = 1; + return runtime_check(state); +} + +/* Additive bootstrap helpers; their state and entries never enter field reads. */ +static struct PyModuleDef probe_module; +#include "field_loader_snapshot_v1.h" + +static PyMethodDef probe_methods[] = { + {"inspect", (PyCFunction)(void(*)(void))probe_inspect, METH_FASTCALL, "Fresh callback-safety metadata: True or NotImplemented."}, + {"check", probe_check, METH_NOARGS, "Check public runtime and captured type slots."}, + {"profile", probe_profile, METH_NOARGS, "Public build/profile metadata; no dict inspection."}, + {"counters", probe_counters, METH_NOARGS, "Fresh bounded operational counters; never authority."}, + {"_activate", probe_activate, METH_NOARGS, "Provider lifecycle after authenticated loading."}, + {"_deactivate", probe_deactivate, METH_NOARGS, "Release this module's active owner."}, + {"_field_loader_maps", probe_field_loader_maps, METH_NOARGS, "Once-only bootstrap map inventory; no symbol resolution."}, + {"_field_loader_snapshot", probe_field_loader_snapshot, METH_O, "Once-only admitted main-scope symbol resolution."}, + {NULL, NULL, 0, NULL} +}; +static PyModuleDef_Slot probe_slots[] = { + {Py_mod_exec, probe_exec}, + {Py_mod_multiple_interpreters, Py_MOD_MULTIPLE_INTERPRETERS_NOT_SUPPORTED}, + {0, NULL} +}; +static struct PyModuleDef probe_module = { + PyModuleDef_HEAD_INIT, + "_h25_dict_probe", + "Fresh source-bound dictionary probe metadata, without answer retention.", + sizeof(ProbeState), + probe_methods, + probe_slots, + NULL, NULL, NULL +}; +PyMODINIT_FUNC +PyInit__h25_dict_probe(void) +{ + return PyModuleDef_Init(&probe_module); +} + +/* Separate multiphase service, sharing no ProbeState or counters. */ +#include "field_service_v1.h" diff --git a/research/h25-c05-v03-input-constructors/inputs/areas/field-negative-variants-v1/pyinit_failure/field_loader_snapshot_v1.h.txt b/research/h25-c05-v03-input-constructors/inputs/areas/field-negative-variants-v1/pyinit_failure/field_loader_snapshot_v1.h.txt new file mode 100644 index 0000000000..e59187ff62 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/inputs/areas/field-negative-variants-v1/pyinit_failure/field_loader_snapshot_v1.h.txt @@ -0,0 +1,495 @@ +/* Bootstrap-only loader evidence, never used by field_id. + * This is not a loader or global-provider authentication replacement. Root + * authenticates these original builtin entries and the admitted process/OS + * closure before use. After maps(), Root must authenticate actual inventory, + * all requested definitions/winners/versions and every permitted OS IFUNC + * resolver/result family BEFORE snapshot() invokes dlsym/dlvsym. + * No named dlopen, dlclose, new namespace, or Python callback is introduced. + * Main handle is deliberately retained through process exit, including errors. + */ +#ifndef H25_FIELD_LOADER_SNAPSHOT_V1_H +#define H25_FIELD_LOADER_SNAPSHOT_V1_H + +#include +#include +#include + +#define H25_MAP_CAP 128 +#define H25_MAP_NAME_CAP 1024 +#define H25_PHDR_CAP 64 +#define H25_SEGMENT_CAP 32 +#define H25_SYMBOL_CAP 512 +#define H25_SYMBOL_NAME_CAP 256 +_Static_assert(RTLD_NOW == 2 && RTLD_LOCAL == 0 && LM_ID_BASE == 0, + "loader flag and base-namespace profile"); + +typedef struct { + uint64_t lo, hi; + unsigned int flags; +} H25LoadSegment; +typedef struct { + uint64_t base, phdr; + char name[H25_MAP_NAME_CAP]; + size_t segment_count; + H25LoadSegment segments[H25_SEGMENT_CAP]; +} H25MapRecord; +typedef struct { + size_t count; + unsigned long long adds, subs; + int failed; + H25MapRecord maps[H25_MAP_CAP]; +} H25MapSnapshot; +typedef struct { + const char *name, *version; + int weak, requested_type; + uint64_t address, provider_base; + const char *provider_name; + int has_address_symbol, address_symbol_type; + uint64_t address_symbol_address; +} H25SymbolResult; +_Static_assert(sizeof(H25LoadSegment) == 24, "loader segment storage profile"); +_Static_assert(sizeof(H25MapRecord) == 1816, "loader map storage profile"); +_Static_assert(sizeof(H25MapSnapshot) == 232480, "loader snapshot storage profile"); +_Static_assert(sizeof(H25SymbolResult) == 64, "loader symbol storage profile"); + +/* All storage is local to this ELF. There are no Python roots here. Static + * bounded buffers avoid unbounded loader callbacks or large C stack frames. + * Serialized bootstrap and no concurrent load mutation are inherited gates. */ +static H25MapSnapshot h25_loader_baseline, h25_loader_before, h25_loader_after; +static H25SymbolResult h25_loader_symbols[H25_SYMBOL_CAP]; +static void *h25_loader_main_handle; +static int h25_loader_maps_attempted, h25_loader_maps_ready; +static int h25_loader_symbols_attempted; + +static int +h25_loader_error(const char *message) +{ + PyErr_SetString(PyExc_RuntimeError, message); + return -1; +} + +static int +h25_loader_copy_name(char *to, const char *from) +{ + if (!from) + return -1; + for (size_t i = 0; i < H25_MAP_NAME_CAP; ++i) { + unsigned char c = (unsigned char)from[i]; + if (c > 127) + return -1; + to[i] = (char)c; + if (c == 0) + return 0; + } + return -1; +} + +/* Only called by authenticated libc dl_iterate_phdr, never by Python. */ +static int +h25_loader_collect(struct dl_phdr_info *info, size_t size, void *opaque) +{ + H25MapSnapshot *out = (H25MapSnapshot *)opaque; + if (size < offsetof(struct dl_phdr_info, dlpi_subs) + sizeof(info->dlpi_subs) || + out->count >= H25_MAP_CAP || !info->dlpi_phdr || + info->dlpi_phnum == 0 || info->dlpi_phnum > H25_PHDR_CAP) { + out->failed = 1; + return 1; + } + if (!out->count) { + out->adds = info->dlpi_adds; + out->subs = info->dlpi_subs; + } + else if (out->adds != info->dlpi_adds || out->subs != info->dlpi_subs) { + out->failed = 1; + return 1; + } + H25MapRecord *record = &out->maps[out->count]; + record->base = (uint64_t)info->dlpi_addr; + record->phdr = (uint64_t)(uintptr_t)info->dlpi_phdr; + record->segment_count = 0; + if (h25_loader_copy_name(record->name, info->dlpi_name) < 0) { + out->failed = 1; + return 1; + } + for (size_t i = 0; i < info->dlpi_phnum; ++i) { + const ElfW(Phdr) *p = &info->dlpi_phdr[i]; + if (p->p_type != PT_LOAD) + continue; + if (!p->p_memsz || p->p_filesz > p->p_memsz || + record->segment_count >= H25_SEGMENT_CAP || + p->p_vaddr > UINT64_MAX - record->base || + p->p_memsz > UINT64_MAX - (record->base + p->p_vaddr) || + (p->p_flags & ~(PF_R | PF_W | PF_X))) { + out->failed = 1; + return 1; + } + H25LoadSegment *segment = &record->segments[record->segment_count++]; + segment->lo = record->base + p->p_vaddr; + segment->hi = segment->lo + p->p_memsz; + segment->flags = p->p_flags; + } + if (!record->segment_count) { + out->failed = 1; + return 1; + } + ++out->count; + return 0; +} + +static int +h25_loader_take_maps(H25MapSnapshot *out) +{ + out->count = 0; + out->adds = out->subs = 0; + out->failed = 0; + int result = dl_iterate_phdr(h25_loader_collect, out); + if (result || out->failed || !out->count) + return h25_loader_error("Native loader map bounds/profile rejected"); + return 0; +} + +static int +h25_loader_same_maps(const H25MapSnapshot *a, const H25MapSnapshot *b) +{ + if (a->count != b->count || a->adds != b->adds || a->subs != b->subs) + return 0; + for (size_t i = 0; i < a->count; ++i) { + const H25MapRecord *x = &a->maps[i], *y = &b->maps[i]; + if (x->base != y->base || x->phdr != y->phdr || + x->segment_count != y->segment_count || strcmp(x->name, y->name)) + return 0; + for (size_t j = 0; j < x->segment_count; ++j) { + if (x->segments[j].lo != y->segments[j].lo || + x->segments[j].hi != y->segments[j].hi || + x->segments[j].flags != y->segments[j].flags) + return 0; + } + } + return 1; +} + +static int +h25_loader_module_check(PyObject *module) +{ + if (!PyModule_CheckExact(module) || PyModule_GetDef(module) != &probe_module) + return h25_loader_error("Loader helper requires original production owner"); + ProbeState *state = (ProbeState *)PyModule_GetState(module); + if (!state || !state->initialized || !state->armed || !PyGILState_Check() || + Py_Version != (unsigned long)PY_VERSION_HEX || state->interpreter_id != 0 || + PyInterpreterState_GetID(PyThreadState_GetInterpreter(PyThreadState_Get())) != 0) + return h25_loader_error("Loader helper requires admitted active bootstrap"); + /* Original provider.guard already authenticated all original slots. Do not + * increment or repurpose the six original entries' metadata counters. */ + return 0; +} + +static int +h25_loader_namespace(void) +{ + Lmid_t namespace_id = (Lmid_t)-1; + struct link_map *main_map = NULL; + if (!h25_loader_main_handle || + dlinfo(h25_loader_main_handle, RTLD_DI_LMID, &namespace_id) != 0 || + namespace_id != LM_ID_BASE || + dlinfo(h25_loader_main_handle, RTLD_DI_LINKMAP, &main_map) != 0 || + !main_map || main_map->l_prev || !main_map->l_name || main_map->l_name[0]) + return h25_loader_error("Loader helper requires base main-program handle"); + if (!h25_loader_before.count || + h25_loader_before.maps[0].base != (uint64_t)main_map->l_addr || + h25_loader_before.maps[0].name[0]) + return h25_loader_error("Loader enumeration is not the admitted base namespace"); + return 0; +} + +static PyObject * +h25_loader_maps_tuple(const H25MapSnapshot *snapshot) +{ + PyObject *maps = PyTuple_New((Py_ssize_t)snapshot->count); + if (!maps) + return NULL; + for (size_t i = 0; i < snapshot->count; ++i) { + const H25MapRecord *record = &snapshot->maps[i]; + PyObject *segments = PyTuple_New((Py_ssize_t)record->segment_count); + if (!segments) { + Py_DECREF(maps); + return NULL; + } + for (size_t j = 0; j < record->segment_count; ++j) { + const H25LoadSegment *s = &record->segments[j]; + PyObject *segment = Py_BuildValue("(KKI)", + (unsigned long long)s->lo, (unsigned long long)s->hi, s->flags); + if (!segment) { + Py_DECREF(segments); + Py_DECREF(maps); + return NULL; + } + PyTuple_SET_ITEM(segments, (Py_ssize_t)j, segment); + } + PyObject *item = Py_BuildValue("(KKsO)", + (unsigned long long)record->base, (unsigned long long)record->phdr, + record->name, segments); + Py_DECREF(segments); + if (!item) { + Py_DECREF(maps); + return NULL; + } + PyTuple_SET_ITEM(maps, (Py_ssize_t)i, item); + } + return maps; +} + +static PyObject * +h25_loader_symbol_tuple(PyObject *requests, Py_ssize_t count) +{ + PyObject *results = PyTuple_New(count); + if (!results) + return NULL; + for (Py_ssize_t i = 0; i < count; ++i) { + H25SymbolResult *r = &h25_loader_symbols[i]; + PyObject *request = PyTuple_GET_ITEM(requests, i); + PyObject *provider = PyUnicode_FromString(r->provider_name ? r->provider_name : ""); + PyObject *address_type = r->has_address_symbol ? PyLong_FromLong(r->address_symbol_type) : Py_NewRef(Py_None); + PyObject *symbol_address = r->has_address_symbol ? PyLong_FromUnsignedLongLong(r->address_symbol_address) : Py_NewRef(Py_None); + if (!provider || !address_type || !symbol_address) { + Py_XDECREF(provider); Py_XDECREF(address_type); Py_XDECREF(symbol_address); + Py_DECREF(results); + return NULL; + } + PyObject *item = Py_BuildValue("(OOOOKKOOO)", + PyTuple_GET_ITEM(request, 0), PyTuple_GET_ITEM(request, 1), + PyTuple_GET_ITEM(request, 2), PyTuple_GET_ITEM(request, 3), + (unsigned long long)r->address, (unsigned long long)r->provider_base, + provider, address_type, symbol_address); + Py_DECREF(provider); Py_DECREF(address_type); Py_DECREF(symbol_address); + if (!item) { + Py_DECREF(results); + return NULL; + } + PyTuple_SET_ITEM(results, i, item); + } + return results; +} + +static PyObject * +h25_loader_result(PyObject *requests, Py_ssize_t count) +{ + PyObject *before = h25_loader_maps_tuple(&h25_loader_before); + if (!before) + return NULL; + PyObject *after = h25_loader_maps_tuple(&h25_loader_after); + if (!after) { + Py_DECREF(before); + return NULL; + } + PyObject *symbols = h25_loader_symbol_tuple(requests, count); + if (!symbols) { + Py_DECREF(before); Py_DECREF(after); + return NULL; + } + PyObject *result = Py_BuildValue("{s:s,s:i,s:i,s:s,s:O,s:O,s:O}", + "schema", "h25-native-provider-snapshot-v1", "namespace", 0, "flags", 2, + "scope", "retained-main-handle", "maps_before", before, "maps_after", after, + "symbol_results", symbols); + Py_DECREF(before); Py_DECREF(after); Py_DECREF(symbols); + return result; +} + +static PyObject * +probe_field_loader_maps(PyObject *module, PyObject *unused) +{ + (void)unused; + if (h25_loader_module_check(module) < 0) + return NULL; + if (h25_loader_maps_attempted) { + h25_loader_error("Loader map capture is single-use"); + return NULL; + } + h25_loader_maps_attempted = 1; + if (h25_loader_take_maps(&h25_loader_before) < 0) + return NULL; + /* glibc 2.39 dlfcn/dlopen.c selects BASE for NULL; dl-open.c names + * the main link map's searchlist as global scope. The existing main map + * is returned; no pathname/dependency load or scope promotion is asked. + * No dlclose occurs, even on error. Root must bill the retained handle. */ + h25_loader_main_handle = dlopen(NULL, RTLD_NOW | RTLD_LOCAL); + if (!h25_loader_main_handle) { + h25_loader_error("Retained main-program handle unavailable"); + return NULL; + } + if (h25_loader_namespace() < 0 || h25_loader_take_maps(&h25_loader_after) < 0) + return NULL; + if (!h25_loader_same_maps(&h25_loader_before, &h25_loader_after)) { + h25_loader_error("Main-program handle changed loaded maps"); + return NULL; + } + h25_loader_baseline = h25_loader_after; + PyObject *result = h25_loader_result(NULL, 0); + if (result) + h25_loader_maps_ready = 1; + return result; +} + +static int +h25_loader_ascii(PyObject *value, const char **out) +{ + if (!PyUnicode_CheckExact(value) || !PyUnicode_IS_ASCII(value) || + PyUnicode_GET_LENGTH(value) <= 0 || + PyUnicode_GET_LENGTH(value) >= H25_SYMBOL_NAME_CAP) + return h25_loader_error("Loader request name/version is not bounded exact ASCII"); + const char *data = (const char *)PyUnicode_1BYTE_DATA(value); + for (Py_ssize_t i = 0; i < PyUnicode_GET_LENGTH(value); ++i) { + if (!data[i]) + return h25_loader_error("Loader request name/version contains NUL"); + } + *out = data; + return 0; +} + +static int +h25_loader_requests(PyObject *requests, Py_ssize_t *count) +{ + if (!PyTuple_CheckExact(requests) || PyTuple_GET_SIZE(requests) > H25_SYMBOL_CAP) + return h25_loader_error("Loader requests require bounded exact tuple"); + *count = PyTuple_GET_SIZE(requests); + for (Py_ssize_t i = 0; i < *count; ++i) { + PyObject *request = PyTuple_GET_ITEM(requests, i); + if (!PyTuple_CheckExact(request) || PyTuple_GET_SIZE(request) != 4 || + !PyBool_Check(PyTuple_GET_ITEM(request, 2)) || + !PyLong_CheckExact(PyTuple_GET_ITEM(request, 3))) + return h25_loader_error("Loader request schema changed"); + H25SymbolResult *r = &h25_loader_symbols[i]; + r->name = r->version = r->provider_name = NULL; + r->address = r->provider_base = r->address_symbol_address = 0; + r->has_address_symbol = r->address_symbol_type = 0; + if (h25_loader_ascii(PyTuple_GET_ITEM(request, 0), &r->name) < 0) + return -1; + PyObject *version = PyTuple_GET_ITEM(request, 1); + if (version != Py_None && h25_loader_ascii(version, &r->version) < 0) + return -1; + r->weak = PyTuple_GET_ITEM(request, 2) == Py_True; + long symbol_type = PyLong_AsLong(PyTuple_GET_ITEM(request, 3)); + if (symbol_type == -1 && PyErr_Occurred()) + return -1; + if (symbol_type != STT_NOTYPE && symbol_type != STT_OBJECT && symbol_type != STT_FUNC) + return h25_loader_error("Loader request rejects unsupported import symbol kind"); + r->requested_type = (int)symbol_type; + for (Py_ssize_t j = 0; j < i; ++j) { + H25SymbolResult *previous = &h25_loader_symbols[j]; + if (!strcmp(r->name, previous->name) && + ((!r->version && !previous->version) || + (r->version && previous->version && !strcmp(r->version, previous->version)))) + return h25_loader_error("Loader requests contain duplicate symbol/version"); + } + } + return 0; +} + +static int +h25_loader_resolve(H25SymbolResult *result) +{ + (void)dlerror(); + /* Never RTLD_DEFAULT: that would use the ordinary caller DSO's local + * scope as well. The retained main handle searches the source-admitted + * base global scope. OS IFUNC authorization precedes this call in Root. */ + void *address = result->version ? + dlvsym(h25_loader_main_handle, result->name, result->version) : + dlsym(h25_loader_main_handle, result->name); + const char *error = dlerror(); + if (!address) { + if (!result->weak) + return h25_loader_error("Required strong global symbol did not resolve"); + if (!error) + return h25_loader_error("Resolved null symbol is outside unresolved-weak profile"); + /* Explicit unresolved weak zero. Root must match its admitted weak + * outcome. A strong symbol is never silently converted to weak zero. */ + return 0; + } + if (error) + return h25_loader_error("Loader symbol resolution returned inconsistent error"); + Dl_info info; + struct link_map *map = NULL; + if (!dladdr1(address, &info, (void **)&map, RTLD_DL_LINKMAP) || !map || !map->l_name) + return h25_loader_error("Resolved symbol has no admitted native provider map"); + size_t found = H25_MAP_CAP; + for (size_t i = 0; i < h25_loader_before.count; ++i) { + H25MapRecord *candidate = &h25_loader_before.maps[i]; + if (candidate->base == (uint64_t)map->l_addr && !strcmp(candidate->name, map->l_name)) { + if (found != H25_MAP_CAP) + return h25_loader_error("Resolved symbol provider map is ambiguous"); + found = i; + } + } + if (found == H25_MAP_CAP) + return h25_loader_error("Resolved symbol provider is absent from captured maps"); + H25MapRecord *provider = &h25_loader_before.maps[found]; + uint64_t location = (uint64_t)(uintptr_t)address; + int in_segment = 0; + for (size_t i = 0; i < provider->segment_count; ++i) { + if (location >= provider->segments[i].lo && location < provider->segments[i].hi) + in_segment = 1; + } + if (!in_segment) + return h25_loader_error("Resolved symbol is outside provider PT_LOAD ranges"); + result->address = location; + result->provider_base = provider->base; + result->provider_name = provider->name; + const ElfW(Sym) *address_symbol = NULL; + if (dladdr1(address, &info, (void **)&address_symbol, RTLD_DL_SYMENT) && + address_symbol && info.dli_saddr) { + result->has_address_symbol = 1; + result->address_symbol_type = ELF64_ST_TYPE(address_symbol->st_info); + result->address_symbol_address = (uint64_t)(uintptr_t)info.dli_saddr; + } + /* This last metadata describes only a nearest address symbol, potentially + * absent for hidden IFUNC implementation code. It is not a definition, + * resolver, binding or symbol-version assertion. */ + return 0; +} + +static void +h25_loader_forget_request_pointers(void) +{ + /* Request strings are borrowed only during the call, never retained. */ + for (size_t i = 0; i < H25_SYMBOL_CAP; ++i) { + h25_loader_symbols[i].name = NULL; + h25_loader_symbols[i].version = NULL; + h25_loader_symbols[i].provider_name = NULL; + } +} + +static PyObject * +probe_field_loader_snapshot(PyObject *module, PyObject *requests) +{ + if (h25_loader_module_check(module) < 0) + return NULL; + if (!h25_loader_maps_ready || h25_loader_symbols_attempted) { + h25_loader_error("Loader symbol capture requires successful maps and one attempt"); + return NULL; + } + h25_loader_symbols_attempted = 1; + Py_ssize_t count = 0; + PyObject *result = NULL; + if (h25_loader_requests(requests, &count) < 0 || + h25_loader_take_maps(&h25_loader_before) < 0 || h25_loader_namespace() < 0) + goto done; + if (!h25_loader_same_maps(&h25_loader_baseline, &h25_loader_before)) { + h25_loader_error("Loaded map history changed before symbol resolution"); + goto done; + } + for (Py_ssize_t i = 0; i < count; ++i) { + if (h25_loader_resolve(&h25_loader_symbols[i]) < 0) + goto done; + } + if (h25_loader_take_maps(&h25_loader_after) < 0) + goto done; + if (!h25_loader_same_maps(&h25_loader_before, &h25_loader_after)) { + h25_loader_error("Symbol resolution changed loaded maps"); + goto done; + } + result = h25_loader_result(requests, count); +done: + h25_loader_forget_request_pointers(); + return result; +} + +#endif diff --git a/research/h25-c05-v03-input-constructors/inputs/areas/field-negative-variants-v1/pyinit_failure/field_service_v1.h.txt b/research/h25-c05-v03-input-constructors/inputs/areas/field-negative-variants-v1/pyinit_failure/field_service_v1.h.txt new file mode 100644 index 0000000000..48e7edb334 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/inputs/areas/field-negative-variants-v1/pyinit_failure/field_service_v1.h.txt @@ -0,0 +1,428 @@ +/* Additive indexed field transport. SOURCE ONLY; no runtime admission. + * Original getter/id semantics: CPython 3.12.3 descrobject.c, funcobject.c, + * bltinmodule.c; attribution/license remain in the unchanged probe sources. + * No function-field structure access and no address-derived field IDs. + */ +#ifndef H25_FIELD_SERVICE_V1_H +#define H25_FIELD_SERVICE_V1_H + +#define H25_FIELD_MAGIC UINT64_C(0x4832354649454c44) +#define H25_FIELD_COUNT 7 +/* Concrete source-fixed pointer-table profile consumed by the separate ELF + * parser. These become compiler gates, not evidence of a current binary. */ +_Static_assert(sizeof(PyMethodDef) == 32, "field method table entry size"); +_Static_assert(sizeof(PyModuleDef) == 104, "field module definition size"); +_Static_assert(sizeof(PyModuleDef_Slot) == 16, "field module slot size"); +_Static_assert(offsetof(PyModuleDef, m_traverse) == 80, "module traverse offset"); +_Static_assert(offsetof(PyModuleDef, m_clear) == 88, "module clear offset"); +_Static_assert(offsetof(PyModuleDef, m_free) == 96, "module free offset"); +_Static_assert(offsetof(PyTypeObject, tp_dealloc) == 48, "context dealloc offset"); +_Static_assert(offsetof(PyTypeObject, tp_traverse) == 184, "context traverse offset"); +_Static_assert(offsetof(PyTypeObject, tp_clear) == 192, "context clear offset"); +enum { + H25_FIELD_UNBOUND = 0, H25_FIELD_BOUND = 1, H25_FIELD_CLOSING = 2, + H25_FIELD_CLOSED = 3, H25_FIELD_FAILED = 4 +}; + +typedef struct { + uint64_t magic; + int initialized, phase, bind_attempted, clear_pending, close_authorized; + int64_t interpreter_id; + Py_ssize_t active; + /* These are the only persistent Python roots. No targets or observations. */ + PyObject *getters[H25_FIELD_COUNT]; + PyObject *id0, *function_type, *close_token; +} H25FieldState; + +typedef struct { + PyObject_HEAD + H25FieldState state; +} H25FieldContext; +_Static_assert(sizeof(H25FieldState) == 128, "field primitive state size"); +_Static_assert(sizeof(H25FieldContext) == 144, "field fixture allocation size"); + +static struct PyModuleDef h25_field_module; +static PyTypeObject h25_field_context_type; +static unsigned int h25_field_context_created; +static int h25_field_exec_attempted; +#define H25_FIELD_CONTEXT_CAP 64u + +static H25FieldState * +h25_field_raw_state(PyObject *owner) +{ + if (Py_IS_TYPE(owner, &h25_field_context_type)) + return &((H25FieldContext *)owner)->state; + if (PyModule_CheckExact(owner) && PyModule_GetDef(owner) == &h25_field_module) + return (H25FieldState *)PyModule_GetState(owner); + return NULL; +} + +/* Clear each slot before decref. The token is an exact plain object, and the + * other roots are original builtin primitives, so cleanup adds no candidate + * finalizer. Keep token after logical close for authenticated idempotence. */ +static void +h25_field_drop_roots(H25FieldState *state, int drop_token) +{ + for (int i = 0; i < H25_FIELD_COUNT; ++i) + Py_CLEAR(state->getters[i]); + Py_CLEAR(state->id0); + Py_CLEAR(state->function_type); + if (drop_token) + Py_CLEAR(state->close_token); +} + +static H25FieldState * +h25_field_state(PyObject *module) +{ + H25FieldState *state = h25_field_raw_state(module); + if (!state) { + PyErr_SetString(PyExc_RuntimeError, "Field service owner changed"); + return NULL; + } + if (!state || !state->initialized || state->magic != H25_FIELD_MAGIC || + !PyGILState_Check() || Py_Version != (unsigned long)PY_VERSION_HEX || + state->interpreter_id != 0 || + PyInterpreterState_GetID(PyThreadState_GetInterpreter(PyThreadState_Get())) != state->interpreter_id || + state->active < 0 || state->phase < H25_FIELD_UNBOUND || + state->phase > H25_FIELD_FAILED) { + PyErr_SetString(PyExc_RuntimeError, "Field service native state unavailable"); + return NULL; + } + return state; +} + +static PyObject * +h25_field_bind(PyObject *module, PyObject *const *args, Py_ssize_t nargs) +{ + H25FieldState *state = h25_field_state(module); + if (!state) + return NULL; + if (state->bind_attempted || state->phase != H25_FIELD_UNBOUND || + state->active || state->clear_pending) { + PyErr_SetString(PyExc_RuntimeError, "Field primitive binding is single-use"); + return NULL; + } + /* Failed first binding is terminal; there is no partial registration. */ + state->bind_attempted = 1; + state->phase = H25_FIELD_FAILED; + if (nargs != 4 || !PyTuple_CheckExact(args[0]) || + PyTuple_GET_SIZE(args[0]) != H25_FIELD_COUNT || + !PyCFunction_CheckExact(args[1]) || + PyCFunction_GET_FLAGS(args[1]) != METH_O || + args[2] != (PyObject *)&PyFunction_Type || + !Py_IS_TYPE(args[3], &PyBaseObject_Type)) { + PyErr_SetString(PyExc_TypeError, "Field binding requires exact original primitive packet"); + return NULL; + } + for (int i = 0; i < H25_FIELD_COUNT; ++i) { + if (!Py_IS_TYPE(PyTuple_GET_ITEM(args[0], i), &_PyMethodWrapper_Type)) { + PyErr_SetString(PyExc_TypeError, "Field getter must be an original bound method-wrapper"); + return NULL; + } + } + /* Root authenticates each object's identity and descriptor ownership before + * this call. The native type checks above are not substitute provenance. */ + for (int i = 0; i < H25_FIELD_COUNT; ++i) + state->getters[i] = Py_NewRef(PyTuple_GET_ITEM(args[0], i)); + state->id0 = Py_NewRef(args[1]); + state->function_type = Py_NewRef(args[2]); + state->close_token = Py_NewRef(args[3]); + state->phase = H25_FIELD_BOUND; + Py_RETURN_NONE; +} + +static void +h25_field_leave(H25FieldState *state) +{ + /* Each successful enter has exactly one leave, with the GIL continuously + * held apart from original getter/id callbacks' own behavior. */ + --state->active; + if (state->active == 0) { + if (state->clear_pending) { + state->phase = H25_FIELD_FAILED; + h25_field_drop_roots(state, 1); + } + else if (state->phase == H25_FIELD_CLOSING) { + state->phase = H25_FIELD_CLOSED; + h25_field_drop_roots(state, 0); + } + } +} + +static PyObject * +h25_field_id(PyObject *module, PyObject *const *args, Py_ssize_t nargs) +{ + H25FieldState *state = h25_field_state(module); + if (!state) + return NULL; + if (nargs != 2 || !PyFunction_Check(args[0]) || !PyLong_CheckExact(args[1])) { + PyErr_SetString(PyExc_TypeError, "field_id requires exact function and integer index"); + return NULL; + } + long index = PyLong_AsLong(args[1]); + if (index == -1 && PyErr_Occurred()) + return NULL; + if (index < 0 || index >= H25_FIELD_COUNT) { + PyErr_SetString(PyExc_IndexError, "field_id index must be in 0..6"); + return NULL; + } + if ((state->phase == H25_FIELD_CLOSING || state->phase == H25_FIELD_CLOSED) && + state->close_authorized && state->close_token && !state->clear_pending) { + /* Exact None can never be an original builtin id result. Root must + * independently witness legitimate CLOSING/CLOSED before fallback. */ + Py_RETURN_NONE; + } + if (state->phase != H25_FIELD_BOUND || state->clear_pending || + !state->bind_attempted || state->close_authorized || !state->close_token || + !state->getters[index] || !state->id0 || + state->function_type != (PyObject *)&PyFunction_Type) { + PyErr_SetString(PyExc_RuntimeError, "Field service is not bound and active"); + return NULL; + } + if (state->active == PY_SSIZE_T_MAX) { + PyErr_SetString(PyExc_OverflowError, "Field service active-call bound exhausted"); + return NULL; + } + /* Acquire every call root before the first observable field event. Neither + * a legitimate close nor GC clear may release state while active != 0. */ + PyObject *owner = Py_NewRef(module); + PyObject *getter = Py_NewRef(state->getters[index]); + PyObject *id0 = Py_NewRef(state->id0); + PyObject *function_type = Py_NewRef(state->function_type); + ++state->active; + PyObject *getter_args[2] = {args[0], function_type}; + PyObject *temporary = PyObject_Vectorcall(getter, getter_args, 2, NULL); + PyObject *result = NULL; + PyObject *error = NULL; + if (temporary) { + /* The original builtin id is invoked even after a legitimate close + * inside the getter. No direct field read, pointer-ID shortcut, retry + * or other field lookup occurs here. */ + result = PyObject_CallOneArg(id0, temporary); + if (!result) + error = PyErr_GetRaisedException(); + /* This is the original expression's temporary-release point. An id + * audit may have detached the field, making this its last reference. + * Its finalizer must run BEFORE return/Python's expected comparison. */ + Py_DECREF(temporary); + } + else { + error = PyErr_GetRaisedException(); + } + h25_field_leave(state); + Py_DECREF(function_type); + Py_DECREF(id0); + Py_DECREF(getter); + /* No state access after owner DECREF. */ + Py_DECREF(owner); + if (!result) + PyErr_SetRaisedException(error); + return result; +} + +static PyObject * +h25_field_close(PyObject *module, PyObject *token) +{ + H25FieldState *state = h25_field_state(module); + if (!state) + return NULL; + if (!state->close_token || token != state->close_token || state->clear_pending || + (state->phase != H25_FIELD_BOUND && state->phase != H25_FIELD_CLOSING && + state->phase != H25_FIELD_CLOSED)) { + PyErr_SetString(PyExc_RuntimeError, "Field close lacks the original owner token"); + return NULL; + } + state->close_authorized = 1; + state->phase = state->active ? H25_FIELD_CLOSING : H25_FIELD_CLOSED; + if (!state->active) + h25_field_drop_roots(state, 0); + Py_RETURN_NONE; +} + +static PyObject * +h25_field_status(PyObject *module, PyObject *unused) +{ + (void)unused; + H25FieldState *state = h25_field_state(module); + if (!state) + return NULL; + return Py_BuildValue("(iiniL)", 1, state->phase, state->active, + state->bind_attempted, (long long)state->interpreter_id); +} + +static PyObject * +h25_field_abi(PyObject *module, PyObject *unused) +{ + (void)unused; + if (!h25_field_state(module)) + return NULL; + return Py_BuildValue("(iiiii)", 1, H25_FIELD_COUNT, PY_VERSION_HEX, + (int)sizeof(void *), 2); +} + +static int +h25_field_traverse(PyObject *module, visitproc visit, void *arg) +{ + H25FieldState *state = h25_field_raw_state(module); + if (!state) + return 0; + for (int i = 0; i < H25_FIELD_COUNT; ++i) + Py_VISIT(state->getters[i]); + Py_VISIT(state->id0); + Py_VISIT(state->function_type); + Py_VISIT(state->close_token); + return 0; +} + +static int +h25_field_clear(PyObject *module) +{ + H25FieldState *state = h25_field_raw_state(module); + if (!state) + return 0; + state->clear_pending = 1; + state->phase = H25_FIELD_FAILED; + if (!state->active) + h25_field_drop_roots(state, 1); + return 0; +} + +static void +h25_field_free(void *module) +{ + /* An active call owns a strong module reference, so module deallocation + * cannot occur during that call. clear remains separately safe/deferred. */ + (void)h25_field_clear((PyObject *)module); + H25FieldState *state = h25_field_raw_state((PyObject *)module); + if (state) + state->magic = 0; +} + +static void +h25_field_context_dealloc(PyObject *context) +{ + /* An active field owns its context just as it owns the primary module. */ + PyObject_GC_UnTrack(context); + (void)h25_field_clear(context); + ((H25FieldContext *)context)->state.magic = 0; + PyObject_GC_Del(context); +} + +static PyObject * +h25_field_new_context(PyObject *module, PyObject *unused) +{ + (void)unused; + if (!PyModule_CheckExact(module) || PyModule_GetDef(module) != &h25_field_module || + !h25_field_state(module)) { + if (!PyErr_Occurred()) + PyErr_SetString(PyExc_RuntimeError, "Field context factory requires original service module"); + return NULL; + } + if (h25_field_context_created >= H25_FIELD_CONTEXT_CAP) { + PyErr_SetString(PyExc_OverflowError, "Field fixture context bound exhausted"); + return NULL; + } + /* Count attempts, including allocation failure; no silent fixture retry. */ + ++h25_field_context_created; + H25FieldContext *context = PyObject_GC_New(H25FieldContext, &h25_field_context_type); + if (!context) + return NULL; + context->state = (H25FieldState){0}; + context->state.magic = H25_FIELD_MAGIC; + context->state.interpreter_id = 0; + context->state.initialized = 1; + context->state.phase = H25_FIELD_UNBOUND; + PyObject_GC_Track(context); + return (PyObject *)context; +} + +static int +h25_field_exec(PyObject *module) +{ + H25FieldState *state = (H25FieldState *)PyModule_GetState(module); + if (!state) + return -1; + if (h25_field_exec_attempted || state->initialized || !PyGILState_Check() || + Py_Version != (unsigned long)PY_VERSION_HEX) { + PyErr_SetString(PyExc_ImportError, "Field service initialization profile rejected"); + return -1; + } + h25_field_exec_attempted = 1; + int64_t interpreter_id = + PyInterpreterState_GetID(PyThreadState_GetInterpreter(PyThreadState_Get())); + if (interpreter_id != 0) { + PyErr_SetString(PyExc_ImportError, "Field service requires the original main interpreter"); + return -1; + } + if (PyType_Ready(&h25_field_context_type) < 0) + return -1; + state->magic = H25_FIELD_MAGIC; + state->interpreter_id = interpreter_id; + state->initialized = 1; + state->phase = H25_FIELD_UNBOUND; + return 0; +} + +static PyMethodDef h25_field_methods[] = { + {"field_id", (PyCFunction)(void(*)(void))h25_field_id, METH_FASTCALL, "One original getter/id event pair, with original temporary disposal."}, + {"_bind_fields", (PyCFunction)(void(*)(void))h25_field_bind, METH_FASTCALL, "Bind the authenticated original primitive packet exactly once."}, + {"_close_fields", h25_field_close, METH_O, "Logical close with original private token; active field completes once."}, + {"_field_status", h25_field_status, METH_NOARGS, "Native phase and active count; no target observations."}, + {"_field_abi", h25_field_abi, METH_NOARGS, "Immutable indexed-field interface profile."}, + {"_new_field_context", h25_field_new_context, METH_NOARGS, "Create one independently bound fixture context in this same image."}, + {NULL, NULL, 0, NULL} +}; +/* Separate table deliberately omits the factory: fixtures cannot manufacture + * other fixtures or reach mutable module storage. Methods remain native + * immutable PyCFunction objects strongly owning their actual context. */ +static PyMethodDef h25_field_context_methods[] = { + {"field_id", (PyCFunction)(void(*)(void))h25_field_id, METH_FASTCALL, "One original getter/id event pair, with original temporary disposal."}, + {"_bind_fields", (PyCFunction)(void(*)(void))h25_field_bind, METH_FASTCALL, "Bind the authenticated original primitive packet exactly once."}, + {"_close_fields", h25_field_close, METH_O, "Logical close with original private token; active field completes once."}, + {"_field_status", h25_field_status, METH_NOARGS, "Native phase and active count; no target observations."}, + {"_field_abi", h25_field_abi, METH_NOARGS, "Immutable indexed-field interface profile."}, + {NULL, NULL, 0, NULL} +}; +static PyTypeObject h25_field_context_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "_h25_field_service_v1._FieldContext", + .tp_basicsize = sizeof(H25FieldContext), + .tp_dealloc = h25_field_context_dealloc, + .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_DISALLOW_INSTANTIATION, + .tp_traverse = h25_field_traverse, + .tp_clear = h25_field_clear, + .tp_methods = h25_field_context_methods, + .tp_doc = "One-shot fixture primitive owner; no dictionary, target roots or reload." +}; +static PyModuleDef_Slot h25_field_slots[] = { + {Py_mod_exec, h25_field_exec}, + {Py_mod_multiple_interpreters, Py_MOD_MULTIPLE_INTERPRETERS_NOT_SUPPORTED}, + {0, NULL} +}; +static struct PyModuleDef h25_field_module = { + PyModuleDef_HEAD_INIT, + "_h25_field_service_v1", + "Source-bound indexed original-primitive transport without target retention.", + sizeof(H25FieldState), + h25_field_methods, + h25_field_slots, + h25_field_traverse, h25_field_clear, h25_field_free +}; +PyMODINIT_FUNC +PyInit__h25_field_service_v1(void) +{ + /* H25_NEGATIVE_FIXTURE_PYINIT_V1: this separate paid fixture reaches the + * original module-definition prefix before its deliberate failure. The + * static PyModuleDef result has no newly acquired heap reference to drop. + * Passing its address to the original external API keeps the definition + * graph source-reachable; actual compiled tables still require ELF checks. + */ + PyObject *definition = PyModuleDef_Init(&h25_field_module); + if (definition == NULL) + return NULL; /* Preserve a genuine original prefix failure. */ + PyErr_SetString(PyExc_ImportError, + "H25 negative pyinit fixture: deliberate failure after module definition initialization"); + return NULL; +} + +#endif diff --git a/research/h25-c05-v03-input-constructors/inputs/areas/field-variant-producer-v2/variant_driver_v1.py.txt b/research/h25-c05-v03-input-constructors/inputs/areas/field-variant-producer-v2/variant_driver_v1.py.txt new file mode 100644 index 0000000000..bfd9b735f6 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/inputs/areas/field-variant-producer-v2/variant_driver_v1.py.txt @@ -0,0 +1,819 @@ +#!/usr/bin/env python3 +"""Build-only two-role negative producer; unconfigured source draft. + +Original f5 Root/API4, initial five and cold authority are retained. No image +is loaded. Parent source/native/process/resource/whole-caller gates stay open. +""" +from __future__ import annotations + +# Actual source-authenticated root injects these three values before driver exec. +# Capture them before importing any candidate, scientific, or orchestration code. +_CAPTURED_BOOTSTRAP_ROOT = bootstrap_root +_CAPTURED_BOOTSTRAP_CAPABILITY = bootstrap_capability +_CAPTURED_BOOTSTRAP_API = bootstrap_api +if type(_CAPTURED_BOOTSTRAP_API) is not tuple or len(_CAPTURED_BOOTSTRAP_API) != 4: + raise RuntimeError('Driver requires the parent-sealed exact four-entry bootstrap API') +_INITIAL_ROOT_IDENTITY = _CAPTURED_BOOTSTRAP_API[0]() +if (type(_CAPTURED_BOOTSTRAP_ROOT) is not _CAPTURED_BOOTSTRAP_ROOT.ModuleType or + any(type(entry) is not _CAPTURED_BOOTSTRAP_ROOT.FunctionType or + entry.__globals__ is not _CAPTURED_BOOTSTRAP_ROOT.__dict__ + for entry in _CAPTURED_BOOTSTRAP_API)): + raise RuntimeError('Driver bootstrap API is not bound to the actual root namespace') + +# SOURCE-ONLY: configuring these literals requires a separately reviewed successor. +VARIANT_CONFIGURATION = None +VARIANT_SOURCE_REVIEW = None +VARIANT_STAGE_ADMISSION = None +VARIANT_NATIVE_PROFILE = None +VARIANT_HEADER_ADMISSION = None +VARIANT_COMMAND_ADMISSION = None +VARIANT_FUNDING = None +VARIANT_EXECUTION = None +if any(value is None for value in (VARIANT_CONFIGURATION, VARIANT_SOURCE_REVIEW, + VARIANT_STAGE_ADMISSION, VARIANT_NATIVE_PROFILE, VARIANT_HEADER_ADMISSION, + VARIANT_COMMAND_ADMISSION, VARIANT_FUNDING, VARIANT_EXECUTION)): + raise RuntimeError('Negative variant producer is unconfigured; execution withheld') + +# Allocated before the first protected I/O. Slots never recycle an error. +# [first delivered primary, first secondary, quarantined, pending open, owned FD] +_VARIANT_IO = [None, None, False, False, None] +_VARIANT_RETURNS = [None, None] +_VARIANT_TERMINAL_ERROR = [None] +_VARIANT_USED = [False, False] +_VARIANT_WIRE_LIMIT = 1048576 + + +_VARIANT_POSIX_NAMES = ('open', 'read', 'fstat', 'close', 'write', 'fsync', 'mkdir') +_VARIANT_POSIX = tuple(_CAPTURED_BOOTSTRAP_ROOT.posix.__dict__[name] for name in _VARIANT_POSIX_NAMES) +_VARIANT_READ_FLAGS = (_CAPTURED_BOOTSTRAP_ROOT.posix.O_RDONLY | + _CAPTURED_BOOTSTRAP_ROOT.posix.O_NOFOLLOW | _CAPTURED_BOOTSTRAP_ROOT.posix.O_CLOEXEC) +_VARIANT_WRITE_FLAGS = (_CAPTURED_BOOTSTRAP_ROOT.posix.O_WRONLY | + _CAPTURED_BOOTSTRAP_ROOT.posix.O_CREAT | _CAPTURED_BOOTSTRAP_ROOT.posix.O_EXCL | + _CAPTURED_BOOTSTRAP_ROOT.posix.O_NOFOLLOW | _CAPTURED_BOOTSTRAP_ROOT.posix.O_CLOEXEC) + + +def _vops(): + _CAPTURED_BOOTSTRAP_API[0]() + root = _CAPTURED_BOOTSTRAP_ROOT + module = root.posix + for name, function in zip(_VARIANT_POSIX_NAMES, _VARIANT_POSIX): + if (type(function) is not root.BuiltinFunctionType or function.__self__ is not module or + function.__name__ != name or module.__dict__.get(name) is not function): + raise RuntimeError('Variant original POSIX primitive differs') + if (_VARIANT_POSIX[0] is not root._OPEN or _VARIANT_POSIX[1] is not root._READ or + _VARIANT_POSIX[2] is not root._FSTAT or _VARIANT_POSIX[3] is not root._CLOSE): + raise RuntimeError('Variant POSIX original Root aliases differ') + return _VARIANT_POSIX + + +def _vsame(left, right): + """Bounded exact native tree equality; no coercion or foreign callbacks. + + The existing producer/receiver JSON domain is integer-only: floats, including + finite floats, remain rejected. Bytes are supported only as exact byte leaves. + Dictionary field sets are unordered; list and tuple order and kind are exact. + The caller cannot supply the private budget or a comparison callback. + """ + budget = [0, 0, 0] # paired nodes, both-side text, both-side bytes + + def walk(a, b, depth): + budget[0] += 1 + if depth > 24 or budget[0] > 65536: + return False + kind = type(a) + if kind is not type(b): + return False + if a is None: + return True + if kind is bool: + return a is b + if kind is int: + if not -(1 << 64) <= a < (1 << 64) or not -(1 << 64) <= b < (1 << 64): + return False + return a == b + if kind is str: + if len(a) > 8192 or len(b) > 8192: + return False + budget[1] += len(a) + len(b) + if budget[1] > 1048576: + return False + return a == b + if kind is bytes: + if len(a) > 8388608 or len(b) > 8388608: + return False + budget[2] += len(a) + len(b) + if budget[2] > 33554432: + return False + return a == b + if kind is list or kind is tuple: + if len(a) > 1024 or len(b) > 1024 or len(a) != len(b): + return False + index = 0 + while index < len(a): + if not walk(a[index], b[index], depth + 1): + return False + index += 1 + return True + if kind is dict: + if len(a) > 1024 or len(b) > 1024 or len(a) != len(b): + return False + # Complete both key-domain walks before membership or lookup. Exact + # str keys use native hashing/equality; no unknown key gets hashed. + for key in a: + if type(key) is not str or len(key) > 8192: + return False + budget[1] += len(key) + if budget[1] > 1048576: + return False + for key in b: + if type(key) is not str or len(key) > 8192: + return False + budget[1] += len(key) + if budget[1] > 1048576: + return False + for key in a: + if key not in b: + return False + if not walk(a[key], b[key], depth + 1): + return False + return True + # Includes float, all subclasses, user objects and callable values. + return False + + return walk(left, right, 0) + + +def _vplain(value, depth=0, budget=None): + # Exact native values only. No repr/str of unknown objects or error objects. + if budget is None: + budget = [0, 0] + budget[0] += 1 + if depth > 24 or budget[0] > 65536: + raise RuntimeError('Variant raw object bound exceeded') + if value is None or type(value) is bool: + return value + if type(value) is int: + if not -(1 << 64) <= value < (1 << 64): + raise RuntimeError('Variant integer bound exceeded') + return value + if type(value) is str: + budget[1] += len(value) + if len(value) > 8192 or budget[1] > 524288: + raise RuntimeError('Variant string bound exceeded') + return value + if type(value) in (list, tuple): + if len(value) > 1024: + raise RuntimeError('Variant sequence bound exceeded') + return [_vplain(item, depth + 1, budget) for item in value] + if type(value) is dict: + if len(value) > 1024: + raise RuntimeError('Variant mapping bound exceeded') + for key in value: + if type(key) is not str: + raise RuntimeError('Variant foreign mapping key') + _vplain(key, depth + 1, budget) + return {key: _vplain(value[key], depth + 1, budget) for key in value} + raise RuntimeError('Variant foreign raw value') + + +def _vencode(value): + # Before cold capture no imports are added. Exact strings are escaped as ASCII JSON. + value = _vplain(value) + def emit(item): + if item is None: + return 'null' + if type(item) is bool: + return 'true' if item else 'false' + if type(item) is int: + return str(item) + if type(item) is str: + parts = ['"'] + for c in item: + if c == '"': + parts.append('\\"') + elif c == '\\': + parts.append('\\\\') + elif ord(c) < 32 or ord(c) >= 127: + code = ord(c) + if code <= 65535: + parts.append('\\u%04x' % code) + else: + code -= 65536 + parts.append('\\u%04x\\u%04x' % (55296 + (code >> 10), 56320 + (code & 1023))) + else: + parts.append(c) + parts.append('"') + return ''.join(parts) + if type(item) is list: + return '[' + ','.join(emit(x) for x in item) + ']' + return '{' + ','.join(emit(k) + ':' + emit(item[k]) for k in sorted(item)) + '}' + result = (emit(value) + '\n').encode('ascii') + if len(result) > _VARIANT_WIRE_LIMIT: + raise RuntimeError('Variant wire bound exceeded') + return result + + +def _vwrite(path, raw): + # Pending-open quarantine covers an unreturned possible descriptor. It does + # not prove release; parent process teardown must close an uncertain FD. + state = _VARIANT_IO + if state[2] or state[3] or state[4] is not None: + raise RuntimeError('Variant I/O quarantined') + if type(raw) is not bytes or len(raw) > _VARIANT_WIRE_LIMIT: + raise RuntimeError('Variant write bound differs') + ops = _vops() + open0, write0, sync0, close0 = ops[0], ops[4], ops[5], ops[3] + flags = _VARIANT_WRITE_FLAGS + primary = secondary = None + try: + state[3] = True + state[4] = open0(path, flags, 0o600) + state[3] = False + offset = calls = 0 + while offset < len(raw): + if calls >= 4096: + raise RuntimeError('Variant write call bound exceeded') + count = write0(state[4], raw[offset:offset + 65536]) + if type(count) is not int or count <= 0: + raise RuntimeError('Variant write made no progress') + offset += count + calls += 1 + sync0(state[4]) + except BaseException as error: + # Inline first bind before any allocating helper/call/formatting. + primary = error + state[0] = error + state[2] = True + finally: + if state[4] is not None: + descriptor = state[4] + state[4] = None + try: + close0(descriptor) + except BaseException as error: + secondary = error + state[1] = error + state[2] = True + if primary is not None: + raise primary + if secondary is not None: + raise secondary + + +def _vraw(path, value): + # Caller roots the returned object before entering this allocating encoder. + _vwrite(path, _vencode(value)) + + +def _vread(path, limit): + state = _VARIANT_IO + if state[2] or state[3] or state[4] is not None: + raise RuntimeError('Variant I/O quarantined') + if type(limit) is not int or not 0 < limit <= 67108864: + raise RuntimeError('Variant read bound differs') + ops = _vops() + open0, read0, stat0, close0 = ops[0], ops[1], ops[2], ops[3] + primary = secondary = None + result = before = after = None + try: + state[3] = True + state[4] = open0(path, _VARIANT_READ_FLAGS) + state[3] = False + before = stat0(state[4]) + if before.st_mode & 0o170000 != 0o100000 or before.st_size > limit: + raise RuntimeError('Variant file type or size differs') + blocks, total, calls = [], 0, 0 + while True: + if calls >= 4096: + raise RuntimeError('Variant read call bound exceeded') + block = read0(state[4], min(65536, limit + 1 - total)) + calls += 1 + if not block: + break + blocks.append(block) + total += len(block) + if total > limit: + raise RuntimeError('Variant file grew past bound') + after = stat0(state[4]) + if ((before.st_dev, before.st_ino, before.st_mode, before.st_size, + before.st_mtime_ns, before.st_ctime_ns) != + (after.st_dev, after.st_ino, after.st_mode, after.st_size, + after.st_mtime_ns, after.st_ctime_ns) or total != after.st_size): + raise RuntimeError('Variant file changed during read') + result = b''.join(blocks) + except BaseException as error: + primary = error + state[0] = error + state[2] = True + finally: + if state[4] is not None: + descriptor = state[4] + state[4] = None + try: + close0(descriptor) + except BaseException as error: + secondary = error + state[1] = error + state[2] = True + if primary is not None: + raise primary + if secondary is not None: + raise secondary + return result, after + + +def _vstdout(raw): + # Descriptor 1 is borrowed from the owning parent and is never closed here. + # receipt.json already exists before this terminal mirror is attempted. + state = _VARIANT_IO + if state[2] or state[3] or state[4] is not None: + raise RuntimeError('Variant stdout after I/O quarantine') + if type(raw) is not bytes or len(raw) > _VARIANT_WIRE_LIMIT: + raise RuntimeError('Variant stdout bound differs') + write0 = _vops()[4] + try: + offset = calls = 0 + while offset < len(raw): + if calls >= 4096: + raise RuntimeError('Variant stdout call bound exceeded') + count = write0(1, raw[offset:offset + 65536]) + if type(count) is not int or count <= 0: + raise RuntimeError('Variant stdout made no progress') + offset += count + calls += 1 + except BaseException as error: + state[0] = error + state[2] = True + raise + + +# Accepted helper/control sources and parent-inspected native dependency tuple. +# These are static expected pins; finite and full execution gates remain closed. +EXPECTED_BOOTSTRAP_ROOT_SHA256 = 'f5a2d33f2b4d3651f214156a0e7094c2bb516ce2d5ab7698d18c11f98f35dee0' +NATIVE_TCB_HELPER_SHA256 = '865943df5cfdbf9383362d7fb2b76c6d0fd895cf0a0e20d550a26b579606b5d7' +NATIVE_TCB_CONTROLS_SHA256 = '63b1804caa7f89915662a1424f788c3becad13520e1f63212a338fb45aaa2c5a' +NATIVE_TCB_EXPECTED_FILES = (('/usr/bin/python3.12', 'e50d468e8b0adfb05733f5b87b3cff34829c4a8c1aea50c865aa8bdfe4bb150f', 8020928), + ('/usr/lib/python3.12/lib-dynload/_hashlib.cpython-312-x86_64-linux-gnu.so', + '8dc6cda6dd9495b95a2bfb5b26e8cf06b72f36dc0213d958b9277a958287f0fe', + 64368), + ('/usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2', + 'c20a2dc8917c755f02b94049356320fe1f62ac7d9f8994731f807d9df39302da', + 236616), + ('/usr/lib/x86_64-linux-gnu/libc.so.6', + '3a15d66867d83762c7f2f1e37359cb8f6c5743edb369c65285cb0b1c4f7498bf', + 2129424), + ('/usr/lib/x86_64-linux-gnu/libcrypto.so.3', + '6866ed711dab8927e1bf82bf1cd30e828bdfc34f3cc1e83b1c9eb01ce6c37d9a', + 5309400), + ('/usr/lib/x86_64-linux-gnu/libexpat.so.1.9.1', + '286682ecbc5e59a638963b1a4e6351e65eb32fcf4bdcb9cb7569b6a61fe06a8d', + 186624), + ('/usr/lib/x86_64-linux-gnu/libm.so.6', + 'fce00b6f25f459cf4ae0b7fae4257909a1a8a86f9149e7c029a5d617baf1ccd0', + 952616), + ('/usr/lib/x86_64-linux-gnu/libz.so.1.3', + 'f61677c7bdb7c2aa2a243ea781bfd16afcb361cede7b4ef76127a9d8eb9a5242', + 113000)) +NATIVE_TCB_EXPECTED_HASHLIB_ORIGIN = '/usr/lib/python3.12/lib-dynload/_hashlib.cpython-312-x86_64-linux-gnu.so' + + +def _initial_native_tcb(): + root, api = _CAPTURED_BOOTSTRAP_ROOT, _CAPTURED_BOOTSTRAP_API + if (type(EXPECTED_BOOTSTRAP_ROOT_SHA256) is not str or + _INITIAL_ROOT_IDENTITY != EXPECTED_BOOTSTRAP_ROOT_SHA256 or + type(NATIVE_TCB_HELPER_SHA256) is not str or len(NATIVE_TCB_HELPER_SHA256) != 64 or + type(NATIVE_TCB_EXPECTED_FILES) is not tuple or + type(NATIVE_TCB_EXPECTED_HASHLIB_ORIGIN) is not str): + raise RuntimeError('Initial native TCB source and expected dependency tuple are not configured') + helper_path = __file__.rsplit('/', 2)[0] + '/areas/cache-validity/probe-native/native_tcb_v1.py' + api[0]() + digest, _, source = root._hash_regular(helper_path, 262144, True) + if digest != NATIVE_TCB_HELPER_SHA256: + raise RuntimeError('Initial native TCB helper source differs') + helper = root.ModuleType('_h25_initial_native_tcb') + namespace = helper.__dict__ + namespace.update({'__file__': helper_path, '__builtins__': root.builtins.__dict__}) + api[0]() + code = root._COMPILE(source, helper_path, 'exec', dont_inherit=True, optimize=root._OPTIMIZE) + api[0]() + root._EXEC(code, namespace) + api[0]() + receipt = namespace['verify_native_tcb'](root, api, NATIVE_TCB_EXPECTED_FILES, + NATIVE_TCB_EXPECTED_HASHLIB_ORIGIN) + if type(NATIVE_TCB_CONTROLS_SHA256) is not str or len(NATIVE_TCB_CONTROLS_SHA256) != 64: + raise RuntimeError('Initial native TCB control source pin is not configured') + control_path = __file__.rsplit('/', 2)[0] + '/areas/cache-validity/probe-native/native_tcb_controls_v1.py' + api[0]() + digest, _, control_source = root._hash_regular(control_path, 262144, True) + if digest != NATIVE_TCB_CONTROLS_SHA256: + raise RuntimeError('Initial native TCB controls source differs') + control_namespace = {'__name__': '_h25_initial_native_tcb_controls', '__file__': control_path, + '__builtins__': root.builtins.__dict__} + api[0]() + control_code = root._COMPILE(control_source, control_path, 'exec', dont_inherit=True, optimize=root._OPTIMIZE) + api[0]() + root._EXEC(control_code, control_namespace) + argv = root.sys.argv + if (type(argv) is not list or any(type(arg) is not str for arg in argv) or + argv.count('--output') != 1 or argv.index('--output') + 1 >= len(argv)): + raise RuntimeError('Early TCB controls require the unique parent --output argument') + output = argv[argv.index('--output') + 1] + stage_root = __file__.rsplit('/', 2)[0] + if (not output.startswith('/') or output.endswith('/') or + any(part in ('', '.', '..') for part in output.split('/')[1:]) or + output == stage_root or output.startswith(stage_root + '/')): + raise RuntimeError('Early TCB controls require a canonical absolute output outside the stage') + # Parent owns an existing nonsymlink output parent. mkdir is exclusive: + # a preexisting output, file, or symlink is rejected before any fixture write. + api[0]() + root.posix.mkdir(output, 0o700) + _vraw(output + '/initial-tcb.raw.json', receipt) + control_directory = output + '/initial-tcb-controls' + root.posix.mkdir(control_directory, 0o700) + api[0]() + controls = control_namespace['run_controls']( + helper, root, api, NATIVE_TCB_EXPECTED_FILES, NATIVE_TCB_EXPECTED_HASHLIB_ORIGIN, control_directory) + _vraw(output + '/initial-controls.raw.json', controls) + if (controls.get('schema') != 'h25-native-tcb-controls-v1' or + controls.get('expected_records') != 5 or len(controls.get('records', [])) != 5 or + controls.get('scientific_calls') != 0 or controls.get('probe_native_imports') != 0): + raise RuntimeError('Initial native TCB control census differs') + controls['status'] = 'NATIVE_INITIAL_TCB_CONTROLS_PASS' + api[0]() + restoration = namespace['verify_native_tcb']( + root, api, NATIVE_TCB_EXPECTED_FILES, NATIVE_TCB_EXPECTED_HASHLIB_ORIGIN) + _vraw(output + '/initial-restoration.raw.json', restoration) + if (type(restoration) is not dict or + restoration.get('status') != 'MATCHED_DECLARED_INITIAL_NATIVE_FILES' or + restoration.get('declared_file_count') != len(NATIVE_TCB_EXPECTED_FILES) or + restoration.get('probe_private_abi_access') is not False): + raise RuntimeError('Initial native TCB restoration corroboration differs') + return receipt, controls, output + + +# Child outer wall/CPU/RSS includes this entire initial trust check. +# It assumes the declared trusted OS/native startup; it does not prove itself. +try: + INITIAL_NATIVE_TCB_RECEIPT, INITIAL_NATIVE_TCB_CONTROLS, _INITIAL_OUTPUT = _initial_native_tcb() +except BaseException as _variant_bootstrap_error: + _VARIANT_TERMINAL_ERROR[0] = _variant_bootstrap_error + raise + +# This independent bootstrap support captures the initial system-stdlib +# continuity boundary before any adapter or scientific module is exposed. +# No late candidate-created snapshot is accepted as initial authentication. +COLD_AUTHORITY_SHA256 = '2a941111bdfd91037dfcbc5552aced004809240a7e2b43bfbce39fb35798af39' + + +def _initial_cold_authority(): + root, cap, api = (_CAPTURED_BOOTSTRAP_ROOT, _CAPTURED_BOOTSTRAP_CAPABILITY, + _CAPTURED_BOOTSTRAP_API) + if type(COLD_AUTHORITY_SHA256) is not str or len(COLD_AUTHORITY_SHA256) != 64: + raise RuntimeError('Initial cold authority source pin is not configured') + source_path = __file__.rsplit('/', 2)[0] + '/areas/cache-validity/cold_authority_v7.py' + api[0]() + digest, _, source = root._hash_regular(source_path, 1048576, True) + if digest != COLD_AUTHORITY_SHA256: + raise RuntimeError('Initial cold authority source differs') + module = root.ModuleType('_h25_initial_cold_authority') + namespace = module.__dict__ + namespace.update({'__file__': source_path, '__builtins__': root.builtins.__dict__}) + api[0]() + code = root._COMPILE(source, source_path, 'exec', dont_inherit=True, optimize=root._OPTIMIZE) + api[0]() + root._EXEC(code, namespace) + # The actual source bytes have just executed under the admitted initial + # interpreter/system-stdlib premise. Capture precedes every candidate import. + api[0]() + authority = namespace['capture_authority'](root, cap, api) + if (type(authority) is not tuple or len(authority) != 7 or + any(type(entry) is not root.FunctionType for entry in authority)): + raise RuntimeError('Initial cold authority must expose the sealed seven-entry tuple') + # Read fresh transport exactly once, before any candidate exposure. + transport = root.FunctionType.__dict__['__dict__'].__get__(authority[0], root.FunctionType) + descriptor = transport['_h25_caller_descriptor'] + if type(descriptor) is not tuple or len(descriptor) != 6 or descriptor[1] is not authority: + raise RuntimeError('Initial cold authority caller descriptor differs') + return authority, descriptor + + +import importlib +import typing +try: + _INITIAL_COLD_AUTHORITY, _INITIAL_COLD_CALLER_DESCRIPTOR = _initial_cold_authority() +except BaseException as _variant_bootstrap_error: + _VARIANT_TERMINAL_ERROR[0] = _variant_bootstrap_error + raise + +import time +START_WALL = time.perf_counter() +import argparse +from contextlib import redirect_stdout +from fractions import Fraction +import hashlib +import io +import json +import os +from pathlib import Path +import resource +import runpy +import shutil +import stat +import sys + +sys.dont_write_bytecode = True +# Independent source pins are literal final-stage configuration. These modules +# are admitted by the pre-exposure authority, including their live helper code. +# Driver/source identity does not depend on a hash of itself. +EARLY_INTEGRATION_SOURCE_PINS = ({'adapters': ('integration/adapters.py', 'f7ca7f4f03ac63c1a95ba42f06149543211566de5e29f487a3dc4d08c5ee9b94'), 'cold_build_evidence': ('integration/cold_build_evidence.py', 'aa0a315110e031e19291970c9611fe5e0f91465fa20eaec51e81186099563f78'), 'native_packet': ('integration/native_packet.py', '6adbcd1dfeb77fb6da7ee8f725796b1bfdbf0a4f397ef23f3a266a6b89d55892'), 'data_adapters': ('integration/data_adapters.py', 'c00c9c215d0b81a91dd5dffddacfd2225c4bc40fe3ba43c7b93677bb686591cc'), 'guarded_adapters_v4': ('integration/guarded_adapters_v4.py', '5579fe0838d8c6acf63834990269479c6c32024a1662846ed0a075c25d13954c'), '_h25_data_cache': ('areas/cache-validity/cache_contract_v8.py', '133c55e269b354542f86a2a1099f48cff052293d06da310f98b7cb33cb85258f')} + + + + + + +) +_INITIAL_INTEGRATION_MODULES = {} +_INITIAL_INTEGRATION_HANDLES = {} +for _entry_name, (_entry_relative, _entry_digest) in EARLY_INTEGRATION_SOURCE_PINS.items(): + if type(_entry_digest) is not str or len(_entry_digest) != 64: + raise RuntimeError('Early integration source pin is not configured: ' + _entry_name) + # BEGIN evaluated dispatch arguments scientific_driver:195 + _ca_args = (__file__.rsplit('/', 2)[0] + '/' + _entry_relative, _entry_digest, _entry_name) + _ca_kwargs = {} + # END evaluated dispatch arguments scientific_driver:195 + # BEGIN caller admission scientific_driver:195 + _ca_desc = _INITIAL_COLD_CALLER_DESCRIPTOR + _ca_p = _ca_desc[5] + _ca_type, _ca_function, _ca_id = _ca_p[0], _ca_p[1], _ca_p[2] + _ca_error, _ca_value_error, _ca_zip = _ca_p[7], _ca_p[8], _ca_p[18] + _ca_dispatch, _ca_record = _ca_desc[2], _ca_desc[3] + if _INITIAL_COLD_AUTHORITY is not _ca_desc[1] or _ca_dispatch is not _ca_record[0] or _ca_type(_ca_dispatch) is not _ca_function: + raise _ca_error('Cold authority caller dispatcher identity differs') + for (_ca_name, _ca_getter), _ca_expected in _ca_zip(_ca_p[4], _ca_record[1:7]): + if _ca_id(_ca_getter(_ca_dispatch, _ca_function)) != _ca_id(_ca_expected): + raise _ca_error('Cold authority caller dispatcher environment differs') + if _ca_record[4] is not None or _ca_record[5] is not None or _ca_record[7]: + raise _ca_error('Cold authority caller dispatcher defaults contract differs') + for _ca_cell, _ca_expected in _ca_record[8]: + try: + _ca_observed_id = _ca_id(_ca_p[6](_ca_cell, _ca_p[5])) + except _ca_value_error: + raise _ca_error('Cold authority caller dispatcher cell became empty') from None + if _ca_observed_id != _ca_id(_ca_expected): + raise _ca_error('Cold authority caller dispatcher cell differs') + # END caller admission scientific_driver:195 + _entry_module, _entry_handle = _ca_dispatch(0, *_ca_args, **_ca_kwargs) + if type(_entry_module) is not _CAPTURED_BOOTSTRAP_ROOT.ModuleType or sys.modules.get(_entry_name) is not _entry_module: + raise RuntimeError('Early integration module registry identity differs: ' + _entry_name) + _INITIAL_INTEGRATION_MODULES[_entry_name] = _entry_module + _INITIAL_INTEGRATION_HANDLES[_entry_name] = _entry_handle +adapters = _INITIAL_INTEGRATION_MODULES['adapters'] +native_packet = _INITIAL_INTEGRATION_MODULES['native_packet'] +data_adapters = _INITIAL_INTEGRATION_MODULES['data_adapters'] +guarded_adapters_v4 = _INITIAL_INTEGRATION_MODULES['guarded_adapters_v4'] + +# This is a build-only descendant of the original driver prefix. Never call +# native_packet.prepare, api[2], create_dynamic, exec_dynamic or a fixture loader. + +def _vdispatch(index, *args, **kwargs): + _ca_desc = _INITIAL_COLD_CALLER_DESCRIPTOR + _ca_p = _ca_desc[5] + _ca_type, _ca_function, _ca_id = _ca_p[0], _ca_p[1], _ca_p[2] + _ca_error, _ca_value_error, _ca_zip = _ca_p[7], _ca_p[8], _ca_p[18] + _ca_dispatch, _ca_record = _ca_desc[2], _ca_desc[3] + if _INITIAL_COLD_AUTHORITY is not _ca_desc[1] or _ca_dispatch is not _ca_record[0] or _ca_type(_ca_dispatch) is not _ca_function: + raise _ca_error('Cold authority caller dispatcher identity differs') + for (_ca_name, _ca_getter), _ca_expected in _ca_zip(_ca_p[4], _ca_record[1:7]): + if _ca_id(_ca_getter(_ca_dispatch, _ca_function)) != _ca_id(_ca_expected): + raise _ca_error('Cold authority caller dispatcher environment differs') + if _ca_record[4] is not None or _ca_record[5] is not None or _ca_record[7]: + raise _ca_error('Cold authority caller dispatcher defaults contract differs') + for _ca_cell, _ca_expected in _ca_record[8]: + try: + _ca_observed_id = _ca_id(_ca_p[6](_ca_cell, _ca_p[5])) + except _ca_value_error: + raise _ca_error('Cold authority caller dispatcher cell became empty') from None + if _ca_observed_id != _ca_id(_ca_expected): + raise _ca_error('Cold authority caller dispatcher cell differs') + return _ca_dispatch(index, *args, **kwargs) + + +def _vinvoke(name, export, *args): + # Current source identity is rechecked immediately before guarded invoke. + handle = _INITIAL_INTEGRATION_HANDLES[name] + _vdispatch(6, handle) + return _vdispatch(1, handle, export, *args) + + +def _vfile(path, bound): + raw, info = _vread(path, bound) + row = {'sha256': hashlib.sha256(raw).hexdigest(), 'bytes': len(raw), + 'mode': info.st_mode & 0o7777, + 'identity': {'device': info.st_dev, 'inode': info.st_ino, + 'mode': info.st_mode, 'links': info.st_nlink, 'uid': info.st_uid, + 'gid': info.st_gid, 'size': info.st_size, + 'mtime_ns': info.st_mtime_ns, 'ctime_ns': info.st_ctime_ns}} + return raw, row + + +def _vcustody(plan): + # All expected files are independently frozen source/header/compiler/link + # closure, including full system header/search/macro/specs witness inputs. + # This loop observes bytes; it cannot invent closure completeness. + rows, total = [], 0 + for entry in plan['source_files']: + raw, current = _vfile(entry['path'], 67108864) + total += len(raw) + if total > 268435456: + raise RuntimeError('Variant custody aggregate byte bound exceeded') + rows.append({'path': entry['path'], **current}) + return rows + + +def _vcheck_custody(observed, expected): + if (not _vsame(len(observed), len(expected))): + raise RuntimeError('Variant source inventory differs') + for row, fixed in zip(observed, expected): + if ((not _vsame(row['path'], fixed['path'])) or (not _vsame(row['sha256'], fixed['sha256'])) or + (not _vsame(row['bytes'], fixed['bytes'])) or (not _vsame(row['mode'], fixed['mode']))): + raise RuntimeError('Variant current source closure differs') + + +def _vroot(path): + counters = _CAPTURED_BOOTSTRAP_API[3](_CAPTURED_BOOTSTRAP_CAPABILITY) + _vraw(path, counters) + expected = ('load_calls', 'native_creations', 'native_execs', 'activation_attempts', + 'successful_bindings', 'deactivation_attempts', 'cleanup_failures', + 'control_module_creations') + if (type(counters) is not dict or (not _vsame(tuple(sorted(counters)), tuple(sorted(expected)))) or + any(type(counters[k]) is not int or (not _vsame(counters[k], 0)) for k in expected)): + raise RuntimeError('Build-only Root event counters differ') + return counters + + +_VARIANT_SOURCE_PINS = { + 'pyinit_failure': ('7656cd37503986459c4133643372fec13d3e5ad5553881f0bf0343a9a3e11abd', 17354), + 'exec_failure': ('f5066831bd812e7e88fb971ba0e7ca86dbef91fc40a1a68c17b040ce474cd880', 17040)} + + +def _vcheck_literal_sources(plan): + stage = __file__.rsplit('/', 2)[0] + if any(not 32 <= ord(c) < 127 for c in stage): + raise RuntimeError('Variant stage path alphabet differs') + rows = {row['path']: row for row in plan['source_files']} + if (not _vsame(len(rows), len(plan['source_files']))): + raise RuntimeError('Variant duplicate closure input') + for role in plan['roles']: + name = role['role'] + source_path = stage + '/areas/field-negative-variants-v1/' + name + '/dict_probe_fields_v1.c' + header_pin = _VARIANT_SOURCE_PINS[name] + expected = { + 'dict_probe_fields_v1.c': ('e0188999d41a9ab26e8d3d5c37b18b2238b3af21b1db90895f01f7be76d50b65', 17806), + 'field_service_v1.h': header_pin, + 'field_loader_snapshot_v1.h': ('bf7ab049cea89c0a882b279e35b1383ac8f99b66aa4b9b8e1ca22eb9c24c5a8d', 19495)} + if (not _vsame(role['source_path'], source_path)): + raise RuntimeError('Variant source role path differs') + for filename, (digest, size) in expected.items(): + row = role['source'] if filename.endswith('.c') else role['source_headers'][filename] + if (not _vsame(row, {'sha256': digest, 'bytes': size, 'mode': 292})): + raise RuntimeError('Variant reviewed source/header differs') + fixed = rows[source_path.rsplit('/', 1)[0] + '/' + filename] + if any((not _vsame(fixed[key], row[key])) for key in ('sha256', 'bytes', 'mode')): + raise RuntimeError('Variant role file omitted from closure') + if (not _vsame(plan['additional_source_pins'], [['sealed_elf_profile_v2', 'integration/sealed_elf_profile_v2.py', + '89ed8c777e6b72af2d6a3595037e7e92385924c6087d88010a27192633391016']])): + raise RuntimeError('Variant original ELF parser source pin differs') + if (not _vsame(plan['include'], '/usr/include/python3.12')): + raise RuntimeError('Variant original Python include differs') + + +def _variant_main(): + plan = _vplain(VARIANT_CONFIGURATION) + if ((not _vsame(len(plan['roles']), 2)) or + (not _vsame([row['role'] for row in plan['roles']], ['pyinit_failure', 'exec_failure'])) or + not 1 <= len(plan['source_files']) <= 512): + raise RuntimeError('Variant literal configuration differs') + output = _INITIAL_OUTPUT + if any(not 32 <= ord(c) < 127 for c in output): + raise RuntimeError('Variant output path alphabet differs') + argv = sys.argv[1:] + if ((not _vsame(len(argv), 6)) or (not _vsame(argv[0], '--output')) or (not _vsame(argv[2], '--generation')) or + (not _vsame(argv[4], '--launch-nonce')) or (not _vsame(argv[1], output)) or + not 1 <= len(argv[3]) <= 96 or (not _vsame(len(argv[5]), 64)) or + any(c not in 'abcdefghijklmnopqrstuvwxyz0123456789-' for c in argv[3]) or + any(c not in '0123456789abcdef' for c in argv[5])): + raise RuntimeError('Variant exact parent launch arguments differ') + binding = {'mode': 'optimized' if sys.flags.optimize else 'normal', + 'generation': argv[3], 'launch_nonce': argv[5]} + _vcheck_literal_sources(plan) + + for name, relative, digest in plan['additional_source_pins']: + module, handle = _vdispatch(0, __file__.rsplit('/', 2)[0] + '/' + relative, digest, name) + if type(module) is not _CAPTURED_BOOTSTRAP_ROOT.ModuleType or sys.modules.get(name) is not module: + raise RuntimeError('Variant additional module identity differs') + _INITIAL_INTEGRATION_MODULES[name] = module + _INITIAL_INTEGRATION_HANDLES[name] = handle + packet = {'bootstrap_root': _CAPTURED_BOOTSTRAP_ROOT, + 'bootstrap_capability': _CAPTURED_BOOTSTRAP_CAPABILITY, + 'bootstrap_api': _CAPTURED_BOOTSTRAP_API, 'late_started': False} + _vinvoke('native_packet', '_fresh', packet) + root_before = _vroot(output + '/root-before.raw.json') + preflight_before = _vinvoke('native_packet', '_preflight', packet) + _vraw(output + '/preflight-before.raw.json', preflight_before) + if (not _vsame(_vplain(preflight_before), plan['expected_preflight'])): + raise RuntimeError('Variant original preflight differs') + dependencies = _vinvoke('native_packet', '_dependencies') + # Dependencies preserved in custody raw, before comparing its original rows. + custody_before = _vcustody(plan) + _vraw(output + '/custody-before.raw.json', {'files': custody_before, 'original_dependencies': dependencies}) + _vcheck_custody(custody_before, plan['source_files']) + if (not _vsame(_vplain(dependencies), plan['expected_dependencies'])): + raise RuntimeError('Variant original compiler dependencies differ') + builds = [] + for index in (0, 1): + row = plan['roles'][index] + # Consume before mkdir/launch. Every exception stops this entire process; + # neither role can retry and the second cannot follow a first failure. + if _VARIANT_USED[index]: + raise RuntimeError('Variant build role already consumed') + _VARIANT_USED[index] = True + directory = output + '/' + row['role'] + _vops()[6](directory, 0o700) + target = directory + '/_h25_dict_probe.cpython-312-x86_64-linux-gnu.so' + command = ['/usr/bin/x86_64-linux-gnu-gcc-13', '-nostartfiles', '-shared', + '-fPIC', '-O3', '-std=c11', '-Wall', '-Wextra', '-Werror', + '-I' + plan['include'], row['source_path'], '-o', target] + context = {'source': row['source'], 'source_name': 'dict_probe_fields_v1.c', + 'no_cached_binary': True, 'module_name': '_h25_dict_probe', 'target': target, + 'source_headers': row['source_headers'], + 'system_header_admission_sha256': plan['system_header_admission_sha256'], + 'negative_variant_role': row['role']} + # Original unchanged cold_build_evidence.run through original authority. + # Its earlier internal failures are NOT covered by this outer handler. + _VARIANT_RETURNS[index] = _vinvoke('cold_build_evidence', 'run', + command, directory, 'control', 15, context) + _vraw(directory + '/helper-return.raw.json', _VARIANT_RETURNS[index]) + returned = _VARIANT_RETURNS[index] + if ((not _vsame(returned['returncode'], 0)) or returned['direct_child_reaped'] is not True or + (not _vsame(returned['status'], 'EXIT0_LOGS_STABLE_PENDING_SOURCE_CUSTODY'))): + raise RuntimeError('Variant cold helper did not complete successfully') + binary, binary_row = _vfile(target, 8388608) + build = {'schema': 'h25-negative-variant-build-v1', 'role': row['role'], + 'status': 'EXIT0_RAW_CAPTURED_PENDING_FINAL_CUSTODY', + 'helper_name': 'control', 'command': command, 'context': context, + 'path': target, 'binary': binary_row, + 'command_sha256': hashlib.sha256(_vencode({'argv': command})).hexdigest(), + 'original_helper_sha256': EARLY_INTEGRATION_SOURCE_PINS['cold_build_evidence'][1], + 'negative_only': True, 'loaded': False} + build_raw = _vencode(build) + _vwrite(directory + '/build.json', build_raw) + policy = dict(row['static_policy']) + if policy['build_receipt_sha256'] is not None: + raise RuntimeError('Variant actual receipt binding must not be prelearned') + policy['build_receipt_sha256'] = hashlib.sha256(build_raw).hexdigest() + # Tuple fields are source literals; conversion is structural, not a + # learned expectation. All other static policy fields stay independent. + for key in ('expected_exports', 'needed', 'required_local_functions', 'required_local_objects'): + policy[key] = tuple(policy[key]) + policy['pointer_slots'] = tuple(tuple(x) for x in policy['pointer_slots']) + policy['method_tables'] = tuple({'symbol': x['symbol'], 'entries': tuple(tuple(y) for y in x['entries'])} + for x in policy['method_tables']) + parsed = _vinvoke('sealed_elf_profile_v2', 'admit_service_elf', + binary, binary_row['sha256'], policy) + _vraw(directory + '/elf.raw.json', parsed) + # ELF parser already checks its static policy; no candidate image loads. + builds.append({'role': row['role'], 'build_receipt_sha256': hashlib.sha256(build_raw).hexdigest(), + 'output_sha256': binary_row['sha256'], 'elf_sha256': hashlib.sha256(_vencode(parsed)).hexdigest()}) + preflight_after = _vinvoke('native_packet', '_preflight', packet) + _vraw(output + '/preflight-after.raw.json', preflight_after) + dependencies_after = _vinvoke('native_packet', '_dependencies') + custody_after = _vcustody(plan) + _vraw(output + '/custody-after.raw.json', {'files': custody_after, 'original_dependencies': dependencies_after}) + _vcheck_custody(custody_after, plan['source_files']) + if ((not _vsame(_vplain(preflight_after), plan['expected_preflight'])) or + (not _vsame(_vplain(dependencies_after), plan['expected_dependencies'])) or + (not _vsame(custody_after, custody_before))): + raise RuntimeError('Variant final source/runtime custody differs') + root_after = _vroot(output + '/root-after.raw.json') + _vinvoke('native_packet', '_fresh', packet) + final = {'schema': 'h25-negative-variant-producer-v1', + 'status': 'TWO_BUILDS_RAW_AND_SOURCE_CAPTURED', 'producer_role': 'failure_variants', + 'binding': binding, + 'process_id': os.getpid(), 'builds': builds, + 'helper_names': ['control', 'control'], 'consumed_roles': list(_VARIANT_USED), + 'root_before': root_before, 'root_after': root_after, + 'negative_only': True, 'candidate_loads': 0, 'parent_completion': None, + 'domain_closed': None, 'failure_helper_qualification': None} + final_raw = _vencode(final) + _vwrite(output + '/receipt.json', final_raw) + _vstdout(final_raw) + + +# First bound outer failure remains rooted. No str/repr/annotation/secondary +# serialization occurs here; raw partial files remain for the owning parent. +try: + _variant_main() +except BaseException as _variant_error: + _VARIANT_TERMINAL_ERROR[0] = _variant_error + raise diff --git a/research/h25-c05-v03-input-constructors/inputs/prerequisite-source/cold_authority_v7.py.txt b/research/h25-c05-v03-input-constructors/inputs/prerequisite-source/cold_authority_v7.py.txt new file mode 100644 index 0000000000..6cd184b086 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/inputs/prerequisite-source/cold_authority_v7.py.txt @@ -0,0 +1,763 @@ +"""Separate V7 cold authority; SOURCE ONLY until the parent's execution gate. + +Raw-load before any candidate exposure. All later checking routines are private +closures over the original primitive/stdlib token. They never dispatch through +a mutable public validator before authenticating it. No native code lives here. +""" +import _ast +import ast +import builtins +import copy +import copyreg +import genericpath +import hashlib +import io +import ntpath +import os +import pathlib +import posixpath +import sys +import types + +SOURCE_REVIEW_GATE = None +EXECUTION_GATE = None +NATIVE_GATE = None +FULL_FUNDING_GATE = None +ROOT_SHA256 = 'f5a2d33f2b4d3651f214156a0e7094c2bb516ce2d5ab7698d18c11f98f35dee0' +PROVIDER_SHA256 = '9cbb7368f89e71d1e6cc46db5dc77efed3e03ed2a801c98c88fe316e4d9f3ef2' +BACKEND_SHA256 = 'e473c38245c3668715b5a78dfe980b2fe3ed0d0c9b8c97c666fbae6ecf1fffd5' +CACHE_PRODUCER_SHA256 = '133c55e269b354542f86a2a1099f48cff052293d06da310f98b7cb33cb85258f' +_CAPTURE_ONCE = [] + + +def capture_authority(root, capability, api): + """Return load/invoke/check/runtime_guard/check_product/set_guard/source. + + The trusted parent calls this entry once immediately after raw source exec. + A later backend instance derives provenance from this original token; it + cannot substitute a newly captured stdlib or a self-reported class record. + """ + if _CAPTURE_ONCE: + raise RuntimeError('Cold authority can only be captured once before exposure') + _CAPTURE_ONCE.append(True) + type0, id0, len0, next0, tuple0, list0 = type, id, len, next, tuple, list + dict0, str0, bytes0, object0, int0 = dict, str, bytes, object, int + error0, base_error0, value_error0 = RuntimeError, BaseException, ValueError + function_type, module_type, code_type = types.FunctionType, types.ModuleType, types.CodeType + builtin_type, cell_type = types.BuiltinFunctionType, types.CellType + static_type, class_type, property_type = staticmethod, classmethod, property + dict_get, dict_items, dict_iter = dict.get, dict.items, dict.__iter__ + dict_len, dict_set, dict_del, dict_clear = dict.__len__, dict.__setitem__, dict.__delitem__, dict.clear + object_get = object.__getattribute__ + type_get = type.__getattribute__ + module_dict_get = module_type.__dict__['__dict__'].__get__ + class_dict_get = type.__dict__['__dict__'].__get__ + class_mro_get = type.__dict__['__mro__'].__get__ + cell_get = cell_type.__dict__['cell_contents'].__get__ + function_fields = tuple((name, function_type.__dict__[name].__get__) for name in + ('__code__', '__globals__', '__builtins__', '__defaults__', + '__kwdefaults__', '__closure__', '__dict__')) + proxy_type = type(type.__dict__) + proxy_get, proxy_iter, proxy_items, proxy_len = proxy_type.get, proxy_type.__iter__, proxy_type.items, proxy_type.__len__ + builtin_self_get = builtin_type.__dict__['__self__'].__get__ + builtin_namespace = builtins.__dict__ + missing = object0() + missing_id = id0(missing) + initial_sys_modules = sys.modules + initial_sys_flags = sys.flags + initial_optimize = sys.flags.optimize + sys_owner = sys + sys_namespace = module_dict_get(sys_owner, module_type) + authority_namespace = globals() + root_pin, provider_pin, backend_pin = ROOT_SHA256, PROVIDER_SHA256, BACKEND_SHA256 + cache_pin = CACHE_PRODUCER_SHA256 + max_source, max_functions, max_classes = 1048576, 8192, 2048 + registry, by_namespace, products, backend_guards = {}, {}, {}, {} + transitions = [] + initial_std_modules = (_ast, ast, copy, copyreg, genericpath, hashlib, io, + ntpath, os, pathlib, posixpath, types) + producer_rules = ( + ('320435ec4125544f2b2aedf74f21469b232d08683fe76f0913607516254bbd29', 'make_runtime_guard', 'backend_guard'), + ('f7ca7f4f03ac63c1a95ba42f06149543211566de5e29f487a3dc4d08c5ee9b94', 'extra_guard_type', 'extra_guard'), + ('4bdb401271ffd049c52eff0edc28d8d604a11faf66fec419555a82cbd3b32d60', 'make_trace_type', 'trace'), + ('364b45c100be73a7ace44ab664f3c792020dad6f33f7788b62aaeab67c0c5aa9', 'make_row_interner', 'row_function'), + ('364b45c100be73a7ace44ab664f3c792020dad6f33f7788b62aaeab67c0c5aa9', 'make_runtime_guard', 'row_guard'), + ('364b45c100be73a7ace44ab664f3c792020dad6f33f7788b62aaeab67c0c5aa9', 'make_cache_runtime_guard', 'row_guard'), + ('5aeee9364d29147ef4e1bfffba532f7392833a6158d73d1da50ed6c772f061af', 'derive_row_bind', 'row_bind'), + (cache_pin, 'compose_runtime_guard', 'cache_guard')) + + def need(ok, message): + if not ok: + raise error0(message) + + def string_domain(owner, domains): + key = iterator = kind = None + try: + identity = id0(owner) + prior = dict_get(domains, identity, missing) + if prior is not missing: + return prior + kind = type0(owner) + if kind is dict0: + iterator = dict_iter(owner) + elif kind is proxy_type: + iterator = proxy_iter(owner) + else: + return False + while True: + key = next0(iterator, missing) + if key is missing: + break + if type0(key) is not str0: + dict_set(domains, identity, False) + return False + key = None + dict_set(domains, identity, True) + return True + finally: + key = iterator = kind = owner = None + + def get_id(owner, name, domains): + try: + if type0(name) is not str0 or not string_domain(owner, domains): + return -1 + if type0(owner) is dict0: + return id0(dict_get(owner, name, missing)) + return id0(proxy_get(owner, name, missing)) + finally: + owner = None + + def identity_mapping(owner, expected): + """Non-string dispatch dictionaries: identity scan, never key equality.""" + iterator = pair = key = value = None + try: + if type0(owner) is not dict0 or dict_len(owner) != len0(expected): + return False + iterator = iter0(dict_items(owner)) + while True: + pair = next0(iterator, missing) + if pair is missing: + break + key, value = pair + found = False + for old_key, old_value in expected: + if key is old_key: + if value is not old_value: + return False + found = True + break + if not found: + return False + pair = key = value = None + return True + finally: + iterator = pair = key = value = owner = None + + iter0 = iter + + def code_names(code): + pending, result, seen = [code], [], {} + while pending: + current = pending.pop() + need(type0(current) is code_type, 'Cold authority code shape differs') + for name in current.co_names: + need(type0(name) is str0, 'Cold authority code name shape differs') + if dict_get(seen, name, missing) is missing: + dict_set(seen, name, True) + result.append(name) + for value in current.co_consts: + if type0(value) is code_type: + pending.append(value) + return tuple0(result) + + def raw_function_record(function): + need(type0(function) is function_type, 'Cold authority requires exact functions') + values = tuple0(getter(function, function_type) for _, getter in function_fields) + code, namespace, builtins_owner, defaults, keywords, closure, attributes = values + domains = {} + try: + need(type0(namespace) is dict0 and type0(builtins_owner) is dict0 and + string_domain(namespace, domains) and string_domain(builtins_owner, domains), + 'Cold authority initial function dictionary domain differs') + keyword_items = () + if keywords is not None: + need(type0(keywords) is dict0 and string_domain(keywords, domains), + 'Cold authority initial keyword defaults differ') + keyword_items = tuple0(dict_items(keywords)) + cells = () if closure is None else tuple0((cell, cell_get(cell, cell_type)) for cell in closure) + lookups = tuple0((name, dict_get(namespace, name, missing), dict_get(builtins_owner, name, missing)) + for name in code_names(code)) + need(type0(attributes) is dict0 and string_domain(attributes, domains), + 'Cold authority function attribute dictionary differs') + return (function, values, keyword_items, cells, lookups, tuple0(dict_items(attributes))) + finally: + dict_clear(domains) + + def capture_graph(initial_functions, initial_classes): + """Called only at initial source load or directly after an admitted producer.""" + functions, classes, seen_functions, seen_classes = [], [], {}, {} + pending_functions, pending_classes = list0(initial_functions), list0(initial_classes) + while pending_functions or pending_classes: + while pending_classes: + cls = pending_classes.pop() + need(type0(cls) is type0, 'Cold authority class metaclass differs') + if dict_get(seen_classes, id0(cls), missing) is not missing: + continue + need(len0(classes) < max_classes, 'Cold authority class census exceeds bound') + dict_set(seen_classes, id0(cls), cls) + mro = class_mro_get(cls, type0) + proxy = class_dict_get(cls, type0) + members = tuple0(proxy_items(proxy)) + classes.append((cls, mro, proxy, members)) + for base in mro[1:]: + if type0(base) is type0: + pending_classes.append(base) + for name, value in members: + need(type0(name) is str0, 'Cold authority class member name differs') + kind = type0(value) + if kind is function_type: + pending_functions.append(value) + elif kind is static_type or kind is class_type: + underlying = object_get(value, '__func__') + if type0(underlying) is function_type: + pending_functions.append(underlying) + elif kind is property_type: + for field in ('fget', 'fset', 'fdel'): + underlying = object_get(value, field) + if type0(underlying) is function_type: + pending_functions.append(underlying) + if pending_functions: + function = pending_functions.pop() + if dict_get(seen_functions, id0(function), missing) is not missing: + continue + need(len0(functions) < max_functions, 'Cold authority function census exceeds bound') + record = raw_function_record(function) + dict_set(seen_functions, id0(function), function) + functions.append(record) + for cell, value in record[3]: + if type0(value) is function_type: + pending_functions.append(value) + defaults = record[1][3] + if defaults is not None: + need(type0(defaults) is tuple0, 'Cold authority positional defaults shape differs') + for value in defaults: + if type0(value) is function_type: + pending_functions.append(value) + for name, value in record[2] + record[5]: + if type0(value) is function_type: + pending_functions.append(value) + # Source-owned function helpers reached through effective globals + # are authenticated transitively, including validator helpers. + for name, value, builtin_value in record[4]: + if type0(value) is function_type: + pending_functions.append(value) + return (tuple0(functions), tuple0(classes)) + + def expected_global(namespace, name, expected): + if name != 'RuntimeGuard': + return expected + record = dict_get(by_namespace, id0(namespace), missing) + if record is not missing and record[2] is namespace and record[12] == 'backend': + return dict_get(backend_guards, id0(record[0]), missing) + return expected + + def fresh_function(record, domains, builtin_values): + function, values, keyword_items, cells, lookups, attributes_items = record + if type0(function) is not function_type: + return False + field_key = ('function-fields', id0(function)) + observed_fields = dict_get(domains, field_key, missing) + if observed_fields is missing: + scalar_fields = [] + for (_, getter), expected in zip0(function_fields, values): + observed_id = id0(getter(function, function_type)) + if observed_id != id0(expected): + return False + scalar_fields.append(observed_id) + dict_set(domains, field_key, tuple0(scalar_fields)) + else: + if len0(observed_fields) != len0(values): + return False + for observed_id, expected in zip0(observed_fields, values): + if observed_id != id0(expected): + return False + code, namespace, builtins_owner, defaults, keywords, closure, attributes = values + if keywords is not None: + if type0(keywords) is not dict0 or dict_len(keywords) != len0(keyword_items): + return False + for name, expected in keyword_items: + if get_id(keywords, name, domains) != id0(expected): + return False + for cell, expected in cells: + try: + if id0(cell_get(cell, cell_type)) != id0(expected): + return False + except value_error0: + return False + if dict_len(attributes) != len0(attributes_items): + return False + for name, expected in attributes_items: + if get_id(attributes, name, domains) != id0(expected): + return False + lookup_key = ('function-lookups', id0(function), id0(code), + id0(namespace), id0(builtins_owner)) + observed_lookups = dict_get(domains, lookup_key, missing) + if observed_lookups is missing: + scalar_lookups = [] + for name, expected, expected_builtin in lookups: + observed_global = get_id(namespace, name, domains) + if observed_global != id0(expected_global(namespace, name, expected)): + return False + # A false builtin_values path must not observe builtin keys or + # values. The absent slot is completed only in a later true path. + if builtin_values: + observed_builtin = get_id(builtins_owner, name, domains) + if observed_builtin != id0(expected_builtin): + return False + scalar_lookups.append((name, observed_global, True, observed_builtin)) + else: + scalar_lookups.append((name, observed_global, False, 0)) + dict_set(domains, lookup_key, tuple0(scalar_lookups)) + else: + if len0(observed_lookups) != len0(lookups): + return False + completed_lookups = None + index = 0 + for (name, expected, expected_builtin), observed in zip0(lookups, observed_lookups): + if observed[0] != name: + return False + if observed[1] != id0(expected_global(namespace, name, expected)): + return False + if builtin_values: + if observed[2]: + observed_builtin = observed[3] + else: + observed_builtin = get_id(builtins_owner, name, domains) + if observed_builtin != id0(expected_builtin): + return False + if not observed[2]: + if completed_lookups is None: + completed_lookups = list0(observed_lookups) + completed_lookups[index] = (name, observed[1], True, observed_builtin) + index += 1 + if completed_lookups is not None: + dict_set(domains, lookup_key, tuple0(completed_lookups)) + return True + + zip0 = zip + + def fresh_graph(graph, domains, builtin_values, message): + functions, classes = graph + for cls, mro, proxy, members in classes: + if not (type0(cls) is type0 and class_mro_get(cls, type0) is mro and + proxy_len(proxy) == len0(members)): + need(False, message + ': class dispatch') + for name, expected in members: + if not (get_id(proxy, name, domains) == id0(expected)): + need(False, message + ': class member ' + name) + for record in functions: + if not (fresh_function(record, domains, builtin_values)): + need(False, message + ': function environment') + + def module_image(module, name, kind, path, digest, source_bytes, *, stdlib=False): + need(type0(module) is module_type, 'Cold authority module exact type differs') + namespace = module_dict_get(module, module_type) + domains = {} + try: + need(type0(namespace) is dict0 and string_domain(namespace, domains), + 'Cold authority module dictionary domain differs') + items = tuple0(dict_items(namespace)) + functions, classes = [], [] + for field, value in items: + if type0(value) is function_type: + if stdlib or value.__globals__ is namespace: + functions.append(value) + elif type0(value) is type0: + declared = type_get(value, '__module__') + if stdlib or (type0(declared) is str0 and declared == name): + classes.append(value) + graph = capture_graph(functions, classes) + mappings = [] + selected = ('_CANONICAL_BUILTINS', '_TYPE_BUILTINS') if kind == 'backend' else () + for field in selected: + mapping = dict_get(namespace, field, missing) + need(type0(mapping) is dict0, 'Cold authority backend dispatch dictionary differs') + mappings.append((field, mapping, tuple0(dict_items(mapping)))) + original_guard = dict_get(namespace, 'RuntimeGuard', missing) if kind == 'backend' else None + if kind == 'backend': + need(type0(original_guard) is type0, 'Cold authority original RuntimeGuard differs') + handle = object0() + return (handle, module, namespace, name, path, digest, source_bytes, + items, graph[0], graph[1], tuple0(mappings), original_guard, kind) + finally: + dict_clear(domains) + + def record_for(handle): + record = dict_get(registry, id0(handle), missing) + need(record is not missing and record[0] is handle, 'Cold authority handle is not registered') + return record + + def fresh_module(record, domains, builtin_values, *, registry_slot=True, exact_census=True, prefix='Cold authority'): + module, namespace = record[1], record[2] + if not (type0(module) is module_type and module_dict_get(module, module_type) is namespace): + need(False, prefix + ': module owner differs') + if registry_slot: + if not (get_id(initial_sys_modules, record[3], domains) == id0(module)): + need(False, prefix + ': registered module slot differs') + if exact_census: + if not (dict_len(namespace) == len0(record[7])): + need(False, prefix + ': namespace census differs') + for name, expected in record[7]: + if not (get_id(namespace, name, domains) == id0(expected_global(namespace, name, expected))): + need(False, prefix + ': namespace binding ' + name) + for name, mapping, expected in record[10]: + if not (identity_mapping(mapping, expected)): + need(False, prefix + ': dispatch dictionary ' + name) + fresh_graph((record[8], record[9]), domains, builtin_values, prefix) + + need(type0(root) is module_type and type0(api) is tuple0 and len0(api) == 4, + 'Cold authority requires the actual pristine root and sealed fourtuple') + root_namespace = module_dict_get(root, module_type) + root_api_graph = capture_graph(api, ()) + root_hash = dict_get(root_namespace, '_hash_regular', missing) + root_compile = dict_get(root_namespace, '_COMPILE', missing) + root_exec = dict_get(root_namespace, '_EXEC', missing) + root_identity = api[0] + initial_builtin_items = tuple0(dict_items(builtin_namespace)) + stdlib_records = tuple0(module_image(module, module.__name__, 'stdlib', None, None, None, stdlib=True) + for module in initial_std_modules) + stdlib_mappings = tuple0((mapping, tuple0(dict_items(mapping))) for mapping in + (copy._deepcopy_dispatch, copy.dispatch_table, copyreg.dispatch_table)) + self_graph = capture_graph((dict_get(authority_namespace, 'capture_authority'),), ()) + self_items = tuple0(dict_items(authority_namespace)) + + def root_and_stdlib(domains): + need(type0(sys_owner) is module_type and module_dict_get(sys_owner, module_type) is sys_namespace and + get_id(sys_namespace, 'modules', domains) == id0(initial_sys_modules) and + get_id(sys_namespace, 'flags', domains) == id0(initial_sys_flags), + 'Cold authority interpreter owner differs') + need(dict_len(builtin_namespace) == len0(initial_builtin_items), 'Cold authority builtin census differs') + for name, expected in initial_builtin_items: + need(get_id(builtin_namespace, name, domains) == id0(expected), 'Cold authority builtin binding ' + name) + for name, expected in self_items: + need(get_id(authority_namespace, name, domains) == id0(expected), 'Cold authority source binding ' + name) + fresh_graph(self_graph, domains, True, 'Cold authority source') + fresh_graph(root_api_graph, domains, True, 'Cold authority root entry') + dict_clear(domains) + need(root_identity() == root_pin, 'Cold authority actual root source identity differs') + dict_clear(domains) + for record in stdlib_records: + fresh_module(record, domains, True, registry_slot=True, exact_census=False, prefix='Cold authority initial stdlib') + for mapping, expected in stdlib_mappings: + need(identity_mapping(mapping, expected), 'Cold authority initial copy dispatch differs') + + def check_registered(domains): + for record in tuple0(registry.values()): + fresh_module(record, domains, True) + + def cold_check(handle=None): + domains = {} + try: + root_and_stdlib(domains) + check_registered(domains) + if handle is not None: + record = record_for(handle) + dict_clear(domains) + digest, size, raw = root_hash(record[4], max_source, False) + need(digest == record[5], 'Cold authority source file changed') + return record + return None + finally: + dict_clear(domains) + + def load(path, digest, name, kind='module'): + cold_check() + need(type0(path) is str0 and path.startswith('/') and type0(digest) is str0 and len0(digest) == 64 and + type0(name) is str0 and name and type0(kind) is str0 and kind in ('module', 'backend'), + 'Cold authority source-load argument shape differs') + for character in digest: + need(character in '0123456789abcdef', 'Cold authority source digest is not lowercase SHA256') + need((kind == 'backend') == (digest == backend_pin), 'Cold authority original backend classification differs') + domains = {} + try: + need(get_id(initial_sys_modules, name, domains) == missing_id, 'Cold authority module name already registered') + finally: + dict_clear(domains) + observed, size, source_bytes = root_hash(path, max_source, True) + need(observed == digest and type0(source_bytes) is bytes0, 'Cold authority source bytes differ') + module = module_type(name) + namespace = module_dict_get(module, module_type) + namespace.update({'__file__': path, '__builtins__': builtin_namespace}) + # Dataclass/import ownership sees the correct unique slot during exec. + dict_set(initial_sys_modules, name, module) + try: + code = root_compile(source_bytes, path, 'exec', dont_inherit=True, optimize=initial_optimize) + root_exec(code, namespace) + record = module_image(module, name, kind, path, digest, source_bytes) + dict_set(registry, id0(record[0]), record) + dict_set(by_namespace, id0(namespace), record) + if kind == 'backend': + dict_set(backend_guards, id0(record[0]), record[11]) + cold_check(record[0]) + except base_error0: + # A failed source is retained in the unique slot for evidence and + # cannot be retried/reclassified as an unobserved clean load. + raise + return (module, record[0]) + + def make_caller_descriptor(operations, label): + """Mint only at original capture or an authenticated entry-three return. + + The caller checks the dispatcher record INLINE before invoking it. This + is not a claim that the dispatcher can authenticate its own replacement + code. Its already-admitted active frame checks all target/helper objects. + """ + pending, seen, records = list0(operations), {}, [] + while pending: + function = pending.pop() + if dict_get(seen, id0(function), missing) is not missing: + continue + need(len0(records) < max_functions, 'Cold authority caller helper census exceeds bound') + raw = raw_function_record(function) + record = (function,) + raw[1][:6] + (raw[2], raw[3]) + dict_set(seen, id0(function), function) + records.append(record) + for cell, value in record[8]: + if type0(value) is function_type: + pending.append(value) + records = tuple0(records) + field_getters = function_fields[:6] + primitives = (type0, function_type, id0, len0, field_getters, cell_type, + cell_get, error0, value_error0, tuple0, dict0, str0, + dict_get, dict_len, dict_iter, next0, dict_clear, missing, zip0) + + def dispatch(index, *args, **kwargs): + # The active caller has already authenticated this actual function. + # This pretarget block uses captured C primitives only. In particular + # it does not call need(), fresh_function(), or any other validator. + if type0(index) is not int0 or index < 0 or index >= len0(operations): + raise error0(label + ': operation index differs') + for record in records: + function = record[0] + if type0(function) is not function_type: + raise error0(label + ': target exact function differs') + for (name, getter), expected in zip0(field_getters, record[1:7]): + if id0(getter(function, function_type)) != id0(expected): + raise error0(label + ': target function environment differs') + keywords = record[5] + if keywords is not None: + if type0(keywords) is not dict0 or dict_len(keywords) != len0(record[7]): + raise error0(label + ': target keyword census differs') + iterator = current = None + valid_domain = True + try: + iterator = dict_iter(keywords) + while True: + current = next0(iterator, missing) + if current is missing: + break + if type0(current) is not str0: + valid_domain = False + break + current = None + finally: + # Foreign current keys never survive a retained error. + iterator = current = None + if not valid_domain: + raise error0(label + ': target keyword key domain differs') + for name, expected in record[7]: + if id0(dict_get(keywords, name, missing)) != id0(expected): + raise error0(label + ': target keyword value differs') + for cell, expected in record[8]: + try: + observed_id = id0(cell_get(cell, cell_type)) + except value_error0: + raise error0(label + ': target closure became empty') from None + if observed_id != id0(expected): + raise error0(label + ': target closure value differs') + # The chosen function object comes from the original immutable + # operations tuple, not a mutable late attribute or caller registry. + return operations[index](*args, **kwargs) + + raw_dispatch = raw_function_record(dispatch) + dispatch_record = (dispatch,) + raw_dispatch[1][:6] + (raw_dispatch[2], raw_dispatch[3]) + need(dispatch_record[4] is None and dispatch_record[5] is None and not dispatch_record[7], + 'Cold authority dispatcher source defaults contract differs') + return ('h25-cold-authority-caller-v1', operations, dispatch, + dispatch_record, records, primitives) + + def runtime_guard(handle): + record = cold_check(handle) + def guarded_helpers(): + domains = {} + try: + fresh_module(record, domains, False, prefix='Runtime drift: cache collector') + finally: + dict_clear(domains) + child_descriptor = make_caller_descriptor((guarded_helpers,), 'Runtime drift: cache collector caller') + return (guarded_helpers, child_descriptor) + + def known_backend(module): + need(type0(module) is module_type, 'Cold authority producer backend type differs') + namespace = module_dict_get(module, module_type) + record = dict_get(by_namespace, id0(namespace), missing) + need(record is not missing and record[1] is module and record[12] == 'backend' and record[5] == backend_pin, + 'Cold authority producer backend provenance differs') + return record + + def known_guard(cls): + need(type0(cls) is type0, 'Cold authority exact guard class differs') + for record in tuple0(registry.values()): + if record[12] == 'backend' and cls is record[11]: + return None + product = dict_get(products, id0(cls), missing) + need(product is not missing and product[0] is cls and product[6] in + ('backend_guard', 'extra_guard', 'row_guard', 'cache_guard'), + 'Cold authority guard was not produced by an admitted source') + domains = {} + try: + fresh_graph(product[5], domains, True, 'Cold authority producer base product') + finally: + dict_clear(domains) + return product + + def classify(record, export): + for digest, name, role in producer_rules: + if digest is not None and record[5] == digest and export == name: + return role + return None + + def validate_producer_arguments(record, export, role, args, kwargs): + domains = {} + try: + need(type0(kwargs) is dict0 and string_domain(kwargs, domains) and not kwargs, + 'Cold authority reviewed producers require positional arguments') + if role == 'backend_guard': + need(len0(args) == 1, 'Cold authority backend guard arguments differ') + known_backend(args[0]) + elif role == 'extra_guard': + need(len0(args) == 3 and type0(args[2]) is tuple0, 'Cold authority trace guard arguments differ') + known_guard(args[0]); known_backend(args[1]) + for entry in args[2]: + need(type0(entry) is tuple0 and len0(entry) == 3, + 'Cold authority trace entry shape differs') + owner, name, function = entry + need(type0(owner) is module_type and type0(name) is str0 and + type0(function) is builtin_type and + builtin_self_get(function, builtin_type) is owner and + get_id(module_dict_get(owner, module_type), name, domains) == id0(function), + 'Cold authority trace entry owner differs') + elif role == 'trace': + need(len0(args) == 2 and type0(args[1]) is module_type, 'Cold authority trace producer arguments differ') + known_backend(args[0]) + elif role == 'row_function': + need(not args, 'Cold authority row interner arguments differ') + elif role == 'row_guard': + need(len0(args) == 2, 'Cold authority row guard arguments differ') + known_guard(args[0]) + product = dict_get(products, id0(args[1]), missing) + need(product is not missing and product[0] is args[1] and product[1] is record[0] and + product[2] == 'make_row_interner' and product[6] == 'row_function', + 'Cold authority row helper provenance differs') + fresh_graph(product[5], domains, True, 'Cold authority producer row helper') + elif role == 'cache_guard': + need(len0(args) == 2 and type0(args[1]) is dict0 and string_domain(args[1], domains), + 'Cold authority cache guard arguments differ') + known_guard(args[0]) + owner = dict_get(args[1], 'owner', missing) + need(type0(owner) is dict_get(record[2], '_Owner', missing), + 'Cold authority prepared cache owner class differs') + elif role == 'row_bind': + need(len0(args) == 2 and type0(args[0]) is function_type and type0(args[1]) is bytes0, + 'Cold authority row bind arguments differ') + found = False + for backend_record in tuple0(registry.values()): + if (backend_record[12] == 'backend' and args[0] is dict_get(backend_record[2], 'bind', missing) and + args[1] is backend_record[6]): + found = True + break + need(found, 'Cold authority row bind is not the original registered function/source') + finally: + dict_clear(domains) + + def invoke(handle, export, *args, **kwargs): + record = cold_check(handle) + need(type0(export) is str0, 'Cold authority export name must be exact str') + function = dict_get(record[2], export, missing) + need(type0(function) is function_type and function.__globals__ is record[2], + 'Cold authority export is not an owned source function') + role = classify(record, export) + if role is not None: + validate_producer_arguments(record, export, role, args, kwargs) + result = function(*args, **kwargs) + if role is not None: + # Do not retain a row producer's enclosing tuple or mutable AST. + product = result[0] if type0(result) is tuple0 and len0(result) and type0(result[0]) is function_type else result + expected_kind = function_type if role in ('row_function', 'row_bind') else type0 + need(type0(product) is expected_kind and dict_get(products, id0(product), missing) is missing, + 'Cold authority producer did not return a fresh exact product') + graph = capture_graph((product,) if expected_kind is function_type else (), + (product,) if expected_kind is type0 else ()) + product_record = (product, handle, export, args, tuple0(dict_items(kwargs)), graph, role) + dict_set(products, id0(product), product_record) + domains = {} + try: + fresh_graph(graph, domains, True, 'Cold authority new product') + finally: + dict_clear(domains) + return result + + def check_product(obj, producer_handle, export, args_tuple, kwargs_dict): + record_for(producer_handle) + cold_check(producer_handle) + need(type0(args_tuple) is tuple0 and type0(kwargs_dict) is dict0 and type0(export) is str0, + 'Cold authority product proof arguments differ') + product = dict_get(products, id0(obj), missing) + need(product is not missing and product[0] is obj and product[1] is producer_handle and product[2] == export, + 'Cold authority product provenance differs') + need(len0(args_tuple) == len0(product[3]), 'Cold authority product positional census differs') + for actual, expected in zip0(args_tuple, product[3]): + need(actual is expected, 'Cold authority product positional identity differs') + domains = {} + try: + need(dict_len(kwargs_dict) == len0(product[4]), 'Cold authority product keyword census differs') + for name, expected in product[4]: + need(get_id(kwargs_dict, name, domains) == id0(expected), 'Cold authority product keyword identity differs') + fresh_graph(product[5], domains, True, 'Cold authority registered product') + finally: + dict_clear(domains) + return None + + def set_backend_guard(handle, cls): + record = cold_check(handle) + need(record[12] == 'backend', 'Cold authority guard transition requires original backend') + product = known_guard(cls) + domains = {} + try: + if product is not None: + fresh_graph(product[5], domains, True, 'Cold authority guard transition product') + old = dict_get(backend_guards, id0(handle), missing) + need(dict_get(record[2], 'RuntimeGuard', missing) is old, + 'Cold authority backend guard changed outside the transition ledger') + dict_clear(domains) + dict_set(record[2], 'RuntimeGuard', cls) + dict_set(backend_guards, id0(handle), cls) + transitions.append((handle, old, cls, product)) + fresh_module(record, domains, True) + finally: + dict_clear(domains) + return None + + def source(handle): + record = cold_check(handle) + return (record[1], record[4], record[5], record[6]) + + # Final initial-root validation occurs before any source can receive a token. + cold_check() + need(api[1](capability, provider_pin) is not None, 'Cold authority root capability differs') + operations = (load, invoke, cold_check, runtime_guard, check_product, set_backend_guard, source) + descriptor = make_caller_descriptor(operations, 'Cold authority caller') + # Original raw loader only: capture this transport immediately and retain + # the immutable descriptor privately. No later attribute read is authority. + load.__dict__['_h25_caller_descriptor'] = descriptor + return operations diff --git a/research/h25-c05-v03-input-constructors/inputs/prerequisite-source/native_tcb_controls_v1.py.txt b/research/h25-c05-v03-input-constructors/inputs/prerequisite-source/native_tcb_controls_v1.py.txt new file mode 100644 index 0000000000..91fb71164c --- /dev/null +++ b/research/h25-c05-v03-input-constructors/inputs/prerequisite-source/native_tcb_controls_v1.py.txt @@ -0,0 +1,97 @@ +"""Source-only planned controls; execute before later driver imports/builds. + +The isolated reader drift case writes only its exclusively created temporary +file. No system native library or live process mapping is mutated. +""" + + +def _need(condition, message): + if not condition: + raise RuntimeError(message) + + +def _reject(operation, expected_fragment): + try: + operation() + except RuntimeError as error: + message = str(error) + _need(expected_fragment in message, 'TCB control rejected for an unexpected reason: ' + message) + return message + raise RuntimeError('TCB negative control did not reject') + + +def run_controls(helper, bootstrap_root, bootstrap_api, expected_files, expected_hashlib_origin, temporary_directory): + bootstrap_api[0]() + records = [] + receipt = helper.verify_native_tcb(bootstrap_root, bootstrap_api, expected_files, expected_hashlib_origin) + _need(receipt['status'] == 'MATCHED_DECLARED_INITIAL_NATIVE_FILES' and + receipt['declared_file_count'] == len(expected_files) and + receipt['probe_private_abi_access'] is False, 'TCB positive receipt differs') + records.append({'case': 'TCB-positive-initial-native-closure', 'receipt': receipt}) + path, digest, size = expected_files[0] + wrong_digest = ('0' if digest[0] != '0' else '1') + digest[1:] + wrong = ((path, wrong_digest, size),) + expected_files[1:] + records.append({'case': 'TCB-wrong-file-digest', 'rejection': _reject( + lambda: helper.verify_native_tcb(bootstrap_root, bootstrap_api, wrong, expected_hashlib_origin), + 'file digest differs')}) + remove_index = next(index for index, row in enumerate(expected_files) if row[0] != expected_hashlib_origin) + missing = expected_files[:remove_index] + expected_files[remove_index + 1:] + records.append({'case': 'TCB-missing-declared-map', 'rejection': _reject( + lambda: helper.verify_native_tcb(bootstrap_root, bootstrap_api, missing, expected_hashlib_origin), + 'mapped file closure differs')}) + original_hash = bootstrap_root._SHA256 + def forbidden(*args, **kwargs): + raise RuntimeError('Corrupt hash alias must never execute') + bootstrap_root._SHA256 = forbidden + try: + rejection = _reject(lambda: helper.verify_native_tcb( + bootstrap_root, bootstrap_api, expected_files, expected_hashlib_origin), + 'Bootstrap/provider global changed') + finally: + bootstrap_root._SHA256 = original_hash + records.append({'case': 'TCB-root-hash-alias', 'rejection': rejection, + 'corrupt_function_executed': False}) + + bootstrap_api[0]() + ops = helper._native_ops(bootstrap_root, bootstrap_api) + posix = bootstrap_root.posix + _need(type(temporary_directory) is str and temporary_directory.startswith('/'), + 'TCB temporary control directory must be absolute') + temporary_path = temporary_directory.rstrip('/') + '/native-tcb-reader-drift.bin' + flags = posix.O_CREAT | posix.O_EXCL | posix.O_WRONLY | posix.O_CLOEXEC | posix.O_NOFOLLOW + initial = b'initial native TCB reader evidence\n' * 32 + descriptor = posix.open(temporary_path, flags, 0o600) + try: + offset = 0 + while offset < len(initial): + written = posix.write(descriptor, initial[offset:]) + _need(written > 0, 'TCB temporary fixture write made no progress') + offset += written + finally: + posix.close(descriptor) + expected_digest = ops['sha256'](initial).hexdigest() + state = {'changed': False} + original_read = ops['read'] + def read_and_truncate(descriptor, count): + data = original_read(descriptor, count) + if data and not state['changed']: + state['changed'] = True + writer = posix.open(temporary_path, posix.O_WRONLY | posix.O_TRUNC | posix.O_CLOEXEC | posix.O_NOFOLLOW) + try: + _need(posix.write(writer, b'x') == 1, 'TCB drift fixture write differs') + finally: + posix.close(writer) + return data + instrumented = dict(ops) + instrumented['read'] = read_and_truncate + try: + rejection = _reject(lambda: helper._hash_file( + instrumented, temporary_path, expected_digest, len(initial)), 'file changed during hashing') + _need(state['changed'], 'TCB reader drift instrumentation did not fire') + finally: + posix.unlink(temporary_path) + records.append({'case': 'TCB-isolated-reader-file-drift', 'rejection': rejection, + 'instrumentation_scope': 'Internal reader only, exclusively created temporary file; public TCB admission never accepts injected ops.', + 'system_native_files_mutated': False}) + return {'schema': 'h25-native-tcb-controls-v1', 'records': records, 'expected_records': 5, + 'scientific_calls': 0, 'probe_native_imports': 0} diff --git a/research/h25-c05-v03-input-constructors/inputs/prerequisite-source/native_tcb_v1.py.txt b/research/h25-c05-v03-input-constructors/inputs/prerequisite-source/native_tcb_v1.py.txt new file mode 100644 index 0000000000..55a2f3320b --- /dev/null +++ b/research/h25-c05-v03-input-constructors/inputs/prerequisite-source/native_tcb_v1.py.txt @@ -0,0 +1,202 @@ +"""Initial native TCB corroboration, before other driver imports or native builds. + +No imports. The parent authenticates this source and the expected native closure +before launch, then calls after its captured sealed root guard. Native hashing, +POSIX, OS/loader integrity and the closed bootstrap interval are explicit trust +premises, not established by this check. The existing217file probe audit remains +separate. This receipt is never a scientific verdict or reusable private-ABI PASS. +""" +_MAX_FILES = 32 +_MAX_FILE_BYTES = 67108864 +_MAX_TOTAL_FILE_BYTES = 268435456 +_MAX_MAP_BYTES = 524288 +_MAX_MAP_LINES = 4096 +_MAX_LINE_BYTES = 8192 +_MAX_EXEC_MAPS = 256 +_CHUNK = 1048576 + + +def _need(condition, message): + if not condition: + raise RuntimeError(message) + + +def _native_ops(root, api): + _need(type(api) is tuple and len(api) == 4, 'Native TCB requires sealed bootstrap API') + root_sha = api[0]() + namespace = root.__dict__ + posix = namespace['posix'] + native_hash_module = namespace['_hashlib'] + function = namespace['_SHA256'] + builtin_type = namespace['BuiltinFunctionType'] + module_type = namespace['ModuleType'] + _need(type(posix) is module_type and type(native_hash_module) is module_type, + 'Native TCB module type differs') + _need(type(function) is builtin_type and function.__self__ is native_hash_module and + function.__name__ == 'openssl_sha256' and + native_hash_module.__dict__.get('openssl_sha256') is function, + 'Native TCB hash function owner differs') + functions = {} + for alias, name in (('open', 'open'), ('read', 'read'), ('fstat', 'fstat'), + ('close', 'close'), ('major', 'major'), ('minor', 'minor'), ('getpid', 'getpid')): + value = posix.__dict__.get(name) + _need(type(value) is builtin_type and value.__self__ is posix and value.__name__ == name, + 'Native TCB POSIX primitive owner differs: ' + name) + functions[alias] = value + _need(functions['open'] is namespace['_OPEN'] and functions['read'] is namespace['_READ'] and + functions['fstat'] is namespace['_FSTAT'] and functions['close'] is namespace['_CLOSE'], + 'Native TCB primitive differs from pristine root') + functions.update({'sha256': function, 'flags': namespace['_FLAGS'], 'posix': posix, + 'hash_module': native_hash_module, 'root_sha256': root_sha}) + return functions + + +def _expected_inventory(expected_files, expected_hashlib_origin): + _need(type(expected_files) is tuple and 1 <= len(expected_files) <= _MAX_FILES, + 'Native TCB expected file inventory type/count differs') + _need(type(expected_hashlib_origin) is str, 'Native TCB expected hashlib origin type differs') + inventory = {} + total = 0 + for row in expected_files: + _need(type(row) is tuple and len(row) == 3, 'Native TCB expected row shape differs') + path, digest, size = row + _need(type(path) is str and path.startswith('/') and len(path) <= 4096 and + all(32 < ord(character) < 127 for character in path) and + path not in inventory and not path.endswith(' (deleted)'), + 'Native TCB expected canonical path differs') + _need(type(digest) is str and len(digest) == 64 and + all(character in '0123456789abcdef' for character in digest), + 'Native TCB expected digest differs') + _need(type(size) is int and 0 < size <= _MAX_FILE_BYTES, + 'Native TCB expected size differs') + total += size + _need(total <= _MAX_TOTAL_FILE_BYTES, 'Native TCB expected total bytes exceed bound') + inventory[path] = (digest, size) + _need(expected_hashlib_origin in inventory, 'Native TCB hashlib origin is undeclared') + return inventory, total + + +def _read_maps(ops): + descriptor = ops['open']('/proc/self/maps', ops['flags']) + try: + info = ops['fstat'](descriptor) + _need((info.st_mode & 0o170000) == 0o100000, 'Native TCB maps pseudo-file type differs') + parts, count = [], 0 + while True: + block = ops['read'](descriptor, min(65536, _MAX_MAP_BYTES + 1 - count)) + if not block: + break + count += len(block) + _need(count <= _MAX_MAP_BYTES, 'Native TCB maps byte bound exceeded') + parts.append(block) + raw = b''.join(parts) + finally: + ops['close'](descriptor) + lines = raw.splitlines() + _need(len(lines) <= _MAX_MAP_LINES, 'Native TCB maps line bound exceeded') + executable = [] + for line in lines: + _need(len(line) <= _MAX_LINE_BYTES, 'Native TCB maps line byte bound exceeded') + fields = line.split(None, 5) + _need(len(fields) >= 5, 'Native TCB maps row shape differs') + address, permissions, offset, device, inode_text = fields[:5] + _need(len(permissions) == 4, 'Native TCB map permissions shape differs') + if permissions[2:3] != b'x': + continue + inode = int(inode_text, 10) + if inode == 0: + continue # anonymous/kernel executable mappings belong to explicit OS TCB + _need(len(fields) == 6 and fields[5].startswith(b'/') and + not fields[5].endswith(b' (deleted)'), 'Native TCB executable map path differs') + path = fields[5].decode('ascii') + span, pair = address.split(b'-'), device.split(b':') + _need(len(span) == 2 and len(pair) == 2, 'Native TCB map address/device shape differs') + start, end = int(span[0], 16), int(span[1], 16) + _need(0 <= start < end < (1 << 64), 'Native TCB map address bounds differ') + row = (path, int(pair[0], 16), int(pair[1], 16), inode, + start, end, int(offset, 16), permissions.decode('ascii')) + executable.append(row) + _need(len(executable) <= _MAX_EXEC_MAPS, 'Native TCB executable map count exceeded') + _need(executable, 'Native TCB no file-backed executable mappings observed') + return tuple(sorted(executable)), len(raw), ops['sha256'](raw).hexdigest() + + +def _fingerprint(info): + return (info.st_dev, info.st_ino, info.st_mode, info.st_size, info.st_mtime_ns, info.st_ctime_ns) + + +def _hash_file(ops, path, expected_digest, expected_size): + """Production uses only freshly captured native ops; controls may separately + instrument this internal reader on an exclusively created temporary file.""" + descriptor = ops['open'](path, ops['flags']) + try: + before = ops['fstat'](descriptor) + _need((before.st_mode & 0o170000) == 0o100000 and before.st_size == expected_size, + 'Native TCB regular-file type/size differs: ' + path) + digest, count = ops['sha256'](), 0 + while True: + block = ops['read'](descriptor, min(_CHUNK, expected_size + 1 - count)) + if not block: + break + count += len(block) + _need(count <= expected_size, 'Native TCB file grew during hashing: ' + path) + digest.update(block) + after = ops['fstat'](descriptor) + _need(_fingerprint(before) == _fingerprint(after) and count == expected_size, + 'Native TCB file changed during hashing: ' + path) + actual = digest.hexdigest() + _need(actual == expected_digest, 'Native TCB file digest differs: ' + path) + return {'path': path, 'expected_sha256': expected_digest, 'observed_sha256': actual, + 'expected_bytes': expected_size, 'observed_bytes': count, + 'device': after.st_dev, 'device_major': ops['major'](after.st_dev), + 'device_minor': ops['minor'](after.st_dev), 'inode': after.st_ino, + 'mode': after.st_mode, 'mtime_ns': after.st_mtime_ns, 'ctime_ns': after.st_ctime_ns} + finally: + ops['close'](descriptor) + + +def verify_native_tcb(bootstrap_root, bootstrap_api, expected_files, expected_hashlib_origin): + """Corroborate the parent's declared initial native file closure, freshly.""" + ops = _native_ops(bootstrap_root, bootstrap_api) + inventory, expected_total = _expected_inventory(expected_files, expected_hashlib_origin) + native_hash_module = ops['hash_module'] + origin = native_hash_module.__dict__.get('__file__') + _need(type(origin) is str and origin == expected_hashlib_origin, + 'Native TCB actual hashlib origin differs') + mappings_before, maps_before_bytes, maps_before_sha = _read_maps(ops) + mapped_paths = {row[0] for row in mappings_before} + _need(mapped_paths == set(inventory), 'Native TCB declared/executable mapped file closure differs') + files = [] + for path, expected_digest, expected_size in expected_files: + observed = _hash_file(ops, path, expected_digest, expected_size) + current = tuple(row for row in mappings_before if row[0] == path) + _need(current and all(row[1] == observed['device_major'] and + row[2] == observed['device_minor'] and row[3] == observed['inode'] + for row in current), 'Native TCB mapped/current file identity differs: ' + path) + observed['executable_mapping_count'] = len(current) + observed['executable_mappings'] = [ + {'start': hex(row[4]), 'end': hex(row[5]), 'offset': row[6], 'permissions': row[7]} + for row in current] + files.append(observed) + mappings_after, maps_after_bytes, maps_after_sha = _read_maps(ops) + _need(mappings_after == mappings_before, 'Native TCB executable mappings changed during audit') + final_ops = _native_ops(bootstrap_root, bootstrap_api) + _need(final_ops['hash_module'] is native_hash_module and final_ops['sha256'] is ops['sha256'] and + native_hash_module.__dict__.get('__file__') == origin and + final_ops['root_sha256'] == ops['root_sha256'], 'Native TCB root/hash provenance changed') + for name in ('open', 'read', 'fstat', 'close', 'major', 'minor', 'getpid'): + _need(final_ops[name] is ops[name], 'Native TCB captured primitive drifted: ' + name) + return {'schema': 'h25-initial-native-tcb-v1', 'status': 'MATCHED_DECLARED_INITIAL_NATIVE_FILES', + 'root_source_sha256': ops['root_sha256'], 'pid': ops['getpid'](), + 'hashlib_origin': origin, 'hashlib_module_id': id(native_hash_module), + 'hash_function_id': id(ops['sha256']), 'hash_function_name': 'openssl_sha256', + 'hash_function_owned_by_root_module': True, 'files': files, + 'declared_file_count': len(files), 'expected_total_file_bytes': expected_total, + 'observed_total_file_bytes': sum(row['observed_bytes'] for row in files), + 'executable_mapping_count': len(mappings_before), + 'maps_before_bytes': maps_before_bytes, 'maps_after_bytes': maps_after_bytes, + 'maps_before_sha256': maps_before_sha, 'maps_after_sha256': maps_after_sha, + 'executable_mappings_stable': True, 'probe_private_abi_access': False, + 'scientific_admission': False, 'reusable_pass': False, + 'trust_boundary': 'Parent-authenticated fresh startup and declared native/OS/loader primitives; corroboration does not self-prove hostile-OS or compromised-hash integrity.', + 'kernel_anonymous_executable_maps': 'Excluded from declared native file closure; remain in explicit OS trust boundary.'} diff --git a/research/h25-c05-v03-input-constructors/inputs/prerequisite-source/sealed_elf_profile_v2.py.txt b/research/h25-c05-v03-input-constructors/inputs/prerequisite-source/sealed_elf_profile_v2.py.txt new file mode 100644 index 0000000000..67967f85b0 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/inputs/prerequisite-source/sealed_elf_profile_v2.py.txt @@ -0,0 +1,1388 @@ +"""Source-only bounded ELF/profile predicates; no file, loader, or process APIs. + +This module is NOT an authentication boundary. The original Root authenticates +this source, its builtin/stdlib environment, input bytes, launch policy and native +helper provenance before calling it. Its exact-builtin inputs/outputs stay private +in the no-callback bootstrap interval. A successful static parse is not permission +to load. See INTERFACE-v2.md for the separately required runtime admission stages. +""" +from hashlib import sha256 as _sha256 +from struct import unpack_from as _unpack_from + +ABI = "h25-elf-profile-v2" +INITIALIZER = "PyInit__h25_field_service_v1" +ORIGINAL_INITIALIZER = "PyInit__h25_dict_probe" +PRODUCTION_DATA_LINKS = ( + ("probe_module", 64, "probe_methods"), + ("probe_module", 72, "probe_slots"), + ("h25_field_module", 64, "h25_field_methods"), + ("h25_field_module", 72, "h25_field_slots"), + ("h25_field_context_type", 232, "h25_field_context_methods"), +) +MAX_FILE = 8 * 1024 * 1024 +MAX_MEMORY = 64 * 1024 * 1024 +MAX_PH = 64 +MAX_SH = 256 +MAX_DYNAMIC = 1024 +MAX_SYMBOLS = 4096 +MAX_RELOCATIONS = 16384 +MAX_IMPORTS = 512 +MAX_MAPS = 256 +MAX_SEGMENTS = 64 +MAX_STRING = 4096 +PAGE = 4096 +U64 = (1 << 64) - 1 + + +class ELFAdmissionError(ValueError): + """Closed-profile rejection; messages never format untrusted objects.""" + + +def _need(condition, reason): + if not condition: + raise ELFAdmissionError(reason) + + +def _int(value, maximum=U64): + _need(type(value) is int and 0 <= value <= maximum, "integer type/range") + return value + + +def _text(value, maximum=MAX_STRING, empty=False): + _need(type(value) is str and len(value) <= maximum, "string type/size") + _need((empty or len(value) > 0) and all(32 <= ord(c) < 127 for c in value), + "string alphabet") + return value + + +def _digest(value): + _need(type(value) is str and len(value) == 64 and + all(c in "0123456789abcdef" for c in value), "digest type/value") + return value + + +def _tuple(value, maximum, minimum=0): + _need(type(value) is tuple and minimum <= len(value) <= maximum, "tuple type/size") + return value + + +def _record(value, keys): + _need(type(value) is dict, "record type") + _need(all(type(k) is str for k in value), "record key type") + _need(set(value) == set(keys), "record key set") + return value + + +def _plain(value): + """Bound the whole graph BEFORE comparing or indexing external structures.""" + count = [0, 0] + def visit(v, depth): + count[0] += 1 + _need(depth <= 16 and count[0] <= 200000, "record nesting/count") + t = type(v) + if t is dict: + _need(len(v) <= 4096 and all(type(k) is str for k in v), "plain dictionary") + for k, x in v.items(): + visit(k, depth + 1) + visit(x, depth + 1) + elif t is tuple: + _need(len(v) <= MAX_RELOCATIONS, "plain tuple count") + for x in v: + visit(x, depth + 1) + elif t is str or t is bytes: + _need(len(v) <= MAX_FILE, "plain byte/string size") + count[1] += len(v) + _need(count[1] <= 64 * 1024 * 1024, "plain aggregate bytes") + elif t is int: + _need(-U64 <= v <= U64, "plain integer range") + else: + _need(v is None or t is bool, "non-builtin input") + visit(value, 0) + + +def _fingerprint(value): + """Canonical, bounded exact-data hash; no repr, pickle, or user hooks.""" + _plain(value) + h = _sha256() + def put(v): + t = type(v) + if t is dict: + h.update(b"d" + str(len(v)).encode("ascii") + b":") + for k in sorted(v): + put(k) + put(v[k]) + elif t is tuple: + h.update(b"t" + str(len(v)).encode("ascii") + b":") + for x in v: + put(x) + elif t is bytes or t is str: + b = v if t is bytes else v.encode("utf-8") + h.update((b"b" if t is bytes else b"s") + str(len(b)).encode("ascii") + b":" + b) + elif t is int: + h.update(b"i" + str(v).encode("ascii") + b";") + else: + h.update(b"n" if v is None else b"y" if v else b"z") + put(value) + return h.hexdigest() + + +def _end(start, size, limit=U64): + _int(start) + _int(size) + _need(start <= limit and size <= limit - start, "range overflow/out of bounds") + return start + size + + +def _overlap(a, b): + return a[0] < b[1] and b[0] < a[1] + + +def _disjoint(ranges, reason): + ordered = sorted(ranges) + for a, b in zip(ordered, ordered[1:]): + _need(a[1] <= b[0], reason) + + +def _elf_hash(name): + h = 0 + for c in name.encode("ascii"): + h = (h << 4) + c + g = h & 0xF0000000 + if g: + h ^= g >> 24 + h &= ~g + return h & 0xFFFFFFFF + + +def _gnu_hash(name): + h = 5381 + for c in name.encode("ascii"): + h = ((h << 5) + h + c) & 0xFFFFFFFF + return h + + +def _static_policy(policy): + _plain(policy) + _record(policy, ("schema", "source_closure_sha256", "compiler_closure_sha256", + "link_profile_sha256", "build_receipt_sha256", "expected_exports", + "needed", "required_local_functions", "required_local_objects", + "method_tables", "pointer_slots", "page_profile")) + _need(policy["schema"] == "h25-static-elf-policy-v2", "static policy schema") + _record(policy["page_profile"], ("schema", "page_size")) + _need(policy["page_profile"]["schema"] == "h25-amd64-page-profile-v1" and + type(policy["page_profile"]["page_size"]) is int and + policy["page_profile"]["page_size"] == PAGE, "unsupported admitted page profile") + for k in ("source_closure_sha256", "compiler_closure_sha256", "link_profile_sha256", + "build_receipt_sha256"): + _digest(policy[k]) + for k in ("expected_exports", "needed", "required_local_functions", "required_local_objects"): + values = _tuple(policy[k], 512) + for v in values: + _text(v, 256) + _need(len(set(values)) == len(values), "duplicate static policy name") + _need(INITIALIZER in policy["expected_exports"], "initializer absent from policy") + _need(len(policy["required_local_functions"]) > 0, "no source helper facts") + _tuple(policy["method_tables"], 32, 1) + for n in policy["needed"]: + _need("/" not in n and "$" not in n and ":" not in n, "needed name profile") + _tuple(policy["method_tables"], 32, 1) + table_names = set() + for table in policy["method_tables"]: + _record(table, ("symbol", "entries")) + n = _text(table["symbol"], 256) + _need(n not in table_names, "duplicate method table") + table_names.add(n) + _need(n in policy["required_local_objects"], "method table missing object fact") + for entry in _tuple(table["entries"], 128, 1): + _tuple(entry, 4, 4) + _text(entry[0], 256) + _text(entry[1], 256) + _int(entry[2], 0xFFFF) + _need(entry[1] in policy["required_local_functions"], "method target missing function fact") + if entry[3] is not None: + _text(entry[3], MAX_STRING, empty=True) + _need(len({e[0] for e in table["entries"]}) == len(table["entries"]), "duplicate method name") + _tuple(policy["pointer_slots"], 512) + for slot in policy["pointer_slots"]: + _tuple(slot, 3, 3) + _text(slot[0], 256) + _int(slot[1], MAX_MEMORY) + _text(slot[2], 256) + _need(slot[0] in policy["required_local_objects"] and + slot[2] in policy["required_local_functions"] + policy["required_local_objects"], + "pointer slot missing local facts") + _need(len(set(policy["pointer_slots"])) == len(policy["pointer_slots"]), "duplicate pointer slot") + if ORIGINAL_INITIALIZER in policy["expected_exports"]: + _need(set(policy["expected_exports"]) == {INITIALIZER, ORIGINAL_INITIALIZER}, "production initializer export set") + _need(set(PRODUCTION_DATA_LINKS).issubset(set(policy["pointer_slots"])), + "missing production module/type data linkage") + return policy + + +class _ELF: + def __init__(self, raw, policy): + _need(type(raw) is bytes and 64 <= len(raw) <= MAX_FILE, "ELF byte type/size") + self.raw = raw + self.policy = _static_policy(policy) + self.page_size = self.policy["page_profile"]["page_size"] + self.loads = [] + self.sections = [] + self.protected = [] + self.dynamic = {} + self.needed = [] + self.relocations = [] + self.by_destination = {} + + def read(self, offset, size): + return self.raw[offset:_end(offset, size, len(self.raw))] + + def unpack(self, fmt, offset, size): + self.read(offset, size) + return _unpack_from(fmt, self.raw, offset) + + def cstring(self, section, offset, empty=False): + _need(0 <= offset < section["size"], "string offset") + start = section["offset"] + offset + limit = min(section["offset"] + section["size"], start + MAX_STRING + 1) + end = self.raw.find(b"\0", start, limit) + _need(end >= start, "unterminated/oversized string") + b = self.raw[start:end] + _need((empty or b) and all(32 <= c < 127 for c in b), "ELF string alphabet") + return b.decode("ascii") + + def load_at(self, address, size, file_backed=False, executable=None, writable=None): + end = _end(address, size) + matches = [] + for p in self.loads: + stop = p["vaddr"] + (p["filesz"] if file_backed else p["memsz"]) + if p["vaddr"] <= address and end <= stop: + if executable is not None and bool(p["flags"] & 1) != executable: + continue + if writable is not None and bool(p["flags"] & 2) != writable: + continue + matches.append(p) + _need(len(matches) == 1 and size > 0, "ambiguous/unmapped address range") + return matches[0] + + def file_at(self, address, size): + p = self.load_at(address, size, file_backed=True) + return p["offset"] + address - p["vaddr"] + + def section_at(self, address, size, writable=None): + end = _end(address, size) + found = [s for s in self.sections if s["flags"] & 2 and s["addr"] <= address + and end <= s["addr"] + s["size"] and + (writable is None or bool(s["flags"] & 1) == writable)] + _need(size > 0 and len(found) == 1, "ambiguous/unsectioned address range") + return found[0] + + def section_type(self, kind, mandatory=True): + found = [s for s in self.sections if s["type"] == kind] + _need(len(found) == 1 if mandatory else len(found) <= 1, "section cardinality") + return found[0] if found else None + + def headers(self): + _need(self.raw[:16] == b"\x7fELF\x02\x01\x01\x00" + b"\0" * 8, "ELF identity/profile") + h = self.unpack("= phend, "header table overlap") + self.header_ranges = [(0, phend), (shoff, shend)] + allowed_ph = {0, 1, 2, 4, 6, 0x6474E550, 0x6474E551, 0x6474E552} + programs = [] + for i in range(phnum): + kind, f, off, va, pa, fs, ms, align = self.unpack(" 0 and fs > 0 and f in (4, 5, 6) and align >= PAGE and + va % align == off % align, "PT_LOAD profile") + _need(not (f & 1) or fs == ms, "executable zero fill") + self.loads.append(p) + _need(2 <= len(self.loads) <= 8, "PT_LOAD count") + _need(self.loads == sorted(self.loads, key=lambda p: p["vaddr"]), "PT_LOAD ordering") + _disjoint([(p["vaddr"] // PAGE * PAGE, + (p["vaddr"] + p["memsz"] + PAGE - 1) // PAGE * PAGE) for p in self.loads], + "PT_LOAD mapped-page overlap") + _disjoint([(p["offset"], p["offset"] + p["filesz"]) for p in self.loads], "PT_LOAD file overlap") + _need(sum(p["memsz"] for p in self.loads) <= MAX_MEMORY, "aggregate mapped memory") + _need(any(p["flags"] == 5 for p in self.loads) and any(p["flags"] == 6 for p in self.loads), + "missing code/data segment") + first = self.loads[0] + _need(first["vaddr"] == 0 and first["offset"] == 0 and first["flags"] == 4 and + first["filesz"] >= phend, "header load mapping") + by_kind = {} + for p in programs: + by_kind.setdefault(p["type"], []).append(p) + if p["type"] in (0, 1, 0x6474E551): + continue + _need(p["filesz"] > 0 and p["memsz"] == p["filesz"], "auxiliary program range") + owner = self.load_at(p["vaddr"], p["filesz"], file_backed=True) + _need(p["offset"] == owner["offset"] + p["vaddr"] - owner["vaddr"], + "auxiliary program mapping") + _need(p["flags"] & ~owner["flags"] == 0, "auxiliary segment permissions") + _need(len(by_kind.get(2, ())) == 1 and len(by_kind.get(0x6474E551, ())) == 1 and + len(by_kind.get(0x6474E552, ())) == 1, "dynamic/stack/RELRO cardinality") + for k in (6, 0x6474E550, 0x6474E553): + _need(len(by_kind.get(k, ())) <= 1, "auxiliary program cardinality") + stack = by_kind[0x6474E551][0] + _need(stack["flags"] == 6 and stack["offset"] == stack["vaddr"] == + stack["filesz"] == stack["memsz"] == 0, "executable/noncanonical stack") + self.dynamic_segment = by_kind[2][0] + _need(self.dynamic_segment["flags"] == 6, "dynamic segment permissions") + self.relro = by_kind[0x6474E552][0] + self.load_at(self.relro["vaddr"], self.relro["memsz"], writable=True) + # glibc 2.39 _dl_protect_relro floors BOTH endpoints, not the end up. + # The admitted first PT_LOAD and p_align establish a page-aligned load + # bias under the independently admitted 4096-byte loader page profile. + relro_start = self.relro["vaddr"] + relro_end = _end(relro_start, self.relro["memsz"], MAX_MEMORY) + self.nominal_relro = (relro_start, relro_end) + self.effective_relro = (relro_start // self.page_size * self.page_size, + relro_end // self.page_size * self.page_size) + _need(self.effective_relro[0] < self.effective_relro[1], "RELRO protects no complete pages") + if by_kind.get(6): + p = by_kind[6][0] + _need(p["offset"] == phoff and p["vaddr"] == phoff and p["filesz"] == phnum * 56, + "PT_PHDR mismatch") + for i in range(shnum): + n, t, f, a, o, z, link, info, align, ent = self.unpack(" 1: + _need((a if f & 2 else o) % align == 0, "section misalignment") + if f & 2 and z: + p = self.load_at(a, z, file_backed=t != 8) + _need(bool(f & 1) == bool(p["flags"] & 2) or not (f & 1), "section write mapping") + _need(not (f & 4) or p["flags"] == 5, "section execute mapping") + _need(not (f & 1) or not (p["flags"] & 1), "writable code mapping") + if t != 8: + _need(o == p["offset"] + a - p["vaddr"], "section file/virtual mapping") + else: + _need(a >= p["vaddr"] + p["filesz"], "NOBITS overlaps file bytes") + elif not (f & 2): + _need(a == 0, "nonallocated section address") + self.sections.append(dict(index=i, name_offset=n, type=t, flags=f, addr=a, offset=o, + size=z, link=link, info=info, align=align, entsize=ent)) + strsec = self.sections[shstr] + _need(strsec["type"] == 3 and strsec["flags"] == 0, "section-name table") + self.string_table(strsec) + names = set() + for s in self.sections: + s["name"] = self.cstring(strsec, s["name_offset"], empty=s["index"] == 0) + _need(s["name"] not in names, "duplicate section name") + names.add(s["name"]) + _need(not any(x in s["name"] for x in ("init_array", "fini_array", "preinit_array")) + and s["name"] not in (".init", ".fini", ".ctors", ".dtors"), "constructor section") + file_ranges = [(s["offset"], s["offset"] + s["size"]) for s in self.sections + if s["type"] != 8 and s["size"]] + _disjoint(file_ranges + self.header_ranges, "section/header file overlap") + _disjoint([(s["addr"], s["addr"] + s["size"]) for s in self.sections if s["flags"] & 2 and s["size"]], + "allocated section overlap") + for s in self.sections: + if s["type"] in (3, 4, 5, 6, 11, 0x6FFFFFF6, 0x6FFFFFFE, 0x6FFFFFFF) and s["flags"] & 2: + self.protected.append((s["addr"], s["addr"] + s["size"])) + if s["type"] != 6 and s["size"]: + owner = self.load_at(s["addr"], s["size"], file_backed=True) + _need(owner["flags"] == 4, "loader metadata not read-only") + self.protected.append((0, phend)) + # Narrow production profile: GNU build-id notes only. GNU properties, + # ABI notes and unknown processor features require a separate profile. + note_sections = [s for s in self.sections if s["type"] == 7] + _need(len(note_sections) <= 1 and len(by_kind.get(4, ())) == len(note_sections), + "note section/program cardinality") + for note, program in zip(note_sections, by_kind.get(4, ())): + _need(note["name"] == ".note.gnu.build-id" and note["flags"] == 2 and + note["align"] == 4 and note["entsize"] == 0 and note["size"] >= 16 and + (note["offset"], note["addr"], note["size"]) == + (program["offset"], program["vaddr"], program["filesz"]), "note profile") + namesz, descsz, kind = self.unpack(" 0 and self.effective_relro[0] <= address and end <= self.effective_relro[1], reason) + + def string_table(self, s): + _need(s["type"] == 3 and 1 <= s["size"] <= MAX_FILE and s["entsize"] == 0, + "string table profile") + b = self.read(s["offset"], s["size"]) + _need(b[0] == b[-1] == 0, "string table endpoints") + + def dynamics(self): + s = self.section_type(6) + p = self.dynamic_segment + _need(s["flags"] == 3 and s["addr"] == p["vaddr"] and s["offset"] == p["offset"] + and s["size"] == p["filesz"] and s["entsize"] == 16 and + 1 <= s["size"] // 16 <= MAX_DYNAMIC, "dynamic section/segment mismatch") + self.dynamic_section = s + _need(self.relro["vaddr"] <= s["addr"] and s["addr"] + s["size"] <= + self.relro["vaddr"] + self.relro["memsz"], "dynamic table outside nominal RELRO") + self.require_effective_relro(s["addr"], s["size"], "dynamic table outside effective RELRO") + allowed = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 20, 23, 24, 30, + 0x6FFFFEF5, 0x6FFFFFF0, 0x6FFFFFF9, 0x6FFFFFFB, 0x6FFFFFFE, 0x6FFFFFFF} + ended = False + for o in range(s["offset"], s["offset"] + s["size"], 16): + tag, val = self.unpack("> 4, info & 15, other & 3 + _need(other == vis and bind in (0, 1, 2) and typ in (0, 1, 2, 3, 4), + "symbol binding/type/visibility") + _need((i < s["info"]) == (bind == 0), "symbol local partition") + name = self.cstring(st, no, empty=i == 0 or typ == 3) + if i == 0: + _need((no, info, other, sh, value, size) == (0,) * 6, "nonnull zero symbol") + elif dynamic: + _need(bind in (1, 2) and typ in (0, 1, 2) and name, "dynamic symbol profile") + if sh == 0: + _need(value == 0 and size == 0 and (i == 0 or bind in (1, 2)) and vis == 0, + "undefined symbol profile") + elif sh == 0xFFF1 and not dynamic and typ == 4 and bind == 0: + _need(value == size == 0, "FILE symbol profile") + else: + _need(0 < sh < len(self.sections), "absolute/common/reserved symbol section") + sec = self.sections[sh] + if typ == 4: + _need(False, "nonabsolute FILE symbol") + if sec["flags"] & 2: + _need(sec["addr"] <= value and _end(value, size) <= sec["addr"] + sec["size"], + "defined symbol extent/section") + if typ == 2: + _need(size > 0 and sec["flags"] & 4, + "function extent/section") + self.load_at(value, size, file_backed=True, executable=True, writable=False) + else: + _need(not dynamic and typ in (0, 3), "unallocated dynamic/object/function symbol") + result.append(dict(index=i, name=name, binding=bind, type=typ, visibility=vis, + section=sh, value=value, size=size)) + return result + + def symbol_tables(self): + self.dynsyms = self.symbols(self.dynsym_section, True) + full = self.section_type(2) + _need(full["flags"] == 0, "full symbol table profile") + self.fullsyms = self.symbols(full, False) + self.versions() + self.full_by_name = {} + for sym in self.fullsyms[1:]: + self.full_by_name.setdefault(sym["name"], []).append(sym) + names = [s["name"] for s in self.dynsyms[1:]] + _need(len(set(names)) == len(names), "duplicate dynamic symbol name") + exports = [] + for sym in self.dynsyms[1:]: + if sym["section"]: + _need(sym["binding"] == 1 and sym["type"] == 2 and sym["visibility"] == 0, + "unexpected exported definition") + exports.append(sym["name"]) + full_names = (sym["name"],) if sym["version"] is None else (sym["name"], sym["name"] + "@" + sym["version"]) + matches = [candidate for name in full_names for candidate in self.full_by_name.get(name, ())] + _need(len(matches) == 1, "dynamic/full symbol ambiguity") + match = matches[0] + _need(all(match[k] == sym[k] for k in ("binding", "type", "visibility", "section", "value", "size")), + "dynamic/full symbol mismatch") + _need(set(exports) == set(self.policy["expected_exports"]), "export closure mismatch") + for sym in self.fullsyms[1:]: + if 0 < sym["section"] < len(self.sections) and sym["type"] in (1, 2) and sym["name"] not in exports: + _need(sym["binding"] == 0 or sym["binding"] == 1 and sym["visibility"] == 2, + "interposable internal function/data") + self.initializer = next(s for s in self.dynsyms if s["name"] == INITIALIZER) + _need(self.initializer["size"] > 0, "empty initializer") + for k, typ in (("required_local_functions", 2), ("required_local_objects", 1)): + for name in self.policy[k]: + matches = self.full_by_name.get(name, ()) + _need(len(matches) == 1, "source helper missing/ambiguous") + s = matches[0] + _need(s["type"] == typ and s["size"] > 0 and 0 < s["section"] < len(self.sections) + and (s["binding"] == 0 or s["binding"] == 1 and s["visibility"] == 2), + "interposable/invalid source helper") + self.load_at(s["value"], s["size"], file_backed=True, executable=typ == 2) + + def hashes(self): + d, syms = self.dynamic, self.dynsyms + n = len(syms) + reachable_sets = [] + for tag, kind in ((4, 5), (0x6FFFFEF5, 0x6FFFFFF6)): + section = self.section_type(kind, False) + _need((tag in d) == (section is not None), "hash section/tag mismatch") + if section is None: + continue + _need(section["flags"] == 2 and section["addr"] == d[tag] and + section["link"] == self.dynsym_section["index"], "hash link/address") + off = section["offset"] + visited = set() + if tag == 4: + nb, nc = self.unpack("> shift) % 64)) + if chain & 1: + break + i += 1 + _need(visited == set(range(first, n)) and tuple(expected_blooms) == blooms, + "GNU unreachable symbol/bloom mismatch") + _need(all(s["section"] == 0 for s in syms[1:first]), "GNU omitted definition") + _need(self.initializer["index"] in visited and + all(s["index"] in visited for s in syms[1:] if s["section"]), "initializer/export not hash reachable") + reachable_sets.append(tuple(sorted(visited))) + self.hash_reachability = tuple(reachable_sets) + + def versions(self): + d = self.dynamic + vs = self.section_type(0x6FFFFFFF, False) + vn = self.section_type(0x6FFFFFFE, False) + _need((0x6FFFFFF0 in d) == (vs is not None) and + (0x6FFFFFFE in d) == (vn is not None), "version section/tag mismatch") + version_map = {} + self.version_requirements = [] + version_pairs = set() + if vn is not None: + _need(vs is not None and vn["flags"] == 2 and vn["addr"] == d[0x6FFFFFFE] and + vn["link"] == self.dynstr["index"] and vn["info"] == d[0x6FFFFFFF] + and 1 <= vn["info"] <= 64, "verneed metadata") + pos = 0 + seen_files = set() + for ni in range(vn["info"]): + ver, cnt, no, aux, nxt = self.unpack(" option. `dir' is found through find_file, that + is the -print-file-name gcc program option. */ +static const char * +find_plugindir_spec_function (int argc, const char **argv ATTRIBUTE_UNUSED) +{ + const char *option; + + if (argc != 0) + abort (); + + option = concat ("-iplugindir=", find_file ("plugin"), NULL); + return option; +} + + +/* %:print-asm-header spec function. Print a banner to say that the + following output is from the assembler. */ + +static const char * +print_asm_header_spec_function (int arg ATTRIBUTE_UNUSED, + const char **argv ATTRIBUTE_UNUSED) +{ + printf (_("Assembler options\n=================\n\n")); + printf (_("Use \"-Wa,OPTION\" to pass \"OPTION\" to the assembler.\n\n")); + fflush (stdout); + return NULL; +} + +/* Get a random number for -frandom-seed */ + +static unsigned HOST_WIDE_INT +get_random_number (void) +{ + unsigned HOST_WIDE_INT ret = 0; + int fd; + + fd = open ("/dev/urandom", O_RDONLY); + if (fd >= 0) + { + read (fd, &ret, sizeof (HOST_WIDE_INT)); + close (fd); + if (ret) + return ret; + } + + /* Get some more or less random data. */ +#ifdef HAVE_GETTIMEOFDAY + { + struct timeval tv; + + gettimeofday (&tv, NULL); + ret = tv.tv_sec * 1000 + tv.tv_usec / 1000; + } +#else + { + time_t now = time (NULL); + + if (now != (time_t)-1) + ret = (unsigned) now; + } +#endif + + return ret ^ getpid (); +} + +/* %:compare-debug-dump-opt spec function. Save the last argument, + expected to be the last -fdump-final-insns option, or generate a + temporary. */ + +static const char * +compare_debug_dump_opt_spec_function (int arg, + const char **argv ATTRIBUTE_UNUSED) +{ + char *ret; + char *name; + int which; + static char random_seed[HOST_BITS_PER_WIDE_INT / 4 + 3]; + + if (arg != 0) + fatal_error (input_location, + "too many arguments to %%:compare-debug-dump-opt"); + + do_spec_2 ("%{fdump-final-insns=*:%*}", NULL); + do_spec_1 (" ", 0, NULL); + + if (argbuf.length () > 0 + && strcmp (argv[argbuf.length () - 1], ".") != 0) + { + if (!compare_debug) + return NULL; + + name = xstrdup (argv[argbuf.length () - 1]); + ret = NULL; + } + else + { + if (argbuf.length () > 0) + do_spec_2 ("%B.gkd", NULL); + else if (!compare_debug) + return NULL; + else + do_spec_2 ("%{!save-temps*:%g.gkd}%{save-temps*:%B.gkd}", NULL); + + do_spec_1 (" ", 0, NULL); + + gcc_assert (argbuf.length () > 0); + + name = xstrdup (argbuf.last ()); + + char *arg = quote_spec (xstrdup (name)); + ret = concat ("-fdump-final-insns=", arg, NULL); + free (arg); + } + + which = compare_debug < 0; + debug_check_temp_file[which] = name; + + if (!which) + { + unsigned HOST_WIDE_INT value = get_random_number (); + + sprintf (random_seed, HOST_WIDE_INT_PRINT_HEX, value); + } + + if (*random_seed) + { + char *tmp = ret; + ret = concat ("%{!frandom-seed=*:-frandom-seed=", random_seed, "} ", + ret, NULL); + free (tmp); + } + + if (which) + *random_seed = 0; + + return ret; +} + +/* %:compare-debug-self-opt spec function. Expands to the options + that are to be passed in the second compilation of + compare-debug. */ + +static const char * +compare_debug_self_opt_spec_function (int arg, + const char **argv ATTRIBUTE_UNUSED) +{ + if (arg != 0) + fatal_error (input_location, + "too many arguments to %%:compare-debug-self-opt"); + + if (compare_debug >= 0) + return NULL; + + return concat ("\ +%= argc) + break; + else if (!*lopt) + lopt = argv[n]; + prepended = concat (prepended, "-plugin-opt=-pass-through=-l", + lopt, " ", NULL); + } + else if (!strcmp (".a", argv[n] + strlen (argv[n]) - 2)) + { + prepended = concat (prepended, "-plugin-opt=-pass-through=", + argv[n], " ", NULL); + } + if (prepended != old) + free (old); + } + return prepended; +} + +static bool +not_actual_file_p (const char *name) +{ + return (strcmp (name, "-") == 0 + || strcmp (name, HOST_BIT_BUCKET) == 0); +} + +/* %:dumps spec function. Take an optional argument that overrides + the default extension for -dumpbase and -dumpbase-ext. + Return -dumpdir, -dumpbase and -dumpbase-ext, if needed. */ +const char * +dumps_spec_func (int argc, const char **argv ATTRIBUTE_UNUSED) +{ + const char *ext = dumpbase_ext; + char *p; + + char *args[3] = { NULL, NULL, NULL }; + int nargs = 0; + + /* Do not compute a default for -dumpbase-ext when -dumpbase was + given explicitly. */ + if (dumpbase && *dumpbase && !ext) + ext = ""; + + if (argc == 1) + { + /* Do not override the explicitly-specified -dumpbase-ext with + the specs-provided overrider. */ + if (!ext) + ext = argv[0]; + } + else if (argc != 0) + fatal_error (input_location, "too many arguments for %%:dumps"); + + if (dumpdir) + { + p = quote_spec_arg (xstrdup (dumpdir)); + args[nargs++] = concat (" -dumpdir ", p, NULL); + free (p); + } + + if (!ext) + ext = input_basename + basename_length; + + /* Use the precomputed outbase, or compute dumpbase from + input_basename, just like %b would. */ + char *base; + + if (dumpbase && *dumpbase) + { + base = xstrdup (dumpbase); + p = base + outbase_length; + gcc_checking_assert (strncmp (base, outbase, outbase_length) == 0); + gcc_checking_assert (strcmp (p, ext) == 0); + } + else if (outbase_length) + { + base = xstrndup (outbase, outbase_length); + p = NULL; + } + else + { + base = xstrndup (input_basename, suffixed_basename_length); + p = base + basename_length; + } + + if (compare_debug < 0 || !p || strcmp (p, ext) != 0) + { + if (p) + *p = '\0'; + + const char *gk; + if (compare_debug < 0) + gk = ".gk"; + else + gk = ""; + + p = concat (base, gk, ext, NULL); + + free (base); + base = p; + } + + base = quote_spec_arg (base); + args[nargs++] = concat (" -dumpbase ", base, NULL); + free (base); + + if (*ext) + { + p = quote_spec_arg (xstrdup (ext)); + args[nargs++] = concat (" -dumpbase-ext ", p, NULL); + free (p); + } + + const char *ret = concat (args[0], args[1], args[2], NULL); + while (nargs > 0) + free (args[--nargs]); + + return ret; +} + +/* Returns "" if ARGV[ARGC - 2] is greater than ARGV[ARGC-1]. + Otherwise, return NULL. */ + +static const char * +greater_than_spec_func (int argc, const char **argv) +{ + char *converted; + + if (argc == 1) + return NULL; + + gcc_assert (argc >= 2); + + long arg = strtol (argv[argc - 2], &converted, 10); + gcc_assert (converted != argv[argc - 2]); + + long lim = strtol (argv[argc - 1], &converted, 10); + gcc_assert (converted != argv[argc - 1]); + + if (arg > lim) + return ""; + + return NULL; +} + +/* Returns "" if debug_info_level is greater than ARGV[ARGC-1]. + Otherwise, return NULL. */ + +static const char * +debug_level_greater_than_spec_func (int argc, const char **argv) +{ + char *converted; + + if (argc != 1) + fatal_error (input_location, + "wrong number of arguments to %%:debug-level-gt"); + + long arg = strtol (argv[0], &converted, 10); + gcc_assert (converted != argv[0]); + + if (debug_info_level > arg) + return ""; + + return NULL; +} + +/* Returns "" if dwarf_version is greater than ARGV[ARGC-1]. + Otherwise, return NULL. */ + +static const char * +dwarf_version_greater_than_spec_func (int argc, const char **argv) +{ + char *converted; + + if (argc != 1) + fatal_error (input_location, + "wrong number of arguments to %%:dwarf-version-gt"); + + long arg = strtol (argv[0], &converted, 10); + gcc_assert (converted != argv[0]); + + if (dwarf_version > arg) + return ""; + + return NULL; +} + +static void +path_prefix_reset (path_prefix *prefix) +{ + struct prefix_list *iter, *next; + iter = prefix->plist; + while (iter) + { + next = iter->next; + free (const_cast (iter->prefix)); + XDELETE (iter); + iter = next; + } + prefix->plist = 0; + prefix->max_len = 0; +} + +/* The function takes 3 arguments: OPTION name, file name and location + where we search for Fortran modules. + When the FILE is found by find_file, return OPTION=path_to_file. */ + +static const char * +find_fortran_preinclude_file (int argc, const char **argv) +{ + char *result = NULL; + if (argc != 3) + return NULL; + + struct path_prefix prefixes = { 0, 0, "preinclude" }; + + /* Search first for 'finclude' folder location for a header file + installed by the compiler (similar to omp_lib.h). */ + add_prefix (&prefixes, argv[2], NULL, 0, 0, 0); +#ifdef TOOL_INCLUDE_DIR + /* Then search: ///finclude */ + add_prefix (&prefixes, TOOL_INCLUDE_DIR "/finclude/", + NULL, 0, 0, 0); +#endif +#ifdef NATIVE_SYSTEM_HEADER_DIR + /* Then search: /usr/include/finclude/ */ + add_sysrooted_hdrs_prefix (&prefixes, NATIVE_SYSTEM_HEADER_DIR "/finclude/", + NULL, 0, 0, 0); +#endif + + const char *path = find_a_file (&include_prefixes, argv[1], R_OK, false); + if (path != NULL) + result = concat (argv[0], path, NULL); + else + { + path = find_a_file (&prefixes, argv[1], R_OK, false); + if (path != NULL) + result = concat (argv[0], path, NULL); + } + + path_prefix_reset (&prefixes); + return result; +} + +/* If any character in ORIG fits QUOTE_P (_, P), reallocate the string + so as to precede every one of them with a backslash. Return the + original string or the reallocated one. */ + +static inline char * +quote_string (char *orig, bool (*quote_p)(char, void *), void *p) +{ + int len, number_of_space = 0; + + for (len = 0; orig[len]; len++) + if (quote_p (orig[len], p)) + number_of_space++; + + if (number_of_space) + { + char *new_spec = (char *) xmalloc (len + number_of_space + 1); + int j, k; + for (j = 0, k = 0; j <= len; j++, k++) + { + if (quote_p (orig[j], p)) + new_spec[k++] = '\\'; + new_spec[k] = orig[j]; + } + free (orig); + return new_spec; + } + else + return orig; +} + +/* Return true iff C is any of the characters convert_white_space + should quote. */ + +static inline bool +whitespace_to_convert_p (char c, void *) +{ + return (c == ' ' || c == '\t'); +} + +/* Insert backslash before spaces in ORIG (usually a file path), to + avoid being broken by spec parser. + + This function is needed as do_spec_1 treats white space (' ' and '\t') + as the end of an argument. But in case of -plugin /usr/gcc install/xxx.so, + the file name should be treated as a single argument rather than being + broken into multiple. Solution is to insert '\\' before the space in a + file name. + + This function converts and only converts all occurrence of ' ' + to '\\' + ' ' and '\t' to '\\' + '\t'. For example: + "a b" -> "a\\ b" + "a b" -> "a\\ \\ b" + "a\tb" -> "a\\\tb" + "a\\ b" -> "a\\\\ b" + + orig: input null-terminating string that was allocated by xalloc. The + memory it points to might be freed in this function. Behavior undefined + if ORIG wasn't xalloced or was freed already at entry. + + Return: ORIG if no conversion needed. Otherwise a newly allocated string + that was converted from ORIG. */ + +static char * +convert_white_space (char *orig) +{ + return quote_string (orig, whitespace_to_convert_p, NULL); +} + +/* Return true iff C matches any of the spec active characters. */ +static inline bool +quote_spec_char_p (char c, void *) +{ + switch (c) + { + case ' ': + case '\t': + case '\n': + case '|': + case '%': + case '\\': + return true; + + default: + return false; + } +} + +/* Like convert_white_space, but deactivate all active spec chars by + quoting them. */ + +static inline char * +quote_spec (char *orig) +{ + return quote_string (orig, quote_spec_char_p, NULL); +} + +/* Like quote_spec, but also turn an empty string into the spec for an + empty argument. */ + +static inline char * +quote_spec_arg (char *orig) +{ + if (!*orig) + { + free (orig); + return xstrdup ("%\""); + } + + return quote_spec (orig); +} + +/* Restore all state within gcc.cc to the initial state, so that the driver + code can be safely re-run in-process. + + Many const char * variables are referenced by static specs (see + INIT_STATIC_SPEC above). These variables are restored to their default + values by a simple loop over the static specs. + + For other variables, we directly restore them all to their initial + values (often implicitly 0). + + Free the various obstacks in this file, along with "opts_obstack" + from opts.cc. + + This function also restores any environment variables that were changed. */ + +void +driver::finalize () +{ + env.restore (); + diagnostic_finish (global_dc); + + is_cpp_driver = 0; + at_file_supplied = 0; + print_help_list = 0; + print_version = 0; + verbose_only_flag = 0; + print_subprocess_help = 0; + use_ld = NULL; + report_times_to_file = NULL; + target_system_root = DEFAULT_TARGET_SYSTEM_ROOT; + target_system_root_changed = 0; + target_sysroot_suffix = 0; + target_sysroot_hdrs_suffix = 0; + save_temps_flag = SAVE_TEMPS_NONE; + save_temps_overrides_dumpdir = false; + dumpdir_trailing_dash_added = false; + free (dumpdir); + free (dumpbase); + free (dumpbase_ext); + free (outbase); + dumpdir = dumpbase = dumpbase_ext = outbase = NULL; + dumpdir_length = outbase_length = 0; + spec_machine = DEFAULT_TARGET_MACHINE; + greatest_status = 1; + + obstack_free (&obstack, NULL); + obstack_free (&opts_obstack, NULL); /* in opts.cc */ + obstack_free (&collect_obstack, NULL); + + link_command_spec = LINK_COMMAND_SPEC; + + obstack_free (&multilib_obstack, NULL); + + user_specs_head = NULL; + user_specs_tail = NULL; + + /* Within the "compilers" vec, the fields "suffix" and "spec" were + statically allocated for the default compilers, but dynamically + allocated for additional compilers. Delete them for the latter. */ + for (int i = n_default_compilers; i < n_compilers; i++) + { + free (const_cast (compilers[i].suffix)); + free (const_cast (compilers[i].spec)); + } + XDELETEVEC (compilers); + compilers = NULL; + n_compilers = 0; + + linker_options.truncate (0); + assembler_options.truncate (0); + preprocessor_options.truncate (0); + + path_prefix_reset (&exec_prefixes); + path_prefix_reset (&startfile_prefixes); + path_prefix_reset (&include_prefixes); + + machine_suffix = 0; + just_machine_suffix = 0; + gcc_exec_prefix = 0; + gcc_libexec_prefix = 0; + set_static_spec_shared (&md_exec_prefix, MD_EXEC_PREFIX); + set_static_spec_shared (&md_startfile_prefix, MD_STARTFILE_PREFIX); + set_static_spec_shared (&md_startfile_prefix_1, MD_STARTFILE_PREFIX_1); + multilib_dir = 0; + multilib_os_dir = 0; + multiarch_dir = 0; + + /* Free any specs dynamically-allocated by set_spec. + These will be at the head of the list, before the + statically-allocated ones. */ + if (specs) + { + while (specs != static_specs) + { + spec_list *next = specs->next; + free (const_cast (specs->name)); + XDELETE (specs); + specs = next; + } + specs = 0; + } + for (unsigned i = 0; i < ARRAY_SIZE (static_specs); i++) + { + spec_list *sl = &static_specs[i]; + if (sl->alloc_p) + { + free (const_cast (*(sl->ptr_spec))); + sl->alloc_p = false; + } + *(sl->ptr_spec) = sl->default_ptr; + } +#ifdef EXTRA_SPECS + extra_specs = NULL; +#endif + + processing_spec_function = 0; + + clear_args (); + + have_c = 0; + have_o = 0; + + temp_names = NULL; + execution_count = 0; + signal_count = 0; + + temp_filename = NULL; + temp_filename_length = 0; + always_delete_queue = NULL; + failure_delete_queue = NULL; + + XDELETEVEC (switches); + switches = NULL; + n_switches = 0; + n_switches_alloc = 0; + + compare_debug = 0; + compare_debug_second = 0; + compare_debug_opt = NULL; + for (int i = 0; i < 2; i++) + { + switches_debug_check[i] = NULL; + n_switches_debug_check[i] = 0; + n_switches_alloc_debug_check[i] = 0; + debug_check_temp_file[i] = NULL; + } + + XDELETEVEC (infiles); + infiles = NULL; + n_infiles = 0; + n_infiles_alloc = 0; + + combine_inputs = false; + added_libraries = 0; + XDELETEVEC (outfiles); + outfiles = NULL; + spec_lang = 0; + last_language_n_infiles = 0; + gcc_input_filename = NULL; + input_file_number = 0; + input_filename_length = 0; + basename_length = 0; + suffixed_basename_length = 0; + input_basename = NULL; + input_suffix = NULL; + /* We don't need to purge "input_stat", just to unset "input_stat_set". */ + input_stat_set = 0; + input_file_compiler = NULL; + arg_going = 0; + delete_this_arg = 0; + this_is_output_file = 0; + this_is_library_file = 0; + this_is_linker_script = 0; + input_from_pipe = 0; + suffix_subst = NULL; + + mdswitches = NULL; + n_mdswitches = 0; + + used_arg.finalize (); +} + +/* PR jit/64810. + Targets can provide configure-time default options in + OPTION_DEFAULT_SPECS. The jit needs to access these, but + they are expressed in the spec language. + + Run just enough of the driver to be able to expand these + specs, and then call the callback CB on each + such option. The options strings are *without* a leading + '-' character e.g. ("march=x86-64"). Finally, clean up. */ + +void +driver_get_configure_time_options (void (*cb) (const char *option, + void *user_data), + void *user_data) +{ + size_t i; + + obstack_init (&obstack); + init_opts_obstack (); + n_switches = 0; + + for (i = 0; i < ARRAY_SIZE (option_default_specs); i++) + do_option_spec (option_default_specs[i].name, + option_default_specs[i].spec); + + for (i = 0; (int) i < n_switches; i++) + { + gcc_assert (switches[i].part1); + (*cb) (switches[i].part1, user_data); + } + + obstack_free (&opts_obstack, NULL); + obstack_free (&obstack, NULL); + n_switches = 0; +} diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-base-selected/gcc/incpath.cc b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-base-selected/gcc/incpath.cc new file mode 100644 index 0000000000..4d44321183 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-base-selected/gcc/incpath.cc @@ -0,0 +1,536 @@ +/* Set up combined include path chain for the preprocessor. + Copyright (C) 1986-2023 Free Software Foundation, Inc. + + Broken out of cppinit.c and cppfiles.c and rewritten Mar 2003. + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation; either version 3, or (at your option) any + later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING3. If not see + . */ + +#include "config.h" +#include "system.h" +#include "coretypes.h" +#include "target.h" +#include "cpplib.h" +#include "prefix.h" +#include "intl.h" +#include "incpath.h" +#include "cppdefault.h" + +/* Microsoft Windows does not natively support inodes. + VMS has non-numeric inodes. */ +#ifdef VMS +# define INO_T_EQ(A, B) (!memcmp (&(A), &(B), sizeof (A))) +# define INO_T_COPY(DEST, SRC) memcpy (&(DEST), &(SRC), sizeof (SRC)) +#elif !defined (HOST_LACKS_INODE_NUMBERS) +# define INO_T_EQ(A, B) ((A) == (B)) +# define INO_T_COPY(DEST, SRC) (DEST) = (SRC) +#endif + +#if defined INO_T_EQ +#define DIRS_EQ(A, B) ((A)->dev == (B)->dev \ + && INO_T_EQ ((A)->ino, (B)->ino)) +#else +#define DIRS_EQ(A, B) (!filename_cmp ((A)->canonical_name, (B)->canonical_name)) +#endif + +#ifndef HOST_STAT_FOR_64BIT_INODES +#define HOST_STAT_FOR_64BIT_INODES stat +#endif + +static const char dir_separator_str[] = { DIR_SEPARATOR, 0 }; + +static void add_env_var_paths (const char *, incpath_kind); +static void add_standard_paths (const char *, const char *, const char *, int); +static void free_path (struct cpp_dir *, int); +static void merge_include_chains (const char *, cpp_reader *, int); +static void add_sysroot_to_chain (const char *, int); +static struct cpp_dir *remove_duplicates (cpp_reader *, struct cpp_dir *, + struct cpp_dir *, struct cpp_dir *, + int); + +/* Include chains heads and tails. */ +static struct cpp_dir *heads[INC_MAX]; +static struct cpp_dir *tails[INC_MAX]; + +static bool quote_ignores_source_dir; +enum { REASON_QUIET = 0, REASON_NOENT, REASON_DUP, REASON_DUP_SYS }; + +/* Free an element of the include chain, possibly giving a reason. */ +static void +free_path (struct cpp_dir *path, int reason) +{ + switch (reason) + { + case REASON_DUP: + case REASON_DUP_SYS: + fprintf (stderr, _("ignoring duplicate directory \"%s\"\n"), path->name); + if (reason == REASON_DUP_SYS) + fprintf (stderr, + _(" as it is a non-system directory that duplicates a system directory\n")); + break; + + case REASON_NOENT: + fprintf (stderr, _("ignoring nonexistent directory \"%s\"\n"), + path->name); + break; + + case REASON_QUIET: + default: + break; + } + + free (path->name); + free (path); +} + +/* Read ENV_VAR for a PATH_SEPARATOR-separated list of file names; and + append all the names to the search path CHAIN. */ +static void +add_env_var_paths (const char *env_var, incpath_kind chain) +{ + char *p, *q, *path; + + q = getenv (env_var); + + if (!q) + return; + + for (p = q; *q; p = q + 1) + { + q = p; + while (*q != 0 && *q != PATH_SEPARATOR) + q++; + + if (p == q) + path = xstrdup ("."); + else + { + path = XNEWVEC (char, q - p + 1); + memcpy (path, p, q - p); + path[q - p] = '\0'; + } + + add_path (path, chain, chain == INC_SYSTEM, false); + } +} + +/* Append the standard include chain defined in cppdefault.cc. */ +static void +add_standard_paths (const char *sysroot, const char *iprefix, + const char *imultilib, int cxx_stdinc) +{ + const struct default_include *p; + int relocated = cpp_relocated (); + size_t len; + + if (iprefix && (len = cpp_GCC_INCLUDE_DIR_len) != 0) + { + /* Look for directories that start with the standard prefix. + "Translate" them, i.e. replace /usr/local/lib/gcc... with + IPREFIX and search them first. */ + for (p = cpp_include_defaults; p->fname; p++) + { + if (p->cplusplus == 0 + || (cxx_stdinc && (p->cplusplus == flag_stdlib_kind))) + { + /* Should we be translating sysrooted dirs too? Assume + that iprefix and sysroot are mutually exclusive, for + now. */ + if (sysroot && p->add_sysroot) + continue; + if (!filename_ncmp (p->fname, cpp_GCC_INCLUDE_DIR, len)) + { + char *str = concat (iprefix, p->fname + len, NULL); + if (p->multilib == 1 && imultilib) + str = reconcat (str, str, dir_separator_str, + imultilib, NULL); + else if (p->multilib == 2) + { + if (!imultiarch) + { + free (str); + continue; + } + str = reconcat (str, str, dir_separator_str, + imultiarch, NULL); + } + add_path (str, INC_SYSTEM, p->cxx_aware, false); + } + } + } + } + + for (p = cpp_include_defaults; p->fname; p++) + { + if (p->cplusplus == 0 + || (cxx_stdinc && (p->cplusplus == flag_stdlib_kind))) + { + char *str; + + /* Should this directory start with the sysroot? */ + if (sysroot && p->add_sysroot) + { + char *sysroot_no_trailing_dir_separator = xstrdup (sysroot); + size_t sysroot_len = strlen (sysroot); + + if (sysroot_len > 0 && sysroot[sysroot_len - 1] == DIR_SEPARATOR) + sysroot_no_trailing_dir_separator[sysroot_len - 1] = '\0'; + str = concat (sysroot_no_trailing_dir_separator, p->fname, NULL); + free (sysroot_no_trailing_dir_separator); + } + else if (!p->add_sysroot && relocated + && !filename_ncmp (p->fname, cpp_PREFIX, cpp_PREFIX_len)) + { + static const char *relocated_prefix; + char *ostr; + /* If this path starts with the configure-time prefix, + but the compiler has been relocated, replace it + with the run-time prefix. The run-time exec prefix + is GCC_EXEC_PREFIX. Compute the path from there back + to the toplevel prefix. */ + if (!relocated_prefix) + { + char *dummy; + /* Make relative prefix expects the first argument + to be a program, not a directory. */ + dummy = concat (gcc_exec_prefix, "dummy", NULL); + relocated_prefix + = make_relative_prefix (dummy, + cpp_EXEC_PREFIX, + cpp_PREFIX); + free (dummy); + } + ostr = concat (relocated_prefix, + p->fname + cpp_PREFIX_len, + NULL); + str = update_path (ostr, p->component); + free (ostr); + } + else + str = update_path (p->fname, p->component); + + if (p->multilib == 1 && imultilib) + str = reconcat (str, str, dir_separator_str, imultilib, NULL); + else if (p->multilib == 2) + { + if (!imultiarch) + { + free (str); + continue; + } + str = reconcat (str, str, dir_separator_str, imultiarch, NULL); + } + + add_path (str, INC_SYSTEM, p->cxx_aware, false); + } + } +} + +/* For each duplicate path in chain HEAD, keep just the first one. + Remove each path in chain HEAD that also exists in chain SYSTEM. + Set the NEXT pointer of the last path in the resulting chain to + JOIN, unless it duplicates JOIN in which case the last path is + removed. Return the head of the resulting chain. Any of HEAD, + JOIN and SYSTEM can be NULL. */ + +static struct cpp_dir * +remove_duplicates (cpp_reader *pfile, struct cpp_dir *head, + struct cpp_dir *system, struct cpp_dir *join, + int verbose) +{ + struct cpp_dir **pcur, *tmp, *cur; + struct HOST_STAT_FOR_64BIT_INODES st; + + for (pcur = &head; *pcur; ) + { + int reason = REASON_QUIET; + + cur = *pcur; + + if (HOST_STAT_FOR_64BIT_INODES (cur->name, &st)) + { + /* Dirs that don't exist or have denied permissions are + silently ignored, unless verbose. */ + if ((errno != ENOENT) && (errno != EPERM)) + cpp_errno (pfile, CPP_DL_ERROR, cur->name); + else + { + /* If -Wmissing-include-dirs is given, warn. */ + cpp_options *opts = cpp_get_options (pfile); + if (opts->warn_missing_include_dirs && cur->user_supplied_p) + cpp_warning (pfile, CPP_W_MISSING_INCLUDE_DIRS, "%s: %s", + cur->name, xstrerror (errno)); + reason = REASON_NOENT; + } + } + else if (!S_ISDIR (st.st_mode)) + cpp_error_with_line (pfile, CPP_DL_WARNING, 0, 0, + "%s: not a directory", cur->name); + else + { +#if defined (INO_T_COPY) + INO_T_COPY (cur->ino, st.st_ino); + cur->dev = st.st_dev; +#endif + + /* Remove this one if it is in the system chain. */ + reason = REASON_DUP_SYS; + for (tmp = system; tmp; tmp = tmp->next) + if (DIRS_EQ (tmp, cur) && cur->construct == tmp->construct) + break; + + if (!tmp) + { + /* Duplicate of something earlier in the same chain? */ + reason = REASON_DUP; + for (tmp = head; tmp != cur; tmp = tmp->next) + if (DIRS_EQ (cur, tmp) && cur->construct == tmp->construct) + break; + + if (tmp == cur + /* Last in the chain and duplicate of JOIN? */ + && !(cur->next == NULL && join + && DIRS_EQ (cur, join) + && cur->construct == join->construct)) + { + /* Unique, so keep this directory. */ + pcur = &cur->next; + continue; + } + } + } + + /* Remove this entry from the chain. */ + *pcur = cur->next; + free_path (cur, verbose ? reason: REASON_QUIET); + } + + *pcur = join; + return head; +} + +/* Add SYSROOT to any user-supplied paths in CHAIN starting with + "=" or "$SYSROOT". */ + +static void +add_sysroot_to_chain (const char *sysroot, int chain) +{ + struct cpp_dir *p; + + for (p = heads[chain]; p != NULL; p = p->next) + { + if (p->user_supplied_p) + { + if (p->name[0] == '=') + p->name = concat (sysroot, p->name + 1, NULL); + if (startswith (p->name, "$SYSROOT")) + p->name = concat (sysroot, p->name + strlen ("$SYSROOT"), NULL); + } + } +} + +/* Merge the four include chains together in the order quote, bracket, + system, after. Remove duplicate dirs (determined in + system-specific manner). + + We can't just merge the lists and then uniquify them because then + we may lose directories from the <> search path that should be + there; consider -iquote foo -iquote bar -Ifoo -Iquux. It is + however safe to treat -iquote bar -iquote foo -Ifoo -Iquux as if + written -iquote bar -Ifoo -Iquux. */ + +static void +merge_include_chains (const char *sysroot, cpp_reader *pfile, int verbose) +{ + /* Add the sysroot to user-supplied paths starting with "=". */ + if (sysroot) + { + add_sysroot_to_chain (sysroot, INC_QUOTE); + add_sysroot_to_chain (sysroot, INC_BRACKET); + add_sysroot_to_chain (sysroot, INC_SYSTEM); + add_sysroot_to_chain (sysroot, INC_AFTER); + } + + /* Join the SYSTEM and AFTER chains. Remove duplicates in the + resulting SYSTEM chain. */ + if (heads[INC_SYSTEM]) + tails[INC_SYSTEM]->next = heads[INC_AFTER]; + else + heads[INC_SYSTEM] = heads[INC_AFTER]; + heads[INC_SYSTEM] + = remove_duplicates (pfile, heads[INC_SYSTEM], 0, 0, verbose); + + /* Remove duplicates from BRACKET that are in itself or SYSTEM, and + join it to SYSTEM. */ + heads[INC_BRACKET] + = remove_duplicates (pfile, heads[INC_BRACKET], heads[INC_SYSTEM], + heads[INC_SYSTEM], verbose); + + /* Remove duplicates from QUOTE that are in itself or SYSTEM, and + join it to BRACKET. */ + heads[INC_QUOTE] + = remove_duplicates (pfile, heads[INC_QUOTE], heads[INC_SYSTEM], + heads[INC_BRACKET], verbose); + + /* If verbose, print the list of dirs to search. */ + if (verbose) + { + struct cpp_dir *p; + + fprintf (stderr, _("#include \"...\" search starts here:\n")); + for (p = heads[INC_QUOTE];; p = p->next) + { + if (p == heads[INC_BRACKET]) + fprintf (stderr, _("#include <...> search starts here:\n")); + if (!p) + break; + fprintf (stderr, " %s\n", p->name); + } + fprintf (stderr, _("End of search list.\n")); + } +} + +/* Use given -I paths for #include "..." but not #include <...>, and + don't search the directory of the present file for #include "...". + (Note that -I. -I- is not the same as the default setup; -I. uses + the compiler's working dir.) */ +void +split_quote_chain (void) +{ + if (heads[INC_QUOTE]) + free_path (heads[INC_QUOTE], REASON_QUIET); + if (tails[INC_QUOTE]) + free_path (tails[INC_QUOTE], REASON_QUIET); + heads[INC_QUOTE] = heads[INC_BRACKET]; + tails[INC_QUOTE] = tails[INC_BRACKET]; + heads[INC_BRACKET] = NULL; + tails[INC_BRACKET] = NULL; + /* This is NOT redundant. */ + quote_ignores_source_dir = true; +} + +/* Add P to the chain specified by CHAIN. */ + +void +add_cpp_dir_path (cpp_dir *p, incpath_kind chain) +{ + if (tails[chain]) + tails[chain]->next = p; + else + heads[chain] = p; + tails[chain] = p; +} + +/* Add PATH to the include chain CHAIN. PATH must be malloc-ed and + NUL-terminated. */ +void +add_path (char *path, incpath_kind chain, int cxx_aware, bool user_supplied_p) +{ + cpp_dir *p; + size_t pathlen = strlen (path); + +#if defined (HAVE_DOS_BASED_FILE_SYSTEM) + /* Remove unnecessary trailing slashes. On some versions of MS + Windows, trailing _forward_ slashes cause no problems for stat(). + On newer versions, stat() does not recognize a directory that ends + in a '\\' or '/', unless it is a drive root dir, such as "c:/", + where it is obligatory. */ + char* end = path + pathlen - 1; + /* Preserve the lead '/' or lead "c:/". */ + char* start = path + (pathlen > 2 && path[1] == ':' ? 3 : 1); + + for (; end > start && IS_DIR_SEPARATOR (*end); end--) + *end = 0; + pathlen = end - path; +#endif + + p = XNEW (cpp_dir); + p->next = NULL; + p->name = path; + p->len = pathlen; +#ifndef INO_T_EQ + p->canonical_name = lrealpath (path); +#endif + if (chain == INC_SYSTEM || chain == INC_AFTER) + p->sysp = 1 + !cxx_aware; + else + p->sysp = 0; + p->construct = 0; + p->user_supplied_p = user_supplied_p; + + add_cpp_dir_path (p, chain); +} + +/* Exported function to handle include chain merging, duplicate + removal, and registration with cpplib. */ +void +register_include_chains (cpp_reader *pfile, const char *sysroot, + const char *iprefix, const char *imultilib, + int stdinc, int cxx_stdinc, int verbose) +{ + static const char *const lang_env_vars[] = + { "C_INCLUDE_PATH", "CPLUS_INCLUDE_PATH", + "OBJC_INCLUDE_PATH", "OBJCPLUS_INCLUDE_PATH" }; + cpp_options *cpp_opts = cpp_get_options (pfile); + size_t idx = (cpp_opts->objc ? 2: 0); + + if (cpp_opts->cplusplus) + idx++; + else + cxx_stdinc = false; + + /* CPATH and language-dependent environment variables may add to the + include chain. */ + add_env_var_paths ("CPATH", INC_BRACKET); + add_env_var_paths (lang_env_vars[idx], INC_SYSTEM); + + target_c_incpath.extra_pre_includes (sysroot, iprefix, stdinc); + + /* Finally chain on the standard directories. */ + if (stdinc) + add_standard_paths (sysroot, iprefix, imultilib, cxx_stdinc); + + target_c_incpath.extra_includes (sysroot, iprefix, stdinc); + + merge_include_chains (sysroot, pfile, verbose); + + cpp_set_include_chains (pfile, heads[INC_QUOTE], heads[INC_BRACKET], + quote_ignores_source_dir); +} + +/* Return the current chain of cpp dirs. */ + +struct cpp_dir * +get_added_cpp_dirs (incpath_kind chain) +{ + return heads[chain]; +} + +#if !(defined TARGET_EXTRA_INCLUDES) || !(defined TARGET_EXTRA_PRE_INCLUDES) +static void hook_void_charptr_charptr_int (const char *sysroot ATTRIBUTE_UNUSED, + const char *iprefix ATTRIBUTE_UNUSED, + int stdinc ATTRIBUTE_UNUSED) +{ +} +#endif + +#ifndef TARGET_EXTRA_INCLUDES +#define TARGET_EXTRA_INCLUDES hook_void_charptr_charptr_int +#endif +#ifndef TARGET_EXTRA_PRE_INCLUDES +#define TARGET_EXTRA_PRE_INCLUDES hook_void_charptr_charptr_int +#endif + +struct target_c_incpath_s target_c_incpath = { TARGET_EXTRA_PRE_INCLUDES, TARGET_EXTRA_INCLUDES }; + diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-base-selected/libcpp/charset.cc b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-base-selected/libcpp/charset.cc new file mode 100644 index 0000000000..d7f323b2cd --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-base-selected/libcpp/charset.cc @@ -0,0 +1,3189 @@ +/* CPP Library - charsets + Copyright (C) 1998-2023 Free Software Foundation, Inc. + + Broken out of c-lex.cc Apr 2003, adding valid C99 UCN ranges. + +This program is free software; you can redistribute it and/or modify it +under the terms of the GNU General Public License as published by the +Free Software Foundation; either version 3, or (at your option) any +later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; see the file COPYING3. If not see +. */ + +#include "config.h" +#include "system.h" +#include "cpplib.h" +#include "internal.h" + +/* Character set handling for C-family languages. + + Terminological note: In what follows, "charset" or "character set" + will be taken to mean both an abstract set of characters and an + encoding for that set. + + The C99 standard discusses two character sets: source and execution. + The source character set is used for internal processing in translation + phases 1 through 4; the execution character set is used thereafter. + Both are required by 5.2.1.2p1 to be multibyte encodings, not wide + character encodings (see 3.7.2, 3.7.3 for the standardese meanings + of these terms). Furthermore, the "basic character set" (listed in + 5.2.1p3) is to be encoded in each with values one byte wide, and is + to appear in the initial shift state. + + It is not explicitly mentioned, but there is also a "wide execution + character set" used to encode wide character constants and wide + string literals; this is supposed to be the result of applying the + standard library function mbstowcs() to an equivalent narrow string + (6.4.5p5). However, the behavior of hexadecimal and octal + \-escapes is at odds with this; they are supposed to be translated + directly to wchar_t values (6.4.4.4p5,6). + + The source character set is not necessarily the character set used + to encode physical source files on disk; translation phase 1 converts + from whatever that encoding is to the source character set. + + The presence of universal character names in C99 (6.4.3 et seq.) + forces the source character set to be isomorphic to ISO 10646, + that is, Unicode. There is no such constraint on the execution + character set; note also that the conversion from source to + execution character set does not occur for identifiers (5.1.1.2p1#5). + + For convenience of implementation, the source character set's + encoding of the basic character set should be identical to the + execution character set OF THE HOST SYSTEM's encoding of the basic + character set, and it should not be a state-dependent encoding. + + cpplib uses UTF-8 or UTF-EBCDIC for the source character set, + depending on whether the host is based on ASCII or EBCDIC (see + respectively Unicode section 2.3/ISO10646 Amendment 2, and Unicode + Technical Report #16). With limited exceptions, it relies on the + system library's iconv() primitive to do charset conversion + (specified in SUSv2). */ + +#if !HAVE_ICONV +/* Make certain that the uses of iconv(), iconv_open(), iconv_close() + below, which are guarded only by if statements with compile-time + constant conditions, do not cause link errors. */ +#define iconv_open(x, y) (errno = EINVAL, (iconv_t)-1) +#define iconv(a,b,c,d,e) (errno = EINVAL, (size_t)-1) +#define iconv_close(x) (void)0 +#define ICONV_CONST +#endif + +#if HOST_CHARSET == HOST_CHARSET_ASCII +#define SOURCE_CHARSET "UTF-8" +#define LAST_POSSIBLY_BASIC_SOURCE_CHAR 0x7e +#elif HOST_CHARSET == HOST_CHARSET_EBCDIC +#define SOURCE_CHARSET "UTF-EBCDIC" +#define LAST_POSSIBLY_BASIC_SOURCE_CHAR 0xFF +#else +#error "Unrecognized basic host character set" +#endif + +#ifndef EILSEQ +#define EILSEQ EINVAL +#endif + +/* This structure is used for a resizable string buffer throughout. */ +/* Don't call it strbuf, as that conflicts with unistd.h on systems + such as DYNIX/ptx where unistd.h includes stropts.h. */ +struct _cpp_strbuf +{ + uchar *text; + size_t asize; + size_t len; +}; + +/* This is enough to hold any string that fits on a single 80-column + line, even if iconv quadruples its size (e.g. conversion from + ASCII to UTF-32) rounded up to a power of two. */ +#define OUTBUF_BLOCK_SIZE 256 + +/* Conversions between UTF-8 and UTF-16/32 are implemented by custom + logic. This is because a depressing number of systems lack iconv, + or have have iconv libraries that do not do these conversions, so + we need a fallback implementation for them. To ensure the fallback + doesn't break due to neglect, it is used on all systems. + + UTF-32 encoding is nice and simple: a four-byte binary number, + constrained to the range 00000000-7FFFFFFF to avoid questions of + signedness. We do have to cope with big- and little-endian + variants. + + UTF-16 encoding uses two-byte binary numbers, again in big- and + little-endian variants, for all values in the 00000000-0000FFFF + range. Values in the 00010000-0010FFFF range are encoded as pairs + of two-byte numbers, called "surrogate pairs": given a number S in + this range, it is mapped to a pair (H, L) as follows: + + H = (S - 0x10000) / 0x400 + 0xD800 + L = (S - 0x10000) % 0x400 + 0xDC00 + + Two-byte values in the D800...DFFF range are ill-formed except as a + component of a surrogate pair. Even if the encoding within a + two-byte value is little-endian, the H member of the surrogate pair + comes first. + + There is no way to encode values in the 00110000-7FFFFFFF range, + which is not currently a problem as there are no assigned code + points in that range; however, the author expects that it will + eventually become necessary to abandon UTF-16 due to this + limitation. Note also that, because of these pairs, UTF-16 does + not meet the requirements of the C standard for a wide character + encoding (see 3.7.3 and 6.4.4.4p11). + + UTF-8 encoding looks like this: + + value range encoded as + 00000000-0000007F 0xxxxxxx + 00000080-000007FF 110xxxxx 10xxxxxx + 00000800-0000FFFF 1110xxxx 10xxxxxx 10xxxxxx + 00010000-001FFFFF 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx + 00200000-03FFFFFF 111110xx 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx + 04000000-7FFFFFFF 1111110x 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx + + Values in the 0000D800 ... 0000DFFF range (surrogates) are invalid, + which means that three-byte sequences ED xx yy, with A0 <= xx <= BF, + never occur. Note also that any value that can be encoded by a + given row of the table can also be encoded by all successive rows, + but this is not done; only the shortest possible encoding for any + given value is valid. For instance, the character 07C0 could be + encoded as any of DF 80, E0 9F 80, F0 80 9F 80, F8 80 80 9F 80, or + FC 80 80 80 9F 80. Only the first is valid. + + An implementation note: the transformation from UTF-16 to UTF-8, or + vice versa, is easiest done by using UTF-32 as an intermediary. */ + +/* Internal primitives which go from an UTF-8 byte stream to native-endian + UTF-32 in a cppchar_t, or vice versa; this avoids an extra marshal/unmarshal + operation in several places below. */ +static inline int +one_utf8_to_cppchar (const uchar **inbufp, size_t *inbytesleftp, + cppchar_t *cp) +{ + static const uchar masks[6] = { 0x7F, 0x1F, 0x0F, 0x07, 0x03, 0x01 }; + static const uchar patns[6] = { 0x00, 0xC0, 0xE0, 0xF0, 0xF8, 0xFC }; + + cppchar_t c; + const uchar *inbuf = *inbufp; + size_t nbytes, i; + + if (*inbytesleftp < 1) + return EINVAL; + + c = *inbuf; + if (c < 0x80) + { + *cp = c; + *inbytesleftp -= 1; + *inbufp += 1; + return 0; + } + + /* The number of leading 1-bits in the first byte indicates how many + bytes follow. */ + for (nbytes = 2; nbytes < 7; nbytes++) + if ((c & ~masks[nbytes-1]) == patns[nbytes-1]) + goto found; + return EILSEQ; + found: + + if (*inbytesleftp < nbytes) + return EINVAL; + + c = (c & masks[nbytes-1]); + inbuf++; + for (i = 1; i < nbytes; i++) + { + cppchar_t n = *inbuf++; + if ((n & 0xC0) != 0x80) + return EILSEQ; + c = ((c << 6) + (n & 0x3F)); + } + + /* Make sure the shortest possible encoding was used. */ + if (c <= 0x7F && nbytes > 1) return EILSEQ; + if (c <= 0x7FF && nbytes > 2) return EILSEQ; + if (c <= 0xFFFF && nbytes > 3) return EILSEQ; + if (c <= 0x1FFFFF && nbytes > 4) return EILSEQ; + if (c <= 0x3FFFFFF && nbytes > 5) return EILSEQ; + + /* Make sure the character is valid. */ + if (c > 0x7FFFFFFF || (c >= 0xD800 && c <= 0xDFFF)) return EILSEQ; + + *cp = c; + *inbufp = inbuf; + *inbytesleftp -= nbytes; + return 0; +} + +static inline int +one_cppchar_to_utf8 (cppchar_t c, uchar **outbufp, size_t *outbytesleftp) +{ + static const uchar masks[6] = { 0x00, 0xC0, 0xE0, 0xF0, 0xF8, 0xFC }; + static const uchar limits[6] = { 0x80, 0xE0, 0xF0, 0xF8, 0xFC, 0xFE }; + size_t nbytes; + uchar buf[6], *p = &buf[6]; + uchar *outbuf = *outbufp; + + nbytes = 1; + if (c < 0x80) + *--p = c; + else + { + do + { + *--p = ((c & 0x3F) | 0x80); + c >>= 6; + nbytes++; + } + while (c >= 0x3F || (c & limits[nbytes-1])); + *--p = (c | masks[nbytes-1]); + } + + if (*outbytesleftp < nbytes) + return E2BIG; + + while (p < &buf[6]) + *outbuf++ = *p++; + *outbytesleftp -= nbytes; + *outbufp = outbuf; + return 0; +} + +/* The following four functions transform one character between the two + encodings named in the function name. All have the signature + int (*)(iconv_t bigend, const uchar **inbufp, size_t *inbytesleftp, + uchar **outbufp, size_t *outbytesleftp) + + BIGEND must have the value 0 or 1, coerced to (iconv_t); it is + interpreted as a boolean indicating whether big-endian or + little-endian encoding is to be used for the member of the pair + that is not UTF-8. + + INBUFP, INBYTESLEFTP, OUTBUFP, OUTBYTESLEFTP work exactly as they + do for iconv. + + The return value is either 0 for success, or an errno value for + failure, which may be E2BIG (need more space), EILSEQ (ill-formed + input sequence), ir EINVAL (incomplete input sequence). */ + +static inline int +one_utf8_to_utf32 (iconv_t bigend, const uchar **inbufp, size_t *inbytesleftp, + uchar **outbufp, size_t *outbytesleftp) +{ + uchar *outbuf; + cppchar_t s = 0; + int rval; + + /* Check for space first, since we know exactly how much we need. */ + if (*outbytesleftp < 4) + return E2BIG; + + rval = one_utf8_to_cppchar (inbufp, inbytesleftp, &s); + if (rval) + return rval; + + outbuf = *outbufp; + outbuf[bigend ? 3 : 0] = (s & 0x000000FF); + outbuf[bigend ? 2 : 1] = (s & 0x0000FF00) >> 8; + outbuf[bigend ? 1 : 2] = (s & 0x00FF0000) >> 16; + outbuf[bigend ? 0 : 3] = (s & 0xFF000000) >> 24; + + *outbufp += 4; + *outbytesleftp -= 4; + return 0; +} + +static inline int +one_utf32_to_utf8 (iconv_t bigend, const uchar **inbufp, size_t *inbytesleftp, + uchar **outbufp, size_t *outbytesleftp) +{ + cppchar_t s; + int rval; + const uchar *inbuf; + + if (*inbytesleftp < 4) + return EINVAL; + + inbuf = *inbufp; + + s = inbuf[bigend ? 0 : 3] << 24; + s += inbuf[bigend ? 1 : 2] << 16; + s += inbuf[bigend ? 2 : 1] << 8; + s += inbuf[bigend ? 3 : 0]; + + if (s >= 0x7FFFFFFF || (s >= 0xD800 && s <= 0xDFFF)) + return EILSEQ; + + rval = one_cppchar_to_utf8 (s, outbufp, outbytesleftp); + if (rval) + return rval; + + *inbufp += 4; + *inbytesleftp -= 4; + return 0; +} + +static inline int +one_utf8_to_utf16 (iconv_t bigend, const uchar **inbufp, size_t *inbytesleftp, + uchar **outbufp, size_t *outbytesleftp) +{ + int rval; + cppchar_t s = 0; + const uchar *save_inbuf = *inbufp; + size_t save_inbytesleft = *inbytesleftp; + uchar *outbuf = *outbufp; + + rval = one_utf8_to_cppchar (inbufp, inbytesleftp, &s); + if (rval) + return rval; + + if (s > 0x0010FFFF) + { + *inbufp = save_inbuf; + *inbytesleftp = save_inbytesleft; + return EILSEQ; + } + + if (s <= 0xFFFF) + { + if (*outbytesleftp < 2) + { + *inbufp = save_inbuf; + *inbytesleftp = save_inbytesleft; + return E2BIG; + } + outbuf[bigend ? 1 : 0] = (s & 0x00FF); + outbuf[bigend ? 0 : 1] = (s & 0xFF00) >> 8; + + *outbufp += 2; + *outbytesleftp -= 2; + return 0; + } + else + { + cppchar_t hi, lo; + + if (*outbytesleftp < 4) + { + *inbufp = save_inbuf; + *inbytesleftp = save_inbytesleft; + return E2BIG; + } + + hi = (s - 0x10000) / 0x400 + 0xD800; + lo = (s - 0x10000) % 0x400 + 0xDC00; + + /* Even if we are little-endian, put the high surrogate first. + ??? Matches practice? */ + outbuf[bigend ? 1 : 0] = (hi & 0x00FF); + outbuf[bigend ? 0 : 1] = (hi & 0xFF00) >> 8; + outbuf[bigend ? 3 : 2] = (lo & 0x00FF); + outbuf[bigend ? 2 : 3] = (lo & 0xFF00) >> 8; + + *outbufp += 4; + *outbytesleftp -= 4; + return 0; + } +} + +static inline int +one_utf16_to_utf8 (iconv_t bigend, const uchar **inbufp, size_t *inbytesleftp, + uchar **outbufp, size_t *outbytesleftp) +{ + cppchar_t s; + const uchar *inbuf = *inbufp; + int rval; + + if (*inbytesleftp < 2) + return EINVAL; + s = inbuf[bigend ? 0 : 1] << 8; + s += inbuf[bigend ? 1 : 0]; + + /* Low surrogate without immediately preceding high surrogate is invalid. */ + if (s >= 0xDC00 && s <= 0xDFFF) + return EILSEQ; + /* High surrogate must have a following low surrogate. */ + else if (s >= 0xD800 && s <= 0xDBFF) + { + cppchar_t hi = s, lo; + if (*inbytesleftp < 4) + return EINVAL; + + lo = inbuf[bigend ? 2 : 3] << 8; + lo += inbuf[bigend ? 3 : 2]; + + if (lo < 0xDC00 || lo > 0xDFFF) + return EILSEQ; + + s = (hi - 0xD800) * 0x400 + (lo - 0xDC00) + 0x10000; + } + + rval = one_cppchar_to_utf8 (s, outbufp, outbytesleftp); + if (rval) + return rval; + + /* Success - update the input pointers (one_cppchar_to_utf8 has done + the output pointers for us). */ + if (s <= 0xFFFF) + { + *inbufp += 2; + *inbytesleftp -= 2; + } + else + { + *inbufp += 4; + *inbytesleftp -= 4; + } + return 0; +} + +/* Helper routine for the next few functions. The 'const' on + one_conversion means that we promise not to modify what function is + pointed to, which lets the inliner see through it. */ + +static inline bool +conversion_loop (int (*const one_conversion)(iconv_t, const uchar **, size_t *, + uchar **, size_t *), + iconv_t cd, const uchar *from, size_t flen, struct _cpp_strbuf *to) +{ + const uchar *inbuf; + uchar *outbuf; + size_t inbytesleft, outbytesleft; + int rval; + + inbuf = from; + inbytesleft = flen; + outbuf = to->text + to->len; + outbytesleft = to->asize - to->len; + + for (;;) + { + do + rval = one_conversion (cd, &inbuf, &inbytesleft, + &outbuf, &outbytesleft); + while (inbytesleft && !rval); + + if (__builtin_expect (inbytesleft == 0, 1)) + { + to->len = to->asize - outbytesleft; + return true; + } + if (rval != E2BIG) + { + errno = rval; + return false; + } + + outbytesleft += OUTBUF_BLOCK_SIZE; + to->asize += OUTBUF_BLOCK_SIZE; + to->text = XRESIZEVEC (uchar, to->text, to->asize); + outbuf = to->text + to->asize - outbytesleft; + } +} + + +/* These functions convert entire strings between character sets. + They all have the signature + + bool (*)(iconv_t cd, const uchar *from, size_t flen, struct _cpp_strbuf *to); + + The input string FROM is converted as specified by the function + name plus the iconv descriptor CD (which may be fake), and the + result appended to TO. On any error, false is returned, otherwise true. */ + +/* These four use the custom conversion code above. */ +static bool +convert_utf8_utf16 (iconv_t cd, const uchar *from, size_t flen, + struct _cpp_strbuf *to) +{ + return conversion_loop (one_utf8_to_utf16, cd, from, flen, to); +} + +static bool +convert_utf8_utf32 (iconv_t cd, const uchar *from, size_t flen, + struct _cpp_strbuf *to) +{ + return conversion_loop (one_utf8_to_utf32, cd, from, flen, to); +} + +static bool +convert_utf16_utf8 (iconv_t cd, const uchar *from, size_t flen, + struct _cpp_strbuf *to) +{ + return conversion_loop (one_utf16_to_utf8, cd, from, flen, to); +} + +static bool +convert_utf32_utf8 (iconv_t cd, const uchar *from, size_t flen, + struct _cpp_strbuf *to) +{ + return conversion_loop (one_utf32_to_utf8, cd, from, flen, to); +} + +/* Identity conversion, used when we have no alternative. */ +static bool +convert_no_conversion (iconv_t cd ATTRIBUTE_UNUSED, + const uchar *from, size_t flen, struct _cpp_strbuf *to) +{ + if (to->len + flen > to->asize) + { + to->asize = to->len + flen; + to->asize += to->asize / 4; + to->text = XRESIZEVEC (uchar, to->text, to->asize); + } + memcpy (to->text + to->len, from, flen); + to->len += flen; + return true; +} + +/* And this one uses the system iconv primitive. It's a little + different, since iconv's interface is a little different. */ +#if HAVE_ICONV + +#define CONVERT_ICONV_GROW_BUFFER \ + do { \ + outbytesleft += OUTBUF_BLOCK_SIZE; \ + to->asize += OUTBUF_BLOCK_SIZE; \ + to->text = XRESIZEVEC (uchar, to->text, to->asize); \ + outbuf = (char *)to->text + to->asize - outbytesleft; \ + } while (0) + +static bool +convert_using_iconv (iconv_t cd, const uchar *from, size_t flen, + struct _cpp_strbuf *to) +{ + ICONV_CONST char *inbuf; + char *outbuf; + size_t inbytesleft, outbytesleft; + + /* Reset conversion descriptor and check that it is valid. */ + if (iconv (cd, 0, 0, 0, 0) == (size_t)-1) + return false; + + inbuf = (ICONV_CONST char *)from; + inbytesleft = flen; + outbuf = (char *)to->text + to->len; + outbytesleft = to->asize - to->len; + + for (;;) + { + iconv (cd, &inbuf, &inbytesleft, &outbuf, &outbytesleft); + if (__builtin_expect (inbytesleft == 0, 1)) + { + /* Close out any shift states, returning to the initial state. */ + if (iconv (cd, 0, 0, &outbuf, &outbytesleft) == (size_t)-1) + { + if (errno != E2BIG) + return false; + + CONVERT_ICONV_GROW_BUFFER; + if (iconv (cd, 0, 0, &outbuf, &outbytesleft) == (size_t)-1) + return false; + } + + to->len = to->asize - outbytesleft; + return true; + } + if (errno != E2BIG) + return false; + + CONVERT_ICONV_GROW_BUFFER; + } +} +#else +#define convert_using_iconv 0 /* prevent undefined symbol error below */ +#endif + +/* Arrange for the above custom conversion logic to be used automatically + when conversion between a suitable pair of character sets is requested. */ + +#define APPLY_CONVERSION(CONVERTER, FROM, FLEN, TO) \ + CONVERTER.func (CONVERTER.cd, FROM, FLEN, TO) + +struct cpp_conversion +{ + const char *pair; + convert_f func; + iconv_t fake_cd; +}; +static const struct cpp_conversion conversion_tab[] = { + { "UTF-8/UTF-32LE", convert_utf8_utf32, (iconv_t)0 }, + { "UTF-8/UTF-32BE", convert_utf8_utf32, (iconv_t)1 }, + { "UTF-8/UTF-16LE", convert_utf8_utf16, (iconv_t)0 }, + { "UTF-8/UTF-16BE", convert_utf8_utf16, (iconv_t)1 }, + { "UTF-32LE/UTF-8", convert_utf32_utf8, (iconv_t)0 }, + { "UTF-32BE/UTF-8", convert_utf32_utf8, (iconv_t)1 }, + { "UTF-16LE/UTF-8", convert_utf16_utf8, (iconv_t)0 }, + { "UTF-16BE/UTF-8", convert_utf16_utf8, (iconv_t)1 }, +}; + +/* Subroutine of cpp_init_iconv: initialize and return a + cset_converter structure for conversion from FROM to TO. If + iconv_open() fails, issue an error and return an identity + converter. Silently return an identity converter if FROM and TO + are identical. + + PFILE is only used for generating diagnostics; setting it to NULL + suppresses diagnostics. */ + +static struct cset_converter +init_iconv_desc (cpp_reader *pfile, const char *to, const char *from) +{ + struct cset_converter ret; + char *pair; + size_t i; + + ret.to = to; + ret.from = from; + + if (!strcasecmp (to, from)) + { + ret.func = convert_no_conversion; + ret.cd = (iconv_t) -1; + ret.width = -1; + return ret; + } + + pair = (char *) alloca(strlen(to) + strlen(from) + 2); + + strcpy(pair, from); + strcat(pair, "/"); + strcat(pair, to); + for (i = 0; i < ARRAY_SIZE (conversion_tab); i++) + if (!strcasecmp (pair, conversion_tab[i].pair)) + { + ret.func = conversion_tab[i].func; + ret.cd = conversion_tab[i].fake_cd; + ret.width = -1; + return ret; + } + + /* No custom converter - try iconv. */ + if (HAVE_ICONV) + { + ret.func = convert_using_iconv; + ret.cd = iconv_open (to, from); + ret.width = -1; + + if (ret.cd == (iconv_t) -1) + { + if (pfile) + { + if (errno == EINVAL) + cpp_error (pfile, CPP_DL_ERROR, /* FIXME should be DL_SORRY */ + "conversion from %s to %s not supported by iconv", + from, to); + else + cpp_errno (pfile, CPP_DL_ERROR, "iconv_open"); + } + ret.func = convert_no_conversion; + } + } + else + { + if (pfile) + { + cpp_error (pfile, CPP_DL_ERROR, /* FIXME: should be DL_SORRY */ + "no iconv implementation, cannot convert from %s to %s", + from, to); + } + ret.func = convert_no_conversion; + ret.cd = (iconv_t) -1; + ret.width = -1; + } + + return ret; +} + +/* If charset conversion is requested, initialize iconv(3) descriptors + for conversion from the source character set to the execution + character sets. If iconv is not present in the C library, and + conversion is requested, issue an error. */ + +void +cpp_init_iconv (cpp_reader *pfile) +{ + const char *ncset = CPP_OPTION (pfile, narrow_charset); + const char *wcset = CPP_OPTION (pfile, wide_charset); + const char *default_wcset; + + bool be = CPP_OPTION (pfile, bytes_big_endian); + + if (CPP_OPTION (pfile, wchar_precision) >= 32) + default_wcset = be ? "UTF-32BE" : "UTF-32LE"; + else if (CPP_OPTION (pfile, wchar_precision) >= 16) + default_wcset = be ? "UTF-16BE" : "UTF-16LE"; + else + /* This effectively means that wide strings are not supported, + so don't do any conversion at all. */ + default_wcset = SOURCE_CHARSET; + + if (!ncset) + ncset = SOURCE_CHARSET; + if (!wcset) + wcset = default_wcset; + + pfile->narrow_cset_desc = init_iconv_desc (pfile, ncset, SOURCE_CHARSET); + pfile->narrow_cset_desc.width = CPP_OPTION (pfile, char_precision); + pfile->utf8_cset_desc = init_iconv_desc (pfile, "UTF-8", SOURCE_CHARSET); + pfile->utf8_cset_desc.width = CPP_OPTION (pfile, char_precision); + pfile->char16_cset_desc = init_iconv_desc (pfile, + be ? "UTF-16BE" : "UTF-16LE", + SOURCE_CHARSET); + pfile->char16_cset_desc.width = 16; + pfile->char32_cset_desc = init_iconv_desc (pfile, + be ? "UTF-32BE" : "UTF-32LE", + SOURCE_CHARSET); + pfile->char32_cset_desc.width = 32; + pfile->wide_cset_desc = init_iconv_desc (pfile, wcset, SOURCE_CHARSET); + pfile->wide_cset_desc.width = CPP_OPTION (pfile, wchar_precision); +} + +/* Destroy iconv(3) descriptors set up by cpp_init_iconv, if necessary. */ +void +_cpp_destroy_iconv (cpp_reader *pfile) +{ + if (HAVE_ICONV) + { + if (pfile->narrow_cset_desc.func == convert_using_iconv) + iconv_close (pfile->narrow_cset_desc.cd); + if (pfile->utf8_cset_desc.func == convert_using_iconv) + iconv_close (pfile->utf8_cset_desc.cd); + if (pfile->char16_cset_desc.func == convert_using_iconv) + iconv_close (pfile->char16_cset_desc.cd); + if (pfile->char32_cset_desc.func == convert_using_iconv) + iconv_close (pfile->char32_cset_desc.cd); + if (pfile->wide_cset_desc.func == convert_using_iconv) + iconv_close (pfile->wide_cset_desc.cd); + } +} + +/* Utility routine for use by a full compiler. C is a character taken + from the *basic* source character set, encoded in the host's + execution encoding. Convert it to (the target's) execution + encoding, and return that value. + + Issues an internal error if C's representation in the narrow + execution character set fails to be a single-byte value (C99 + 5.2.1p3: "The representation of each member of the source and + execution character sets shall fit in a byte.") May also issue an + internal error if C fails to be a member of the basic source + character set (testing this exactly is too hard, especially when + the host character set is EBCDIC). */ +cppchar_t +cpp_host_to_exec_charset (cpp_reader *pfile, cppchar_t c) +{ + uchar sbuf[1]; + struct _cpp_strbuf tbuf; + + /* This test is merely an approximation, but it suffices to catch + the most important thing, which is that we don't get handed a + character outside the unibyte range of the host character set. */ + if (c > LAST_POSSIBLY_BASIC_SOURCE_CHAR) + { + cpp_error (pfile, CPP_DL_ICE, + "character 0x%lx is not in the basic source character set\n", + (unsigned long)c); + return 0; + } + + /* Being a character in the unibyte range of the host character set, + we can safely splat it into a one-byte buffer and trust that that + is a well-formed string. */ + sbuf[0] = c; + + /* This should never need to reallocate, but just in case... */ + tbuf.asize = 1; + tbuf.text = XNEWVEC (uchar, tbuf.asize); + tbuf.len = 0; + + if (!APPLY_CONVERSION (pfile->narrow_cset_desc, sbuf, 1, &tbuf)) + { + cpp_errno (pfile, CPP_DL_ICE, "converting to execution character set"); + return 0; + } + if (tbuf.len != 1) + { + cpp_error (pfile, CPP_DL_ICE, + "character 0x%lx is not unibyte in execution character set", + (unsigned long)c); + return 0; + } + c = tbuf.text[0]; + free(tbuf.text); + return c; +} + + + +/* cpp_substring_ranges's constructor. */ + +cpp_substring_ranges::cpp_substring_ranges () : + m_ranges (NULL), + m_num_ranges (0), + m_alloc_ranges (8) +{ + m_ranges = XNEWVEC (source_range, m_alloc_ranges); +} + +/* cpp_substring_ranges's destructor. */ + +cpp_substring_ranges::~cpp_substring_ranges () +{ + free (m_ranges); +} + +/* Add RANGE to the vector of source_range information. */ + +void +cpp_substring_ranges::add_range (source_range range) +{ + if (m_num_ranges >= m_alloc_ranges) + { + m_alloc_ranges *= 2; + m_ranges + = (source_range *)xrealloc (m_ranges, + sizeof (source_range) * m_alloc_ranges); + } + m_ranges[m_num_ranges++] = range; +} + +/* Read NUM ranges from LOC_READER, adding them to the vector of source_range + information. */ + +void +cpp_substring_ranges::add_n_ranges (int num, + cpp_string_location_reader &loc_reader) +{ + for (int i = 0; i < num; i++) + add_range (loc_reader.get_next ()); +} + + + +/* Utility routine that computes a mask of the form 0000...111... with + WIDTH 1-bits. */ +static inline size_t +width_to_mask (size_t width) +{ + width = MIN (width, BITS_PER_CPPCHAR_T); + if (width >= CHAR_BIT * sizeof (size_t)) + return ~(size_t) 0; + else + return ((size_t) 1 << width) - 1; +} + +/* A large table of unicode character information. */ +enum { + /* Valid in a C99 identifier? */ + C99 = 1, + /* Valid in a C99 identifier, but not as the first character? */ + N99 = 2, + /* Valid in a C++ identifier? */ + CXX = 4, + /* Valid in a C11/C++11 identifier? */ + C11 = 8, + /* Valid in a C11/C++11 identifier, but not as the first character? */ + N11 = 16, + /* Valid in a C++23 identifier? */ + CXX23 = 32, + /* Valid in a C++23 identifier, but not as the first character? */ + NXX23 = 64, + /* NFC representation is not valid in an identifier? */ + CID = 128, + /* Might be valid NFC form? */ + NFC = 256, + /* Might be valid NFKC form? */ + NKC = 512, + /* Certain preceding characters might make it not valid NFC/NKFC form? */ + CTX = 1024 +}; + +struct ucnrange { + /* Bitmap of flags above. */ + unsigned short flags; + /* Combining class of the character. */ + unsigned char combine; + /* Last character in the range described by this entry. */ + unsigned int end; +}; +#include "ucnid.h" + +/* ISO 10646 defines the UCS codespace as the range 0-0x10FFFF inclusive. */ +#define UCS_LIMIT 0x10FFFF + +#include "uname2c.h" + +static const char hangul_syllables[][4] = { + /* L */ + "G", "GG", "N", "D", "DD", "R", "M", "B", "BB", "S", "SS", "", + "J", "JJ", "C", "K", "T", "P", "H", + /* V */ + "A", "AE", "YA", "YAE", "EO", "E", "YEO", "YE", "O", "WA", "WAE", + "OE", "YO", "U", "WEO", "WE", "WI", "YU", "EU", "YI", "I", + /* T */ + "", "G", "GG", "GS", "N", "NJ", "NH", "D", "L", "LG", "LM", "LB", + "LS", "LT", "LP", "LH", "M", "B", "BS", "S", "SS", "NG", "J", "C", + "K", "T", "P", "H" +}; + +static const short hangul_count[6] = { 19, 21, 28 }; + +/* Used for Unicode loose matching rule UAX44-LM2 matching. */ + +struct uname2c_data +{ + char *canon_name; + char prev_char; +}; + +/* Map NAME, a Unicode character name or correction/control/alternate + alias, to a Unicode codepoint, or return (cppchar_t) -1 if + not found. This uses a space optimized radix tree precomputed + by the makeuname2c utility, with binary format documented in its + source makeuname2c.cc. */ + +static cppchar_t +_cpp_uname2c (const char *name, size_t len, const unsigned char *n, + struct uname2c_data *data) +{ + do + { + char k; + const char *key; + size_t key_len, len_adj; + bool has_value = *n & 0x40; + bool has_children, no_sibling = false; + cppchar_t codepoint = -1; + const unsigned char *child = NULL; + int ret; + + if (*n & 0x80) + { + k = ' ' + (*n++ & 0x3f); + key = &k; + key_len = 1; + } + else + { + key_len = *n++ & 0x3f; + key = &uname2c_dict[*n++]; + key += (*n++ << 8); + } + if (has_value) + { + codepoint = *n + (n[1] << 8) + ((n[2] & 0x1f) << 16); + has_children = n[2] & 0x80; + no_sibling = n[2] & 0x40; + n += 3; + } + else + has_children = true; + if (has_children) + { + unsigned int shift = 0; + size_t child_off = 0; + + do + { + child_off |= (*n & 0x7f) << shift; + shift += 7; + } + while ((*n++ & 0x80) != 0); + child = n + child_off; + } + if (__builtin_expect (data == NULL, 1)) + { + ret = memcmp (name, key, len > key_len ? key_len : len); + len_adj = key_len; + } + else + { + const char *p = name, *q = key; + + while (1) + { + if ((size_t) (p - name) == len || (size_t) (q - key) == key_len) + break; + if (*q == ' ') + { + ++q; + continue; + } + if (*q == '-') + { + /* This is the hard case. Only medial hyphens + should be removed, where medial means preceded + and followed by alnum. */ + if (ISALNUM (q == key ? data->prev_char : q[-1])) + { + if (q + 1 == key + key_len) + { + /* We don't know what the next letter will be. + It could be ISALNUM, then we are supposed + to omit it, or it could be a space and then + we should not omit it and need to compare it. + Fortunately the only 3 names with hyphen + followed by non-letter are + U+0F0A TIBETAN MARK BKA- SHOG YIG MGO + U+0FD0 TIBETAN MARK BKA- SHOG GI MGO RGYAN + U+0FD0 TIBETAN MARK BSKA- SHOG GI MGO RGYAN + Furthermore, prefixes of NR2 generated + ranges all end with a hyphen, but the generated + part is then followed by alpha-numeric. + So, let's just assume that - at the end of + key is always followed by alphanumeric and + so should be omitted. + makeuname2c.cc verifies that this is true. */ + ++q; + continue; + } + else if (ISALNUM (q[1])) + { + ++q; + continue; + } + } + } + if (*p != *q) + break; + ++p; + ++q; + } + len_adj = p - name; + /* If we don't consume the whole key, signal a mismatch, + but always with ret = 1, so that we keep looking through + siblings. */ + ret = q < key + key_len; + } + if (ret < 0) + return -1; + else if (ret == 0) + { + if (len < len_adj) + return -1; + else if (codepoint >= 0xd800 + && codepoint < 0xd800 + ARRAY_SIZE (uname2c_generated)) + { + name += len_adj; + len -= len_adj; + if (codepoint == 0xd800) + { + /* NR1 - Hangul syllables. */ + size_t start = 0, end, i, j; + int this_len, max_len; + char winner[3]; + + for (i = 0; i < 3; ++i) + { + end = start + hangul_count[i]; + max_len = -1; + winner[i] = -1; + for (j = start; j < end; j++) + { + this_len = strlen (hangul_syllables[j]); + if (len >= (size_t) this_len + && this_len > max_len + && memcmp (name, hangul_syllables[j], + this_len) == 0) + { + max_len = this_len; + winner[i] = j - start; + } + } + if (max_len == -1) + return -1; + name += max_len; + len -= max_len; + start = end; + } + if (__builtin_expect (data != NULL, 0)) + { + memcpy (data->canon_name, key, key_len); + data->canon_name[key_len] = '\0'; + for (i = 0, start = 0; i < 3; ++i) + { + strcat (data->canon_name, + hangul_syllables[start + winner[i]]); + start += hangul_count[i]; + } + } + return (0xac00 + 21 * 28 * winner[0] + + 28 * winner[1] + winner[2]); + } + else + { + /* NR2 - prefix followed by hexadecimal codepoint. */ + const cppchar_t *p; + size_t i; + + if (len < 4 || len > 5) + return -1; + p = uname2c_pairs + uname2c_generated[codepoint - 0xd800]; + codepoint = 0; + for (i = 0; i < len; ++i) + { + codepoint <<= 4; + if (!ISXDIGIT (name[i])) + return -1; + codepoint += hex_value (name[i]); + } + for (; *p; p += 2) + if (codepoint < *p) + return -1; + else if (codepoint <= p[1]) + { + if (__builtin_expect (data != NULL, 0)) + { + memcpy (data->canon_name, key, key_len); + memcpy (data->canon_name + key_len, name, len); + data->canon_name[key_len + len] = '\0'; + } + return codepoint; + } + return -1; + } + } + else if (__builtin_expect (data != NULL, 0)) + { + if (len == len_adj) + { + memcpy (data->canon_name, key, key_len); + data->canon_name[key_len] = '\0'; + return codepoint; + } + if (has_children) + { + struct uname2c_data save = *data; + memcpy (data->canon_name, key, key_len); + data->canon_name += key_len; + data->prev_char = key[key_len - 1]; + codepoint = _cpp_uname2c (name + len_adj, len - len_adj, + child, data); + if (codepoint != (cppchar_t) -1) + return codepoint; + *data = save; + } + } + else if (len == len_adj) + return codepoint; + else if (!has_children) + return -1; + else + { + name += len_adj; + len -= len_adj; + n = child; + continue; + } + } + if (no_sibling || (!has_value && *n == 0xff)) + break; + } + while (1); + return -1; +} + +/* Try to do a loose name lookup according to Unicode loose matching rule + UAX44-LM2. First ignore medial hyphens, whitespace, underscore + characters and convert to upper case. */ + +static cppchar_t +_cpp_uname2c_uax44_lm2 (const char *name, size_t len, char *canon_name) +{ + char name_after_uax44_lm2[uname2c_max_name_len]; + char *q = name_after_uax44_lm2; + const char *p; + + for (p = name; p < name + len; p++) + if (*p == '_' || *p == ' ') + continue; + else if (*p == '-' && p != name && ISALNUM (p[-1]) && ISALNUM (p[1])) + continue; + else if (q == name_after_uax44_lm2 + uname2c_max_name_len) + return -1; + else if (ISLOWER (*p)) + *q++ = TOUPPER (*p); + else + *q++ = *p; + + struct uname2c_data data; + data.canon_name = canon_name; + data.prev_char = ' '; + /* Hangul Jungseong O- E after UAX44-LM2 should be HANGULJUNGSEONGO-E + and so should match U+1180. */ + if (q - name_after_uax44_lm2 == sizeof ("HANGULJUNGSEONGO-E") - 1 + && memcmp (name_after_uax44_lm2, "HANGULJUNGSEONGO-E", + sizeof ("HANGULJUNGSEONGO-E") - 1) == 0) + { + name_after_uax44_lm2[sizeof ("HANGULJUNGSEONGO") - 1] = 'E'; + --q; + } + cppchar_t result + = _cpp_uname2c (name_after_uax44_lm2, q - name_after_uax44_lm2, + uname2c_tree, &data); + + /* Unicode UAX44-LM2 exception: + U+116C HANGUL JUNGSEONG OE + U+1180 HANGUL JUNGSEONG O-E + We remove all medial hyphens when we shouldn't remote the U+1180 one. + The U+1180 entry sorts before U+116C lexicographilly, so we get U+1180 + in both cases. Thus, if result is U+1180, check if user's name doesn't + have a hyphen there and adjust. */ + if (result == 0x1180) + { + while (p[-1] == ' ' || p[-1] == '_') + --p; + gcc_assert (TOUPPER (p[-1]) == 'E'); + --p; + while (p[-1] == ' ' || p[-1] == '_') + --p; + if (p[-1] != '-') + { + result = 0x116c; + memcpy (canon_name + sizeof ("HANGUL JUNGSEONG O") - 1, "E", 2); + } + } + return result; +} + + +/* Returns 1 if C is valid in an identifier, 2 if C is valid except at + the start of an identifier, and 0 if C is not valid in an + identifier. We assume C has already gone through the checks of + _cpp_valid_ucn. Also update NST for C if returning nonzero. The + algorithm is a simple binary search on the table defined in + ucnid.h. */ + +static int +ucn_valid_in_identifier (cpp_reader *pfile, cppchar_t c, + struct normalize_state *nst) +{ + int mn, mx, md; + unsigned short valid_flags, invalid_start_flags; + + if (c > UCS_LIMIT) + return 0; + + mn = 0; + mx = ARRAY_SIZE (ucnranges) - 1; + while (mx != mn) + { + md = (mn + mx) / 2; + if (c <= ucnranges[md].end) + mx = md; + else + mn = md + 1; + } + + /* When -pedantic, we require the character to have been listed by + the standard for the current language. Otherwise, we accept the + union of the acceptable sets for all supported language versions. */ + valid_flags = C99 | CXX | C11 | CXX23; + if (CPP_PEDANTIC (pfile)) + { + if (CPP_OPTION (pfile, xid_identifiers)) + valid_flags = CXX23; + else if (CPP_OPTION (pfile, c11_identifiers)) + valid_flags = C11; + else if (CPP_OPTION (pfile, c99)) + valid_flags = C99; + } + if (! (ucnranges[mn].flags & valid_flags)) + return 0; + + /* Update NST. */ + if (ucnranges[mn].combine != 0 && ucnranges[mn].combine < nst->prev_class) + nst->level = normalized_none; + else if (ucnranges[mn].flags & CTX) + { + bool safe; + cppchar_t p = nst->previous; + + /* For Hangul, characters in the range AC00-D7A3 are NFC/NFKC, + and are combined algorithmically from a sequence of the form + 1100-1112 1161-1175 11A8-11C2 + (if the third is not present, it is treated as 11A7, which is not + really a valid character). + Unfortunately, C99 allows (only) the NFC form, but C++ allows + only the combining characters. */ + if (c >= 0x1161 && c <= 0x1175) + safe = p < 0x1100 || p > 0x1112; + else if (c >= 0x11A8 && c <= 0x11C2) + safe = (p < 0xAC00 || p > 0xD7A3 || (p - 0xAC00) % 28 != 0); + else + safe = check_nfc (pfile, c, p); + if (!safe) + { + if ((c >= 0x1161 && c <= 0x1175) || (c >= 0x11A8 && c <= 0x11C2)) + nst->level = MAX (nst->level, normalized_identifier_C); + else + nst->level = normalized_none; + } + } + else if (ucnranges[mn].flags & NKC) + ; + else if (ucnranges[mn].flags & NFC) + nst->level = MAX (nst->level, normalized_C); + else if (ucnranges[mn].flags & CID) + nst->level = MAX (nst->level, normalized_identifier_C); + else + nst->level = normalized_none; + if (ucnranges[mn].combine == 0) + nst->previous = c; + nst->prev_class = ucnranges[mn].combine; + + if (!CPP_PEDANTIC (pfile)) + { + /* If not -pedantic, accept as character that may + begin an identifier a union of characters allowed + at that position in each of the character sets. */ + if ((ucnranges[mn].flags & (C99 | N99)) == C99 + || (ucnranges[mn].flags & CXX) != 0 + || (ucnranges[mn].flags & (C11 | N11)) == C11 + || (ucnranges[mn].flags & (CXX23 | NXX23)) == CXX23) + return 1; + return 2; + } + + if (CPP_OPTION (pfile, xid_identifiers)) + invalid_start_flags = NXX23; + else if (CPP_OPTION (pfile, c11_identifiers)) + invalid_start_flags = N11; + else if (CPP_OPTION (pfile, c99)) + invalid_start_flags = N99; + else + invalid_start_flags = 0; + + /* In C99, UCN digits may not begin identifiers. In C11 and C++11, + UCN combining characters may not begin identifiers. */ + if (ucnranges[mn].flags & invalid_start_flags) + return 2; + + return 1; +} + +/* Increment char_range->m_finish by a single character. */ + +static void +extend_char_range (source_range *char_range, + cpp_string_location_reader *loc_reader) +{ + if (loc_reader) + { + gcc_assert (char_range); + char_range->m_finish = loc_reader->get_next ().m_finish; + } +} + +/* [lex.charset]: The character designated by the universal character + name \UNNNNNNNN is that character whose character short name in + ISO/IEC 10646 is NNNNNNNN; the character designated by the + universal character name \uNNNN is that character whose character + short name in ISO/IEC 10646 is 0000NNNN. If the hexadecimal value + for a universal character name corresponds to a surrogate code point + (in the range 0xD800-0xDFFF, inclusive), the program is ill-formed. + Additionally, if the hexadecimal value for a universal-character-name + outside a character or string literal corresponds to a control character + (in either of the ranges 0x00-0x1F or 0x7F-0x9F, both inclusive) or to a + character in the basic source character set, the program is ill-formed. + + C99 6.4.3: A universal character name shall not specify a character + whose short identifier is less than 00A0 other than 0024 ($), 0040 (@), + or 0060 (`), nor one in the range D800 through DFFF inclusive. + + If the hexadecimal value is larger than the upper bound of the UCS + codespace specified in ISO/IEC 10646, a pedantic warning is issued + in all versions of C and in the C++20 or later versions of C++. + + *PSTR must be preceded by "\u" or "\U"; it is assumed that the + buffer end is delimited by a non-hex digit. Returns false if the + UCN has not been consumed, true otherwise. + + The value of the UCN, whether valid or invalid, is returned in *CP. + Diagnostics are emitted for invalid values. PSTR is updated to point + one beyond the UCN, or to the syntactically invalid character. + + IDENTIFIER_POS is 0 when not in an identifier, 1 for the start of + an identifier, or 2 otherwise. + + If LOC_READER is non-NULL, then position information is + read from *LOC_READER and CHAR_RANGE->m_finish is updated accordingly. */ + +bool +_cpp_valid_ucn (cpp_reader *pfile, const uchar **pstr, + const uchar *limit, int identifier_pos, + struct normalize_state *nst, cppchar_t *cp, + source_range *char_range, + cpp_string_location_reader *loc_reader) +{ + cppchar_t result, c; + unsigned int length; + const uchar *str = *pstr; + const uchar *base = str - 2; + bool delimited = false, named = false; + + if (!CPP_OPTION (pfile, cplusplus) && !CPP_OPTION (pfile, c99)) + cpp_error (pfile, CPP_DL_WARNING, + "universal character names are only valid in C++ and C99"); + else if (CPP_OPTION (pfile, cpp_warn_c90_c99_compat) > 0 + && !CPP_OPTION (pfile, cplusplus)) + cpp_error (pfile, CPP_DL_WARNING, + "C99's universal character names are incompatible with C90"); + else if (CPP_WTRADITIONAL (pfile) && identifier_pos == 0) + cpp_warning (pfile, CPP_W_TRADITIONAL, + "the meaning of '\\%c' is different in traditional C", + (int) str[-1]); + + result = 0; + if (str[-1] == 'u') + { + length = 4; + if (str < limit + && *str == '{' + && (!identifier_pos + || CPP_OPTION (pfile, delimited_escape_seqs) + || !CPP_OPTION (pfile, std))) + { + str++; + /* Magic value to indicate no digits seen. */ + length = 32; + delimited = true; + extend_char_range (char_range, loc_reader); + } + } + else if (str[-1] == 'U') + length = 8; + else if (str[-1] == 'N') + { + length = 4; + if (identifier_pos + && !CPP_OPTION (pfile, delimited_escape_seqs) + && CPP_OPTION (pfile, std)) + { + *cp = 0; + return false; + } + if (str == limit || *str != '{') + { + if (identifier_pos) + { + *cp = 0; + return false; + } + cpp_error (pfile, CPP_DL_ERROR, "'\\N' not followed by '{'"); + } + else + { + str++; + named = true; + extend_char_range (char_range, loc_reader); + length = 0; + const uchar *name = str; + bool strict = true; + + do + { + if (str == limit) + break; + c = *str; + if (!ISIDNUM (c) && c != ' ' && c != '-') + break; + if (ISLOWER (c) || c == '_') + strict = false; + str++; + extend_char_range (char_range, loc_reader); + } + while (1); + + if (str < limit && *str == '}') + { + if (identifier_pos && name == str) + { + cpp_warning (pfile, CPP_W_UNICODE, + "empty named universal character escape " + "sequence; treating it as separate tokens"); + *cp = 0; + return false; + } + if (name == str) + cpp_error (pfile, CPP_DL_ERROR, + "empty named universal character escape sequence"); + else if ((!identifier_pos || strict) + && !CPP_OPTION (pfile, delimited_escape_seqs) + && CPP_OPTION (pfile, cpp_pedantic)) + cpp_error (pfile, CPP_DL_PEDWARN, + "named universal character escapes are only valid " + "in C++23"); + if (name == str) + result = 0x40; + else + { + /* If the name is longer than maximum length of a Unicode + name, it can't be strictly valid. */ + if ((size_t) (str - name) > uname2c_max_name_len || !strict) + result = -1; + else + result = _cpp_uname2c ((const char *) name, str - name, + uname2c_tree, NULL); + if (result == (cppchar_t) -1) + { + bool ret = true; + if (identifier_pos + && (!CPP_OPTION (pfile, delimited_escape_seqs) + || !strict)) + ret = cpp_warning (pfile, CPP_W_UNICODE, + "\\N{%.*s} is not a valid " + "universal character; treating it " + "as separate tokens", + (int) (str - name), name); + else + cpp_error (pfile, CPP_DL_ERROR, + "\\N{%.*s} is not a valid universal " + "character", (int) (str - name), name); + + /* Try to do a loose name lookup according to + Unicode loose matching rule UAX44-LM2. */ + char canon_name[uname2c_max_name_len + 1]; + result = _cpp_uname2c_uax44_lm2 ((const char *) name, + str - name, canon_name); + if (result != (cppchar_t) -1 && ret) + cpp_error (pfile, CPP_DL_NOTE, + "did you mean \\N{%s}?", canon_name); + else + result = 0xC0; + if (identifier_pos + && (!CPP_OPTION (pfile, delimited_escape_seqs) + || !strict)) + { + *cp = 0; + return false; + } + } + } + str++; + extend_char_range (char_range, loc_reader); + } + else if (identifier_pos) + { + cpp_warning (pfile, CPP_W_UNICODE, + "'\\N{' not terminated with '}' after %.*s; " + "treating it as separate tokens", + (int) (str - base), base); + *cp = 0; + return false; + } + else + { + cpp_error (pfile, CPP_DL_ERROR, + "'\\N{' not terminated with '}' after %.*s", + (int) (str - base), base); + result = 1; + } + } + } + else + { + cpp_error (pfile, CPP_DL_ICE, "In _cpp_valid_ucn but not a UCN"); + length = 4; + } + + if (!named) + do + { + if (str == limit) + break; + c = *str; + if (!ISXDIGIT (c)) + break; + str++; + extend_char_range (char_range, loc_reader); + if (delimited) + { + if (!result) + /* Accept arbitrary number of leading zeros. + 16 is another magic value, smaller than 32 above + and bigger than 8, so that upon encountering first + non-zero digit we can count 8 digits and after that + or in overflow bit and ensure length doesn't decrease + to 0, as delimited escape sequence doesn't have upper + bound on the number of hex digits. */ + length = 16; + else if (length == 16 - 8) + { + /* Make sure we detect overflows. */ + result |= 0x8000000; + ++length; + } + } + + result = (result << 4) + hex_value (c); + } + while (--length); + + if (delimited && str < limit && *str == '}') + { + if (length == 32 && identifier_pos) + { + cpp_warning (pfile, CPP_W_UNICODE, + "empty delimited escape sequence; " + "treating it as separate tokens"); + *cp = 0; + return false; + } + else if (length == 32) + cpp_error (pfile, CPP_DL_ERROR, + "empty delimited escape sequence"); + else if (!CPP_OPTION (pfile, delimited_escape_seqs) + && CPP_OPTION (pfile, cpp_pedantic)) + cpp_error (pfile, CPP_DL_PEDWARN, + "delimited escape sequences are only valid in C++23"); + str++; + length = 0; + delimited = false; + extend_char_range (char_range, loc_reader); + } + + /* Partial UCNs are not valid in strings, but decompose into + multiple tokens in identifiers, so we can't give a helpful + error message in that case. */ + if (length && identifier_pos) + { + if (delimited) + cpp_warning (pfile, CPP_W_UNICODE, + "'\\u{' not terminated with '}' after %.*s; " + "treating it as separate tokens", + (int) (str - base), base); + *cp = 0; + return false; + } + + *pstr = str; + if (length) + { + if (!delimited) + cpp_error (pfile, CPP_DL_ERROR, + "incomplete universal character name %.*s", + (int) (str - base), base); + else + cpp_error (pfile, CPP_DL_ERROR, + "'\\u{' not terminated with '}' after %.*s", + (int) (str - base), base); + result = 1; + } + /* The C99 standard permits $, @ and ` to be specified as UCNs. We use + hex escapes so that this also works with EBCDIC hosts. + C++0x permits everything below 0xa0 within literals; + ucn_valid_in_identifier will complain about identifiers. */ + else if ((result < 0xa0 + && !CPP_OPTION (pfile, cplusplus) + && (result != 0x24 && result != 0x40 && result != 0x60)) + || (result & 0x80000000) + || (result >= 0xD800 && result <= 0xDFFF)) + { + cpp_error (pfile, CPP_DL_ERROR, + "%.*s is not a valid universal character", + (int) (str - base), base); + result = 1; + } + else if (identifier_pos && result == 0x24 + && CPP_OPTION (pfile, dollars_in_ident)) + { + if (CPP_OPTION (pfile, warn_dollars) && !pfile->state.skipping) + { + CPP_OPTION (pfile, warn_dollars) = 0; + cpp_error (pfile, CPP_DL_PEDWARN, "'$' in identifier or number"); + } + NORMALIZE_STATE_UPDATE_IDNUM (nst, result); + } + else if (identifier_pos) + { + int validity = ucn_valid_in_identifier (pfile, result, nst); + + if (validity == 0) + cpp_error (pfile, CPP_DL_ERROR, + "universal character %.*s is not valid in an identifier", + (int) (str - base), base); + else if (validity == 2 && identifier_pos == 1) + cpp_error (pfile, CPP_DL_ERROR, + "universal character %.*s is not valid at the start of an identifier", + (int) (str - base), base); + } + else if (result > UCS_LIMIT + && (!CPP_OPTION (pfile, cplusplus) + || CPP_OPTION (pfile, lang) > CLK_CXX17)) + cpp_error (pfile, CPP_DL_PEDWARN, + "%.*s is outside the UCS codespace", + (int) (str - base), base); + + *cp = result; + return true; +} + +/* Convert an UCN, pointed to by FROM, to UTF-8 encoding, then translate + it to the execution character set and write the result into TBUF, + if TBUF is non-NULL. + An advanced pointer is returned. Issues all relevant diagnostics. + If LOC_READER is non-NULL, then RANGES must be non-NULL and CHAR_RANGE + contains the location of the character so far: location information + is read from *LOC_READER, and *RANGES is updated accordingly. */ +static const uchar * +convert_ucn (cpp_reader *pfile, const uchar *from, const uchar *limit, + struct _cpp_strbuf *tbuf, struct cset_converter cvt, + source_range char_range, + cpp_string_location_reader *loc_reader, + cpp_substring_ranges *ranges) +{ + cppchar_t ucn; + uchar buf[6]; + uchar *bufp = buf; + size_t bytesleft = 6; + int rval; + struct normalize_state nst = INITIAL_NORMALIZE_STATE; + + /* loc_reader and ranges must either be both NULL, or both be non-NULL. */ + gcc_assert ((loc_reader != NULL) == (ranges != NULL)); + + from++; /* Skip u/U/N. */ + + /* The u/U is part of the spelling of this character. */ + extend_char_range (&char_range, loc_reader); + + _cpp_valid_ucn (pfile, &from, limit, 0, &nst, + &ucn, &char_range, loc_reader); + + rval = one_cppchar_to_utf8 (ucn, &bufp, &bytesleft); + if (rval) + { + errno = rval; + cpp_errno (pfile, CPP_DL_ERROR, + "converting UCN to source character set"); + } + else + { + if (tbuf) + if (!APPLY_CONVERSION (cvt, buf, 6 - bytesleft, tbuf)) + cpp_errno (pfile, CPP_DL_ERROR, + "converting UCN to execution character set"); + + if (loc_reader) + { + int num_encoded_bytes = 6 - bytesleft; + for (int i = 0; i < num_encoded_bytes; i++) + ranges->add_range (char_range); + } + } + + return from; +} + +/* Performs a similar task as _cpp_valid_ucn, but parses UTF-8-encoded + extended characters rather than UCNs. If the return value is TRUE, then a + character was successfully decoded and stored in *CP; *PSTR has been + updated to point one past the valid UTF-8 sequence. Diagnostics may have + been emitted if the character parsed is not allowed in the current context. + If the return value is FALSE, then *PSTR has not been modified and *CP may + equal 0, to indicate that *PSTR does not form a valid UTF-8 sequence, or it + may, when processing an identifier in C mode, equal a codepoint that was + validly encoded but is not allowed to appear in an identifier. In either + case, no diagnostic is emitted, and the return value of FALSE should cause + a new token to be formed. + + _cpp_valid_utf8 can be called when lexing a potential identifier, or a + CPP_OTHER token or for the purposes of -Winvalid-utf8 warning in string or + character literals. NST is unused when not in a potential identifier. + + As in _cpp_valid_ucn, IDENTIFIER_POS is 0 when not in an identifier, 1 for + the start of an identifier, or 2 otherwise. */ + +extern bool +_cpp_valid_utf8 (cpp_reader *pfile, + const uchar **pstr, + const uchar *limit, + int identifier_pos, + struct normalize_state *nst, + cppchar_t *cp) +{ + const uchar *base = *pstr; + size_t inbytesleft = limit - base; + if (one_utf8_to_cppchar (pstr, &inbytesleft, cp)) + { + /* No diagnostic here as this byte will rather become a + new token. */ + *cp = 0; + return false; + } + + if (identifier_pos) + { + switch (ucn_valid_in_identifier (pfile, *cp, nst)) + { + + case 0: + /* In C++, this is an error for invalid character in an identifier + because logically, the UTF-8 was converted to a UCN during + translation phase 1 (even though we don't physically do it that + way). In C, this byte rather becomes grammatically a separate + token. */ + + if (CPP_OPTION (pfile, cplusplus)) + cpp_error (pfile, CPP_DL_ERROR, + "extended character %.*s is not valid in an identifier", + (int) (*pstr - base), base); + else + { + *pstr = base; + return false; + } + + break; + + case 2: + if (identifier_pos == 1) + { + /* This is treated the same way in C++ or C99 -- lexed as an + identifier which is then invalid because an identifier is + not allowed to start with this character. */ + cpp_error (pfile, CPP_DL_ERROR, + "extended character %.*s is not valid at the start of an identifier", + (int) (*pstr - base), base); + } + break; + } + } + + return true; +} + +/* Return true iff BUFFER of size NUM_BYTES is validly-encoded UTF-8. */ + +extern bool +cpp_valid_utf8_p (const char *buffer, size_t num_bytes) +{ + const uchar *iter = (const uchar *)buffer; + size_t bytesleft = num_bytes; + while (bytesleft > 0) + { + /* one_utf8_to_cppchar implements 5-byte and 6 byte sequences as per + RFC 2279, but this has been superceded by RFC 3629, which + restricts UTF-8 to 1-byte through 4-byte sequences, and + states "the octet values C0, C1, F5 to FF never appear". + + Reject such values. */ + if (*iter >= 0xf4) + return false; + + cppchar_t cp; + int err = one_utf8_to_cppchar (&iter, &bytesleft, &cp); + if (err) + return false; + } + /* No problems encountered. */ + return true; +} + +/* Subroutine of convert_hex and convert_oct. N is the representation + in the execution character set of a numeric escape; write it into the + string buffer TBUF and update the end-of-string pointer therein. WIDE + is true if it's a wide string that's being assembled in TBUF. This + function issues no diagnostics and never fails. */ +static void +emit_numeric_escape (cpp_reader *pfile, cppchar_t n, + struct _cpp_strbuf *tbuf, struct cset_converter cvt) +{ + size_t width = cvt.width; + + if (width != CPP_OPTION (pfile, char_precision)) + { + /* We have to render this into the target byte order, which may not + be our byte order. */ + bool bigend = CPP_OPTION (pfile, bytes_big_endian); + size_t cwidth = CPP_OPTION (pfile, char_precision); + size_t cmask = width_to_mask (cwidth); + size_t nbwc = width / cwidth; + size_t i; + size_t off = tbuf->len; + cppchar_t c; + + if (tbuf->len + nbwc > tbuf->asize) + { + tbuf->asize += OUTBUF_BLOCK_SIZE; + tbuf->text = XRESIZEVEC (uchar, tbuf->text, tbuf->asize); + } + + for (i = 0; i < nbwc; i++) + { + c = n & cmask; + n >>= cwidth; + tbuf->text[off + (bigend ? nbwc - i - 1 : i)] = c; + } + tbuf->len += nbwc; + } + else + { + /* Note: this code does not handle the case where the target + and host have a different number of bits in a byte. */ + if (tbuf->len + 1 > tbuf->asize) + { + tbuf->asize += OUTBUF_BLOCK_SIZE; + tbuf->text = XRESIZEVEC (uchar, tbuf->text, tbuf->asize); + } + tbuf->text[tbuf->len++] = n; + } +} + +/* Convert a hexadecimal escape, pointed to by FROM, to the execution + character set and write it into the string buffer TBUF (if non-NULL). + Returns an advanced pointer, and issues diagnostics as necessary. + No character set translation occurs; this routine always produces the + execution-set character with numeric value equal to the given hex + number. You can, e.g. generate surrogate pairs this way. + If LOC_READER is non-NULL, then RANGES must be non-NULL and CHAR_RANGE + contains the location of the character so far: location information + is read from *LOC_READER, and *RANGES is updated accordingly. */ +static const uchar * +convert_hex (cpp_reader *pfile, const uchar *from, const uchar *limit, + struct _cpp_strbuf *tbuf, struct cset_converter cvt, + source_range char_range, + cpp_string_location_reader *loc_reader, + cpp_substring_ranges *ranges) +{ + cppchar_t c, n = 0, overflow = 0; + int digits_found = 0; + size_t width = cvt.width; + size_t mask = width_to_mask (width); + bool delimited = false; + const uchar *base = from - 1; + + /* loc_reader and ranges must either be both NULL, or both be non-NULL. */ + gcc_assert ((loc_reader != NULL) == (ranges != NULL)); + + if (CPP_WTRADITIONAL (pfile)) + cpp_warning (pfile, CPP_W_TRADITIONAL, + "the meaning of '\\x' is different in traditional C"); + + /* Skip 'x'. */ + from++; + + /* The 'x' is part of the spelling of this character. */ + extend_char_range (&char_range, loc_reader); + + if (from < limit && *from == '{') + { + delimited = true; + from++; + extend_char_range (&char_range, loc_reader); + } + + while (from < limit) + { + c = *from; + if (! hex_p (c)) + break; + from++; + extend_char_range (&char_range, loc_reader); + overflow |= n ^ (n << 4 >> 4); + n = (n << 4) + hex_value (c); + digits_found = 1; + } + + if (delimited && from < limit && *from == '}') + { + from++; + if (!digits_found) + { + cpp_error (pfile, CPP_DL_ERROR, + "empty delimited escape sequence"); + return from; + } + else if (!CPP_OPTION (pfile, delimited_escape_seqs) + && CPP_OPTION (pfile, cpp_pedantic)) + cpp_error (pfile, CPP_DL_PEDWARN, + "delimited escape sequences are only valid in C++23"); + delimited = false; + extend_char_range (&char_range, loc_reader); + } + + if (!digits_found) + { + cpp_error (pfile, CPP_DL_ERROR, + "\\x used with no following hex digits"); + return from; + } + else if (delimited) + { + cpp_error (pfile, CPP_DL_ERROR, + "'\\x{' not terminated with '}' after %.*s", + (int) (from - base), base); + return from; + } + + if (overflow | (n != (n & mask))) + { + cpp_error (pfile, CPP_DL_PEDWARN, + "hex escape sequence out of range"); + n &= mask; + } + + if (tbuf) + emit_numeric_escape (pfile, n, tbuf, cvt); + if (ranges) + ranges->add_range (char_range); + + return from; +} + +/* Convert an octal escape, pointed to by FROM, to the execution + character set and write it into the string buffer TBUF. Returns an + advanced pointer, and issues diagnostics as necessary. + No character set translation occurs; this routine always produces the + execution-set character with numeric value equal to the given octal + number. + If LOC_READER is non-NULL, then RANGES must be non-NULL and CHAR_RANGE + contains the location of the character so far: location information + is read from *LOC_READER, and *RANGES is updated accordingly. */ +static const uchar * +convert_oct (cpp_reader *pfile, const uchar *from, const uchar *limit, + struct _cpp_strbuf *tbuf, struct cset_converter cvt, + source_range char_range, + cpp_string_location_reader *loc_reader, + cpp_substring_ranges *ranges) +{ + size_t count = 0; + cppchar_t c, n = 0, overflow = 0; + size_t width = cvt.width; + size_t mask = width_to_mask (width); + bool delimited = false; + const uchar *base = from - 1; + + /* loc_reader and ranges must either be both NULL, or both be non-NULL. */ + gcc_assert ((loc_reader != NULL) == (ranges != NULL)); + + if (from < limit && *from == 'o') + { + from++; + extend_char_range (&char_range, loc_reader); + if (from == limit || *from != '{') + cpp_error (pfile, CPP_DL_ERROR, "'\\o' not followed by '{'"); + else + { + from++; + extend_char_range (&char_range, loc_reader); + delimited = true; + } + } + + while (from < limit && count++ < 3) + { + c = *from; + if (c < '0' || c > '7') + break; + from++; + extend_char_range (&char_range, loc_reader); + if (delimited) + { + count = 2; + overflow |= n ^ (n << 3 >> 3); + } + n = (n << 3) + c - '0'; + } + + if (delimited) + { + if (from < limit && *from == '}') + { + from++; + if (count == 1) + { + cpp_error (pfile, CPP_DL_ERROR, + "empty delimited escape sequence"); + return from; + } + else if (!CPP_OPTION (pfile, delimited_escape_seqs) + && CPP_OPTION (pfile, cpp_pedantic)) + cpp_error (pfile, CPP_DL_PEDWARN, + "delimited escape sequences are only valid in C++23"); + extend_char_range (&char_range, loc_reader); + } + else + { + cpp_error (pfile, CPP_DL_ERROR, + "'\\o{' not terminated with '}' after %.*s", + (int) (from - base), base); + return from; + } + } + + if (overflow | (n != (n & mask))) + { + cpp_error (pfile, CPP_DL_PEDWARN, + "octal escape sequence out of range"); + n &= mask; + } + + if (tbuf) + emit_numeric_escape (pfile, n, tbuf, cvt); + if (ranges) + ranges->add_range (char_range); + + return from; +} + +/* Convert an escape sequence (pointed to by FROM) to its value on + the target, and to the execution character set. Do not scan past + LIMIT. Write the converted value into TBUF, if TBUF is non-NULL. + Returns an advanced pointer. Handles all relevant diagnostics. + If LOC_READER is non-NULL, then RANGES must be non-NULL: location + information is read from *LOC_READER, and *RANGES is updated + accordingly. */ +static const uchar * +convert_escape (cpp_reader *pfile, const uchar *from, const uchar *limit, + struct _cpp_strbuf *tbuf, struct cset_converter cvt, + cpp_string_location_reader *loc_reader, + cpp_substring_ranges *ranges) +{ + /* Values of \a \b \e \f \n \r \t \v respectively. */ +#if HOST_CHARSET == HOST_CHARSET_ASCII + static const uchar charconsts[] = { 7, 8, 27, 12, 10, 13, 9, 11 }; +#elif HOST_CHARSET == HOST_CHARSET_EBCDIC + static const uchar charconsts[] = { 47, 22, 39, 12, 21, 13, 5, 11 }; +#else +#error "unknown host character set" +#endif + + uchar c; + + /* Record the location of the backslash. */ + source_range char_range; + if (loc_reader) + char_range = loc_reader->get_next (); + + c = *from; + switch (c) + { + /* UCNs, hex escapes, and octal escapes are processed separately. */ + case 'u': case 'U': case 'N': + return convert_ucn (pfile, from, limit, tbuf, cvt, + char_range, loc_reader, ranges); + + case 'x': + return convert_hex (pfile, from, limit, tbuf, cvt, + char_range, loc_reader, ranges); + + case '0': case '1': case '2': case '3': + case '4': case '5': case '6': case '7': + case 'o': + return convert_oct (pfile, from, limit, tbuf, cvt, + char_range, loc_reader, ranges); + + /* Various letter escapes. Get the appropriate host-charset + value into C. */ + case '\\': case '\'': case '"': case '?': break; + + case '(': case '{': case '[': case '%': + /* '\(', etc, can be used at the beginning of a line in a long + string split onto multiple lines with \-newline, to prevent + Emacs or other text editors from getting confused. '\%' can + be used to prevent SCCS from mangling printf format strings. */ + if (CPP_PEDANTIC (pfile)) + goto unknown; + break; + + case 'b': c = charconsts[1]; break; + case 'f': c = charconsts[3]; break; + case 'n': c = charconsts[4]; break; + case 'r': c = charconsts[5]; break; + case 't': c = charconsts[6]; break; + case 'v': c = charconsts[7]; break; + + case 'a': + if (CPP_WTRADITIONAL (pfile)) + cpp_warning (pfile, CPP_W_TRADITIONAL, + "the meaning of '\\a' is different in traditional C"); + c = charconsts[0]; + break; + + case 'e': case 'E': + if (CPP_PEDANTIC (pfile)) + cpp_error (pfile, CPP_DL_PEDWARN, + "non-ISO-standard escape sequence, '\\%c'", (int) c); + c = charconsts[2]; + break; + + default: + unknown: + if (ISGRAPH (c)) + cpp_error (pfile, CPP_DL_PEDWARN, + "unknown escape sequence: '\\%c'", (int) c); + else + { + encoding_rich_location rich_loc (pfile); + + /* diagnostic.cc does not support "%03o". When it does, this + code can use %03o directly in the diagnostic again. */ + char buf[32]; + sprintf(buf, "%03o", (int) c); + cpp_error_at (pfile, CPP_DL_PEDWARN, &rich_loc, + "unknown escape sequence: '\\%s'", buf); + } + } + + if (tbuf) + /* Now convert what we have to the execution character set. */ + if (!APPLY_CONVERSION (cvt, &c, 1, tbuf)) + cpp_errno (pfile, CPP_DL_ERROR, + "converting escape sequence to execution character set"); + + if (loc_reader) + { + char_range.m_finish = loc_reader->get_next ().m_finish; + ranges->add_range (char_range); + } + + return from + 1; +} + +/* TYPE is a token type. The return value is the conversion needed to + convert from source to execution character set for the given type. */ +static struct cset_converter +converter_for_type (cpp_reader *pfile, enum cpp_ttype type) +{ + switch (type) + { + default: + return pfile->narrow_cset_desc; + case CPP_UTF8CHAR: + case CPP_UTF8STRING: + return pfile->utf8_cset_desc; + case CPP_CHAR16: + case CPP_STRING16: + return pfile->char16_cset_desc; + case CPP_CHAR32: + case CPP_STRING32: + return pfile->char32_cset_desc; + case CPP_WCHAR: + case CPP_WSTRING: + return pfile->wide_cset_desc; + } +} + +/* FROM is an array of cpp_string structures of length COUNT. These + are to be converted from the source to the execution character set, + escape sequences translated, and finally all are to be + concatenated. WIDE indicates whether or not to produce a wide + string. If TO is non-NULL, the result is written into TO. + If LOC_READERS and OUT are non-NULL, then location information + is read from LOC_READERS (which must be an array of length COUNT), + and location information is written to *RANGES. + + Returns true for success, false for failure. */ + +static bool +cpp_interpret_string_1 (cpp_reader *pfile, const cpp_string *from, size_t count, + cpp_string *to, enum cpp_ttype type, + cpp_string_location_reader *loc_readers, + cpp_substring_ranges *out) +{ + struct _cpp_strbuf tbuf; + const uchar *p, *base, *limit; + size_t i; + struct cset_converter cvt = converter_for_type (pfile, type); + + /* loc_readers and out must either be both NULL, or both be non-NULL. */ + gcc_assert ((loc_readers != NULL) == (out != NULL)); + + if (to) + { + tbuf.asize = MAX (OUTBUF_BLOCK_SIZE, from->len); + tbuf.text = XNEWVEC (uchar, tbuf.asize); + tbuf.len = 0; + } + + cpp_string_location_reader *loc_reader = NULL; + for (i = 0; i < count; i++) + { + if (loc_readers) + loc_reader = &loc_readers[i]; + + p = from[i].text; + if (*p == 'u') + { + p++; + if (loc_reader) + loc_reader->get_next (); + if (*p == '8') + { + p++; + if (loc_reader) + loc_reader->get_next (); + } + } + else if (*p == 'L' || *p == 'U') p++; + if (*p == 'R') + { + const uchar *prefix; + + /* Skip over 'R"'. */ + p += 2; + if (loc_reader) + { + loc_reader->get_next (); + loc_reader->get_next (); + } + prefix = p; + while (*p != '(') + { + p++; + if (loc_reader) + loc_reader->get_next (); + } + p++; + if (loc_reader) + loc_reader->get_next (); + limit = from[i].text + from[i].len; + if (limit >= p + (p - prefix) + 1) + limit -= (p - prefix) + 1; + + /* Raw strings are all normal characters; these can be fed + directly to convert_cset. */ + if (to) + if (!APPLY_CONVERSION (cvt, p, limit - p, &tbuf)) + goto fail; + + if (loc_reader) + { + /* If generating source ranges, assume we have a 1:1 + correspondence between bytes in the source encoding and bytes + in the execution encoding (e.g. if we have a UTF-8 to UTF-8 + conversion), so that this run of bytes in the source file + corresponds to a run of bytes in the execution string. + This requirement is guaranteed by an early-reject in + cpp_interpret_string_ranges. */ + gcc_assert (cvt.func == convert_no_conversion); + out->add_n_ranges (limit - p, *loc_reader); + } + + continue; + } + + /* If we don't now have a leading quote, something has gone wrong. + This can occur if cpp_interpret_string_ranges is handling a + stringified macro argument, but should not be possible otherwise. */ + if (*p != '"' && *p != '\'') + { + gcc_assert (out != NULL); + cpp_error (pfile, CPP_DL_ERROR, "missing open quote"); + if (to) + free (tbuf.text); + return false; + } + + /* Skip leading quote. */ + p++; + if (loc_reader) + loc_reader->get_next (); + + limit = from[i].text + from[i].len - 1; /* Skip trailing quote. */ + + for (;;) + { + base = p; + while (p < limit && *p != '\\') + p++; + if (p > base) + { + /* We have a run of normal characters; these can be fed + directly to convert_cset. */ + if (to) + if (!APPLY_CONVERSION (cvt, base, p - base, &tbuf)) + goto fail; + /* Similar to above: assumes we have a 1:1 correspondence + between bytes in the source encoding and bytes in the + execution encoding. */ + if (loc_reader) + { + gcc_assert (cvt.func == convert_no_conversion); + out->add_n_ranges (p - base, *loc_reader); + } + } + if (p >= limit) + break; + + struct _cpp_strbuf *tbuf_ptr = to ? &tbuf : NULL; + p = convert_escape (pfile, p + 1, limit, tbuf_ptr, cvt, + loc_reader, out); + } + } + + if (to) + { + /* NUL-terminate the 'to' buffer and translate it to a cpp_string + structure. */ + emit_numeric_escape (pfile, 0, &tbuf, cvt); + tbuf.text = XRESIZEVEC (uchar, tbuf.text, tbuf.len); + to->text = tbuf.text; + to->len = tbuf.len; + } + /* Use the location of the trailing quote as the location of the + NUL-terminator. */ + if (loc_reader) + { + source_range range = loc_reader->get_next (); + out->add_range (range); + } + + return true; + + fail: + cpp_errno (pfile, CPP_DL_ERROR, "converting to execution character set"); + if (to) + free (tbuf.text); + return false; +} + +/* FROM is an array of cpp_string structures of length COUNT. These + are to be converted from the source to the execution character set, + escape sequences translated, and finally all are to be + concatenated. WIDE indicates whether or not to produce a wide + string. The result is written into TO. Returns true for success, + false for failure. */ +bool +cpp_interpret_string (cpp_reader *pfile, const cpp_string *from, size_t count, + cpp_string *to, enum cpp_ttype type) +{ + return cpp_interpret_string_1 (pfile, from, count, to, type, NULL, NULL); +} + +/* A "do nothing" diagnostic-handling callback for use by + cpp_interpret_string_ranges, so that it can temporarily suppress + diagnostic-handling. */ + +static bool +noop_diagnostic_cb (cpp_reader *, enum cpp_diagnostic_level, + enum cpp_warning_reason, rich_location *, + const char *, va_list *) +{ + /* no-op. */ + return true; +} + +/* This function mimics the behavior of cpp_interpret_string, but + rather than generating a string in the execution character set, + *OUT is written to with the source code ranges of the characters + in such a string. + FROM and LOC_READERS should both be arrays of length COUNT. + Returns NULL for success, or an error message for failure. */ + +const char * +cpp_interpret_string_ranges (cpp_reader *pfile, const cpp_string *from, + cpp_string_location_reader *loc_readers, + size_t count, + cpp_substring_ranges *out, + enum cpp_ttype type) +{ + /* There are a couple of cases in the range-handling in + cpp_interpret_string_1 that rely on there being a 1:1 correspondence + between bytes in the source encoding and bytes in the execution + encoding, so that each byte in the execution string can correspond + to the location of a byte in the source string. + + This holds for the typical case of a UTF-8 to UTF-8 conversion. + Enforce this requirement by only attempting to track substring + locations if we have source encoding == execution encoding. + + This is a stronger condition than we need, since we could e.g. + have ASCII to EBCDIC (with 1 byte per character before and after), + but it seems to be a reasonable restriction. */ + struct cset_converter cvt = converter_for_type (pfile, type); + if (cvt.func != convert_no_conversion) + return "execution character set != source character set"; + + /* For on-demand strings we have already lexed the strings, so there + should be no diagnostics. However, if we have bogus source location + data (or stringified macro arguments), the attempt to lex the + strings could fail with an diagnostic. Temporarily install an + diagnostic-handler to catch the diagnostic, so that it can lead to this call + failing, rather than being emitted as a user-visible diagnostic. + If an diagnostic does occur, we should see it via the return value of + cpp_interpret_string_1. */ + bool (*saved_diagnostic_handler) (cpp_reader *, enum cpp_diagnostic_level, + enum cpp_warning_reason, rich_location *, + const char *, va_list *) + ATTRIBUTE_FPTR_PRINTF(5,0); + + saved_diagnostic_handler = pfile->cb.diagnostic; + pfile->cb.diagnostic = noop_diagnostic_cb; + + bool result = cpp_interpret_string_1 (pfile, from, count, NULL, type, + loc_readers, out); + + /* Restore the saved diagnostic-handler. */ + pfile->cb.diagnostic = saved_diagnostic_handler; + + if (!result) + return "cpp_interpret_string_1 failed"; + + /* Success. */ + return NULL; +} + +/* Subroutine of do_line and do_linemarker. Convert escape sequences + in a string, but do not perform character set conversion. */ +bool +cpp_interpret_string_notranslate (cpp_reader *pfile, const cpp_string *from, + size_t count, cpp_string *to, + enum cpp_ttype type ATTRIBUTE_UNUSED) +{ + struct cset_converter save_narrow_cset_desc = pfile->narrow_cset_desc; + bool retval; + + pfile->narrow_cset_desc.func = convert_no_conversion; + pfile->narrow_cset_desc.cd = (iconv_t) -1; + pfile->narrow_cset_desc.width = CPP_OPTION (pfile, char_precision); + + retval = cpp_interpret_string (pfile, from, count, to, CPP_STRING); + + pfile->narrow_cset_desc = save_narrow_cset_desc; + return retval; +} + + +/* Subroutine of cpp_interpret_charconst which performs the conversion + to a number, for narrow strings. STR is the string structure returned + by cpp_interpret_string. PCHARS_SEEN and UNSIGNEDP are as for + cpp_interpret_charconst. TYPE is the token type. */ +static cppchar_t +narrow_str_to_charconst (cpp_reader *pfile, cpp_string str, + unsigned int *pchars_seen, int *unsignedp, + enum cpp_ttype type) +{ + size_t width = CPP_OPTION (pfile, char_precision); + size_t max_chars = CPP_OPTION (pfile, int_precision) / width; + size_t mask = width_to_mask (width); + size_t i; + cppchar_t result, c; + bool unsigned_p; + + /* The value of a multi-character character constant, or a + single-character character constant whose representation in the + execution character set is more than one byte long, is + implementation defined. This implementation defines it to be the + number formed by interpreting the byte sequence in memory as a + big-endian binary number. If overflow occurs, the high bytes are + lost, and a warning is issued. + + We don't want to process the NUL terminator handed back by + cpp_interpret_string. */ + result = 0; + for (i = 0; i < str.len - 1; i++) + { + c = str.text[i] & mask; + if (width < BITS_PER_CPPCHAR_T) + result = (result << width) | c; + else + result = c; + } + + if (type == CPP_UTF8CHAR) + max_chars = 1; + if (i > max_chars) + { + i = max_chars; + cpp_error (pfile, type == CPP_UTF8CHAR ? CPP_DL_ERROR : CPP_DL_WARNING, + "character constant too long for its type"); + } + else if (i > 1 && CPP_OPTION (pfile, warn_multichar)) + cpp_warning (pfile, CPP_W_MULTICHAR, "multi-character character constant"); + + /* Multichar constants are of type int and therefore signed. */ + if (i > 1) + unsigned_p = 0; + else if (type == CPP_UTF8CHAR) + unsigned_p = CPP_OPTION (pfile, unsigned_utf8char); + else + unsigned_p = CPP_OPTION (pfile, unsigned_char); + + /* Truncate the constant to its natural width, and simultaneously + sign- or zero-extend to the full width of cppchar_t. + For single-character constants, the value is WIDTH bits wide. + For multi-character constants, the value is INT_PRECISION bits wide. */ + if (i > 1) + width = CPP_OPTION (pfile, int_precision); + if (width < BITS_PER_CPPCHAR_T) + { + mask = ((cppchar_t) 1 << width) - 1; + if (unsigned_p || !(result & (1 << (width - 1)))) + result &= mask; + else + result |= ~mask; + } + *pchars_seen = i; + *unsignedp = unsigned_p; + return result; +} + +/* Subroutine of cpp_interpret_charconst which performs the conversion + to a number, for wide strings. STR is the string structure returned + by cpp_interpret_string. PCHARS_SEEN and UNSIGNEDP are as for + cpp_interpret_charconst. TYPE is the token type. */ +static cppchar_t +wide_str_to_charconst (cpp_reader *pfile, cpp_string str, + unsigned int *pchars_seen, int *unsignedp, + enum cpp_ttype type) +{ + bool bigend = CPP_OPTION (pfile, bytes_big_endian); + size_t width = converter_for_type (pfile, type).width; + size_t cwidth = CPP_OPTION (pfile, char_precision); + size_t mask = width_to_mask (width); + size_t cmask = width_to_mask (cwidth); + size_t nbwc = width / cwidth; + size_t off, i; + cppchar_t result = 0, c; + + if (str.len <= nbwc) + { + /* Error recovery, if no errors have been diagnosed previously, + there should be at least two wide characters. Empty literals + are diagnosed earlier and we can get just the zero terminator + only if there were errors diagnosed during conversion. */ + *pchars_seen = 0; + *unsignedp = 0; + return 0; + } + + /* This is finicky because the string is in the target's byte order, + which may not be our byte order. Only the last character, ignoring + the NUL terminator, is relevant. */ + off = str.len - (nbwc * 2); + result = 0; + for (i = 0; i < nbwc; i++) + { + c = bigend ? str.text[off + i] : str.text[off + nbwc - i - 1]; + result = (result << cwidth) | (c & cmask); + } + + /* Wide character constants have type wchar_t, and a single + character exactly fills a wchar_t, so a multi-character wide + character constant is guaranteed to overflow. */ + if (str.len > nbwc * 2) + cpp_error (pfile, (CPP_OPTION (pfile, cplusplus) + && (type == CPP_CHAR16 + || type == CPP_CHAR32 + /* In C++23 this is error even for L'ab'. */ + || (type == CPP_WCHAR + && CPP_OPTION (pfile, size_t_literals)))) + ? CPP_DL_ERROR : CPP_DL_WARNING, + "character constant too long for its type"); + + /* Truncate the constant to its natural width, and simultaneously + sign- or zero-extend to the full width of cppchar_t. */ + if (width < BITS_PER_CPPCHAR_T) + { + if (type == CPP_CHAR16 || type == CPP_CHAR32 + || CPP_OPTION (pfile, unsigned_wchar) + || !(result & (1 << (width - 1)))) + result &= mask; + else + result |= ~mask; + } + + if (type == CPP_CHAR16 || type == CPP_CHAR32 + || CPP_OPTION (pfile, unsigned_wchar)) + *unsignedp = 1; + else + *unsignedp = 0; + + *pchars_seen = 1; + return result; +} + +/* Interpret a (possibly wide) character constant in TOKEN. + PCHARS_SEEN points to a variable that is filled in with the number + of characters seen, and UNSIGNEDP to a variable that indicates + whether the result has signed type. */ +cppchar_t +cpp_interpret_charconst (cpp_reader *pfile, const cpp_token *token, + unsigned int *pchars_seen, int *unsignedp) +{ + cpp_string str = { 0, 0 }; + bool wide = (token->type != CPP_CHAR && token->type != CPP_UTF8CHAR); + int u8 = 2 * int(token->type == CPP_UTF8CHAR); + cppchar_t result; + + /* An empty constant will appear as L'', u'', U'', u8'', or '' */ + if (token->val.str.len == (size_t) (2 + wide + u8)) + { + cpp_error (pfile, CPP_DL_ERROR, "empty character constant"); + *pchars_seen = 0; + *unsignedp = 0; + return 0; + } + else if (!cpp_interpret_string (pfile, &token->val.str, 1, &str, + token->type)) + { + *pchars_seen = 0; + *unsignedp = 0; + return 0; + } + + if (wide) + result = wide_str_to_charconst (pfile, str, pchars_seen, unsignedp, + token->type); + else + result = narrow_str_to_charconst (pfile, str, pchars_seen, unsignedp, + token->type); + + if (str.text != token->val.str.text) + free ((void *)str.text); + + return result; +} + +/* Convert an identifier denoted by ID and LEN, which might contain + UCN escapes or UTF-8 multibyte chars, to the source character set, + either UTF-8 or UTF-EBCDIC. Assumes that the identifier is actually + a valid identifier. */ +cpp_hashnode * +_cpp_interpret_identifier (cpp_reader *pfile, const uchar *id, size_t len) +{ + /* It turns out that a UCN escape always turns into fewer characters + than the escape itself, so we can allocate a temporary in advance. */ + uchar * buf = (uchar *) alloca (len + 1); + uchar * bufp = buf; + size_t idp; + + for (idp = 0; idp < len; idp++) + if (id[idp] != '\\') + *bufp++ = id[idp]; + else + { + unsigned length = id[idp + 1] == 'u' ? 4 : 8; + cppchar_t value = 0; + size_t bufleft = len - (bufp - buf); + int rval; + bool delimited = false; + + idp += 2; + if (id[idp - 1] == 'N' && id[idp] == '{') + { + idp++; + const uchar *name = &id[idp]; + while (idp < len + && (ISIDNUM (id[idp]) || id[idp] == ' ' || id[idp] == '-')) + idp++; + if (id[idp] == '}') + { + value = _cpp_uname2c ((const char *) name, &id[idp] - name, + uname2c_tree, NULL); + if (value == (cppchar_t) -1) + value = 1; + } + else + idp--; + } + else + { + if (length == 4 && id[idp] == '{') + { + delimited = true; + idp++; + } + while (length && idp < len && ISXDIGIT (id[idp])) + { + value = (value << 4) + hex_value (id[idp]); + idp++; + if (!delimited) + length--; + } + if (!delimited || id[idp] != '}') + idp--; + } + + /* Special case for EBCDIC: if the identifier contains + a '$' specified using a UCN, translate it to EBCDIC. */ + if (value == 0x24) + { + *bufp++ = '$'; + continue; + } + + rval = one_cppchar_to_utf8 (value, &bufp, &bufleft); + if (rval) + { + errno = rval; + cpp_errno (pfile, CPP_DL_ERROR, + "converting UCN to source character set"); + break; + } + } + + return CPP_HASHNODE (ht_lookup (pfile->hash_table, + buf, bufp - buf, HT_ALLOC)); +} + + +/* Utility to strip a UTF-8 byte order marking from the beginning + of a buffer. Returns the number of bytes to skip, which currently + will be either 0 or 3. */ +int +cpp_check_utf8_bom (const char *data, size_t data_length) +{ + +#if HOST_CHARSET == HOST_CHARSET_ASCII + const unsigned char *udata = (const unsigned char *) data; + if (data_length >= 3 && udata[0] == 0xef && udata[1] == 0xbb + && udata[2] == 0xbf) + return 3; +#endif + + return 0; +} + + +/* Convert an input buffer (containing the complete contents of one + source file) from INPUT_CHARSET to the source character set. INPUT + points to the input buffer, SIZE is its allocated size, and LEN is + the length of the meaningful data within the buffer. The + translated buffer is returned, *ST_SIZE is set to the length of + the meaningful data within the translated buffer, and *BUFFER_START + is set to the start of the returned buffer. *BUFFER_START may + differ from the return value in the case of a BOM or other ignored + marker information. + + INPUT is expected to have been allocated with xmalloc. This + function will either set *BUFFER_START to INPUT, or free it and set + *BUFFER_START to a pointer to another xmalloc-allocated block of + memory. + + PFILE is only used to generate diagnostics; setting it to NULL suppresses + diagnostics, and causes a return of NULL if there was any error instead. */ + +uchar * +_cpp_convert_input (cpp_reader *pfile, const char *input_charset, + uchar *input, size_t size, size_t len, + const unsigned char **buffer_start, off_t *st_size) +{ + struct cset_converter input_cset; + struct _cpp_strbuf to; + unsigned char *buffer; + + input_cset = init_iconv_desc (pfile, SOURCE_CHARSET, input_charset); + if (input_cset.func == convert_no_conversion) + { + to.text = input; + to.asize = size; + to.len = len; + } + else + { + to.asize = MAX (65536, len); + to.text = XNEWVEC (uchar, to.asize); + to.len = 0; + + const bool ok = APPLY_CONVERSION (input_cset, input, len, &to); + free (input); + + /* Clean up the mess. */ + if (input_cset.func == convert_using_iconv) + iconv_close (input_cset.cd); + + /* Handle conversion failure. */ + if (!ok) + { + if (!pfile) + { + XDELETEVEC (to.text); + *buffer_start = NULL; + *st_size = 0; + return NULL; + } + cpp_error (pfile, CPP_DL_ERROR, "failure to convert %s to %s", + input_charset, SOURCE_CHARSET); + } + } + + /* Resize buffer if we allocated substantially too much, or if we + haven't enough space for the \n-terminator or following + 15 bytes of padding (used to quiet warnings from valgrind or + Address Sanitizer, when the optimized lexer accesses aligned + 16-byte memory chunks, including the bytes after the malloced, + area, and stops lexing on '\n'). */ + if (to.len + 4096 < to.asize || to.len + 16 > to.asize) + to.text = XRESIZEVEC (uchar, to.text, to.len + 16); + + memset (to.text + to.len, '\0', 16); + + /* If the file is using old-school Mac line endings (\r only), + terminate with another \r, not an \n, so that we do not mistake + the \r\n sequence for a single DOS line ending and erroneously + issue the "No newline at end of file" diagnostic. */ + if (to.len && to.text[to.len - 1] == '\r') + to.text[to.len] = '\r'; + else + to.text[to.len] = '\n'; + + buffer = to.text; + *st_size = to.len; + + /* Ignore a UTF-8 BOM if we see one and the source charset is UTF-8. Note + that glib'c UTF-8 iconv() provider (as of glibc 2.7) does not ignore a + BOM -- however, even if it did, we would still need this code due + to the 'convert_no_conversion' case. */ + const int bom_len = cpp_check_utf8_bom ((const char *) to.text, to.len); + *st_size -= bom_len; + buffer += bom_len; + + *buffer_start = to.text; + return buffer; +} + +/* Decide on the default encoding to assume for input files. */ +const char * +_cpp_default_encoding (void) +{ + const char *current_encoding = NULL; + + /* We disable this because the default codeset is 7-bit ASCII on + most platforms, and this causes conversion failures on every + file in GCC that happens to have one of the upper 128 characters + in it -- most likely, as part of the name of a contributor. + We should definitely recognize in-band markers of file encoding, + like: + - the appropriate Unicode byte-order mark (FE FF) to recognize + UTF16 and UCS4 (in both big-endian and little-endian flavors) + and UTF8 + - a "#i", "#d", "/ *", "//", " #p" or "#p" (for #pragma) to + distinguish ASCII and EBCDIC. + - now we can parse something like "#pragma GCC encoding + on the first line, or even Emacs/VIM's mode line tags (there's + a problem here in that VIM uses the last line, and Emacs has + its more elaborate "local variables" convention). + - investigate whether Java has another common convention, which + would be friendly to support. + (Zack Weinberg and Paolo Bonzini, May 20th 2004) */ +#if defined (HAVE_LOCALE_H) && defined (HAVE_LANGINFO_CODESET) && 0 + setlocale (LC_CTYPE, ""); + current_encoding = nl_langinfo (CODESET); +#endif + if (current_encoding == NULL || *current_encoding == '\0') + current_encoding = SOURCE_CHARSET; + + return current_encoding; +} + +/* Check if the configured input charset requires no conversion, other than + possibly stripping a UTF-8 BOM. */ +bool cpp_input_conversion_is_trivial (const char *input_charset) +{ + return !strcasecmp (input_charset, SOURCE_CHARSET); +} + +/* Implementation of class cpp_string_location_reader. */ + +/* Constructor for cpp_string_location_reader. */ + +cpp_string_location_reader:: +cpp_string_location_reader (location_t src_loc, + line_maps *line_table) +{ + src_loc = get_range_from_loc (line_table, src_loc).m_start; + + /* SRC_LOC might be a macro location. It only makes sense to do + column-by-column calculations on ordinary maps, so get the + corresponding location in an ordinary map. */ + m_loc + = linemap_resolve_location (line_table, src_loc, + LRK_SPELLING_LOCATION, NULL); + + const line_map_ordinary *map + = linemap_check_ordinary (linemap_lookup (line_table, m_loc)); + m_offset_per_column = (1 << map->m_range_bits); +} + +/* Get the range of the next source byte. */ + +source_range +cpp_string_location_reader::get_next () +{ + source_range result; + result.m_start = m_loc; + result.m_finish = m_loc; + if (m_loc <= LINE_MAP_MAX_LOCATION_WITH_COLS) + m_loc += m_offset_per_column; + return result; +} + +cpp_display_width_computation:: +cpp_display_width_computation (const char *data, int data_length, + const cpp_char_column_policy &policy) : + m_begin (data), + m_next (m_begin), + m_bytes_left (data_length), + m_policy (policy), + m_display_cols (0) +{ + gcc_assert (policy.m_tabstop > 0); + gcc_assert (policy.m_width_cb); +} + + +/* The main implementation function for class cpp_display_width_computation. + m_next points on entry to the start of the UTF-8 encoding of the next + character, and is updated to point just after the last byte of the encoding. + m_bytes_left contains on entry the remaining size of the buffer into which + m_next points, and this is also updated accordingly. If m_next does not + point to a valid UTF-8-encoded sequence, then it will be treated as a single + byte with display width 1. m_cur_display_col is the current display column, + relative to which tab stops should be expanded. Returns the display width of + the codepoint just processed. + If OUT is non-NULL, it is populated. */ + +int +cpp_display_width_computation::process_next_codepoint (cpp_decoded_char *out) +{ + cppchar_t c; + int next_width; + + if (out) + out->m_start_byte = m_next; + + if (*m_next == '\t') + { + ++m_next; + --m_bytes_left; + next_width = m_policy.m_tabstop - (m_display_cols % m_policy.m_tabstop); + if (out) + { + out->m_ch = '\t'; + out->m_valid_ch = true; + } + } + else if (one_utf8_to_cppchar ((const uchar **) &m_next, &m_bytes_left, &c) + != 0) + { + /* Input is not convertible to UTF-8. This could be fine, e.g. in a + string literal, so don't complain. Just treat it as if it has a width + of one. */ + ++m_next; + --m_bytes_left; + next_width = m_policy.m_undecoded_byte_width; + if (out) + out->m_valid_ch = false; + } + else + { + /* one_utf8_to_cppchar() has updated m_next and m_bytes_left for us. */ + next_width = m_policy.m_width_cb (c); + if (out) + { + out->m_ch = c; + out->m_valid_ch = true; + } + } + + if (out) + out->m_next_byte = m_next; + + m_display_cols += next_width; + return next_width; +} + +/* Utility to advance the byte stream by the minimum amount needed to consume + N display columns. Returns the number of display columns that were + actually skipped. This could be less than N, if there was not enough data, + or more than N, if the last character to be skipped had a sufficiently large + display width. */ +int +cpp_display_width_computation::advance_display_cols (int n) +{ + const int start = m_display_cols; + const int target = start + n; + while (m_display_cols < target && !done ()) + process_next_codepoint (NULL); + return m_display_cols - start; +} + +/* For the string of length DATA_LENGTH bytes that begins at DATA, compute + how many display columns are occupied by the first COLUMN bytes. COLUMN + may exceed DATA_LENGTH, in which case the phantom bytes at the end are + treated as if they have display width 1. Tabs are expanded to the next tab + stop, relative to the start of DATA, and non-printable-ASCII characters + will be escaped as per POLICY. */ + +int +cpp_byte_column_to_display_column (const char *data, int data_length, + int column, + const cpp_char_column_policy &policy) +{ + const int offset = MAX (0, column - data_length); + cpp_display_width_computation dw (data, column - offset, policy); + while (!dw.done ()) + dw.process_next_codepoint (NULL); + return dw.display_cols_processed () + offset; +} + +/* For the string of length DATA_LENGTH bytes that begins at DATA, compute + the least number of bytes that will result in at least DISPLAY_COL display + columns. The return value may exceed DATA_LENGTH if the entire string does + not occupy enough display columns. Non-printable-ASCII characters + will be escaped as per POLICY. */ + +int +cpp_display_column_to_byte_column (const char *data, int data_length, + int display_col, + const cpp_char_column_policy &policy) +{ + cpp_display_width_computation dw (data, data_length, policy); + const int avail_display = dw.advance_display_cols (display_col); + return dw.bytes_processed () + MAX (0, display_col - avail_display); +} + +/* Our own version of wcwidth(). We don't use the actual wcwidth() in glibc, + because that will inspect the user's locale, and in particular in an ASCII + locale, it will not return anything useful for extended characters. But GCC + in other respects (see e.g. _cpp_default_encoding()) behaves as if + everything is UTF-8. We also make some tweaks that are useful for the way + GCC needs to use this data, e.g. tabs and other control characters should be + treated as having width 1. The lookup tables are generated from + contrib/unicode/gen_wcwidth.py and were made by simply calling glibc + wcwidth() on all codepoints, then applying the small tweaks. These tables + are not highly optimized, but for the present purpose of outputting + diagnostics, they are sufficient. */ + +#include "generated_cpp_wcwidth.h" +int cpp_wcwidth (cppchar_t c) +{ + if (__builtin_expect (c <= wcwidth_range_ends[0], true)) + return wcwidth_widths[0]; + + /* Binary search the tables. */ + int begin = 1; + static const int end + = sizeof wcwidth_range_ends / sizeof (*wcwidth_range_ends); + int len = end - begin; + do + { + int half = len/2; + int middle = begin + half; + if (c > wcwidth_range_ends[middle]) + { + begin = middle + 1; + len -= half + 1; + } + else + len = half; + } while (len); + + if (__builtin_expect (begin != end, true)) + return wcwidth_widths[begin]; + return 1; +} diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-base-selected/libcpp/directives.cc b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-base-selected/libcpp/directives.cc new file mode 100644 index 0000000000..1fdd73edcb --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-base-selected/libcpp/directives.cc @@ -0,0 +1,2819 @@ +/* CPP Library. (Directive handling.) + Copyright (C) 1986-2023 Free Software Foundation, Inc. + Contributed by Per Bothner, 1994-95. + Based on CCCP program by Paul Rubin, June 1986 + Adapted to ANSI C, Richard Stallman, Jan 1987 + +This program is free software; you can redistribute it and/or modify it +under the terms of the GNU General Public License as published by the +Free Software Foundation; either version 3, or (at your option) any +later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; see the file COPYING3. If not see +. */ + +#include "config.h" +#include "system.h" +#include "cpplib.h" +#include "internal.h" +#include "mkdeps.h" +#include "obstack.h" + +/* Stack of conditionals currently in progress + (including both successful and failing conditionals). */ +struct if_stack +{ + struct if_stack *next; + location_t line; /* Line where condition started. */ + const cpp_hashnode *mi_cmacro;/* macro name for #ifndef around entire file */ + bool skip_elses; /* Can future #else / #elif be skipped? */ + bool was_skipping; /* If were skipping on entry. */ + int type; /* Most recent conditional for diagnostics. */ +}; + +/* Contains a registered pragma or pragma namespace. */ +typedef void (*pragma_cb) (cpp_reader *); +struct pragma_entry +{ + struct pragma_entry *next; + const cpp_hashnode *pragma; /* Name and length. */ + bool is_nspace; + bool is_internal; + bool is_deferred; + bool allow_expansion; + union { + pragma_cb handler; + struct pragma_entry *space; + unsigned int ident; + } u; +}; + +/* Values for the origin field of struct directive. KANDR directives + come from traditional (K&R) C. STDC89 directives come from the + 1989 C standard. STDC2X directives come from the C2X standard. EXTENSION + directives are extensions. */ +#define KANDR 0 +#define STDC89 1 +#define STDC2X 2 +#define EXTENSION 3 + +/* Values for the flags field of struct directive. COND indicates a + conditional; IF_COND an opening conditional. INCL means to treat + "..." and <...> as q-char and h-char sequences respectively. IN_I + means this directive should be handled even if -fpreprocessed is in + effect (these are the directives with callback hooks). + + EXPAND is set on directives that are always macro-expanded. + + ELIFDEF is set on directives that are only handled for standards with the + #elifdef / #elifndef feature. */ +#define COND (1 << 0) +#define IF_COND (1 << 1) +#define INCL (1 << 2) +#define IN_I (1 << 3) +#define EXPAND (1 << 4) +#define DEPRECATED (1 << 5) +#define ELIFDEF (1 << 6) + +/* Defines one #-directive, including how to handle it. */ +typedef void (*directive_handler) (cpp_reader *); +typedef struct directive directive; +struct directive +{ + directive_handler handler; /* Function to handle directive. */ + const uchar *name; /* Name of directive. */ + unsigned short length; /* Length of name. */ + unsigned char origin; /* Origin of directive. */ + unsigned char flags; /* Flags describing this directive. */ +}; + +/* Forward declarations. */ + +static void skip_rest_of_line (cpp_reader *); +static void check_eol (cpp_reader *, bool); +static void start_directive (cpp_reader *); +static void prepare_directive_trad (cpp_reader *); +static void end_directive (cpp_reader *, int); +static void directive_diagnostics (cpp_reader *, const directive *, int); +static void run_directive (cpp_reader *, int, const char *, size_t); +static char *glue_header_name (cpp_reader *); +static const char *parse_include (cpp_reader *, int *, const cpp_token ***, + location_t *); +static void push_conditional (cpp_reader *, int, int, const cpp_hashnode *); +static unsigned int read_flag (cpp_reader *, unsigned int); +static bool strtolinenum (const uchar *, size_t, linenum_type *, bool *); +static void do_diagnostic (cpp_reader *, enum cpp_diagnostic_level code, + enum cpp_warning_reason reason, int); +static cpp_hashnode *lex_macro_node (cpp_reader *, bool); +static int undefine_macros (cpp_reader *, cpp_hashnode *, void *); +static void do_include_common (cpp_reader *, enum include_type); +static struct pragma_entry *lookup_pragma_entry (struct pragma_entry *, + const cpp_hashnode *); +static int count_registered_pragmas (struct pragma_entry *); +static char ** save_registered_pragmas (struct pragma_entry *, char **); +static char ** restore_registered_pragmas (cpp_reader *, struct pragma_entry *, + char **); +static void do_pragma_once (cpp_reader *); +static void do_pragma_poison (cpp_reader *); +static void do_pragma_system_header (cpp_reader *); +static void do_pragma_dependency (cpp_reader *); +static void do_pragma_warning_or_error (cpp_reader *, bool error); +static void do_pragma_warning (cpp_reader *); +static void do_pragma_error (cpp_reader *); +static void do_linemarker (cpp_reader *); +static const cpp_token *get_token_no_padding (cpp_reader *); +static const cpp_token *get__Pragma_string (cpp_reader *); +static void destringize_and_run (cpp_reader *, const cpp_string *, + location_t); +static bool parse_answer (cpp_reader *, int, location_t, cpp_macro **); +static cpp_hashnode *parse_assertion (cpp_reader *, int, cpp_macro **); +static cpp_macro **find_answer (cpp_hashnode *, const cpp_macro *); +static void handle_assertion (cpp_reader *, const char *, int); +static void do_pragma_push_macro (cpp_reader *); +static void do_pragma_pop_macro (cpp_reader *); +static void cpp_pop_definition (cpp_reader *, struct def_pragma_macro *); + +/* This is the table of directive handlers. All extensions other than + #warning, #include_next, and #import are deprecated. The name is + where the extension appears to have come from. */ + +#define DIRECTIVE_TABLE \ + D(define, T_DEFINE = 0, KANDR, IN_I) \ + D(include, T_INCLUDE, KANDR, INCL | EXPAND) \ + D(endif, T_ENDIF, KANDR, COND) \ + D(ifdef, T_IFDEF, KANDR, COND | IF_COND) \ + D(if, T_IF, KANDR, COND | IF_COND | EXPAND) \ + D(else, T_ELSE, KANDR, COND) \ + D(ifndef, T_IFNDEF, KANDR, COND | IF_COND) \ + D(undef, T_UNDEF, KANDR, IN_I) \ + D(line, T_LINE, KANDR, EXPAND) \ + D(elif, T_ELIF, STDC89, COND | EXPAND) \ + D(elifdef, T_ELIFDEF, STDC2X, COND | ELIFDEF) \ + D(elifndef, T_ELIFNDEF, STDC2X, COND | ELIFDEF) \ + D(error, T_ERROR, STDC89, 0) \ + D(pragma, T_PRAGMA, STDC89, IN_I) \ + D(warning, T_WARNING, STDC2X, 0) \ + D(include_next, T_INCLUDE_NEXT, EXTENSION, INCL | EXPAND) \ + D(ident, T_IDENT, EXTENSION, IN_I) \ + D(import, T_IMPORT, EXTENSION, INCL | EXPAND) /* ObjC */ \ + D(assert, T_ASSERT, EXTENSION, DEPRECATED) /* SVR4 */ \ + D(unassert, T_UNASSERT, EXTENSION, DEPRECATED) /* SVR4 */ \ + D(sccs, T_SCCS, EXTENSION, IN_I) /* SVR4? */ + +/* #sccs is synonymous with #ident. */ +#define do_sccs do_ident + +/* Use the table to generate a series of prototypes, an enum for the + directive names, and an array of directive handlers. */ + +#define D(name, t, o, f) static void do_##name (cpp_reader *); +DIRECTIVE_TABLE +#undef D + +#define D(n, tag, o, f) tag, +enum +{ + DIRECTIVE_TABLE + N_DIRECTIVES +}; +#undef D + +#define D(name, t, origin, flags) \ +{ do_##name, (const uchar *) #name, \ + sizeof #name - 1, origin, flags }, +static const directive dtable[] = +{ +DIRECTIVE_TABLE +}; +#undef D + +/* A NULL-terminated array of directive names for use + when suggesting corrections for misspelled directives. */ +#define D(name, t, origin, flags) #name, +static const char * const directive_names[] = { +DIRECTIVE_TABLE + NULL +}; +#undef D + +#undef DIRECTIVE_TABLE + +/* Wrapper struct directive for linemarkers. + The origin is more or less true - the original K+R cpp + did use this notation in its preprocessed output. */ +static const directive linemarker_dir = +{ + do_linemarker, UC"#", 1, KANDR, IN_I +}; + +/* Skip any remaining tokens in a directive. */ +static void +skip_rest_of_line (cpp_reader *pfile) +{ + /* Discard all stacked contexts. */ + while (pfile->context->prev) + _cpp_pop_context (pfile); + + /* Sweep up all tokens remaining on the line. */ + if (! SEEN_EOL ()) + while (_cpp_lex_token (pfile)->type != CPP_EOF) + ; +} + +/* Helper function for check_oel. */ + +static void +check_eol_1 (cpp_reader *pfile, bool expand, enum cpp_warning_reason reason) +{ + if (! SEEN_EOL () && (expand + ? cpp_get_token (pfile) + : _cpp_lex_token (pfile))->type != CPP_EOF) + cpp_pedwarning (pfile, reason, "extra tokens at end of #%s directive", + pfile->directive->name); +} + +/* Variant of check_eol used for Wendif-labels warnings. */ + +static void +check_eol_endif_labels (cpp_reader *pfile) +{ + check_eol_1 (pfile, false, CPP_W_ENDIF_LABELS); +} + +/* Ensure there are no stray tokens at the end of a directive. If + EXPAND is true, tokens macro-expanding to nothing are allowed. */ + +static void +check_eol (cpp_reader *pfile, bool expand) +{ + check_eol_1 (pfile, expand, CPP_W_NONE); +} + +/* Ensure there are no stray tokens other than comments at the end of + a directive, and gather the comments. */ +static const cpp_token ** +check_eol_return_comments (cpp_reader *pfile) +{ + size_t c; + size_t capacity = 8; + const cpp_token **buf; + + buf = XNEWVEC (const cpp_token *, capacity); + c = 0; + if (! SEEN_EOL ()) + { + while (1) + { + const cpp_token *tok; + + tok = _cpp_lex_token (pfile); + if (tok->type == CPP_EOF) + break; + if (tok->type != CPP_COMMENT) + cpp_error (pfile, CPP_DL_PEDWARN, + "extra tokens at end of #%s directive", + pfile->directive->name); + else + { + if (c + 1 >= capacity) + { + capacity *= 2; + buf = XRESIZEVEC (const cpp_token *, buf, capacity); + } + buf[c] = tok; + ++c; + } + } + } + buf[c] = NULL; + return buf; +} + +/* Called when entering a directive, _Pragma or command-line directive. */ +static void +start_directive (cpp_reader *pfile) +{ + /* Setup in-directive state. */ + pfile->state.in_directive = 1; + pfile->state.save_comments = 0; + pfile->directive_result.type = CPP_PADDING; + + /* Some handlers need the position of the # for diagnostics. */ + pfile->directive_line = pfile->line_table->highest_line; +} + +/* Called when leaving a directive, _Pragma or command-line directive. */ +static void +end_directive (cpp_reader *pfile, int skip_line) +{ + if (CPP_OPTION (pfile, traditional)) + { + /* Revert change of prepare_directive_trad. */ + if (!pfile->state.in_deferred_pragma) + pfile->state.prevent_expansion--; + + if (pfile->directive != &dtable[T_DEFINE]) + _cpp_remove_overlay (pfile); + } + else if (pfile->state.in_deferred_pragma) + ; + /* We don't skip for an assembler #. */ + else if (skip_line) + { + skip_rest_of_line (pfile); + if (!pfile->keep_tokens) + { + pfile->cur_run = &pfile->base_run; + pfile->cur_token = pfile->base_run.base; + } + } + + /* Restore state. */ + pfile->state.save_comments = ! CPP_OPTION (pfile, discard_comments); + pfile->state.in_directive = 0; + pfile->state.in_expression = 0; + pfile->state.angled_headers = 0; + pfile->directive = 0; +} + +/* Prepare to handle the directive in pfile->directive. */ +static void +prepare_directive_trad (cpp_reader *pfile) +{ + if (pfile->directive != &dtable[T_DEFINE]) + { + bool no_expand = (pfile->directive + && ! (pfile->directive->flags & EXPAND)); + bool was_skipping = pfile->state.skipping; + + pfile->state.in_expression = (pfile->directive == &dtable[T_IF] + || pfile->directive == &dtable[T_ELIF]); + if (pfile->state.in_expression) + pfile->state.skipping = false; + + if (no_expand) + pfile->state.prevent_expansion++; + _cpp_scan_out_logical_line (pfile, NULL, false); + if (no_expand) + pfile->state.prevent_expansion--; + + pfile->state.skipping = was_skipping; + _cpp_overlay_buffer (pfile, pfile->out.base, + pfile->out.cur - pfile->out.base); + } + + /* Stop ISO C from expanding anything. */ + pfile->state.prevent_expansion++; +} + +/* Output diagnostics for a directive DIR. INDENTED is nonzero if + the '#' was indented. */ +static void +directive_diagnostics (cpp_reader *pfile, const directive *dir, int indented) +{ + /* Issue -pedantic or deprecated warnings for extensions. We let + -pedantic take precedence if both are applicable. */ + if (! pfile->state.skipping) + { + if (dir->origin == EXTENSION + && !(dir == &dtable[T_IMPORT] && CPP_OPTION (pfile, objc)) + && CPP_PEDANTIC (pfile)) + cpp_error (pfile, CPP_DL_PEDWARN, "#%s is a GCC extension", dir->name); + else if (dir == &dtable[T_WARNING]) + { + if (CPP_PEDANTIC (pfile) && !CPP_OPTION (pfile, warning_directive)) + { + if (CPP_OPTION (pfile, cplusplus)) + cpp_error (pfile, CPP_DL_PEDWARN, + "#%s before C++23 is a GCC extension", dir->name); + else + cpp_error (pfile, CPP_DL_PEDWARN, + "#%s before C2X is a GCC extension", dir->name); + } + else if (CPP_OPTION (pfile, cpp_warn_c11_c2x_compat) > 0) + cpp_warning (pfile, CPP_W_C11_C2X_COMPAT, + "#%s before C2X is a GCC extension", dir->name); + } + else if (((dir->flags & DEPRECATED) != 0 + || (dir == &dtable[T_IMPORT] && !CPP_OPTION (pfile, objc))) + && CPP_OPTION (pfile, cpp_warn_deprecated)) + cpp_warning (pfile, CPP_W_DEPRECATED, + "#%s is a deprecated GCC extension", dir->name); + } + + /* Traditionally, a directive is ignored unless its # is in + column 1. Therefore in code intended to work with K+R + compilers, directives added by C89 must have their # + indented, and directives present in traditional C must not. + This is true even of directives in skipped conditional + blocks. #elif cannot be used at all. */ + if (CPP_WTRADITIONAL (pfile)) + { + if (dir == &dtable[T_ELIF]) + cpp_warning (pfile, CPP_W_TRADITIONAL, + "suggest not using #elif in traditional C"); + else if (indented && dir->origin == KANDR) + cpp_warning (pfile, CPP_W_TRADITIONAL, + "traditional C ignores #%s with the # indented", + dir->name); + else if (!indented && dir->origin != KANDR) + cpp_warning (pfile, CPP_W_TRADITIONAL, + "suggest hiding #%s from traditional C with an indented #", + dir->name); + } +} + +/* Check if we have a known directive. INDENTED is true if the + '#' of the directive was indented. This function is in this file + to save unnecessarily exporting dtable etc. to lex.cc. Returns + nonzero if the line of tokens has been handled, zero if we should + continue processing the line. */ +int +_cpp_handle_directive (cpp_reader *pfile, bool indented) +{ + const directive *dir = 0; + const cpp_token *dname; + bool was_parsing_args = pfile->state.parsing_args; + bool was_discarding_output = pfile->state.discarding_output; + int skip = 1; + + if (was_discarding_output) + pfile->state.prevent_expansion = 0; + + if (was_parsing_args) + { + if (CPP_OPTION (pfile, cpp_pedantic)) + cpp_error (pfile, CPP_DL_PEDWARN, + "embedding a directive within macro arguments is not portable"); + pfile->state.parsing_args = 0; + pfile->state.prevent_expansion = 0; + } + start_directive (pfile); + dname = _cpp_lex_token (pfile); + + if (dname->type == CPP_NAME) + { + if (dname->val.node.node->is_directive) + { + dir = &dtable[dname->val.node.node->directive_index]; + if ((dir->flags & ELIFDEF) + && !CPP_OPTION (pfile, elifdef) + /* For -std=gnu* modes elifdef is supported with + a pedwarn if pedantic. */ + && CPP_OPTION (pfile, std)) + dir = 0; + } + } + /* We do not recognize the # followed by a number extension in + assembler code. */ + else if (dname->type == CPP_NUMBER && CPP_OPTION (pfile, lang) != CLK_ASM) + { + dir = &linemarker_dir; + if (CPP_PEDANTIC (pfile) && ! CPP_OPTION (pfile, preprocessed) + && ! pfile->state.skipping) + cpp_error (pfile, CPP_DL_PEDWARN, + "style of line directive is a GCC extension"); + } + + if (dir) + { + /* If we have a directive that is not an opening conditional, + invalidate any control macro. */ + if (! (dir->flags & IF_COND)) + pfile->mi_valid = false; + + /* Kluge alert. In order to be sure that code like this + + #define HASH # + HASH define foo bar + + does not cause '#define foo bar' to get executed when + compiled with -save-temps, we recognize directives in + -fpreprocessed mode only if the # is in column 1. macro.cc + puts a space in front of any '#' at the start of a macro. + + We exclude the -fdirectives-only case because macro expansion + has not been performed yet, and block comments can cause spaces + to precede the directive. */ + if (CPP_OPTION (pfile, preprocessed) + && !CPP_OPTION (pfile, directives_only) + && (indented || !(dir->flags & IN_I))) + { + skip = 0; + dir = 0; + } + else + { + /* In failed conditional groups, all non-conditional + directives are ignored. Before doing that, whether + skipping or not, we should lex angle-bracketed headers + correctly, and maybe output some diagnostics. */ + pfile->state.angled_headers = dir->flags & INCL; + pfile->state.directive_wants_padding = dir->flags & INCL; + if (! CPP_OPTION (pfile, preprocessed)) + directive_diagnostics (pfile, dir, indented); + if (pfile->state.skipping && !(dir->flags & COND)) + dir = 0; + } + } + else if (dname->type == CPP_EOF) + ; /* CPP_EOF is the "null directive". */ + else + { + /* An unknown directive. Don't complain about it in assembly + source: we don't know where the comments are, and # may + introduce assembler pseudo-ops. Don't complain about invalid + directives in skipped conditional groups (6.10 p4). */ + if (CPP_OPTION (pfile, lang) == CLK_ASM) + skip = 0; + else if (!pfile->state.skipping) + { + const char *unrecognized + = (const char *)cpp_token_as_text (pfile, dname); + const char *hint = NULL; + + /* Call back into gcc to get a spelling suggestion. Ideally + we'd just use best_match from gcc/spellcheck.h (and filter + out the uncommon directives), but that requires moving it + to a support library. */ + if (pfile->cb.get_suggestion) + hint = pfile->cb.get_suggestion (pfile, unrecognized, + directive_names); + + if (hint) + { + rich_location richloc (pfile->line_table, dname->src_loc); + source_range misspelled_token_range + = get_range_from_loc (pfile->line_table, dname->src_loc); + richloc.add_fixit_replace (misspelled_token_range, hint); + cpp_error_at (pfile, CPP_DL_ERROR, &richloc, + "invalid preprocessing directive #%s;" + " did you mean #%s?", + unrecognized, hint); + } + else + cpp_error (pfile, CPP_DL_ERROR, + "invalid preprocessing directive #%s", + unrecognized); + } + } + + pfile->directive = dir; + if (CPP_OPTION (pfile, traditional)) + prepare_directive_trad (pfile); + + if (dir) + pfile->directive->handler (pfile); + else if (skip == 0) + _cpp_backup_tokens (pfile, 1); + + end_directive (pfile, skip); + if (was_parsing_args && !pfile->state.in_deferred_pragma) + { + /* Restore state when within macro args. */ + pfile->state.parsing_args = 2; + pfile->state.prevent_expansion = 1; + } + if (was_discarding_output) + pfile->state.prevent_expansion = 1; + return skip; +} + +/* Directive handler wrapper used by the command line option + processor. BUF is \n terminated. */ +static void +run_directive (cpp_reader *pfile, int dir_no, const char *buf, size_t count) +{ + cpp_push_buffer (pfile, (const uchar *) buf, count, + /* from_stage3 */ true); + start_directive (pfile); + + /* This is a short-term fix to prevent a leading '#' being + interpreted as a directive. */ + _cpp_clean_line (pfile); + + pfile->directive = &dtable[dir_no]; + if (CPP_OPTION (pfile, traditional)) + prepare_directive_trad (pfile); + pfile->directive->handler (pfile); + end_directive (pfile, 1); + _cpp_pop_buffer (pfile); +} + +/* Checks for validity the macro name in #define, #undef, #ifdef and + #ifndef directives. IS_DEF_OR_UNDEF is true if this call is + processing a #define or #undefine directive, and false + otherwise. */ +static cpp_hashnode * +lex_macro_node (cpp_reader *pfile, bool is_def_or_undef) +{ + const cpp_token *token = _cpp_lex_token (pfile); + + /* The token immediately after #define must be an identifier. That + identifier may not be "defined", per C99 6.10.8p4. + In C++, it may not be any of the "named operators" either, + per C++98 [lex.digraph], [lex.key]. + Finally, the identifier may not have been poisoned. (In that case + the lexer has issued the error message for us.) */ + + if (token->type == CPP_NAME) + { + cpp_hashnode *node = token->val.node.node; + + if (is_def_or_undef + && node == pfile->spec_nodes.n_defined) + cpp_error (pfile, CPP_DL_ERROR, + "\"%s\" cannot be used as a macro name", + NODE_NAME (node)); + else if (! (node->flags & NODE_POISONED)) + return node; + } + else if (token->flags & NAMED_OP) + cpp_error (pfile, CPP_DL_ERROR, + "\"%s\" cannot be used as a macro name as it is an operator in C++", + NODE_NAME (token->val.node.node)); + else if (token->type == CPP_EOF) + cpp_error (pfile, CPP_DL_ERROR, "no macro name given in #%s directive", + pfile->directive->name); + else + cpp_error (pfile, CPP_DL_ERROR, "macro names must be identifiers"); + + return NULL; +} + +/* Process a #define directive. Most work is done in macro.cc. */ +static void +do_define (cpp_reader *pfile) +{ + cpp_hashnode *node = lex_macro_node (pfile, true); + + if (node) + { + /* If we have been requested to expand comments into macros, + then re-enable saving of comments. */ + pfile->state.save_comments = + ! CPP_OPTION (pfile, discard_comments_in_macro_exp); + + if (pfile->cb.before_define) + pfile->cb.before_define (pfile); + + if (_cpp_create_definition (pfile, node)) + if (pfile->cb.define) + pfile->cb.define (pfile, pfile->directive_line, node); + + node->flags &= ~NODE_USED; + } +} + +/* Handle #undef. Mark the identifier NT_VOID in the hash table. */ +static void +do_undef (cpp_reader *pfile) +{ + cpp_hashnode *node = lex_macro_node (pfile, true); + + if (node) + { + if (pfile->cb.before_define) + pfile->cb.before_define (pfile); + + if (pfile->cb.undef) + pfile->cb.undef (pfile, pfile->directive_line, node); + + /* 6.10.3.5 paragraph 2: [#undef] is ignored if the specified + identifier is not currently defined as a macro name. */ + if (cpp_macro_p (node)) + { + if (node->flags & NODE_WARN) + cpp_error (pfile, CPP_DL_WARNING, + "undefining \"%s\"", NODE_NAME (node)); + else if (cpp_builtin_macro_p (node) + && CPP_OPTION (pfile, warn_builtin_macro_redefined)) + cpp_warning_with_line (pfile, CPP_W_BUILTIN_MACRO_REDEFINED, + pfile->directive_line, 0, + "undefining \"%s\"", NODE_NAME (node)); + + if (node->value.macro + && CPP_OPTION (pfile, warn_unused_macros)) + _cpp_warn_if_unused_macro (pfile, node, NULL); + + _cpp_free_definition (node); + } + } + + check_eol (pfile, false); +} + +/* Undefine a single macro/assertion/whatever. */ + +static int +undefine_macros (cpp_reader *pfile ATTRIBUTE_UNUSED, cpp_hashnode *h, + void *data_p ATTRIBUTE_UNUSED) +{ + /* Body of _cpp_free_definition inlined here for speed. + Macros and assertions no longer have anything to free. */ + h->type = NT_VOID; + h->value.answers = NULL; + h->flags &= ~(NODE_POISONED|NODE_DISABLED|NODE_USED); + return 1; +} + +/* Undefine all macros and assertions. */ + +void +cpp_undef_all (cpp_reader *pfile) +{ + cpp_forall_identifiers (pfile, undefine_macros, NULL); +} + + +/* Helper routine used by parse_include. Reinterpret the current line + as an h-char-sequence (< ... >); we are looking at the first token + after the <. Returns a malloced filename. */ +static char * +glue_header_name (cpp_reader *pfile) +{ + const cpp_token *token; + char *buffer; + size_t len, total_len = 0, capacity = 1024; + + /* To avoid lexed tokens overwriting our glued name, we can only + allocate from the string pool once we've lexed everything. */ + buffer = XNEWVEC (char, capacity); + for (;;) + { + token = get_token_no_padding (pfile); + + if (token->type == CPP_GREATER) + break; + if (token->type == CPP_EOF) + { + cpp_error (pfile, CPP_DL_ERROR, "missing terminating > character"); + break; + } + + len = cpp_token_len (token) + 2; /* Leading space, terminating \0. */ + if (total_len + len > capacity) + { + capacity = (capacity + len) * 2; + buffer = XRESIZEVEC (char, buffer, capacity); + } + + if (token->flags & PREV_WHITE) + buffer[total_len++] = ' '; + + total_len = (cpp_spell_token (pfile, token, (uchar *) &buffer[total_len], + true) + - (uchar *) buffer); + } + + buffer[total_len] = '\0'; + return buffer; +} + +/* Returns the file name of #include, #include_next, #import and + #pragma dependency. The string is malloced and the caller should + free it. Returns NULL on error. LOCATION is the source location + of the file name. */ + +static const char * +parse_include (cpp_reader *pfile, int *pangle_brackets, + const cpp_token ***buf, location_t *location) +{ + char *fname; + const cpp_token *header; + + /* Allow macro expansion. */ + header = get_token_no_padding (pfile); + *location = header->src_loc; + if ((header->type == CPP_STRING && header->val.str.text[0] != 'R') + || header->type == CPP_HEADER_NAME) + { + fname = XNEWVEC (char, header->val.str.len - 1); + memcpy (fname, header->val.str.text + 1, header->val.str.len - 2); + fname[header->val.str.len - 2] = '\0'; + *pangle_brackets = header->type == CPP_HEADER_NAME; + } + else if (header->type == CPP_LESS) + { + fname = glue_header_name (pfile); + *pangle_brackets = 1; + } + else + { + const unsigned char *dir; + + if (pfile->directive == &dtable[T_PRAGMA]) + dir = UC"pragma dependency"; + else + dir = pfile->directive->name; + cpp_error (pfile, CPP_DL_ERROR, "#%s expects \"FILENAME\" or ", + dir); + + return NULL; + } + + if (pfile->directive == &dtable[T_PRAGMA]) + { + /* This pragma allows extra tokens after the file name. */ + } + else if (buf == NULL || CPP_OPTION (pfile, discard_comments)) + check_eol (pfile, true); + else + { + /* If we are not discarding comments, then gather them while + doing the eol check. */ + *buf = check_eol_return_comments (pfile); + } + + return fname; +} + +/* Handle #include, #include_next and #import. */ +static void +do_include_common (cpp_reader *pfile, enum include_type type) +{ + const char *fname; + int angle_brackets; + const cpp_token **buf = NULL; + location_t location; + + /* Re-enable saving of comments if requested, so that the include + callback can dump comments which follow #include. */ + pfile->state.save_comments = ! CPP_OPTION (pfile, discard_comments); + + /* Tell the lexer this is an include directive -- we want it to + increment the line number even if this is the last line of a file. */ + pfile->state.in_directive = 2; + + fname = parse_include (pfile, &angle_brackets, &buf, &location); + if (!fname) + goto done; + + if (!*fname) + { + cpp_error_with_line (pfile, CPP_DL_ERROR, location, 0, + "empty filename in #%s", + pfile->directive->name); + goto done; + } + + /* Prevent #include recursion. */ + if (pfile->line_table->depth >= CPP_OPTION (pfile, max_include_depth)) + cpp_error (pfile, + CPP_DL_ERROR, + "#include nested depth %u exceeds maximum of %u" + " (use -fmax-include-depth=DEPTH to increase the maximum)", + pfile->line_table->depth, + CPP_OPTION (pfile, max_include_depth)); + else + { + /* Get out of macro context, if we are. */ + skip_rest_of_line (pfile); + + if (pfile->cb.include) + pfile->cb.include (pfile, pfile->directive_line, + pfile->directive->name, fname, angle_brackets, + buf); + + _cpp_stack_include (pfile, fname, angle_brackets, type, location); + } + + done: + XDELETEVEC (fname); + if (buf) + XDELETEVEC (buf); +} + +static void +do_include (cpp_reader *pfile) +{ + do_include_common (pfile, IT_INCLUDE); +} + +static void +do_import (cpp_reader *pfile) +{ + do_include_common (pfile, IT_IMPORT); +} + +static void +do_include_next (cpp_reader *pfile) +{ + enum include_type type = IT_INCLUDE_NEXT; + + /* If this is the primary source file, warn and use the normal + search logic. */ + if (_cpp_in_main_source_file (pfile)) + { + cpp_error (pfile, CPP_DL_WARNING, + "#include_next in primary source file"); + type = IT_INCLUDE; + } + do_include_common (pfile, type); +} + +/* Subroutine of do_linemarker. Read possible flags after file name. + LAST is the last flag seen; 0 if this is the first flag. Return the + flag if it is valid, 0 at the end of the directive. Otherwise + complain. */ +static unsigned int +read_flag (cpp_reader *pfile, unsigned int last) +{ + const cpp_token *token = _cpp_lex_token (pfile); + + if (token->type == CPP_NUMBER && token->val.str.len == 1) + { + unsigned int flag = token->val.str.text[0] - '0'; + + if (flag > last && flag <= 4 + && (flag != 4 || last == 3) + && (flag != 2 || last == 0)) + return flag; + } + + if (token->type != CPP_EOF) + cpp_error (pfile, CPP_DL_ERROR, "invalid flag \"%s\" in line directive", + cpp_token_as_text (pfile, token)); + return 0; +} + +/* Subroutine of do_line and do_linemarker. Convert a number in STR, + of length LEN, to binary; store it in NUMP, and return false if the + number was well-formed, true if not. WRAPPED is set to true if the + number did not fit into 'linenum_type'. */ +static bool +strtolinenum (const uchar *str, size_t len, linenum_type *nump, bool *wrapped) +{ + linenum_type reg = 0; + + uchar c; + bool seen_digit_sep = false; + *wrapped = false; + while (len--) + { + c = *str++; + if (!seen_digit_sep && c == '\'' && len) + { + seen_digit_sep = true; + continue; + } + if (!ISDIGIT (c)) + return true; + seen_digit_sep = false; + if (reg > ((linenum_type) -1) / 10) + *wrapped = true; + reg *= 10; + if (reg > ((linenum_type) -1) - (c - '0')) + *wrapped = true; + reg += c - '0'; + } + *nump = reg; + return false; +} + +/* Interpret #line command. + Note that the filename string (if any) is a true string constant + (escapes are interpreted). */ +static void +do_line (cpp_reader *pfile) +{ + class line_maps *line_table = pfile->line_table; + const line_map_ordinary *map = LINEMAPS_LAST_ORDINARY_MAP (line_table); + + /* skip_rest_of_line() may cause line table to be realloc()ed so note down + sysp right now. */ + + unsigned char map_sysp = ORDINARY_MAP_IN_SYSTEM_HEADER_P (map); + const cpp_token *token; + const char *new_file = ORDINARY_MAP_FILE_NAME (map); + linenum_type new_lineno; + + /* C99 raised the minimum limit on #line numbers. */ + linenum_type cap = CPP_OPTION (pfile, c99) ? 2147483647 : 32767; + bool wrapped; + + /* #line commands expand macros. */ + token = cpp_get_token (pfile); + if (token->type != CPP_NUMBER + || strtolinenum (token->val.str.text, token->val.str.len, + &new_lineno, &wrapped)) + { + if (token->type == CPP_EOF) + cpp_error (pfile, CPP_DL_ERROR, "unexpected end of file after #line"); + else + cpp_error (pfile, CPP_DL_ERROR, + "\"%s\" after #line is not a positive integer", + cpp_token_as_text (pfile, token)); + return; + } + + if (CPP_PEDANTIC (pfile) && (new_lineno == 0 || new_lineno > cap || wrapped)) + cpp_error (pfile, CPP_DL_PEDWARN, "line number out of range"); + else if (wrapped) + cpp_error (pfile, CPP_DL_WARNING, "line number out of range"); + + token = cpp_get_token (pfile); + if (token->type == CPP_STRING) + { + cpp_string s = { 0, 0 }; + if (cpp_interpret_string_notranslate (pfile, &token->val.str, 1, + &s, CPP_STRING)) + new_file = (const char *)s.text; + check_eol (pfile, true); + } + else if (token->type != CPP_EOF) + { + cpp_error (pfile, CPP_DL_ERROR, "\"%s\" is not a valid filename", + cpp_token_as_text (pfile, token)); + return; + } + + skip_rest_of_line (pfile); + _cpp_do_file_change (pfile, LC_RENAME_VERBATIM, new_file, new_lineno, + map_sysp); + line_table->seen_line_directive = true; +} + +/* Interpret the # 44 "file" [flags] notation, which has slightly + different syntax and semantics from #line: Flags are allowed, + and we never complain about the line number being too big. */ +static void +do_linemarker (cpp_reader *pfile) +{ + class line_maps *line_table = pfile->line_table; + const line_map_ordinary *map = LINEMAPS_LAST_ORDINARY_MAP (line_table); + const cpp_token *token; + const char *new_file = ORDINARY_MAP_FILE_NAME (map); + linenum_type new_lineno; + unsigned int new_sysp = ORDINARY_MAP_IN_SYSTEM_HEADER_P (map); + enum lc_reason reason = LC_RENAME_VERBATIM; + int flag; + bool wrapped; + + /* Back up so we can get the number again. Putting this in + _cpp_handle_directive risks two calls to _cpp_backup_tokens in + some circumstances, which can segfault. */ + _cpp_backup_tokens (pfile, 1); + + /* #line commands expand macros. */ + token = cpp_get_token (pfile); + if (token->type != CPP_NUMBER + || strtolinenum (token->val.str.text, token->val.str.len, + &new_lineno, &wrapped)) + { + /* Unlike #line, there does not seem to be a way to get an EOF + here. So, it should be safe to always spell the token. */ + cpp_error (pfile, CPP_DL_ERROR, + "\"%s\" after # is not a positive integer", + cpp_token_as_text (pfile, token)); + return; + } + + token = cpp_get_token (pfile); + if (token->type == CPP_STRING) + { + cpp_string s = { 0, 0 }; + if (cpp_interpret_string_notranslate (pfile, &token->val.str, + 1, &s, CPP_STRING)) + new_file = (const char *)s.text; + + new_sysp = 0; + flag = read_flag (pfile, 0); + if (flag == 1) + { + reason = LC_ENTER; + /* Fake an include for cpp_included (). */ + _cpp_fake_include (pfile, new_file); + flag = read_flag (pfile, flag); + } + else if (flag == 2) + { + reason = LC_LEAVE; + flag = read_flag (pfile, flag); + } + if (flag == 3) + { + new_sysp = 1; + flag = read_flag (pfile, flag); + if (flag == 4) + new_sysp = 2; + } + pfile->buffer->sysp = new_sysp; + + check_eol (pfile, false); + } + else if (token->type != CPP_EOF) + { + cpp_error (pfile, CPP_DL_ERROR, "\"%s\" is not a valid filename", + cpp_token_as_text (pfile, token)); + return; + } + + skip_rest_of_line (pfile); + + if (reason == LC_LEAVE) + { + /* Reread map since cpp_get_token can invalidate it with a + reallocation. */ + map = LINEMAPS_LAST_ORDINARY_MAP (line_table); + const line_map_ordinary *from + = linemap_included_from_linemap (line_table, map); + + if (!from) + /* Not nested. */; + else if (!new_file[0]) + /* Leaving to "" means fill in the popped-to name. */ + new_file = ORDINARY_MAP_FILE_NAME (from); + else if (filename_cmp (ORDINARY_MAP_FILE_NAME (from), new_file) != 0) + /* It's the wrong name, Grommit! */ + from = NULL; + + if (!from) + { + cpp_warning (pfile, CPP_W_NONE, + "file \"%s\" linemarker ignored due to " + "incorrect nesting", new_file); + return; + } + } + + /* Compensate for the increment in linemap_add that occurs in + _cpp_do_file_change. We're currently at the start of the line + *following* the #line directive. A separate location_t for this + location makes no sense (until we do the LC_LEAVE), and + complicates LAST_SOURCE_LINE_LOCATION. */ + pfile->line_table->highest_location--; + + _cpp_do_file_change (pfile, reason, new_file, new_lineno, new_sysp); + line_table->seen_line_directive = true; +} + +/* Arrange the file_change callback. Changing to TO_FILE:TO_LINE for + REASON. SYSP is 1 for a system header, 2 for a system header that + needs to be extern "C" protected, and zero otherwise. */ +void +_cpp_do_file_change (cpp_reader *pfile, enum lc_reason reason, + const char *to_file, linenum_type to_line, + unsigned int sysp) +{ + linemap_assert (reason != LC_ENTER_MACRO); + + const line_map_ordinary *ord_map = NULL; + if (!to_line && reason == LC_RENAME_VERBATIM) + { + /* A linemarker moving to line zero. If we're on the second + line of the current map, and it also starts at zero, just + rewind -- we're probably reading the builtins of a + preprocessed source. */ + line_map_ordinary *last = LINEMAPS_LAST_ORDINARY_MAP (pfile->line_table); + if (!ORDINARY_MAP_STARTING_LINE_NUMBER (last) + && 0 == filename_cmp (to_file, ORDINARY_MAP_FILE_NAME (last)) + && SOURCE_LINE (last, pfile->line_table->highest_line) == 2) + { + ord_map = last; + pfile->line_table->highest_location + = pfile->line_table->highest_line = MAP_START_LOCATION (last); + } + } + + if (!ord_map) + if (const line_map *map = linemap_add (pfile->line_table, reason, sysp, + to_file, to_line)) + { + ord_map = linemap_check_ordinary (map); + linemap_line_start (pfile->line_table, + ORDINARY_MAP_STARTING_LINE_NUMBER (ord_map), + 127); + } + + if (pfile->cb.file_change) + pfile->cb.file_change (pfile, ord_map); +} + +/* Report a warning or error detected by the program we are + processing. Use the directive's tokens in the error message. */ +static void +do_diagnostic (cpp_reader *pfile, enum cpp_diagnostic_level code, + enum cpp_warning_reason reason, int print_dir) +{ + const unsigned char *dir_name; + unsigned char *line; + location_t src_loc = pfile->cur_token[-1].src_loc; + + if (print_dir) + dir_name = pfile->directive->name; + else + dir_name = NULL; + pfile->state.prevent_expansion++; + line = cpp_output_line_to_string (pfile, dir_name); + pfile->state.prevent_expansion--; + + if (code == CPP_DL_WARNING_SYSHDR && reason) + cpp_warning_with_line_syshdr (pfile, reason, src_loc, 0, "%s", line); + else if (code == CPP_DL_WARNING && reason) + cpp_warning_with_line (pfile, reason, src_loc, 0, "%s", line); + else + cpp_error_with_line (pfile, code, src_loc, 0, "%s", line); + free (line); +} + +static void +do_error (cpp_reader *pfile) +{ + do_diagnostic (pfile, CPP_DL_ERROR, CPP_W_NONE, 1); +} + +static void +do_warning (cpp_reader *pfile) +{ + /* We want #warning diagnostics to be emitted in system headers too. */ + do_diagnostic (pfile, CPP_DL_WARNING_SYSHDR, CPP_W_WARNING_DIRECTIVE, 1); +} + +/* Report program identification. */ +static void +do_ident (cpp_reader *pfile) +{ + const cpp_token *str = cpp_get_token (pfile); + + if (str->type != CPP_STRING) + cpp_error (pfile, CPP_DL_ERROR, "invalid #%s directive", + pfile->directive->name); + else if (pfile->cb.ident) + pfile->cb.ident (pfile, pfile->directive_line, &str->val.str); + + check_eol (pfile, false); +} + +/* Lookup a PRAGMA name in a singly-linked CHAIN. Returns the + matching entry, or NULL if none is found. The returned entry could + be the start of a namespace chain, or a pragma. */ +static struct pragma_entry * +lookup_pragma_entry (struct pragma_entry *chain, const cpp_hashnode *pragma) +{ + while (chain && chain->pragma != pragma) + chain = chain->next; + + return chain; +} + +/* Create and insert a blank pragma entry at the beginning of a + singly-linked CHAIN. */ +static struct pragma_entry * +new_pragma_entry (cpp_reader *pfile, struct pragma_entry **chain) +{ + struct pragma_entry *new_entry; + + new_entry = (struct pragma_entry *) + _cpp_aligned_alloc (pfile, sizeof (struct pragma_entry)); + + memset (new_entry, 0, sizeof (struct pragma_entry)); + new_entry->next = *chain; + + *chain = new_entry; + return new_entry; +} + +/* Register a pragma NAME in namespace SPACE. If SPACE is null, it + goes in the global namespace. */ +static struct pragma_entry * +register_pragma_1 (cpp_reader *pfile, const char *space, const char *name, + bool allow_name_expansion) +{ + struct pragma_entry **chain = &pfile->pragmas; + struct pragma_entry *entry; + const cpp_hashnode *node; + + if (space) + { + node = cpp_lookup (pfile, UC space, strlen (space)); + entry = lookup_pragma_entry (*chain, node); + if (!entry) + { + entry = new_pragma_entry (pfile, chain); + entry->pragma = node; + entry->is_nspace = true; + entry->allow_expansion = allow_name_expansion; + } + else if (!entry->is_nspace) + goto clash; + else if (entry->allow_expansion != allow_name_expansion) + { + cpp_error (pfile, CPP_DL_ICE, + "registering pragmas in namespace \"%s\" with mismatched " + "name expansion", space); + return NULL; + } + chain = &entry->u.space; + } + else if (allow_name_expansion) + { + cpp_error (pfile, CPP_DL_ICE, + "registering pragma \"%s\" with name expansion " + "and no namespace", name); + return NULL; + } + + /* Check for duplicates. */ + node = cpp_lookup (pfile, UC name, strlen (name)); + entry = lookup_pragma_entry (*chain, node); + if (entry == NULL) + { + entry = new_pragma_entry (pfile, chain); + entry->pragma = node; + return entry; + } + + if (entry->is_nspace) + clash: + cpp_error (pfile, CPP_DL_ICE, + "registering \"%s\" as both a pragma and a pragma namespace", + NODE_NAME (node)); + else if (space) + cpp_error (pfile, CPP_DL_ICE, "#pragma %s %s is already registered", + space, name); + else + cpp_error (pfile, CPP_DL_ICE, "#pragma %s is already registered", name); + + return NULL; +} + +/* Register a cpplib internal pragma SPACE NAME with HANDLER. */ +static void +register_pragma_internal (cpp_reader *pfile, const char *space, + const char *name, pragma_cb handler) +{ + struct pragma_entry *entry; + + entry = register_pragma_1 (pfile, space, name, false); + entry->is_internal = true; + entry->u.handler = handler; +} + +/* Register a pragma NAME in namespace SPACE. If SPACE is null, it + goes in the global namespace. HANDLER is the handler it will call, + which must be non-NULL. If ALLOW_EXPANSION is set, allow macro + expansion while parsing pragma NAME. This function is exported + from libcpp. */ +void +cpp_register_pragma (cpp_reader *pfile, const char *space, const char *name, + pragma_cb handler, bool allow_expansion) +{ + struct pragma_entry *entry; + + if (!handler) + { + cpp_error (pfile, CPP_DL_ICE, "registering pragma with NULL handler"); + return; + } + + entry = register_pragma_1 (pfile, space, name, false); + if (entry) + { + entry->allow_expansion = allow_expansion; + entry->u.handler = handler; + } +} + +/* Similarly, but create mark the pragma for deferred processing. + When found, a CPP_PRAGMA token will be insertted into the stream + with IDENT in the token->u.pragma slot. */ +void +cpp_register_deferred_pragma (cpp_reader *pfile, const char *space, + const char *name, unsigned int ident, + bool allow_expansion, bool allow_name_expansion) +{ + struct pragma_entry *entry; + + entry = register_pragma_1 (pfile, space, name, allow_name_expansion); + if (entry) + { + entry->is_deferred = true; + entry->allow_expansion = allow_expansion; + entry->u.ident = ident; + } +} + +/* Register the pragmas the preprocessor itself handles. */ +void +_cpp_init_internal_pragmas (cpp_reader *pfile) +{ + /* Pragmas in the global namespace. */ + register_pragma_internal (pfile, 0, "once", do_pragma_once); + register_pragma_internal (pfile, 0, "push_macro", do_pragma_push_macro); + register_pragma_internal (pfile, 0, "pop_macro", do_pragma_pop_macro); + + /* New GCC-specific pragmas should be put in the GCC namespace. */ + register_pragma_internal (pfile, "GCC", "poison", do_pragma_poison); + register_pragma_internal (pfile, "GCC", "system_header", + do_pragma_system_header); + register_pragma_internal (pfile, "GCC", "dependency", do_pragma_dependency); + register_pragma_internal (pfile, "GCC", "warning", do_pragma_warning); + register_pragma_internal (pfile, "GCC", "error", do_pragma_error); +} + +/* Return the number of registered pragmas in PE. */ + +static int +count_registered_pragmas (struct pragma_entry *pe) +{ + int ct = 0; + for (; pe != NULL; pe = pe->next) + { + if (pe->is_nspace) + ct += count_registered_pragmas (pe->u.space); + ct++; + } + return ct; +} + +/* Save into SD the names of the registered pragmas referenced by PE, + and return a pointer to the next free space in SD. */ + +static char ** +save_registered_pragmas (struct pragma_entry *pe, char **sd) +{ + for (; pe != NULL; pe = pe->next) + { + if (pe->is_nspace) + sd = save_registered_pragmas (pe->u.space, sd); + *sd++ = (char *) xmemdup (HT_STR (&pe->pragma->ident), + HT_LEN (&pe->pragma->ident), + HT_LEN (&pe->pragma->ident) + 1); + } + return sd; +} + +/* Return a newly-allocated array which saves the names of the + registered pragmas. */ + +char ** +_cpp_save_pragma_names (cpp_reader *pfile) +{ + int ct = count_registered_pragmas (pfile->pragmas); + char **result = XNEWVEC (char *, ct); + (void) save_registered_pragmas (pfile->pragmas, result); + return result; +} + +/* Restore from SD the names of the registered pragmas referenced by PE, + and return a pointer to the next unused name in SD. */ + +static char ** +restore_registered_pragmas (cpp_reader *pfile, struct pragma_entry *pe, + char **sd) +{ + for (; pe != NULL; pe = pe->next) + { + if (pe->is_nspace) + sd = restore_registered_pragmas (pfile, pe->u.space, sd); + pe->pragma = cpp_lookup (pfile, UC *sd, strlen (*sd)); + free (*sd); + sd++; + } + return sd; +} + +/* Restore the names of the registered pragmas from SAVED. */ + +void +_cpp_restore_pragma_names (cpp_reader *pfile, char **saved) +{ + (void) restore_registered_pragmas (pfile, pfile->pragmas, saved); + free (saved); +} + +/* Pragmata handling. We handle some, and pass the rest on to the + front end. C99 defines three pragmas and says that no macro + expansion is to be performed on them; whether or not macro + expansion happens for other pragmas is implementation defined. + This implementation allows for a mix of both, since GCC did not + traditionally macro expand its (few) pragmas, whereas OpenMP + specifies that macro expansion should happen. */ +static void +do_pragma (cpp_reader *pfile) +{ + const struct pragma_entry *p = NULL; + const cpp_token *token, *pragma_token; + location_t pragma_token_virt_loc = 0; + cpp_token ns_token; + unsigned int count = 1; + + pfile->state.prevent_expansion++; + + pragma_token = token = cpp_get_token_with_location (pfile, + &pragma_token_virt_loc); + ns_token = *token; + if (token->type == CPP_NAME) + { + p = lookup_pragma_entry (pfile->pragmas, token->val.node.node); + if (p && p->is_nspace) + { + bool allow_name_expansion = p->allow_expansion; + if (allow_name_expansion) + pfile->state.prevent_expansion--; + + token = cpp_get_token (pfile); + if (token->type == CPP_NAME) + p = lookup_pragma_entry (p->u.space, token->val.node.node); + else + p = NULL; + if (allow_name_expansion) + pfile->state.prevent_expansion++; + count = 2; + } + } + + if (p) + { + if (p->is_deferred) + { + pfile->directive_result.src_loc = pragma_token_virt_loc; + pfile->directive_result.type = CPP_PRAGMA; + pfile->directive_result.flags = pragma_token->flags; + pfile->directive_result.val.pragma = p->u.ident; + pfile->state.in_deferred_pragma = true; + pfile->state.pragma_allow_expansion = p->allow_expansion; + if (!p->allow_expansion) + pfile->state.prevent_expansion++; + } + else + { + /* Since the handler below doesn't get the line number, that + it might need for diagnostics, make sure it has the right + numbers in place. */ + if (pfile->cb.line_change) + (*pfile->cb.line_change) (pfile, pragma_token, false); + if (p->allow_expansion) + pfile->state.prevent_expansion--; + (*p->u.handler) (pfile); + if (p->allow_expansion) + pfile->state.prevent_expansion++; + } + } + else if (pfile->cb.def_pragma) + { + if (count == 1 || pfile->context->prev == NULL) + _cpp_backup_tokens (pfile, count); + else + { + /* Invalid name comes from macro expansion, _cpp_backup_tokens + won't allow backing 2 tokens. */ + const auto tok_buff = _cpp_get_buff (pfile, 2 * sizeof (cpp_token)); + const auto toks = (cpp_token *)tok_buff->base; + toks[0] = ns_token; + toks[0].flags |= NO_EXPAND; + toks[1] = *token; + toks[1].flags |= NO_EXPAND | PREV_WHITE; + _cpp_push_token_context (pfile, NULL, toks, 2); + /* Arrange to free this buffer when no longer needed. */ + pfile->context->buff = tok_buff; + } + pfile->cb.def_pragma (pfile, pfile->directive_line); + } + + pfile->state.prevent_expansion--; +} + +/* Handle #pragma once. */ +static void +do_pragma_once (cpp_reader *pfile) +{ + if (_cpp_in_main_source_file (pfile)) + cpp_error (pfile, CPP_DL_WARNING, "#pragma once in main file"); + + check_eol (pfile, false); + _cpp_mark_file_once_only (pfile, pfile->buffer->file); +} + +/* Handle #pragma push_macro(STRING). */ +static void +do_pragma_push_macro (cpp_reader *pfile) +{ + cpp_hashnode *node; + size_t defnlen; + const uchar *defn = NULL; + char *macroname, *dest; + const char *limit, *src; + const cpp_token *txt; + struct def_pragma_macro *c; + + txt = get__Pragma_string (pfile); + if (!txt) + { + location_t src_loc = pfile->cur_token[-1].src_loc; + cpp_error_with_line (pfile, CPP_DL_ERROR, src_loc, 0, + "invalid #pragma push_macro directive"); + check_eol (pfile, false); + skip_rest_of_line (pfile); + return; + } + dest = macroname = (char *) alloca (txt->val.str.len + 2); + src = (const char *) (txt->val.str.text + 1 + (txt->val.str.text[0] == 'L')); + limit = (const char *) (txt->val.str.text + txt->val.str.len - 1); + while (src < limit) + { + /* We know there is a character following the backslash. */ + if (*src == '\\' && (src[1] == '\\' || src[1] == '"')) + src++; + *dest++ = *src++; + } + *dest = 0; + check_eol (pfile, false); + skip_rest_of_line (pfile); + c = XNEW (struct def_pragma_macro); + memset (c, 0, sizeof (struct def_pragma_macro)); + c->name = XNEWVAR (char, strlen (macroname) + 1); + strcpy (c->name, macroname); + c->next = pfile->pushed_macros; + node = _cpp_lex_identifier (pfile, c->name); + if (node->type == NT_VOID) + c->is_undef = 1; + else if (node->type == NT_BUILTIN_MACRO) + c->is_builtin = 1; + else + { + defn = cpp_macro_definition (pfile, node); + defnlen = ustrlen (defn); + c->definition = XNEWVEC (uchar, defnlen + 2); + c->definition[defnlen] = '\n'; + c->definition[defnlen + 1] = 0; + c->line = node->value.macro->line; + c->syshdr = node->value.macro->syshdr; + c->used = node->value.macro->used; + memcpy (c->definition, defn, defnlen); + } + + pfile->pushed_macros = c; +} + +/* Handle #pragma pop_macro(STRING). */ +static void +do_pragma_pop_macro (cpp_reader *pfile) +{ + char *macroname, *dest; + const char *limit, *src; + const cpp_token *txt; + struct def_pragma_macro *l = NULL, *c = pfile->pushed_macros; + txt = get__Pragma_string (pfile); + if (!txt) + { + location_t src_loc = pfile->cur_token[-1].src_loc; + cpp_error_with_line (pfile, CPP_DL_ERROR, src_loc, 0, + "invalid #pragma pop_macro directive"); + check_eol (pfile, false); + skip_rest_of_line (pfile); + return; + } + dest = macroname = (char *) alloca (txt->val.str.len + 2); + src = (const char *) (txt->val.str.text + 1 + (txt->val.str.text[0] == 'L')); + limit = (const char *) (txt->val.str.text + txt->val.str.len - 1); + while (src < limit) + { + /* We know there is a character following the backslash. */ + if (*src == '\\' && (src[1] == '\\' || src[1] == '"')) + src++; + *dest++ = *src++; + } + *dest = 0; + check_eol (pfile, false); + skip_rest_of_line (pfile); + + while (c != NULL) + { + if (!strcmp (c->name, macroname)) + { + if (!l) + pfile->pushed_macros = c->next; + else + l->next = c->next; + cpp_pop_definition (pfile, c); + free (c->definition); + free (c->name); + free (c); + break; + } + l = c; + c = c->next; + } +} + +/* Handle #pragma GCC poison, to poison one or more identifiers so + that the lexer produces a hard error for each subsequent usage. */ +static void +do_pragma_poison (cpp_reader *pfile) +{ + const cpp_token *tok; + cpp_hashnode *hp; + + pfile->state.poisoned_ok = 1; + for (;;) + { + tok = _cpp_lex_token (pfile); + if (tok->type == CPP_EOF) + break; + if (tok->type != CPP_NAME) + { + cpp_error (pfile, CPP_DL_ERROR, + "invalid #pragma GCC poison directive"); + break; + } + + hp = tok->val.node.node; + if (hp->flags & NODE_POISONED) + continue; + + if (cpp_macro_p (hp)) + cpp_error (pfile, CPP_DL_WARNING, "poisoning existing macro \"%s\"", + NODE_NAME (hp)); + _cpp_free_definition (hp); + hp->flags |= NODE_POISONED | NODE_DIAGNOSTIC; + } + pfile->state.poisoned_ok = 0; +} + +/* Mark the current header as a system header. This will suppress + some categories of warnings (notably those from -pedantic). It is + intended for use in system libraries that cannot be implemented in + conforming C, but cannot be certain that their headers appear in a + system include directory. To prevent abuse, it is rejected in the + primary source file. */ +static void +do_pragma_system_header (cpp_reader *pfile) +{ + if (_cpp_in_main_source_file (pfile)) + cpp_error (pfile, CPP_DL_WARNING, + "#pragma system_header ignored outside include file"); + else + { + check_eol (pfile, false); + skip_rest_of_line (pfile); + cpp_make_system_header (pfile, 1, 0); + } +} + +/* Check the modified date of the current include file against a specified + file. Issue a diagnostic, if the specified file is newer. We use this to + determine if a fixed header should be refixed. */ +static void +do_pragma_dependency (cpp_reader *pfile) +{ + const char *fname; + int angle_brackets, ordering; + location_t location; + + fname = parse_include (pfile, &angle_brackets, NULL, &location); + if (!fname) + return; + + ordering = _cpp_compare_file_date (pfile, fname, angle_brackets); + if (ordering < 0) + cpp_error (pfile, CPP_DL_WARNING, "cannot find source file %s", fname); + else if (ordering > 0) + { + cpp_error (pfile, CPP_DL_WARNING, + "current file is older than %s", fname); + if (cpp_get_token (pfile)->type != CPP_EOF) + { + _cpp_backup_tokens (pfile, 1); + do_diagnostic (pfile, CPP_DL_WARNING, CPP_W_NONE, 0); + } + } + + free ((void *) fname); +} + +/* Issue a diagnostic with the message taken from the pragma. If + ERROR is true, the diagnostic is a warning, otherwise, it is an + error. */ +static void +do_pragma_warning_or_error (cpp_reader *pfile, bool error) +{ + const cpp_token *tok = _cpp_lex_token (pfile); + cpp_string str; + if (tok->type != CPP_STRING + || !cpp_interpret_string_notranslate (pfile, &tok->val.str, 1, &str, + CPP_STRING) + || str.len == 0) + { + cpp_error (pfile, CPP_DL_ERROR, "invalid \"#pragma GCC %s\" directive", + error ? "error" : "warning"); + return; + } + cpp_error (pfile, error ? CPP_DL_ERROR : CPP_DL_WARNING, + "%s", str.text); + free ((void *)str.text); +} + +/* Issue a warning diagnostic. */ +static void +do_pragma_warning (cpp_reader *pfile) +{ + do_pragma_warning_or_error (pfile, false); +} + +/* Issue an error diagnostic. */ +static void +do_pragma_error (cpp_reader *pfile) +{ + do_pragma_warning_or_error (pfile, true); +} + +/* Get a token but skip padding. */ +static const cpp_token * +get_token_no_padding (cpp_reader *pfile) +{ + for (;;) + { + const cpp_token *result = cpp_get_token (pfile); + if (result->type != CPP_PADDING) + return result; + } +} + +/* Check syntax is "(string-literal)". Returns the string on success, + or NULL on failure. */ +static const cpp_token * +get__Pragma_string (cpp_reader *pfile) +{ + const cpp_token *string; + const cpp_token *paren; + + paren = get_token_no_padding (pfile); + if (paren->type == CPP_EOF) + _cpp_backup_tokens (pfile, 1); + if (paren->type != CPP_OPEN_PAREN) + return NULL; + + string = get_token_no_padding (pfile); + if (string->type == CPP_EOF) + _cpp_backup_tokens (pfile, 1); + if (string->type != CPP_STRING && string->type != CPP_WSTRING + && string->type != CPP_STRING32 && string->type != CPP_STRING16 + && string->type != CPP_UTF8STRING) + return NULL; + + paren = get_token_no_padding (pfile); + if (paren->type == CPP_EOF) + _cpp_backup_tokens (pfile, 1); + if (paren->type != CPP_CLOSE_PAREN) + return NULL; + + return string; +} + +/* Destringize IN into a temporary buffer, by removing the first \ of + \" and \\ sequences, and process the result as a #pragma directive. */ +static void +destringize_and_run (cpp_reader *pfile, const cpp_string *in, + location_t expansion_loc) +{ + const unsigned char *src, *limit; + char *dest, *result; + cpp_context *saved_context; + cpp_token *saved_cur_token; + tokenrun *saved_cur_run; + cpp_token *toks; + int count; + const struct directive *save_directive; + + dest = result = (char *) alloca (in->len - 1); + src = in->text + 1 + (in->text[0] == 'L'); + limit = in->text + in->len - 1; + while (src < limit) + { + /* We know there is a character following the backslash. */ + if (*src == '\\' && (src[1] == '\\' || src[1] == '"')) + src++; + *dest++ = *src++; + } + *dest = '\n'; + + /* Ugh; an awful kludge. We are really not set up to be lexing + tokens when in the middle of a macro expansion. Use a new + context to force cpp_get_token to lex, and so skip_rest_of_line + doesn't go beyond the end of the text. Also, remember the + current lexing position so we can return to it later. + + Something like line-at-a-time lexing should remove the need for + this. */ + saved_context = pfile->context; + saved_cur_token = pfile->cur_token; + saved_cur_run = pfile->cur_run; + + pfile->context = XCNEW (cpp_context); + + /* Inline run_directive, since we need to delay the _cpp_pop_buffer + until we've read all of the tokens that we want. */ + cpp_push_buffer (pfile, (const uchar *) result, dest - result, + /* from_stage3 */ true); + /* ??? Antique Disgusting Hack. What does this do? */ + if (pfile->buffer->prev) + pfile->buffer->file = pfile->buffer->prev->file; + + start_directive (pfile); + _cpp_clean_line (pfile); + save_directive = pfile->directive; + pfile->directive = &dtable[T_PRAGMA]; + do_pragma (pfile); + if (pfile->directive_result.type == CPP_PRAGMA) + pfile->directive_result.flags |= PRAGMA_OP; + end_directive (pfile, 1); + pfile->directive = save_directive; + + /* We always insert at least one token, the directive result. It'll + either be a CPP_PADDING or a CPP_PRAGMA. In the later case, we + need to insert *all* of the tokens, including the CPP_PRAGMA_EOL. */ + + /* If we're not handling the pragma internally, read all of the tokens from + the string buffer now, while the string buffer is still installed. */ + /* ??? Note that the token buffer allocated here is leaked. It's not clear + to me what the true lifespan of the tokens are. It would appear that + the lifespan is the entire parse of the main input stream, in which case + this may not be wrong. */ + if (pfile->directive_result.type == CPP_PRAGMA) + { + int maxcount; + + count = 1; + maxcount = 50; + toks = XNEWVEC (cpp_token, maxcount); + toks[0] = pfile->directive_result; + toks[0].src_loc = expansion_loc; + + do + { + if (count == maxcount) + { + maxcount = maxcount * 3 / 2; + toks = XRESIZEVEC (cpp_token, toks, maxcount); + } + toks[count] = *cpp_get_token (pfile); + /* _Pragma is a builtin, so we're not within a macro-map, and so + the token locations are set to bogus ordinary locations + near to, but after that of the "_Pragma". + Paper over this by setting them equal to the location of the + _Pragma itself (PR preprocessor/69126). */ + toks[count].src_loc = expansion_loc; + /* Macros have been already expanded by cpp_get_token + if the pragma allowed expansion. */ + toks[count++].flags |= NO_EXPAND; + } + while (toks[count-1].type != CPP_PRAGMA_EOL); + } + else + { + count = 1; + toks = &pfile->avoid_paste; + + /* If we handled the entire pragma internally, make sure we get the + line number correct for the next token. */ + if (pfile->cb.line_change) + pfile->cb.line_change (pfile, pfile->cur_token, false); + } + + /* Finish inlining run_directive. */ + pfile->buffer->file = NULL; + _cpp_pop_buffer (pfile); + + /* Reset the old macro state before ... */ + XDELETE (pfile->context); + pfile->context = saved_context; + pfile->cur_token = saved_cur_token; + pfile->cur_run = saved_cur_run; + + /* ... inserting the new tokens we collected. */ + _cpp_push_token_context (pfile, NULL, toks, count); +} + +/* Handle the _Pragma operator. Return 0 on error, 1 if ok. */ +int +_cpp_do__Pragma (cpp_reader *pfile, location_t expansion_loc) +{ + /* Make sure we don't invalidate the string token, if the closing parenthesis + ended up on a different line. */ + ++pfile->keep_tokens; + const cpp_token *string = get__Pragma_string (pfile); + --pfile->keep_tokens; + + pfile->directive_result.type = CPP_PADDING; + + if (string) + { + destringize_and_run (pfile, &string->val.str, expansion_loc); + return 1; + } + cpp_error (pfile, CPP_DL_ERROR, + "_Pragma takes a parenthesized string literal"); + return 0; +} + +/* Handle #ifdef. */ +static void +do_ifdef (cpp_reader *pfile) +{ + int skip = 1; + + if (! pfile->state.skipping) + { + cpp_hashnode *node = lex_macro_node (pfile, false); + + if (node) + { + skip = !_cpp_defined_macro_p (node); + if (!_cpp_maybe_notify_macro_use (pfile, node, pfile->directive_line)) + /* It wasn't a macro after all. */ + skip = true; + _cpp_mark_macro_used (node); + if (pfile->cb.used) + pfile->cb.used (pfile, pfile->directive_line, node); + check_eol (pfile, false); + } + } + + push_conditional (pfile, skip, T_IFDEF, 0); +} + +/* Handle #ifndef. */ +static void +do_ifndef (cpp_reader *pfile) +{ + int skip = 1; + cpp_hashnode *node = 0; + + if (! pfile->state.skipping) + { + node = lex_macro_node (pfile, false); + + if (node) + { + skip = _cpp_defined_macro_p (node); + if (!_cpp_maybe_notify_macro_use (pfile, node, pfile->directive_line)) + /* It wasn't a macro after all. */ + skip = false; + _cpp_mark_macro_used (node); + if (pfile->cb.used) + pfile->cb.used (pfile, pfile->directive_line, node); + check_eol (pfile, false); + } + } + + push_conditional (pfile, skip, T_IFNDEF, node); +} + +/* _cpp_parse_expr puts a macro in a "#if !defined ()" expression in + pfile->mi_ind_cmacro so we can handle multiple-include + optimizations. If macro expansion occurs in the expression, we + cannot treat it as a controlling conditional, since the expansion + could change in the future. That is handled by cpp_get_token. */ +static void +do_if (cpp_reader *pfile) +{ + int skip = 1; + + if (! pfile->state.skipping) + skip = _cpp_parse_expr (pfile, true) == false; + + push_conditional (pfile, skip, T_IF, pfile->mi_ind_cmacro); +} + +/* Flip skipping state if appropriate and continue without changing + if_stack; this is so that the error message for missing #endif's + etc. will point to the original #if. */ +static void +do_else (cpp_reader *pfile) +{ + cpp_buffer *buffer = pfile->buffer; + struct if_stack *ifs = buffer->if_stack; + + if (ifs == NULL) + cpp_error (pfile, CPP_DL_ERROR, "#else without #if"); + else + { + if (ifs->type == T_ELSE) + { + cpp_error (pfile, CPP_DL_ERROR, "#else after #else"); + cpp_error_with_line (pfile, CPP_DL_ERROR, ifs->line, 0, + "the conditional began here"); + } + ifs->type = T_ELSE; + + /* Skip any future (erroneous) #elses or #elifs. */ + pfile->state.skipping = ifs->skip_elses; + ifs->skip_elses = true; + + /* Invalidate any controlling macro. */ + ifs->mi_cmacro = 0; + + /* Only check EOL if was not originally skipping. */ + if (!ifs->was_skipping && CPP_OPTION (pfile, warn_endif_labels)) + check_eol_endif_labels (pfile); + } +} + +/* Handle a #elif, #elifdef or #elifndef directive by not changing if_stack + either. See the comment above do_else. */ +static void +do_elif (cpp_reader *pfile) +{ + cpp_buffer *buffer = pfile->buffer; + struct if_stack *ifs = buffer->if_stack; + + if (ifs == NULL) + cpp_error (pfile, CPP_DL_ERROR, "#%s without #if", pfile->directive->name); + else + { + if (ifs->type == T_ELSE) + { + cpp_error (pfile, CPP_DL_ERROR, "#%s after #else", + pfile->directive->name); + cpp_error_with_line (pfile, CPP_DL_ERROR, ifs->line, 0, + "the conditional began here"); + } + ifs->type = T_ELIF; + + /* See DR#412: "Only the first group whose control condition + evaluates to true (nonzero) is processed; any following groups + are skipped and their controlling directives are processed as + if they were in a group that is skipped." */ + if (ifs->skip_elses) + { + /* In older GNU standards, #elifdef/#elifndef is supported + as an extension, but pedwarn if -pedantic if the presence + of the directive would be rejected. */ + if (pfile->directive != &dtable[T_ELIF] + && ! CPP_OPTION (pfile, elifdef) + && CPP_PEDANTIC (pfile) + && !pfile->state.skipping) + { + if (CPP_OPTION (pfile, cplusplus)) + cpp_error (pfile, CPP_DL_PEDWARN, + "#%s before C++23 is a GCC extension", + pfile->directive->name); + else + cpp_error (pfile, CPP_DL_PEDWARN, + "#%s before C2X is a GCC extension", + pfile->directive->name); + } + pfile->state.skipping = 1; + } + else + { + if (pfile->directive == &dtable[T_ELIF]) + pfile->state.skipping = !_cpp_parse_expr (pfile, false); + else + { + cpp_hashnode *node = lex_macro_node (pfile, false); + + if (node) + { + bool macro_defined = _cpp_defined_macro_p (node); + if (!_cpp_maybe_notify_macro_use (pfile, node, + pfile->directive_line)) + /* It wasn't a macro after all. */ + macro_defined = false; + bool skip = (pfile->directive == &dtable[T_ELIFDEF] + ? !macro_defined + : macro_defined); + if (pfile->cb.used) + pfile->cb.used (pfile, pfile->directive_line, node); + check_eol (pfile, false); + /* In older GNU standards, #elifdef/#elifndef is supported + as an extension, but pedwarn if -pedantic if the presence + of the directive would change behavior. */ + if (! CPP_OPTION (pfile, elifdef) + && CPP_PEDANTIC (pfile) + && pfile->state.skipping != skip) + { + if (CPP_OPTION (pfile, cplusplus)) + cpp_error (pfile, CPP_DL_PEDWARN, + "#%s before C++23 is a GCC extension", + pfile->directive->name); + else + cpp_error (pfile, CPP_DL_PEDWARN, + "#%s before C2X is a GCC extension", + pfile->directive->name); + } + pfile->state.skipping = skip; + } + } + ifs->skip_elses = !pfile->state.skipping; + } + + /* Invalidate any controlling macro. */ + ifs->mi_cmacro = 0; + } +} + +/* Handle a #elifdef directive. */ +static void +do_elifdef (cpp_reader *pfile) +{ + do_elif (pfile); +} + +/* Handle a #elifndef directive. */ +static void +do_elifndef (cpp_reader *pfile) +{ + do_elif (pfile); +} + +/* #endif pops the if stack and resets pfile->state.skipping. */ +static void +do_endif (cpp_reader *pfile) +{ + cpp_buffer *buffer = pfile->buffer; + struct if_stack *ifs = buffer->if_stack; + + if (ifs == NULL) + cpp_error (pfile, CPP_DL_ERROR, "#endif without #if"); + else + { + /* Only check EOL if was not originally skipping. */ + if (!ifs->was_skipping && CPP_OPTION (pfile, warn_endif_labels)) + check_eol_endif_labels (pfile); + + /* If potential control macro, we go back outside again. */ + if (ifs->next == 0 && ifs->mi_cmacro) + { + pfile->mi_valid = true; + pfile->mi_cmacro = ifs->mi_cmacro; + } + + buffer->if_stack = ifs->next; + pfile->state.skipping = ifs->was_skipping; + obstack_free (&pfile->buffer_ob, ifs); + } +} + +/* Push an if_stack entry for a preprocessor conditional, and set + pfile->state.skipping to SKIP. If TYPE indicates the conditional + is #if or #ifndef, CMACRO is a potentially controlling macro, and + we need to check here that we are at the top of the file. */ +static void +push_conditional (cpp_reader *pfile, int skip, int type, + const cpp_hashnode *cmacro) +{ + struct if_stack *ifs; + cpp_buffer *buffer = pfile->buffer; + + ifs = XOBNEW (&pfile->buffer_ob, struct if_stack); + ifs->line = pfile->directive_line; + ifs->next = buffer->if_stack; + ifs->skip_elses = pfile->state.skipping || !skip; + ifs->was_skipping = pfile->state.skipping; + ifs->type = type; + /* This condition is effectively a test for top-of-file. */ + if (pfile->mi_valid && pfile->mi_cmacro == 0) + ifs->mi_cmacro = cmacro; + else + ifs->mi_cmacro = 0; + + pfile->state.skipping = skip; + buffer->if_stack = ifs; +} + +/* Read the tokens of the answer into the macro pool, in a directive + of type TYPE. Only commit the memory if we intend it as permanent + storage, i.e. the #assert case. Returns 0 on success, and sets + ANSWERP to point to the answer. PRED_LOC is the location of the + predicate. */ +static bool +parse_answer (cpp_reader *pfile, int type, location_t pred_loc, + cpp_macro **answer_ptr) +{ + /* In a conditional, it is legal to not have an open paren. We + should save the following token in this case. */ + const cpp_token *paren = cpp_get_token (pfile); + + /* If not a paren, see if we're OK. */ + if (paren->type != CPP_OPEN_PAREN) + { + /* In a conditional no answer is a test for any answer. It + could be followed by any token. */ + if (type == T_IF) + { + _cpp_backup_tokens (pfile, 1); + return true; + } + + /* #unassert with no answer is valid - it removes all answers. */ + if (type == T_UNASSERT && paren->type == CPP_EOF) + return true; + + cpp_error_with_line (pfile, CPP_DL_ERROR, pred_loc, 0, + "missing '(' after predicate"); + return false; + } + + cpp_macro *answer = _cpp_new_macro (pfile, cmk_assert, + _cpp_reserve_room (pfile, 0, + sizeof (cpp_macro))); + answer->parm.next = NULL; + unsigned count = 0; + for (;;) + { + const cpp_token *token = cpp_get_token (pfile); + + if (token->type == CPP_CLOSE_PAREN) + break; + + if (token->type == CPP_EOF) + { + cpp_error (pfile, CPP_DL_ERROR, "missing ')' to complete answer"); + return false; + } + + answer = (cpp_macro *)_cpp_reserve_room + (pfile, sizeof (cpp_macro) + count * sizeof (cpp_token), + sizeof (cpp_token)); + answer->exp.tokens[count++] = *token; + } + + if (!count) + { + cpp_error (pfile, CPP_DL_ERROR, "predicate's answer is empty"); + return false; + } + + /* Drop whitespace at start, for answer equivalence purposes. */ + answer->exp.tokens[0].flags &= ~PREV_WHITE; + + answer->count = count; + *answer_ptr = answer; + + return true; +} + +/* Parses an assertion directive of type TYPE, returning a pointer to + the hash node of the predicate, or 0 on error. The node is + guaranteed to be disjoint from the macro namespace, so can only + have type 'NT_VOID'. If an answer was supplied, it is placed in + *ANSWER_PTR, which is otherwise set to 0. */ +static cpp_hashnode * +parse_assertion (cpp_reader *pfile, int type, cpp_macro **answer_ptr) +{ + cpp_hashnode *result = 0; + + /* We don't expand predicates or answers. */ + pfile->state.prevent_expansion++; + + *answer_ptr = NULL; + + const cpp_token *predicate = cpp_get_token (pfile); + if (predicate->type == CPP_EOF) + cpp_error (pfile, CPP_DL_ERROR, "assertion without predicate"); + else if (predicate->type != CPP_NAME) + cpp_error_with_line (pfile, CPP_DL_ERROR, predicate->src_loc, 0, + "predicate must be an identifier"); + else if (parse_answer (pfile, type, predicate->src_loc, answer_ptr)) + { + unsigned int len = NODE_LEN (predicate->val.node.node); + unsigned char *sym = (unsigned char *) alloca (len + 1); + + /* Prefix '#' to get it out of macro namespace. */ + sym[0] = '#'; + memcpy (sym + 1, NODE_NAME (predicate->val.node.node), len); + result = cpp_lookup (pfile, sym, len + 1); + } + + pfile->state.prevent_expansion--; + + return result; +} + +/* Returns a pointer to the pointer to CANDIDATE in the answer chain, + or a pointer to NULL if the answer is not in the chain. */ +static cpp_macro ** +find_answer (cpp_hashnode *node, const cpp_macro *candidate) +{ + unsigned int i; + cpp_macro **result = NULL; + + for (result = &node->value.answers; *result; result = &(*result)->parm.next) + { + cpp_macro *answer = *result; + + if (answer->count == candidate->count) + { + for (i = 0; i < answer->count; i++) + if (!_cpp_equiv_tokens (&answer->exp.tokens[i], + &candidate->exp.tokens[i])) + break; + + if (i == answer->count) + break; + } + } + + return result; +} + +/* Test an assertion within a preprocessor conditional. Returns + nonzero on failure, zero on success. On success, the result of + the test is written into VALUE, otherwise the value 0. */ +int +_cpp_test_assertion (cpp_reader *pfile, unsigned int *value) +{ + cpp_macro *answer; + cpp_hashnode *node = parse_assertion (pfile, T_IF, &answer); + + /* For recovery, an erroneous assertion expression is handled as a + failing assertion. */ + *value = 0; + + if (node) + { + if (node->value.answers) + *value = !answer || *find_answer (node, answer); + } + else if (pfile->cur_token[-1].type == CPP_EOF) + _cpp_backup_tokens (pfile, 1); + + /* We don't commit the memory for the answer - it's temporary only. */ + return node == 0; +} + +/* Handle #assert. */ +static void +do_assert (cpp_reader *pfile) +{ + cpp_macro *answer; + cpp_hashnode *node = parse_assertion (pfile, T_ASSERT, &answer); + + if (node) + { + /* Place the new answer in the answer list. First check there + is not a duplicate. */ + if (*find_answer (node, answer)) + { + cpp_error (pfile, CPP_DL_WARNING, "\"%s\" re-asserted", + NODE_NAME (node) + 1); + return; + } + + /* Commit or allocate storage for the answer. */ + answer = (cpp_macro *)_cpp_commit_buff + (pfile, sizeof (cpp_macro) - sizeof (cpp_token) + + sizeof (cpp_token) * answer->count); + + /* Chain into the list. */ + answer->parm.next = node->value.answers; + node->value.answers = answer; + + check_eol (pfile, false); + } +} + +/* Handle #unassert. */ +static void +do_unassert (cpp_reader *pfile) +{ + cpp_macro *answer; + cpp_hashnode *node = parse_assertion (pfile, T_UNASSERT, &answer); + + /* It isn't an error to #unassert something that isn't asserted. */ + if (node) + { + if (answer) + { + cpp_macro **p = find_answer (node, answer); + + /* Remove the assert from the list. */ + if (cpp_macro *temp = *p) + *p = temp->parm.next; + + check_eol (pfile, false); + } + else + _cpp_free_definition (node); + } + + /* We don't commit the memory for the answer - it's temporary only. */ +} + +/* These are for -D, -U, -A. */ + +/* Process the string STR as if it appeared as the body of a #define. + If STR is just an identifier, define it with value 1. + If STR has anything after the identifier, then it should + be identifier=definition. */ +void +cpp_define (cpp_reader *pfile, const char *str) +{ + char *buf; + const char *p; + size_t count; + + /* Copy the entire option so we can modify it. + Change the first "=" in the string to a space. If there is none, + tack " 1" on the end. */ + + count = strlen (str); + buf = (char *) alloca (count + 3); + memcpy (buf, str, count); + + p = strchr (str, '='); + if (p) + buf[p - str] = ' '; + else + { + buf[count++] = ' '; + buf[count++] = '1'; + } + buf[count] = '\n'; + + run_directive (pfile, T_DEFINE, buf, count); +} + +/* Like cpp_define, but does not warn about unused macro. */ +void +cpp_define_unused (cpp_reader *pfile, const char *str) +{ + unsigned char warn_unused_macros = CPP_OPTION (pfile, warn_unused_macros); + CPP_OPTION (pfile, warn_unused_macros) = 0; + cpp_define (pfile, str); + CPP_OPTION (pfile, warn_unused_macros) = warn_unused_macros; +} + +/* Use to build macros to be run through cpp_define() as + described above. + Example: cpp_define_formatted (pfile, "MACRO=%d", value); */ + +void +cpp_define_formatted (cpp_reader *pfile, const char *fmt, ...) +{ + char *ptr; + + va_list ap; + va_start (ap, fmt); + ptr = xvasprintf (fmt, ap); + va_end (ap); + + cpp_define (pfile, ptr); + free (ptr); +} + +/* Like cpp_define_formatted, but does not warn about unused macro. */ +void +cpp_define_formatted_unused (cpp_reader *pfile, const char *fmt, ...) +{ + char *ptr; + + va_list ap; + va_start (ap, fmt); + ptr = xvasprintf (fmt, ap); + va_end (ap); + + cpp_define_unused (pfile, ptr); + free (ptr); +} + +/* Slight variant of the above for use by initialize_builtins. */ +void +_cpp_define_builtin (cpp_reader *pfile, const char *str) +{ + size_t len = strlen (str); + char *buf = (char *) alloca (len + 1); + memcpy (buf, str, len); + buf[len] = '\n'; + run_directive (pfile, T_DEFINE, buf, len); +} + +/* Process MACRO as if it appeared as the body of an #undef. */ +void +cpp_undef (cpp_reader *pfile, const char *macro) +{ + size_t len = strlen (macro); + char *buf = (char *) alloca (len + 1); + memcpy (buf, macro, len); + buf[len] = '\n'; + run_directive (pfile, T_UNDEF, buf, len); +} + +/* Replace a previous definition DEF of the macro STR. If DEF is NULL, + or first element is zero, then the macro should be undefined. */ +static void +cpp_pop_definition (cpp_reader *pfile, struct def_pragma_macro *c) +{ + cpp_hashnode *node = _cpp_lex_identifier (pfile, c->name); + if (node == NULL) + return; + + if (pfile->cb.before_define) + pfile->cb.before_define (pfile); + + if (cpp_macro_p (node)) + { + if (pfile->cb.undef) + pfile->cb.undef (pfile, pfile->directive_line, node); + if (CPP_OPTION (pfile, warn_unused_macros)) + _cpp_warn_if_unused_macro (pfile, node, NULL); + _cpp_free_definition (node); + } + + if (c->is_undef) + return; + if (c->is_builtin) + { + _cpp_restore_special_builtin (pfile, c); + return; + } + + { + size_t namelen; + const uchar *dn; + cpp_hashnode *h = NULL; + cpp_buffer *nbuf; + + namelen = ustrcspn (c->definition, "( \n"); + h = cpp_lookup (pfile, c->definition, namelen); + dn = c->definition + namelen; + + nbuf = cpp_push_buffer (pfile, dn, ustrchr (dn, '\n') - dn, true); + if (nbuf != NULL) + { + _cpp_clean_line (pfile); + nbuf->sysp = 1; + if (!_cpp_create_definition (pfile, h)) + abort (); + _cpp_pop_buffer (pfile); + } + else + abort (); + h->value.macro->line = c->line; + h->value.macro->syshdr = c->syshdr; + h->value.macro->used = c->used; + } +} + +/* Process the string STR as if it appeared as the body of a #assert. */ +void +cpp_assert (cpp_reader *pfile, const char *str) +{ + handle_assertion (pfile, str, T_ASSERT); +} + +/* Process STR as if it appeared as the body of an #unassert. */ +void +cpp_unassert (cpp_reader *pfile, const char *str) +{ + handle_assertion (pfile, str, T_UNASSERT); +} + +/* Common code for cpp_assert (-A) and cpp_unassert (-A-). */ +static void +handle_assertion (cpp_reader *pfile, const char *str, int type) +{ + size_t count = strlen (str); + const char *p = strchr (str, '='); + + /* Copy the entire option so we can modify it. Change the first + "=" in the string to a '(', and tack a ')' on the end. */ + char *buf = (char *) alloca (count + 2); + + memcpy (buf, str, count); + if (p) + { + buf[p - str] = '('; + buf[count++] = ')'; + } + buf[count] = '\n'; + str = buf; + + run_directive (pfile, type, str, count); +} + +/* The options structure. */ +cpp_options * +cpp_get_options (cpp_reader *pfile) +{ + return &pfile->opts; +} + +/* The callbacks structure. */ +cpp_callbacks * +cpp_get_callbacks (cpp_reader *pfile) +{ + return &pfile->cb; +} + +/* Copy the given callbacks structure to our own. */ +void +cpp_set_callbacks (cpp_reader *pfile, cpp_callbacks *cb) +{ + pfile->cb = *cb; +} + +/* The narrow character set identifier. */ +const char * +cpp_get_narrow_charset_name (cpp_reader *pfile) +{ + return pfile->narrow_cset_desc.to; +} + +/* The wide character set identifier. */ +const char * +cpp_get_wide_charset_name (cpp_reader *pfile) +{ + return pfile->wide_cset_desc.to; +} + +/* The dependencies structure. (Creates one if it hasn't already been.) */ +class mkdeps * +cpp_get_deps (cpp_reader *pfile) +{ + if (!pfile->deps && CPP_OPTION (pfile, deps.style) != DEPS_NONE) + pfile->deps = deps_init (); + return pfile->deps; +} + +/* Push a new buffer on the buffer stack. Returns the new buffer; it + doesn't fail. It does not generate a file change call back; that + is the responsibility of the caller. */ +cpp_buffer * +cpp_push_buffer (cpp_reader *pfile, const uchar *buffer, size_t len, + int from_stage3) +{ + cpp_buffer *new_buffer = XOBNEW (&pfile->buffer_ob, cpp_buffer); + + /* Clears, amongst other things, if_stack and mi_cmacro. */ + memset (new_buffer, 0, sizeof (cpp_buffer)); + + new_buffer->next_line = new_buffer->buf = buffer; + new_buffer->rlimit = buffer + len; + new_buffer->from_stage3 = from_stage3; + new_buffer->prev = pfile->buffer; + new_buffer->need_line = true; + + pfile->buffer = new_buffer; + + return new_buffer; +} + +/* Pops a single buffer, with a file change call-back if appropriate. + Then pushes the next -include file, if any remain. */ +void +_cpp_pop_buffer (cpp_reader *pfile) +{ + cpp_buffer *buffer = pfile->buffer; + struct _cpp_file *inc = buffer->file; + struct if_stack *ifs; + const unsigned char *to_free; + + /* Walk back up the conditional stack till we reach its level at + entry to this file, issuing error messages. */ + for (ifs = buffer->if_stack; ifs; ifs = ifs->next) + cpp_error_with_line (pfile, CPP_DL_ERROR, ifs->line, 0, + "unterminated #%s", dtable[ifs->type].name); + + /* In case of a missing #endif. */ + pfile->state.skipping = 0; + + /* _cpp_do_file_change expects pfile->buffer to be the new one. */ + pfile->buffer = buffer->prev; + + to_free = buffer->to_free; + free (buffer->notes); + + /* Free the buffer object now; we may want to push a new buffer + in _cpp_push_next_include_file. */ + obstack_free (&pfile->buffer_ob, buffer); + + if (inc) + { + _cpp_pop_file_buffer (pfile, inc, to_free); + + _cpp_do_file_change (pfile, LC_LEAVE, 0, 0, 0); + } + else if (to_free) + free ((void *)to_free); +} + +/* Enter all recognized directives in the hash table. */ +void +_cpp_init_directives (cpp_reader *pfile) +{ + for (int i = 0; i < N_DIRECTIVES; i++) + { + cpp_hashnode *node = cpp_lookup (pfile, dtable[i].name, dtable[i].length); + node->is_directive = 1; + node->directive_index = i; + } +} + +/* Extract header file from a bracket include. Parsing starts after '<'. + The string is malloced and must be freed by the caller. */ +char * +_cpp_bracket_include(cpp_reader *pfile) +{ + return glue_header_name (pfile); +} + diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-base-selected/libcpp/files.cc b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-base-selected/libcpp/files.cc new file mode 100644 index 0000000000..3f8a8106ec --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-base-selected/libcpp/files.cc @@ -0,0 +1,2174 @@ +/* Part of CPP library. File handling. + Copyright (C) 1986-2023 Free Software Foundation, Inc. + Written by Per Bothner, 1994. + Based on CCCP program by Paul Rubin, June 1986 + Adapted to ANSI C, Richard Stallman, Jan 1987 + Split out of cpplib.c, Zack Weinberg, Oct 1998 + Reimplemented, Neil Booth, Jul 2003 + +This program is free software; you can redistribute it and/or modify it +under the terms of the GNU General Public License as published by the +Free Software Foundation; either version 3, or (at your option) any +later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; see the file COPYING3. If not see +. */ + +#include "config.h" +#include "system.h" +#include "cpplib.h" +#include "internal.h" +#include "mkdeps.h" +#include "obstack.h" +#include "hashtab.h" +#include "md5.h" +#include + +/* Variable length record files on VMS will have a stat size that includes + record control characters that won't be included in the read size. */ +#ifdef VMS +# define FAB_C_VAR 2 /* variable length records (see Starlet fabdef.h) */ +# define STAT_SIZE_RELIABLE(ST) ((ST).st_fab_rfm != FAB_C_VAR) +#else +# define STAT_SIZE_RELIABLE(ST) true +#endif + +#ifdef __DJGPP__ +#include + /* For DJGPP redirected input is opened in text mode. */ +# define set_stdin_to_binary_mode() \ + if (! isatty (0)) setmode (0, O_BINARY) +#else +# define set_stdin_to_binary_mode() /* Nothing */ +#endif + +/* This structure represents a file searched for by CPP, whether it + exists or not. An instance may be pointed to by more than one + cpp_file_hash_entry; at present no reference count is kept. */ +struct _cpp_file +{ + /* Filename as given to #include or command line switch. */ + const char *name; + + /* The full path used to find the file. */ + const char *path; + + /* The full path of the pch file. */ + const char *pchname; + + /* The file's path with the basename stripped. NULL if it hasn't + been calculated yet. */ + const char *dir_name; + + /* Chain through all files. */ + struct _cpp_file *next_file; + + /* The contents of NAME after calling read_file(). */ + const uchar *buffer; + + /* Pointer to the real start of BUFFER. read_file() might increment + BUFFER; when freeing, this this pointer must be used instead. */ + const uchar *buffer_start; + + /* The macro, if any, preventing re-inclusion. */ + const cpp_hashnode *cmacro; + + /* The directory in the search path where FILE was found. Used for + #include_next and determining whether a header is a system + header. */ + cpp_dir *dir; + + /* As filled in by stat(2) for the file. */ + struct stat st; + + /* File descriptor. Invalid if -1, otherwise open. */ + int fd; + + /* Zero if this file was successfully opened and stat()-ed, + otherwise errno obtained from failure. */ + int err_no; + + /* Number of times the file has been stacked for preprocessing. */ + unsigned short stack_count; + + /* If opened with #import or contains #pragma once. */ + bool once_only : 1; + + /* If read() failed before. */ + bool dont_read : 1; + + /* If BUFFER above contains the true contents of the file. */ + bool buffer_valid : 1; + + /* If this file is implicitly preincluded. */ + bool implicit_preinclude : 1; + + /* > 0: Known C++ Module header unit, <0: known not. ==0, unknown */ + int header_unit : 2; +}; + +/* A singly-linked list for all searches for a given file name, with + its head pointed to by a slot in FILE_HASH. The file name is what + appeared between the quotes in a #include directive; it can be + determined implicitly from the hash table location or explicitly + from FILE->name. + + FILE is a structure containing details about the file that was + found with that search, or details of how the search failed. + + START_DIR is the starting location of the search in the include + chain. The current directories for "" includes are also hashed in + the hash table and therefore unique. Files that are looked up + without using a search path, such as absolute filenames and file + names from the command line share a special starting directory so + they don't cause cache hits with normal include-chain lookups. + + If START_DIR is NULL then the entry is for a directory, not a file, + and the directory is in DIR. Since the starting point in a file + lookup chain is never NULL, this means that simple pointer + comparisons against START_DIR can be made to determine cache hits + in file lookups. + + If a cache lookup fails because of e.g. an extra "./" in the path, + then nothing will break. It is just less efficient as CPP will + have to do more work re-preprocessing the file, and/or comparing + its contents against earlier once-only files. +*/ +struct cpp_file_hash_entry +{ + struct cpp_file_hash_entry *next; + cpp_dir *start_dir; + location_t location; + union + { + _cpp_file *file; + cpp_dir *dir; + } u; +}; + +/* Number of entries to put in a cpp_file_hash_entry pool. */ +#define FILE_HASH_POOL_SIZE 127 + +/* A file hash entry pool. We allocate cpp_file_hash_entry object from + one of these. */ +struct file_hash_entry_pool +{ + /* Number of entries used from this pool. */ + unsigned int file_hash_entries_used; + /* Next pool in the chain; used when freeing. */ + struct file_hash_entry_pool *next; + /* The memory pool. */ + struct cpp_file_hash_entry pool[FILE_HASH_POOL_SIZE]; +}; + +static bool open_file (_cpp_file *file); +static bool pch_open_file (cpp_reader *pfile, _cpp_file *file, + bool *invalid_pch); +static bool find_file_in_dir (cpp_reader *pfile, _cpp_file *file, + bool *invalid_pch, location_t loc); +static bool read_file_guts (cpp_reader *pfile, _cpp_file *file, + location_t loc, const char *input_charset); +static bool read_file (cpp_reader *pfile, _cpp_file *file, + location_t loc); +static struct cpp_dir *search_path_head (cpp_reader *, const char *fname, + int angle_brackets, enum include_type); +static const char *dir_name_of_file (_cpp_file *file); +static void open_file_failed (cpp_reader *pfile, _cpp_file *file, int, + location_t); +static struct cpp_file_hash_entry *search_cache (struct cpp_file_hash_entry *head, + const cpp_dir *start_dir); +static _cpp_file *make_cpp_file (cpp_dir *, const char *fname); +static void destroy_cpp_file (_cpp_file *); +static cpp_dir *make_cpp_dir (cpp_reader *, const char *dir_name, int sysp); +static void allocate_file_hash_entries (cpp_reader *pfile); +static struct cpp_file_hash_entry *new_file_hash_entry (cpp_reader *pfile); +static int report_missing_guard (void **slot, void *b); +static hashval_t file_hash_hash (const void *p); +static int file_hash_eq (const void *p, const void *q); +static char *read_filename_string (int ch, FILE *f); +static void read_name_map (cpp_dir *dir); +static char *remap_filename (cpp_reader *pfile, _cpp_file *file); +static char *append_file_to_dir (const char *fname, cpp_dir *dir); +static bool validate_pch (cpp_reader *, _cpp_file *file, const char *pchname); +static int pchf_save_compare (const void *e1, const void *e2); +static int pchf_compare (const void *d_p, const void *e_p); +static bool check_file_against_entries (cpp_reader *, _cpp_file *, bool); + +/* Given a filename in FILE->PATH, with the empty string interpreted + as , open it. + + On success FILE contains an open file descriptor and stat + information for the file. On failure the file descriptor is -1 and + the appropriate errno is also stored in FILE. Returns TRUE iff + successful. + + We used to open files in nonblocking mode, but that caused more + problems than it solved. Do take care not to acquire a controlling + terminal by mistake (this can't happen on sane systems, but + paranoia is a virtue). + + Use the three-argument form of open even though we aren't + specifying O_CREAT, to defend against broken system headers. + + O_BINARY tells some runtime libraries (notably DJGPP) not to do + newline translation; we can handle DOS line breaks just fine + ourselves. */ +static bool +open_file (_cpp_file *file) +{ + if (file->path[0] == '\0') + { + file->fd = 0; + set_stdin_to_binary_mode (); + } + else + file->fd = open (file->path, O_RDONLY | O_NOCTTY | O_BINARY, 0666); + + if (file->fd != -1) + { + if (fstat (file->fd, &file->st) == 0) + { + if (!S_ISDIR (file->st.st_mode)) + { + file->err_no = 0; + return true; + } + + /* Ignore a directory and continue the search. The file we're + looking for may be elsewhere in the search path. */ + errno = ENOENT; + } + + close (file->fd); + file->fd = -1; + } +#if defined(_WIN32) && !defined(__CYGWIN__) + else if (errno == EACCES) + { + /* On most UNIX systems, open succeeds on a directory. Above, + we check if we have opened a directory and if so, set errno + to ENOENT. However, on Windows, opening a directory + fails with EACCES. We want to return ENOENT in that + case too. */ + if (stat (file->path, &file->st) == 0 + && S_ISDIR (file->st.st_mode)) + errno = ENOENT; + else + /* The call to stat may have reset errno. */ + errno = EACCES; + } +#endif + else if (errno == ENOTDIR) + errno = ENOENT; + + file->err_no = errno; + + return false; +} + +/* Temporary PCH intercept of opening a file. Try to find a PCH file + based on FILE->name and FILE->dir, and test those found for + validity using PFILE->cb.valid_pch. Return true iff a valid file is + found. Set *INVALID_PCH if a PCH file is found but wasn't valid. */ + +static bool +pch_open_file (cpp_reader *pfile, _cpp_file *file, bool *invalid_pch) +{ + static const char extension[] = ".gch"; + const char *path = file->path; + size_t len, flen; + char *pchname; + struct stat st; + bool valid = false; + + /* No PCH on or if not requested. */ + if (file->name[0] == '\0' || !pfile->cb.valid_pch) + return false; + + /* If the file is not included as first include from either the toplevel + file or the command-line it is not a valid use of PCH. */ + for (_cpp_file *f = pfile->all_files; f; f = f->next_file) + if (f->implicit_preinclude) + continue; + else if (pfile->main_file == f) + break; + else + return false; + + flen = strlen (path); + len = flen + sizeof (extension); + pchname = XNEWVEC (char, len); + memcpy (pchname, path, flen); + memcpy (pchname + flen, extension, sizeof (extension)); + + if (stat (pchname, &st) == 0) + { + DIR *pchdir; + struct dirent *d; + size_t dlen, plen = len; + + if (!S_ISDIR (st.st_mode)) + valid = validate_pch (pfile, file, pchname); + else if ((pchdir = opendir (pchname)) != NULL) + { + pchname[plen - 1] = '/'; + while ((d = readdir (pchdir)) != NULL) + { + dlen = strlen (d->d_name) + 1; + if ((strcmp (d->d_name, ".") == 0) + || (strcmp (d->d_name, "..") == 0)) + continue; + if (dlen + plen > len) + { + len += dlen + 64; + pchname = XRESIZEVEC (char, pchname, len); + } + memcpy (pchname + plen, d->d_name, dlen); + valid = validate_pch (pfile, file, pchname); + if (valid) + break; + } + closedir (pchdir); + } + if (!valid) + *invalid_pch = true; + } + + if (valid) + file->pchname = pchname; + else + free (pchname); + + return valid; +} + +/* Canonicalize the path to FILE. Return the canonical form if it is + shorter, otherwise return NULL. This function does NOT free the + memory pointed by FILE. */ + +static char * +maybe_shorter_path (const char * file) +{ + char * file2 = lrealpath (file); + if (file2 && strlen (file2) < strlen (file)) + { + return file2; + } + else + { + free (file2); + return NULL; + } +} + +/* Try to open the path FILE->name appended to FILE->dir. This is + where remap and PCH intercept the file lookup process. Return true + if the file was found, whether or not the open was successful. + Set *INVALID_PCH to true if a PCH file is found but wasn't valid. + Use LOC when emitting any diagnostics. */ + +static bool +find_file_in_dir (cpp_reader *pfile, _cpp_file *file, bool *invalid_pch, + location_t loc) +{ + char *path; + + if (CPP_OPTION (pfile, remap) && (path = remap_filename (pfile, file))) + ; + else + if (file->dir->construct) + path = file->dir->construct (file->name, file->dir); + else + path = append_file_to_dir (file->name, file->dir); + + if (path) + { + hashval_t hv; + char *copy; + void **pp; + + /* We try to canonicalize system headers. For DOS based file + * system, we always try to shorten non-system headers, as DOS + * has a tighter constraint on max path length. */ + if ((CPP_OPTION (pfile, canonical_system_headers) && file->dir->sysp) +#ifdef HAVE_DOS_BASED_FILE_SYSTEM + || !file->dir->sysp +#endif + ) + { + char * canonical_path = maybe_shorter_path (path); + if (canonical_path) + { + /* The canonical path was newly allocated. Let's free the + non-canonical one. */ + free (path); + path = canonical_path; + } + } + + hv = htab_hash_string (path); + if (htab_find_with_hash (pfile->nonexistent_file_hash, path, hv) != NULL) + { + file->err_no = ENOENT; + return false; + } + + file->path = path; + if (pch_open_file (pfile, file, invalid_pch)) + return true; + + if (open_file (file)) + return true; + + if (file->err_no != ENOENT) + { + open_file_failed (pfile, file, 0, loc); + return true; + } + + /* We copy the path name onto an obstack partly so that we don't + leak the memory, but mostly so that we don't fragment the + heap. */ + copy = (char *) obstack_copy0 (&pfile->nonexistent_file_ob, path, + strlen (path)); + free (path); + pp = htab_find_slot_with_hash (pfile->nonexistent_file_hash, + copy, hv, INSERT); + *pp = copy; + + file->path = file->name; + } + else + { + file->err_no = ENOENT; + file->path = NULL; + } + + return false; +} + +/* Return true iff the missing_header callback found the given HEADER. */ +static bool +search_path_exhausted (cpp_reader *pfile, const char *header, _cpp_file *file) +{ + missing_header_cb func = pfile->cb.missing_header; + + /* When the regular search path doesn't work, try context dependent + headers search paths. */ + if (func + && file->dir == NULL) + { + if ((file->path = func (pfile, header, &file->dir)) != NULL) + { + if (open_file (file)) + return true; + free ((void *)file->path); + } + file->path = file->name; + } + + return false; +} + +bool +_cpp_find_failed (_cpp_file *file) +{ + return file->err_no != 0; +} + +/* Given a filename FNAME search for such a file in the include path + starting from START_DIR. If FNAME is the empty string it is + interpreted as STDIN if START_DIR is PFILE->no_search_path. + + If the file is not found in the file cache fall back to the O/S and + add the result to our cache. + + If the file was not found in the filesystem, or there was an error + opening it, then ERR_NO is nonzero and FD is -1. If the file was + found, then ERR_NO is zero and FD could be -1 or an open file + descriptor. FD can be -1 if the file was found in the cache and + had previously been closed. To open it again pass the return value + to open_file(). + + If KIND is _cpp_FFK_PRE_INCLUDE then it is OK for the file to be + missing. If present, it is OK for a precompiled header to be + included after it. + + Use LOC as the location for any errors. */ + +_cpp_file * +_cpp_find_file (cpp_reader *pfile, const char *fname, cpp_dir *start_dir, + int angle_brackets, _cpp_find_file_kind kind, location_t loc) +{ + bool invalid_pch = false; + bool saw_bracket_include = false; + bool saw_quote_include = false; + struct cpp_dir *found_in_cache = NULL; + + /* Ensure we get no confusion between cached files and directories. */ + if (start_dir == NULL) + cpp_error_at (pfile, CPP_DL_ICE, loc, "NULL directory in find_file"); + + void **hash_slot + = htab_find_slot_with_hash (pfile->file_hash, fname, + htab_hash_string (fname), INSERT); + + /* First check the cache before we resort to memory allocation. */ + cpp_file_hash_entry *entry + = search_cache ((struct cpp_file_hash_entry *) *hash_slot, start_dir); + if (entry) + return entry->u.file; + + _cpp_file *file = make_cpp_file (start_dir, fname); + file->implicit_preinclude + = (kind == _cpp_FFK_PRE_INCLUDE + || (pfile->buffer && pfile->buffer->file->implicit_preinclude)); + + if (kind != _cpp_FFK_FAKE) + /* Try each path in the include chain. */ + for (;;) + { + if (find_file_in_dir (pfile, file, &invalid_pch, loc)) + break; + + file->dir = file->dir->next; + if (file->dir == NULL) + { + if (search_path_exhausted (pfile, fname, file)) + { + /* Although this file must not go in the cache, + because the file found might depend on things (like + the current file) that aren't represented in the + cache, it still has to go in the list of all files + so that #import works. */ + file->next_file = pfile->all_files; + pfile->all_files = file; + if (*hash_slot == NULL) + { + /* If *hash_slot is NULL, the above + htab_find_slot_with_hash call just created the + slot, but we aren't going to store there anything + of use, so need to remove the newly created entry. + htab_clear_slot requires that it is non-NULL, so + store some non-NULL but valid pointer there, + htab_clear_slot will immediately overwrite it. */ + *hash_slot = file; + htab_clear_slot (pfile->file_hash, hash_slot); + } + return file; + } + + if (invalid_pch) + { + cpp_error (pfile, CPP_DL_ERROR, + "one or more PCH files were found," + " but they were invalid"); + if (!cpp_get_options (pfile)->warn_invalid_pch) + cpp_error (pfile, CPP_DL_NOTE, + "use -Winvalid-pch for more information"); + } + + if (kind == _cpp_FFK_PRE_INCLUDE) + { + free ((char *) file->name); + free (file); + if (*hash_slot == NULL) + { + /* See comment on the above htab_clear_slot call. */ + *hash_slot = &hash_slot; + htab_clear_slot (pfile->file_hash, hash_slot); + } + return NULL; + } + + if (kind != _cpp_FFK_HAS_INCLUDE) + open_file_failed (pfile, file, angle_brackets, loc); + break; + } + + /* Only check the cache for the starting location (done above) + and the quote and bracket chain heads because there are no + other possible starting points for searches. */ + if (file->dir == pfile->bracket_include) + saw_bracket_include = true; + else if (file->dir == pfile->quote_include) + saw_quote_include = true; + else + continue; + + entry + = search_cache ((struct cpp_file_hash_entry *) *hash_slot, file->dir); + if (entry) + { + found_in_cache = file->dir; + break; + } + } + + if (entry) + { + /* Cache for START_DIR too, sharing the _cpp_file structure. */ + free ((char *) file->name); + free (file); + file = entry->u.file; + } + else + { + /* This is a new file; put it in the list. */ + file->next_file = pfile->all_files; + pfile->all_files = file; + } + + /* Store this new result in the hash table. */ + entry = new_file_hash_entry (pfile); + entry->next = (struct cpp_file_hash_entry *) *hash_slot; + entry->start_dir = start_dir; + entry->location = loc; + entry->u.file = file; + *hash_slot = (void *) entry; + + /* If we passed the quote or bracket chain heads, cache them also. + This speeds up processing if there are lots of -I options. */ + if (saw_bracket_include + && pfile->bracket_include != start_dir + && found_in_cache != pfile->bracket_include) + { + entry = new_file_hash_entry (pfile); + entry->next = (struct cpp_file_hash_entry *) *hash_slot; + entry->start_dir = pfile->bracket_include; + entry->location = loc; + entry->u.file = file; + *hash_slot = (void *) entry; + } + if (saw_quote_include + && pfile->quote_include != start_dir + && found_in_cache != pfile->quote_include) + { + entry = new_file_hash_entry (pfile); + entry->next = (struct cpp_file_hash_entry *) *hash_slot; + entry->start_dir = pfile->quote_include; + entry->location = loc; + entry->u.file = file; + *hash_slot = (void *) entry; + } + + return file; +} + +/* Read a file into FILE->buffer, returning true on success. + + If FILE->fd is something weird, like a block device, we don't want + to read it at all. Don't even try to figure out what something is, + except for plain files and block devices, since there is no + reliable portable way of doing this. + + Use LOC for any diagnostics. + + PFILE may be NULL. In this case, no diagnostics are issued. + + FIXME: Flush file cache and try again if we run out of memory. */ +static bool +read_file_guts (cpp_reader *pfile, _cpp_file *file, location_t loc, + const char *input_charset) +{ + ssize_t size, total, count; + uchar *buf; + bool regular; + + if (S_ISBLK (file->st.st_mode)) + { + if (pfile) + cpp_error_at (pfile, CPP_DL_ERROR, loc, + "%s is a block device", file->path); + return false; + } + + regular = S_ISREG (file->st.st_mode) != 0; + if (regular) + { + /* off_t might have a wider range than ssize_t - in other words, + the max size of a file might be bigger than the address + space. We can't handle a file that large. (Anyone with + a single source file bigger than 2GB needs to rethink + their coding style.) Some systems (e.g. AIX 4.1) define + SSIZE_MAX to be much smaller than the actual range of the + type. Use INTTYPE_MAXIMUM unconditionally to ensure this + does not bite us. */ + if (file->st.st_size > INTTYPE_MAXIMUM (ssize_t)) + { + if (pfile) + cpp_error_at (pfile, CPP_DL_ERROR, loc, + "%s is too large", file->path); + return false; + } + + size = file->st.st_size; + } + else + /* 8 kilobytes is a sensible starting size. It ought to be bigger + than the kernel pipe buffer, and it's definitely bigger than + the majority of C source files. */ + size = 8 * 1024; + + /* The + 16 here is space for the final '\n' and 15 bytes of padding, + used to quiet warnings from valgrind or Address Sanitizer, when the + optimized lexer accesses aligned 16-byte memory chunks, including + the bytes after the malloced, area, and stops lexing on '\n'. */ + buf = XNEWVEC (uchar, size + 16); + total = 0; + while ((count = read (file->fd, buf + total, size - total)) > 0) + { + total += count; + + if (total == size) + { + if (regular) + break; + size *= 2; + buf = XRESIZEVEC (uchar, buf, size + 16); + } + } + + if (count < 0) + { + if (pfile) + cpp_errno_filename (pfile, CPP_DL_ERROR, file->path, loc); + free (buf); + return false; + } + + if (pfile && regular && total != size && STAT_SIZE_RELIABLE (file->st)) + cpp_error_at (pfile, CPP_DL_WARNING, loc, + "%s is shorter than expected", file->path); + + file->buffer = _cpp_convert_input (pfile, + input_charset, + buf, size + 16, total, + &file->buffer_start, + &file->st.st_size); + file->buffer_valid = file->buffer; + return file->buffer_valid; +} + +/* Convenience wrapper around read_file_guts that opens the file if + necessary and closes the file descriptor after reading. FILE must + have been passed through find_file() at some stage. Use LOC for + any diagnostics. Unlike read_file_guts(), PFILE may not be NULL. */ +static bool +read_file (cpp_reader *pfile, _cpp_file *file, location_t loc) +{ + /* If we already have its contents in memory, succeed immediately. */ + if (file->buffer_valid) + return true; + + /* If an earlier read failed for some reason don't try again. */ + if (file->dont_read || file->err_no) + return false; + + if (file->fd == -1 && !open_file (file)) + { + open_file_failed (pfile, file, 0, loc); + return false; + } + + file->dont_read = !read_file_guts (pfile, file, loc, + CPP_OPTION (pfile, input_charset)); + close (file->fd); + file->fd = -1; + + return !file->dont_read; +} + +/* Returns TRUE if FILE is already known to be idempotent, and should + therefore not be read again. */ +static bool +is_known_idempotent_file (cpp_reader *pfile, _cpp_file *file, bool import) +{ + /* Skip once-only files. */ + if (file->once_only) + return true; + + /* We must mark the file once-only if #import now, before header + guard checks. Otherwise, undefining the header guard might + cause the file to be re-stacked. */ + if (import) + { + _cpp_mark_file_once_only (pfile, file); + + /* Don't stack files that have been stacked before. */ + if (file->stack_count) + return true; + } + + /* Skip if the file had a header guard and the macro is defined. + PCH relies on this appearing before the PCH handler below. */ + if (file->cmacro && cpp_macro_p (file->cmacro)) + return true; + + /* Handle PCH files immediately; don't stack them. */ + if (file->pchname) + { + pfile->cb.read_pch (pfile, file->pchname, file->fd, file->path); + file->fd = -1; + free ((void *) file->pchname); + file->pchname = NULL; + return true; + } + + return false; +} + +/* Return TRUE if file has unique contents, so we should read process + it. The file's contents must already have been read. */ + +static bool +has_unique_contents (cpp_reader *pfile, _cpp_file *file, bool import, + location_t loc) +{ + /* Check the file against the PCH file. This is done before + checking against files we've already seen, since it may save on + I/O. */ + if (check_file_against_entries (pfile, file, import)) + { + /* If this isn't a #import, but yet we can't include the file, + that means that it was #import-ed in the PCH file, + so we can never include it again. */ + if (! import) + _cpp_mark_file_once_only (pfile, file); + return false; + } + + /* Now we've read the file's contents, we can stack it if there + are no once-only files. */ + if (!pfile->seen_once_only) + return true; + + /* We may have read the file under a different name. Look + for likely candidates and compare file contents to be sure. */ + for (_cpp_file *f = pfile->all_files; f; f = f->next_file) + { + if (f == file) + continue; /* It'sa me! */ + + if ((import || f->once_only) + && f->err_no == 0 + && f->st.st_mtime == file->st.st_mtime + && f->st.st_size == file->st.st_size) + { + _cpp_file *ref_file; + + if (f->buffer && !f->buffer_valid) + { + /* We already have a buffer but it is not valid, because + the file is still stacked. Make a new one. */ + ref_file = make_cpp_file (f->dir, f->name); + ref_file->path = f->path; + } + else + /* The file is not stacked anymore. We can reuse it. */ + ref_file = f; + + bool same_file_p = (read_file (pfile, ref_file, loc) + /* Size might have changed in read_file(). */ + && ref_file->st.st_size == file->st.st_size + && !memcmp (ref_file->buffer, file->buffer, + file->st.st_size)); + + if (f->buffer && !f->buffer_valid) + { + ref_file->path = 0; + destroy_cpp_file (ref_file); + } + + if (same_file_p) + /* Already seen under a different name. */ + return false; + } + } + + return true; +} + +/* Place the file referenced by FILE into a new buffer on the buffer + stack if possible. Returns true if a buffer is stacked. Use LOC + for any diagnostics. */ + +bool +_cpp_stack_file (cpp_reader *pfile, _cpp_file *file, include_type type, + location_t loc) +{ + if (is_known_idempotent_file (pfile, file, type == IT_IMPORT)) + return false; + + int sysp = 0; + char *buf = nullptr; + + /* Check C++ module include translation. */ + if (!file->header_unit && type < IT_HEADER_HWM + /* Do not include translate include-next. */ + && type != IT_INCLUDE_NEXT + && pfile->cb.translate_include) + buf = (pfile->cb.translate_include + (pfile, pfile->line_table, loc, file->path)); + + if (buf) + { + /* We don't increment the line number at the end of a buffer, + because we don't usually need that location (we're popping an + include file). However in this case we do want to do the + increment. So push a writable buffer of two newlines to acheive + that. (We also need an extra newline, so this looks like a regular + file, which we do that to to make sure we don't fall off the end in the + middle of a line. */ + static uchar newlines[] = "\n\n\n"; + cpp_push_buffer (pfile, newlines, 2, true); + + size_t len = strlen (buf); + buf[len] = '\n'; /* See above */ + cpp_buffer *buffer + = cpp_push_buffer (pfile, reinterpret_cast (buf), + len, true); + buffer->to_free = buffer->buf; + + file->header_unit = +1; + _cpp_mark_file_once_only (pfile, file); + } + else + { + /* Not a header unit, and we know it. */ + file->header_unit = -1; + + if (!read_file (pfile, file, loc)) + return false; + + if (!has_unique_contents (pfile, file, type == IT_IMPORT, loc)) + return false; + + if (pfile->buffer && file->dir) + sysp = MAX (pfile->buffer->sysp, file->dir->sysp); + + /* Add the file to the dependencies on its first inclusion. */ + if (CPP_OPTION (pfile, deps.style) > (sysp != 0) + && !file->stack_count + && file->path[0] + && !(pfile->main_file == file + && CPP_OPTION (pfile, deps.ignore_main_file))) + deps_add_dep (pfile->deps, file->path); + + /* Clear buffer_valid since _cpp_clean_line messes it up. */ + file->buffer_valid = false; + file->stack_count++; + + /* Stack the buffer. */ + cpp_buffer *buffer + = cpp_push_buffer (pfile, file->buffer, file->st.st_size, + CPP_OPTION (pfile, preprocessed) + && !CPP_OPTION (pfile, directives_only)); + buffer->file = file; + buffer->sysp = sysp; + buffer->to_free = file->buffer_start; + + /* Initialize controlling macro state. */ + pfile->mi_valid = true; + pfile->mi_cmacro = 0; + } + + /* In the case of a normal #include, we're now at the start of the + line *following* the #include. A separate location_t for this + location makes no sense, until we do the LC_LEAVE. + + This does not apply if we found a PCH file, we're not a regular + include, or we ran out of locations. */ + bool decrement = (file->pchname == NULL + && type < IT_DIRECTIVE_HWM + && (pfile->line_table->highest_location + != LINE_MAP_MAX_LOCATION - 1)); + if (decrement) + pfile->line_table->highest_location--; + + if (file->header_unit <= 0) + /* Add line map and do callbacks. */ + _cpp_do_file_change (pfile, LC_ENTER, file->path, + /* With preamble injection, start on line zero, + so the preamble doesn't appear to have been + included from line 1. Likewise when + starting preprocessed, we expect an initial + locating line. */ + type == IT_PRE_MAIN ? 0 : 1, sysp); + else if (decrement) + { + /* Adjust the line back one so we appear on the #include line itself. */ + const line_map_ordinary *map + = LINEMAPS_LAST_ORDINARY_MAP (pfile->line_table); + linenum_type line = SOURCE_LINE (map, pfile->line_table->highest_line); + linemap_line_start (pfile->line_table, line - 1, 0); + } + + return true; +} + +/* Mark FILE to be included once only. */ +void +_cpp_mark_file_once_only (cpp_reader *pfile, _cpp_file *file) +{ + pfile->seen_once_only = true; + file->once_only = true; +} + +/* Return the directory from which searching for FNAME should start, + considering the directive TYPE and ANGLE_BRACKETS. If there is + nothing left in the path, returns NULL. */ +static struct cpp_dir * +search_path_head (cpp_reader *pfile, const char *fname, int angle_brackets, + enum include_type type) +{ + cpp_dir *dir; + _cpp_file *file; + + if (IS_ABSOLUTE_PATH (fname)) + return &pfile->no_search_path; + + /* pfile->buffer is NULL when processing an -include command-line flag. */ + file = pfile->buffer == NULL ? pfile->main_file : pfile->buffer->file; + + /* For #include_next, skip in the search path past the dir in which + the current file was found, but if it was found via an absolute + path use the normal search logic. */ + if (type == IT_INCLUDE_NEXT && file->dir + && file->dir != &pfile->no_search_path) + dir = file->dir->next; + else if (angle_brackets) + dir = pfile->bracket_include; + else if (type == IT_CMDLINE) + /* -include and -imacros use the #include "" chain with the + preprocessor's cwd prepended. */ + return make_cpp_dir (pfile, "./", false); + else if (pfile->quote_ignores_source_dir) + dir = pfile->quote_include; + else + return make_cpp_dir (pfile, dir_name_of_file (file), + pfile->buffer ? pfile->buffer->sysp : 0); + + if (dir == NULL) + cpp_error (pfile, CPP_DL_ERROR, + "no include path in which to search for %s", fname); + + return dir; +} + +/* Strip the basename from the file's path. It ends with a slash if + of nonzero length. Note that this procedure also works for + , which is represented by the empty string. */ +static const char * +dir_name_of_file (_cpp_file *file) +{ + if (!file->dir_name) + { + size_t len = lbasename (file->path) - file->path; + char *dir_name = XNEWVEC (char, len + 1); + + memcpy (dir_name, file->path, len); + dir_name[len] = '\0'; + file->dir_name = dir_name; + } + + return file->dir_name; +} + +/* Handles #include-family directives (distinguished by TYPE), + including HEADER, and the command line -imacros and -include. + Returns true if a buffer was stacked. */ +bool +_cpp_stack_include (cpp_reader *pfile, const char *fname, int angle_brackets, + enum include_type type, location_t loc) +{ + /* For -include command-line flags we have type == IT_CMDLINE. + When the first -include file is processed we have the case, where + pfile->cur_token == pfile->cur_run->base, we are directly called up + by the front end. However in the case of the second -include file, + we are called from _cpp_lex_token -> _cpp_get_fresh_line -> + cpp_push_include, with pfile->cur_token != pfile->cur_run->base, + and pfile->cur_token[-1].src_loc not (yet) initialized. + However, when the include file cannot be found, we need src_loc to + be initialized to some safe value: 0 means UNKNOWN_LOCATION. */ + if (type == IT_CMDLINE && pfile->cur_token != pfile->cur_run->base) + pfile->cur_token[-1].src_loc = 0; + + cpp_dir *dir = search_path_head (pfile, fname, angle_brackets, type); + if (!dir) + return false; + + _cpp_file *file = _cpp_find_file (pfile, fname, dir, angle_brackets, + type == IT_DEFAULT ? _cpp_FFK_PRE_INCLUDE + : _cpp_FFK_NORMAL, loc); + if (type == IT_DEFAULT && file == NULL) + return false; + + return _cpp_stack_file (pfile, file, type, loc); +} + +/* NAME is a header file name, find the _cpp_file, if any. */ + +static _cpp_file * +test_header_unit (cpp_reader *pfile, const char *name, bool angle, + location_t loc) +{ + if (cpp_dir *dir = search_path_head (pfile, name, angle, IT_INCLUDE)) + return _cpp_find_file (pfile, name, dir, angle, _cpp_FFK_NORMAL, loc); + + return nullptr; +} + +/* NAME is a header file name, find the path we'll use to open it and infer that + it is a header-unit. */ + +const char * +_cpp_find_header_unit (cpp_reader *pfile, const char *name, bool angle, + location_t loc) +{ + if (_cpp_file *file = test_header_unit (pfile, name, angle, loc)) + { + if (file->fd > 0) + { + /* Don't leave it open. */ + close (file->fd); + file->fd = 0; + } + + file->header_unit = +1; + _cpp_mark_file_once_only (pfile, file); + + return file->path; + } + + return nullptr; +} + +/* NAME is a header file name, find the path we'll use to open it. But do not + infer it is a header unit. */ + +const char * +cpp_probe_header_unit (cpp_reader *pfile, const char *name, bool angle, + location_t loc) +{ + if (_cpp_file *file = test_header_unit (pfile, name, angle, loc)) + return file->path; + + return nullptr; +} + +/* Retrofit the just-entered main file asif it was an include. This + will permit correct include_next use, and mark it as a system + header if that's where it resides. We use filesystem-appropriate + prefix matching of the include path to locate the main file. */ +void +cpp_retrofit_as_include (cpp_reader *pfile) +{ + /* We should be the outermost. */ + gcc_assert (!pfile->buffer->prev); + + if (const char *name = pfile->main_file->name) + { + /* Locate name on the include dir path, using a prefix match. */ + size_t name_len = strlen (name); + for (cpp_dir *dir = pfile->quote_include; dir; dir = dir->next) + if (dir->len < name_len + && IS_DIR_SEPARATOR (name[dir->len]) + && !filename_ncmp (name, dir->name, dir->len)) + { + pfile->main_file->dir = dir; + if (dir->sysp) + cpp_make_system_header (pfile, 1, 0); + break; + } + } + + /* Initialize controlling macro state. */ + pfile->mi_valid = true; + pfile->mi_cmacro = 0; +} + +/* Could not open FILE. The complication is dependency output. */ +static void +open_file_failed (cpp_reader *pfile, _cpp_file *file, int angle_brackets, + location_t loc) +{ + int sysp = pfile->line_table->highest_line > 1 && pfile->buffer ? pfile->buffer->sysp : 0; + bool print_dep = CPP_OPTION (pfile, deps.style) > (angle_brackets || !!sysp); + + errno = file->err_no; + if (print_dep && CPP_OPTION (pfile, deps.missing_files) && errno == ENOENT) + { + deps_add_dep (pfile->deps, file->name); + /* If the preprocessor output (other than dependency information) is + being used, we must also flag an error. */ + if (CPP_OPTION (pfile, deps.need_preprocessor_output)) + cpp_errno_filename (pfile, CPP_DL_FATAL, + file->path ? file->path : file->name, + loc); + } + else + { + /* If we are not outputting dependencies, or if we are and dependencies + were requested for this file, or if preprocessor output is needed + in addition to dependency information, this is an error. + + Otherwise (outputting dependencies but not for this file, and not + using the preprocessor output), we can still produce correct output + so it's only a warning. */ + if (CPP_OPTION (pfile, deps.style) == DEPS_NONE + || print_dep + || CPP_OPTION (pfile, deps.need_preprocessor_output)) + cpp_errno_filename (pfile, CPP_DL_FATAL, + file->path ? file->path : file->name, + loc); + else + cpp_errno_filename (pfile, CPP_DL_WARNING, + file->path ? file->path : file->name, + loc); + } +} + +/* Search in the chain beginning at HEAD for a file whose search path + started at START_DIR != NULL. */ +static struct cpp_file_hash_entry * +search_cache (struct cpp_file_hash_entry *head, const cpp_dir *start_dir) +{ + while (head && head->start_dir != start_dir) + head = head->next; + + return head; +} + +/* Allocate a new _cpp_file structure. */ +static _cpp_file * +make_cpp_file (cpp_dir *dir, const char *fname) +{ + _cpp_file *file = XCNEW (_cpp_file); + file->fd = -1; + file->dir = dir; + file->name = xstrdup (fname); + + return file; +} + +/* Release a _cpp_file structure. */ +static void +destroy_cpp_file (_cpp_file *file) +{ + free ((void *) file->buffer_start); + free ((void *) file->name); + free ((void *) file->path); + free (file); +} + +/* Release all the files allocated by this reader. */ +static void +destroy_all_cpp_files (cpp_reader *pfile) +{ + _cpp_file *iter = pfile->all_files; + while (iter) + { + _cpp_file *next = iter->next_file; + destroy_cpp_file (iter); + iter = next; + } +} + +/* A hash of directory names. The directory names are the path names + of files which contain a #include "", the included file name is + appended to this directories. + + To avoid duplicate entries we follow the convention that all + non-empty directory names should end in a '/'. DIR_NAME must be + stored in permanently allocated memory. */ +static cpp_dir * +make_cpp_dir (cpp_reader *pfile, const char *dir_name, int sysp) +{ + struct cpp_file_hash_entry *entry, **hash_slot; + cpp_dir *dir; + + hash_slot = (struct cpp_file_hash_entry **) + htab_find_slot_with_hash (pfile->dir_hash, dir_name, + htab_hash_string (dir_name), + INSERT); + + /* Have we already hashed this directory? */ + for (entry = *hash_slot; entry; entry = entry->next) + if (entry->start_dir == NULL) + return entry->u.dir; + + dir = XCNEW (cpp_dir); + dir->next = pfile->quote_include; + dir->name = (char *) dir_name; + dir->len = strlen (dir_name); + dir->sysp = sysp; + dir->construct = 0; + + /* Store this new result in the hash table. */ + entry = new_file_hash_entry (pfile); + entry->next = *hash_slot; + entry->start_dir = NULL; + entry->location = pfile->line_table->highest_location; + entry->u.dir = dir; + *hash_slot = entry; + + return dir; +} + +/* Create a new block of memory for file hash entries. */ +static void +allocate_file_hash_entries (cpp_reader *pfile) +{ + struct file_hash_entry_pool *pool = XNEW (struct file_hash_entry_pool); + pool->file_hash_entries_used = 0; + pool->next = pfile->file_hash_entries; + pfile->file_hash_entries = pool; +} + +/* Return a new file hash entry. */ +static struct cpp_file_hash_entry * +new_file_hash_entry (cpp_reader *pfile) +{ + unsigned int idx; + if (pfile->file_hash_entries->file_hash_entries_used == FILE_HASH_POOL_SIZE) + allocate_file_hash_entries (pfile); + + idx = pfile->file_hash_entries->file_hash_entries_used++; + return &pfile->file_hash_entries->pool[idx]; +} + +/* Free the file hash entry pools. */ +static void +free_file_hash_entries (cpp_reader *pfile) +{ + struct file_hash_entry_pool *iter = pfile->file_hash_entries; + while (iter) + { + struct file_hash_entry_pool *next = iter->next; + free (iter); + iter = next; + } +} + +/* Returns TRUE if a file FNAME has ever been successfully opened. + This routine is not intended to correctly handle filenames aliased + by links or redundant . or .. traversals etc. */ +bool +cpp_included (cpp_reader *pfile, const char *fname) +{ + struct cpp_file_hash_entry *entry; + + entry = (struct cpp_file_hash_entry *) + htab_find_with_hash (pfile->file_hash, fname, htab_hash_string (fname)); + + while (entry && (entry->start_dir == NULL || entry->u.file->err_no)) + entry = entry->next; + + return entry != NULL; +} + +/* Returns TRUE if a file FNAME has ever been successfully opened + before LOCATION. This routine is not intended to correctly handle + filenames aliased by links or redundant . or .. traversals etc. */ +bool +cpp_included_before (cpp_reader *pfile, const char *fname, + location_t location) +{ + struct cpp_file_hash_entry *entry + = (struct cpp_file_hash_entry *) + htab_find_with_hash (pfile->file_hash, fname, htab_hash_string (fname)); + + if (IS_ADHOC_LOC (location)) + location = get_location_from_adhoc_loc (pfile->line_table, location); + + while (entry && (entry->start_dir == NULL || entry->u.file->err_no + || entry->location > location)) + entry = entry->next; + + return entry != NULL; +} + +/* Calculate the hash value of a file hash entry P. */ + +static hashval_t +file_hash_hash (const void *p) +{ + struct cpp_file_hash_entry *entry = (struct cpp_file_hash_entry *) p; + const char *hname; + if (entry->start_dir) + hname = entry->u.file->name; + else + hname = entry->u.dir->name; + + return htab_hash_string (hname); +} + +/* Compare a string Q against a file hash entry P. */ +static int +file_hash_eq (const void *p, const void *q) +{ + struct cpp_file_hash_entry *entry = (struct cpp_file_hash_entry *) p; + const char *fname = (const char *) q; + const char *hname; + + if (entry->start_dir) + hname = entry->u.file->name; + else + hname = entry->u.dir->name; + + return filename_cmp (hname, fname) == 0; +} + +/* Compare entries in the nonexistent file hash table. These are just + strings. */ +static int +nonexistent_file_hash_eq (const void *p, const void *q) +{ + return filename_cmp ((const char *) p, (const char *) q) == 0; +} + +/* Initialize everything in this source file. */ +void +_cpp_init_files (cpp_reader *pfile) +{ + pfile->file_hash = htab_create_alloc (127, file_hash_hash, file_hash_eq, + NULL, xcalloc, free); + pfile->dir_hash = htab_create_alloc (127, file_hash_hash, file_hash_eq, + NULL, xcalloc, free); + allocate_file_hash_entries (pfile); + pfile->nonexistent_file_hash = htab_create_alloc (127, htab_hash_string, + nonexistent_file_hash_eq, + NULL, xcalloc, free); + obstack_specify_allocation (&pfile->nonexistent_file_ob, 0, 0, + xmalloc, free); +} + +/* Finalize everything in this source file. */ +void +_cpp_cleanup_files (cpp_reader *pfile) +{ + htab_delete (pfile->file_hash); + htab_delete (pfile->dir_hash); + htab_delete (pfile->nonexistent_file_hash); + obstack_free (&pfile->nonexistent_file_ob, 0); + free_file_hash_entries (pfile); + destroy_all_cpp_files (pfile); +} + +/* Make the parser forget about files it has seen. This can be useful + for resetting the parser to start another run. */ +void +cpp_clear_file_cache (cpp_reader *pfile) +{ + _cpp_cleanup_files (pfile); + pfile->file_hash_entries = NULL; + pfile->all_files = NULL; + _cpp_init_files (pfile); +} + +/* Enter a file name in the hash for the sake of cpp_included. */ +void +_cpp_fake_include (cpp_reader *pfile, const char *fname) +{ + _cpp_find_file (pfile, fname, pfile->buffer->file->dir, 0, _cpp_FFK_FAKE, 0); +} + +/* Not everyone who wants to set system-header-ness on a buffer can + see the details of a buffer. This is an exported interface because + fix-header needs it. */ +void +cpp_make_system_header (cpp_reader *pfile, int syshdr, int externc) +{ + int flags = 0; + const class line_maps *line_table = pfile->line_table; + const line_map_ordinary *map = LINEMAPS_LAST_ORDINARY_MAP (line_table); + /* 1 = system header, 2 = system header to be treated as C. */ + if (syshdr) + flags = 1 + (externc != 0); + pfile->buffer->sysp = flags; + _cpp_do_file_change (pfile, LC_RENAME, ORDINARY_MAP_FILE_NAME (map), + SOURCE_LINE (map, pfile->line_table->highest_line), + flags); +} + +/* Allow the client to change the current file. Used by the front end + to achieve pseudo-file names like . + If REASON is LC_LEAVE, then NEW_NAME must be NULL. */ +void +cpp_change_file (cpp_reader *pfile, enum lc_reason reason, + const char *new_name) +{ + _cpp_do_file_change (pfile, reason, new_name, 1, 0); +} + +struct report_missing_guard_data +{ + cpp_reader *pfile; + const char **paths; + size_t count; +}; + +/* Callback function for htab_traverse. */ +static int +report_missing_guard (void **slot, void *d) +{ + struct cpp_file_hash_entry *entry = (struct cpp_file_hash_entry *) *slot; + struct report_missing_guard_data *data + = (struct report_missing_guard_data *) d; + + /* Skip directories. */ + if (entry->start_dir != NULL) + { + _cpp_file *file = entry->u.file; + + /* We don't want MI guard advice for the main file. */ + if (!file->once_only + && file->cmacro == NULL + && file->stack_count == 1 + && data->pfile->main_file != file) + { + if (data->paths == NULL) + { + data->paths = XCNEWVEC (const char *, data->count); + data->count = 0; + } + + data->paths[data->count++] = file->path; + } + } + + /* Keep traversing the hash table. */ + return 1; +} + +/* Comparison function for qsort. */ +static int +report_missing_guard_cmp (const void *p1, const void *p2) +{ + return strcmp (*(const char *const *) p1, *(const char *const *) p2); +} + +/* Report on all files that might benefit from a multiple include guard. + Triggered by -H. */ +void +_cpp_report_missing_guards (cpp_reader *pfile) +{ + struct report_missing_guard_data data; + + data.pfile = pfile; + data.paths = NULL; + data.count = htab_elements (pfile->file_hash); + htab_traverse (pfile->file_hash, report_missing_guard, &data); + + if (data.paths != NULL) + { + size_t i; + + /* Sort the paths to avoid outputting them in hash table + order. */ + qsort (data.paths, data.count, sizeof (const char *), + report_missing_guard_cmp); + fputs (_("Multiple include guards may be useful for:\n"), + stderr); + for (i = 0; i < data.count; i++) + { + fputs (data.paths[i], stderr); + putc ('\n', stderr); + } + free (data.paths); + } +} + +/* Locate HEADER, and determine whether it is newer than the current + file. If it cannot be located or dated, return -1, if it is + newer, return 1, otherwise 0. */ +int +_cpp_compare_file_date (cpp_reader *pfile, const char *fname, + int angle_brackets) +{ + _cpp_file *file; + struct cpp_dir *dir; + + dir = search_path_head (pfile, fname, angle_brackets, IT_INCLUDE); + if (!dir) + return -1; + + file = _cpp_find_file (pfile, fname, dir, angle_brackets, _cpp_FFK_NORMAL, 0); + if (file->err_no) + return -1; + + if (file->fd != -1) + { + close (file->fd); + file->fd = -1; + } + + return file->st.st_mtime > pfile->buffer->file->st.st_mtime; +} + +/* Pushes the given file onto the buffer stack. Returns nonzero if + successful. */ +bool +cpp_push_include (cpp_reader *pfile, const char *fname) +{ + return _cpp_stack_include (pfile, fname, false, IT_CMDLINE, + pfile->line_table->highest_line); +} + +/* Pushes the given file, implicitly included at the start of a + compilation, onto the buffer stack but without any errors if the + file is not found. Returns nonzero if successful. */ +bool +cpp_push_default_include (cpp_reader *pfile, const char *fname) +{ + return _cpp_stack_include (pfile, fname, true, IT_DEFAULT, + pfile->line_table->highest_line); +} + +/* Do appropriate cleanup when a file INC's buffer is popped off the + input stack. */ +void +_cpp_pop_file_buffer (cpp_reader *pfile, _cpp_file *file, + const unsigned char *to_free) +{ + /* Record the inclusion-preventing macro, which could be NULL + meaning no controlling macro. */ + if (pfile->mi_valid && file->cmacro == NULL) + file->cmacro = pfile->mi_cmacro; + + /* Invalidate control macros in the #including file. */ + pfile->mi_valid = false; + + if (to_free) + { + if (to_free == file->buffer_start) + { + file->buffer_start = NULL; + file->buffer = NULL; + file->buffer_valid = false; + } + free ((void *) to_free); + } +} + +/* Return the file name associated with FILE. */ +const char * +_cpp_get_file_name (_cpp_file *file) +{ + return file->name; +} + +/* Inteface to file statistics record in _cpp_file structure. */ +struct stat * +_cpp_get_file_stat (_cpp_file *file) +{ + return &file->st; +} + +/* Set the include chain for "" to QUOTE, for <> to BRACKET. If + QUOTE_IGNORES_SOURCE_DIR, then "" includes do not look in the + directory of the including file. + + If BRACKET does not lie in the QUOTE chain, it is set to QUOTE. */ +void +cpp_set_include_chains (cpp_reader *pfile, cpp_dir *quote, cpp_dir *bracket, + int quote_ignores_source_dir) +{ + pfile->quote_include = quote; + pfile->bracket_include = quote; + pfile->quote_ignores_source_dir = quote_ignores_source_dir; + + for (; quote; quote = quote->next) + { + quote->name_map = NULL; + quote->len = strlen (quote->name); + if (quote == bracket) + pfile->bracket_include = bracket; + } +} + +/* Append the file name to the directory to create the path, but don't + turn / into // or // into ///; // may be a namespace escape. */ +static char * +append_file_to_dir (const char *fname, cpp_dir *dir) +{ + size_t dlen, flen; + char *path; + + dlen = dir->len; + flen = strlen (fname); + path = XNEWVEC (char, dlen + 1 + flen + 1); + memcpy (path, dir->name, dlen); + if (dlen && !IS_DIR_SEPARATOR (path[dlen - 1])) + path[dlen++] = '/'; + memcpy (&path[dlen], fname, flen + 1); + + return path; +} + +/* Read a space delimited string of unlimited length from a stdio + file F. */ +static char * +read_filename_string (int ch, FILE *f) +{ + char *alloc, *set; + int len; + + len = 20; + set = alloc = XNEWVEC (char, len + 1); + if (! is_space (ch)) + { + *set++ = ch; + while ((ch = getc (f)) != EOF && ! is_space (ch)) + { + if (set - alloc == len) + { + len *= 2; + alloc = XRESIZEVEC (char, alloc, len + 1); + set = alloc + len / 2; + } + *set++ = ch; + } + } + *set = '\0'; + ungetc (ch, f); + return alloc; +} + +/* Read the file name map file for DIR. */ +static void +read_name_map (cpp_dir *dir) +{ + static const char FILE_NAME_MAP_FILE[] = "header.gcc"; + char *name; + FILE *f; + size_t len, count = 0, room = 9; + + len = dir->len; + name = (char *) alloca (len + sizeof (FILE_NAME_MAP_FILE) + 1); + memcpy (name, dir->name, len); + if (len && !IS_DIR_SEPARATOR (name[len - 1])) + name[len++] = '/'; + strcpy (name + len, FILE_NAME_MAP_FILE); + f = fopen (name, "r"); + + dir->name_map = XNEWVEC (const char *, room); + + /* Silently return NULL if we cannot open. */ + if (f) + { + int ch; + + while ((ch = getc (f)) != EOF) + { + char *to; + + if (is_space (ch)) + continue; + + if (count + 2 > room) + { + room += 8; + dir->name_map = XRESIZEVEC (const char *, dir->name_map, room); + } + + dir->name_map[count] = read_filename_string (ch, f); + while ((ch = getc (f)) != EOF && is_hspace (ch)) + ; + + to = read_filename_string (ch, f); + if (IS_ABSOLUTE_PATH (to)) + dir->name_map[count + 1] = to; + else + { + dir->name_map[count + 1] = append_file_to_dir (to, dir); + free (to); + } + + count += 2; + while ((ch = getc (f)) != '\n') + if (ch == EOF) + break; + } + + fclose (f); + } + + /* Terminate the list of maps. */ + dir->name_map[count] = NULL; +} + +/* Remap a FILE's name based on the file_name_map, if any, for + FILE->dir. If the file name has any directory separators, + recursively check those directories too. */ +static char * +remap_filename (cpp_reader *pfile, _cpp_file *file) +{ + const char *fname, *p; + char *new_dir, *p3; + cpp_dir *dir; + size_t index, len; + + dir = file->dir; + fname = file->name; + + for (;;) + { + if (!dir->name_map) + read_name_map (dir); + + for (index = 0; dir->name_map[index]; index += 2) + if (!filename_cmp (dir->name_map[index], fname)) + return xstrdup (dir->name_map[index + 1]); + if (IS_ABSOLUTE_PATH (fname)) + return NULL; + p = strchr (fname, '/'); +#ifdef HAVE_DOS_BASED_FILE_SYSTEM + { + const char *p2 = strchr (fname, '\\'); + if (!p || (p2 && p > p2)) + p = p2; + } +#endif + if (!p || p == fname) + return NULL; + + len = dir->len + (p - fname + 1); + new_dir = XNEWVEC (char, len + 2); + p3 = new_dir + dir->len; + memcpy (new_dir, dir->name, dir->len); + if (dir->len && !IS_DIR_SEPARATOR (dir->name[dir->len - 1])) + { + *p3++ = '/'; + len++; + } + memcpy (p3, fname, p - fname + 1); + new_dir[len] = '\0'; + + dir = make_cpp_dir (pfile, new_dir, dir->sysp); + fname = p + 1; + } +} + +/* Returns true if PCHNAME is a valid PCH file for FILE. */ +static bool +validate_pch (cpp_reader *pfile, _cpp_file *file, const char *pchname) +{ + const char *saved_path = file->path; + bool valid = false; + + file->path = pchname; + if (open_file (file)) + { + valid = 1 & pfile->cb.valid_pch (pfile, pchname, file->fd); + + if (!valid) + { + close (file->fd); + file->fd = -1; + } + + if (CPP_OPTION (pfile, print_include_names)) + { + unsigned int i; + for (i = 1; i < pfile->line_table->depth; i++) + putc ('.', stderr); + fprintf (stderr, "%c %s\n", + valid ? '!' : 'x', pchname); + } + } + + file->path = saved_path; + return valid; +} + +/* Get the path associated with the _cpp_file F. The path includes + the base name from the include directive and the directory it was + found in via the search path. */ + +const char * +cpp_get_path (struct _cpp_file *f) +{ + return f->path; +} + +/* Get the directory associated with the _cpp_file F. */ + +cpp_dir * +cpp_get_dir (struct _cpp_file *f) +{ + return f->dir; +} + +/* Get the cpp_buffer currently associated with the cpp_reader + PFILE. */ + +cpp_buffer * +cpp_get_buffer (cpp_reader *pfile) +{ + return pfile->buffer; +} + +/* Get the _cpp_file associated with the cpp_buffer B. */ + +_cpp_file * +cpp_get_file (cpp_buffer *b) +{ + return b->file; +} + +/* Get the previous cpp_buffer given a cpp_buffer B. The previous + buffer is the buffer that included the given buffer. */ + +cpp_buffer * +cpp_get_prev (cpp_buffer *b) +{ + return b->prev; +} + +/* This data structure holds the list of header files that were seen + while the PCH was being built. The 'entries' field is kept sorted + in memcmp() order; yes, this means that on little-endian systems, + it's sorted initially by the least-significant byte of 'size', but + that's OK. The code does rely on having entries with the same size + next to each other. */ + +struct pchf_entry { + /* The size of this file. This is used to save running a MD5 checksum + if the sizes don't match. */ + off_t size; + /* The MD5 checksum of this file. */ + unsigned char sum[16]; + /* Is this file to be included only once? */ + bool once_only; +}; + +struct pchf_data { + /* Number of pchf_entry structures. */ + size_t count; + + /* Are there any values with once_only set? + This is used as an optimisation, it means we don't have to search + the structure if we're processing a regular #include. */ + bool have_once_only; + + struct pchf_entry entries[1]; +}; + +static struct pchf_data *pchf; + +/* A qsort ordering function for pchf_entry structures. */ + +static int +pchf_save_compare (const void *e1, const void *e2) +{ + return memcmp (e1, e2, sizeof (struct pchf_entry)); +} + +/* Create and write to F a pchf_data structure. */ + +bool +_cpp_save_file_entries (cpp_reader *pfile, FILE *fp) +{ + size_t count = 0; + struct pchf_data *result; + size_t result_size; + _cpp_file *f; + bool ret; + + for (f = pfile->all_files; f; f = f->next_file) + ++count; + + result_size = (sizeof (struct pchf_data) + + sizeof (struct pchf_entry) * (count - 1)); + result = XCNEWVAR (struct pchf_data, result_size); + + result->count = 0; + result->have_once_only = false; + + for (f = pfile->all_files; f; f = f->next_file) + { + size_t count; + + /* This should probably never happen, since if a read error occurred + the PCH file shouldn't be written... */ + if (f->dont_read || f->err_no) + continue; + + if (f->stack_count == 0) + continue; + + count = result->count++; + + result->entries[count].once_only = f->once_only; + /* |= is avoided in the next line because of an HP C compiler bug */ + result->have_once_only = result->have_once_only | f->once_only; + if (f->buffer_valid) + md5_buffer ((const char *)f->buffer, + f->st.st_size, result->entries[count].sum); + else + { + FILE *ff; + int oldfd = f->fd; + + if (!open_file (f)) + { + open_file_failed (pfile, f, 0, 0); + free (result); + return false; + } + ff = fdopen (f->fd, "rb"); + md5_stream (ff, result->entries[count].sum); + fclose (ff); + f->fd = oldfd; + } + result->entries[count].size = f->st.st_size; + } + + result_size = (sizeof (struct pchf_data) + + sizeof (struct pchf_entry) * (result->count - 1)); + + qsort (result->entries, result->count, sizeof (struct pchf_entry), + pchf_save_compare); + + ret = fwrite (result, result_size, 1, fp) == 1; + free (result); + return ret; +} + +/* Read the pchf_data structure from F. */ + +bool +_cpp_read_file_entries (cpp_reader *pfile ATTRIBUTE_UNUSED, FILE *f) +{ + struct pchf_data d; + + if (fread (&d, sizeof (struct pchf_data) - sizeof (struct pchf_entry), 1, f) + != 1) + return false; + + pchf = XNEWVAR (struct pchf_data, sizeof (struct pchf_data) + + sizeof (struct pchf_entry) * (d.count - 1)); + memcpy (pchf, &d, sizeof (struct pchf_data) - sizeof (struct pchf_entry)); + if (fread (pchf->entries, sizeof (struct pchf_entry), d.count, f) + != d.count) + return false; + return true; +} + +/* The parameters for pchf_compare. */ + +struct pchf_compare_data +{ + /* The size of the file we're looking for. */ + off_t size; + + /* The MD5 checksum of the file, if it's been computed. */ + unsigned char sum[16]; + + /* Is SUM valid? */ + bool sum_computed; + + /* Do we need to worry about entries that don't have ONCE_ONLY set? */ + bool check_included; + + /* The file that we're searching for. */ + _cpp_file *f; +}; + +/* bsearch comparison function; look for D_P in E_P. */ + +static int +pchf_compare (const void *d_p, const void *e_p) +{ + const struct pchf_entry *e = (const struct pchf_entry *)e_p; + struct pchf_compare_data *d = (struct pchf_compare_data *)d_p; + int result; + + result = memcmp (&d->size, &e->size, sizeof (off_t)); + if (result != 0) + return result; + + if (! d->sum_computed) + { + _cpp_file *const f = d->f; + + md5_buffer ((const char *)f->buffer, f->st.st_size, d->sum); + d->sum_computed = true; + } + + result = memcmp (d->sum, e->sum, 16); + if (result != 0) + return result; + + if (d->check_included || e->once_only) + return 0; + else + return 1; +} + +/* Check that F is not in a list read from a PCH file (if any). + Assumes that f->buffer_valid is true. Return TRUE if the file + should not be read. */ + +static bool +check_file_against_entries (cpp_reader *pfile ATTRIBUTE_UNUSED, + _cpp_file *f, + bool check_included) +{ + struct pchf_compare_data d; + + if (pchf == NULL + || (! check_included && ! pchf->have_once_only)) + return false; + + d.size = f->st.st_size; + d.sum_computed = false; + d.f = f; + d.check_included = check_included; + return bsearch (&d, pchf->entries, pchf->count, sizeof (struct pchf_entry), + pchf_compare) != NULL; +} + +/* Return true if the file FNAME is found in the appropriate include file path + as indicated by ANGLE_BRACKETS. */ + +bool +_cpp_has_header (cpp_reader *pfile, const char *fname, int angle_brackets, + enum include_type type) +{ + cpp_dir *start_dir = search_path_head (pfile, fname, angle_brackets, type); + _cpp_file *file = _cpp_find_file (pfile, fname, start_dir, angle_brackets, + _cpp_FFK_HAS_INCLUDE, 0); + return file->err_no != ENOENT; +} + +/* Read a file and convert to input charset, the same as if it were being read + by a cpp_reader. */ + +cpp_converted_source +cpp_get_converted_source (const char *fname, const char *input_charset) +{ + cpp_converted_source res = {}; + _cpp_file file = {}; + file.fd = -1; + file.name = lbasename (fname); + file.path = fname; + if (!open_file (&file)) + return res; + const bool ok = read_file_guts (NULL, &file, 0, input_charset); + close (file.fd); + if (!ok) + return res; + res.to_free = (char *) file.buffer_start; + res.data = (char *) file.buffer; + res.len = file.st.st_size; + return res; +} diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-base-selected/libcpp/init.cc b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-base-selected/libcpp/init.cc new file mode 100644 index 0000000000..c508f06112 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-base-selected/libcpp/init.cc @@ -0,0 +1,927 @@ +/* CPP Library. + Copyright (C) 1986-2023 Free Software Foundation, Inc. + Contributed by Per Bothner, 1994-95. + Based on CCCP program by Paul Rubin, June 1986 + Adapted to ANSI C, Richard Stallman, Jan 1987 + +This program is free software; you can redistribute it and/or modify it +under the terms of the GNU General Public License as published by the +Free Software Foundation; either version 3, or (at your option) any +later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; see the file COPYING3. If not see +. */ + +#include "config.h" +#include "system.h" +#include "cpplib.h" +#include "internal.h" +#include "mkdeps.h" +#include "localedir.h" +#include "filenames.h" + +#ifndef ENABLE_CANONICAL_SYSTEM_HEADERS +#ifdef HAVE_DOS_BASED_FILE_SYSTEM +#define ENABLE_CANONICAL_SYSTEM_HEADERS 1 +#else +#define ENABLE_CANONICAL_SYSTEM_HEADERS 0 +#endif +#endif + +static void init_library (void); +static void mark_named_operators (cpp_reader *, int); +static bool read_original_filename (cpp_reader *); +static void read_original_directory (cpp_reader *); +static void post_options (cpp_reader *); + +/* If we have designated initializers (GCC >2.7) these tables can be + initialized, constant data. Otherwise, they have to be filled in at + runtime. */ +#if HAVE_DESIGNATED_INITIALIZERS + +#define init_trigraph_map() /* Nothing. */ +#define TRIGRAPH_MAP \ +__extension__ const uchar _cpp_trigraph_map[UCHAR_MAX + 1] = { + +#define END }; +#define s(p, v) [p] = v, + +#else + +#define TRIGRAPH_MAP uchar _cpp_trigraph_map[UCHAR_MAX + 1] = { 0 }; \ + static void init_trigraph_map (void) { \ + unsigned char *x = _cpp_trigraph_map; + +#define END } +#define s(p, v) x[p] = v; + +#endif + +TRIGRAPH_MAP + s('=', '#') s(')', ']') s('!', '|') + s('(', '[') s('\'', '^') s('>', '}') + s('/', '\\') s('<', '{') s('-', '~') +END + +#undef s +#undef END +#undef TRIGRAPH_MAP + +/* A set of booleans indicating what CPP features each source language + requires. */ +struct lang_flags +{ + char c99; + char cplusplus; + char extended_numbers; + char extended_identifiers; + char c11_identifiers; + char xid_identifiers; + char std; + char digraphs; + char uliterals; + char rliterals; + char user_literals; + char binary_constants; + char digit_separators; + char trigraphs; + char utf8_char_literals; + char va_opt; + char scope; + char dfp_constants; + char size_t_literals; + char elifdef; + char warning_directive; + char delimited_escape_seqs; + char true_false; +}; + +static const struct lang_flags lang_defaults[] = +{ /* c99 c++ xnum xid c11 xidid std digr ulit rlit udlit bincst digsep trig u8chlit vaopt scope dfp szlit elifdef warndir delim trufal */ + /* GNUC89 */ { 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0 }, + /* GNUC99 */ { 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0 }, + /* GNUC11 */ { 1, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0 }, + /* GNUC17 */ { 1, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0 }, + /* GNUC2X */ { 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1 }, + /* STDC89 */ { 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + /* STDC94 */ { 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + /* STDC99 */ { 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + /* STDC11 */ { 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + /* STDC17 */ { 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + /* STDC2X */ { 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1 }, + /* GNUCXX */ { 0, 1, 1, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1 }, + /* CXX98 */ { 0, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1 }, + /* GNUCXX11 */ { 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1 }, + /* CXX11 */ { 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1 }, + /* GNUCXX14 */ { 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1 }, + /* CXX14 */ { 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1 }, + /* GNUCXX17 */ { 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1 }, + /* CXX17 */ { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1 }, + /* GNUCXX20 */ { 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1 }, + /* CXX20 */ { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1 }, + /* GNUCXX23 */ { 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1 }, + /* CXX23 */ { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1 }, + /* ASM */ { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } +}; + +/* Sets internal flags correctly for a given language. */ +void +cpp_set_lang (cpp_reader *pfile, enum c_lang lang) +{ + const struct lang_flags *l = &lang_defaults[(int) lang]; + + CPP_OPTION (pfile, lang) = lang; + + CPP_OPTION (pfile, c99) = l->c99; + CPP_OPTION (pfile, cplusplus) = l->cplusplus; + CPP_OPTION (pfile, extended_numbers) = l->extended_numbers; + CPP_OPTION (pfile, extended_identifiers) = l->extended_identifiers; + CPP_OPTION (pfile, c11_identifiers) = l->c11_identifiers; + CPP_OPTION (pfile, xid_identifiers) = l->xid_identifiers; + CPP_OPTION (pfile, std) = l->std; + CPP_OPTION (pfile, digraphs) = l->digraphs; + CPP_OPTION (pfile, uliterals) = l->uliterals; + CPP_OPTION (pfile, rliterals) = l->rliterals; + CPP_OPTION (pfile, user_literals) = l->user_literals; + CPP_OPTION (pfile, binary_constants) = l->binary_constants; + CPP_OPTION (pfile, digit_separators) = l->digit_separators; + CPP_OPTION (pfile, trigraphs) = l->trigraphs; + CPP_OPTION (pfile, utf8_char_literals) = l->utf8_char_literals; + CPP_OPTION (pfile, va_opt) = l->va_opt; + CPP_OPTION (pfile, scope) = l->scope; + CPP_OPTION (pfile, dfp_constants) = l->dfp_constants; + CPP_OPTION (pfile, size_t_literals) = l->size_t_literals; + CPP_OPTION (pfile, elifdef) = l->elifdef; + CPP_OPTION (pfile, warning_directive) = l->warning_directive; + CPP_OPTION (pfile, delimited_escape_seqs) = l->delimited_escape_seqs; + CPP_OPTION (pfile, true_false) = l->true_false; +} + +/* Initialize library global state. */ +static void +init_library (void) +{ + static int initialized = 0; + + if (! initialized) + { + initialized = 1; + + _cpp_init_lexer (); + + /* Set up the trigraph map. This doesn't need to do anything if + we were compiled with a compiler that supports C99 designated + initializers. */ + init_trigraph_map (); + +#ifdef ENABLE_NLS + (void) bindtextdomain (PACKAGE, LOCALEDIR); +#endif + } +} + +/* Initialize a cpp_reader structure. */ +cpp_reader * +cpp_create_reader (enum c_lang lang, cpp_hash_table *table, + class line_maps *line_table) +{ + cpp_reader *pfile; + + /* Initialize this instance of the library if it hasn't been already. */ + init_library (); + + pfile = XCNEW (cpp_reader); + memset (&pfile->base_context, 0, sizeof (pfile->base_context)); + + cpp_set_lang (pfile, lang); + CPP_OPTION (pfile, warn_multichar) = 1; + CPP_OPTION (pfile, discard_comments) = 1; + CPP_OPTION (pfile, discard_comments_in_macro_exp) = 1; + CPP_OPTION (pfile, max_include_depth) = 200; + CPP_OPTION (pfile, operator_names) = 1; + CPP_OPTION (pfile, warn_trigraphs) = 2; + CPP_OPTION (pfile, warn_endif_labels) = 1; + CPP_OPTION (pfile, cpp_warn_c90_c99_compat) = -1; + CPP_OPTION (pfile, cpp_warn_c11_c2x_compat) = -1; + CPP_OPTION (pfile, cpp_warn_cxx11_compat) = 0; + CPP_OPTION (pfile, cpp_warn_cxx20_compat) = 0; + CPP_OPTION (pfile, cpp_warn_deprecated) = 1; + CPP_OPTION (pfile, cpp_warn_long_long) = 0; + CPP_OPTION (pfile, dollars_in_ident) = 1; + CPP_OPTION (pfile, warn_dollars) = 1; + CPP_OPTION (pfile, warn_variadic_macros) = 1; + CPP_OPTION (pfile, warn_builtin_macro_redefined) = 1; + CPP_OPTION (pfile, cpp_warn_implicit_fallthrough) = 0; + /* By default, track locations of tokens resulting from macro + expansion. The '2' means, track the locations with the highest + accuracy. Read the comments for struct + cpp_options::track_macro_expansion to learn about the other + values. */ + CPP_OPTION (pfile, track_macro_expansion) = 2; + CPP_OPTION (pfile, warn_normalize) = normalized_C; + CPP_OPTION (pfile, warn_literal_suffix) = 1; + CPP_OPTION (pfile, canonical_system_headers) + = ENABLE_CANONICAL_SYSTEM_HEADERS; + CPP_OPTION (pfile, ext_numeric_literals) = 1; + CPP_OPTION (pfile, warn_date_time) = 0; + CPP_OPTION (pfile, cpp_warn_bidirectional) = bidirectional_unpaired; + CPP_OPTION (pfile, cpp_warn_invalid_utf8) = 0; + CPP_OPTION (pfile, cpp_warn_unicode) = 1; + CPP_OPTION (pfile, cpp_input_charset_explicit) = 0; + + /* Default CPP arithmetic to something sensible for the host for the + benefit of dumb users like fix-header. */ + CPP_OPTION (pfile, precision) = CHAR_BIT * sizeof (long); + CPP_OPTION (pfile, char_precision) = CHAR_BIT; + CPP_OPTION (pfile, wchar_precision) = CHAR_BIT * sizeof (int); + CPP_OPTION (pfile, int_precision) = CHAR_BIT * sizeof (int); + CPP_OPTION (pfile, unsigned_char) = 0; + CPP_OPTION (pfile, unsigned_wchar) = 1; + CPP_OPTION (pfile, unsigned_utf8char) = 1; + CPP_OPTION (pfile, bytes_big_endian) = 1; /* does not matter */ + + /* Default to no charset conversion. */ + CPP_OPTION (pfile, narrow_charset) = _cpp_default_encoding (); + CPP_OPTION (pfile, wide_charset) = 0; + + /* Default the input character set to UTF-8. */ + CPP_OPTION (pfile, input_charset) = _cpp_default_encoding (); + + /* A fake empty "directory" used as the starting point for files + looked up without a search path. Name cannot be '/' because we + don't want to prepend anything at all to filenames using it. All + other entries are correct zero-initialized. */ + pfile->no_search_path.name = (char *) ""; + + /* Initialize the line map. */ + pfile->line_table = line_table; + + /* Initialize lexer state. */ + pfile->state.save_comments = ! CPP_OPTION (pfile, discard_comments); + + /* Set up static tokens. */ + pfile->avoid_paste.type = CPP_PADDING; + pfile->avoid_paste.val.source = NULL; + pfile->avoid_paste.src_loc = 0; + pfile->endarg.type = CPP_EOF; + pfile->endarg.flags = 0; + pfile->endarg.src_loc = 0; + + /* Create a token buffer for the lexer. */ + _cpp_init_tokenrun (&pfile->base_run, 250); + pfile->cur_run = &pfile->base_run; + pfile->cur_token = pfile->base_run.base; + + /* Initialize the base context. */ + pfile->context = &pfile->base_context; + pfile->base_context.c.macro = 0; + pfile->base_context.prev = pfile->base_context.next = 0; + + /* Aligned and unaligned storage. */ + pfile->a_buff = _cpp_get_buff (pfile, 0); + pfile->u_buff = _cpp_get_buff (pfile, 0); + + /* Initialize table for push_macro/pop_macro. */ + pfile->pushed_macros = 0; + + /* Do not force token locations by default. */ + pfile->forced_token_location = 0; + + /* Note the timestamp is unset. */ + pfile->time_stamp = time_t (-1); + pfile->time_stamp_kind = 0; + + /* The expression parser stack. */ + _cpp_expand_op_stack (pfile); + + /* Initialize the buffer obstack. */ + obstack_specify_allocation (&pfile->buffer_ob, 0, 0, xmalloc, free); + + _cpp_init_files (pfile); + + _cpp_init_hashtable (pfile, table); + + return pfile; +} + +/* Set the line_table entry in PFILE. This is called after reading a + PCH file, as the old line_table will be incorrect. */ +void +cpp_set_line_map (cpp_reader *pfile, class line_maps *line_table) +{ + pfile->line_table = line_table; +} + +/* Free resources used by PFILE. Accessing PFILE after this function + returns leads to undefined behavior. Returns the error count. */ +void +cpp_destroy (cpp_reader *pfile) +{ + cpp_context *context, *contextn; + struct def_pragma_macro *pmacro; + tokenrun *run, *runn; + int i; + + free (pfile->op_stack); + + while (CPP_BUFFER (pfile) != NULL) + _cpp_pop_buffer (pfile); + + free (pfile->out.base); + + if (pfile->macro_buffer) + { + free (pfile->macro_buffer); + pfile->macro_buffer = NULL; + pfile->macro_buffer_len = 0; + } + + if (pfile->deps) + deps_free (pfile->deps); + obstack_free (&pfile->buffer_ob, 0); + + _cpp_destroy_hashtable (pfile); + _cpp_cleanup_files (pfile); + _cpp_destroy_iconv (pfile); + + _cpp_free_buff (pfile->a_buff); + _cpp_free_buff (pfile->u_buff); + _cpp_free_buff (pfile->free_buffs); + + for (run = &pfile->base_run; run; run = runn) + { + runn = run->next; + free (run->base); + if (run != &pfile->base_run) + free (run); + } + + for (context = pfile->base_context.next; context; context = contextn) + { + contextn = context->next; + free (context); + } + + if (pfile->comments.entries) + { + for (i = 0; i < pfile->comments.count; i++) + free (pfile->comments.entries[i].comment); + + free (pfile->comments.entries); + } + if (pfile->pushed_macros) + { + do + { + pmacro = pfile->pushed_macros; + pfile->pushed_macros = pmacro->next; + free (pmacro->name); + free (pmacro); + } + while (pfile->pushed_macros); + } + + free (pfile); +} + +/* This structure defines one built-in identifier. A node will be + entered in the hash table under the name NAME, with value VALUE. + + There are two tables of these. builtin_array holds all the + "builtin" macros: these are handled by builtin_macro() in + macro.cc. Builtin is somewhat of a misnomer -- the property of + interest is that these macros require special code to compute their + expansions. The value is a "cpp_builtin_type" enumerator. + + operator_array holds the C++ named operators. These are keywords + which act as aliases for punctuators. In C++, they cannot be + altered through #define, and #if recognizes them as operators. In + C, these are not entered into the hash table at all (but see + ). The value is a token-type enumerator. */ +struct builtin_macro +{ + const uchar *const name; + const unsigned short len; + const unsigned short value; + const bool always_warn_if_redefined; +}; + +#define B(n, t, f) { DSC(n), t, f } +static const struct builtin_macro builtin_array[] = +{ + B("__TIMESTAMP__", BT_TIMESTAMP, false), + B("__TIME__", BT_TIME, false), + B("__DATE__", BT_DATE, false), + B("__FILE__", BT_FILE, false), + B("__FILE_NAME__", BT_FILE_NAME, false), + B("__BASE_FILE__", BT_BASE_FILE, false), + B("__LINE__", BT_SPECLINE, true), + B("__INCLUDE_LEVEL__", BT_INCLUDE_LEVEL, true), + B("__COUNTER__", BT_COUNTER, true), + /* Make sure to update the list of built-in + function-like macros in traditional.cc: + fun_like_macro() when adding more following */ + B("__has_attribute", BT_HAS_ATTRIBUTE, true), + B("__has_c_attribute", BT_HAS_STD_ATTRIBUTE, true), + B("__has_cpp_attribute", BT_HAS_ATTRIBUTE, true), + B("__has_builtin", BT_HAS_BUILTIN, true), + B("__has_include", BT_HAS_INCLUDE, true), + B("__has_include_next",BT_HAS_INCLUDE_NEXT, true), + /* Keep builtins not used for -traditional-cpp at the end, and + update init_builtins() if any more are added. */ + B("_Pragma", BT_PRAGMA, true), + B("__STDC__", BT_STDC, true), +}; +#undef B + +struct builtin_operator +{ + const uchar *const name; + const unsigned short len; + const unsigned short value; +}; + +#define B(n, t) { DSC(n), t } +static const struct builtin_operator operator_array[] = +{ + B("and", CPP_AND_AND), + B("and_eq", CPP_AND_EQ), + B("bitand", CPP_AND), + B("bitor", CPP_OR), + B("compl", CPP_COMPL), + B("not", CPP_NOT), + B("not_eq", CPP_NOT_EQ), + B("or", CPP_OR_OR), + B("or_eq", CPP_OR_EQ), + B("xor", CPP_XOR), + B("xor_eq", CPP_XOR_EQ) +}; +#undef B + +/* Mark the C++ named operators in the hash table. */ +static void +mark_named_operators (cpp_reader *pfile, int flags) +{ + const struct builtin_operator *b; + + for (b = operator_array; + b < (operator_array + ARRAY_SIZE (operator_array)); + b++) + { + cpp_hashnode *hp = cpp_lookup (pfile, b->name, b->len); + hp->flags |= flags; + hp->is_directive = 0; + hp->directive_index = b->value; + } +} + +/* Helper function of cpp_type2name. Return the string associated with + named operator TYPE. */ +const char * +cpp_named_operator2name (enum cpp_ttype type) +{ + const struct builtin_operator *b; + + for (b = operator_array; + b < (operator_array + ARRAY_SIZE (operator_array)); + b++) + { + if (type == b->value) + return (const char *) b->name; + } + + return NULL; +} + +void +cpp_init_special_builtins (cpp_reader *pfile) +{ + const struct builtin_macro *b; + size_t n = ARRAY_SIZE (builtin_array); + + if (CPP_OPTION (pfile, traditional)) + n -= 2; + else if (! CPP_OPTION (pfile, stdc_0_in_system_headers) + || CPP_OPTION (pfile, std)) + n--; + + for (b = builtin_array; b < builtin_array + n; b++) + { + if ((b->value == BT_HAS_ATTRIBUTE + || b->value == BT_HAS_STD_ATTRIBUTE + || b->value == BT_HAS_BUILTIN) + && (CPP_OPTION (pfile, lang) == CLK_ASM + || pfile->cb.has_attribute == NULL)) + continue; + cpp_hashnode *hp = cpp_lookup (pfile, b->name, b->len); + hp->type = NT_BUILTIN_MACRO; + if (b->always_warn_if_redefined) + hp->flags |= NODE_WARN; + hp->value.builtin = (enum cpp_builtin_type) b->value; + } +} + +/* Restore macro C to builtin macro definition. */ + +void +_cpp_restore_special_builtin (cpp_reader *pfile, struct def_pragma_macro *c) +{ + size_t len = strlen (c->name); + + for (const struct builtin_macro *b = builtin_array; + b < builtin_array + ARRAY_SIZE (builtin_array); b++) + if (b->len == len && memcmp (c->name, b->name, len + 1) == 0) + { + cpp_hashnode *hp = cpp_lookup (pfile, b->name, b->len); + hp->type = NT_BUILTIN_MACRO; + if (b->always_warn_if_redefined) + hp->flags |= NODE_WARN; + hp->value.builtin = (enum cpp_builtin_type) b->value; + } +} + +/* Read the builtins table above and enter them, and language-specific + macros, into the hash table. HOSTED is true if this is a hosted + environment. */ +void +cpp_init_builtins (cpp_reader *pfile, int hosted) +{ + cpp_init_special_builtins (pfile); + + if (!CPP_OPTION (pfile, traditional) + && (! CPP_OPTION (pfile, stdc_0_in_system_headers) + || CPP_OPTION (pfile, std))) + _cpp_define_builtin (pfile, "__STDC__ 1"); + + if (CPP_OPTION (pfile, cplusplus)) + { + /* C++23 is not yet a standard. For now, use an invalid + * year/month, 202100L, which is larger than 202002L. */ + if (CPP_OPTION (pfile, lang) == CLK_CXX23 + || CPP_OPTION (pfile, lang) == CLK_GNUCXX23) + _cpp_define_builtin (pfile, "__cplusplus 202100L"); + else if (CPP_OPTION (pfile, lang) == CLK_CXX20 + || CPP_OPTION (pfile, lang) == CLK_GNUCXX20) + _cpp_define_builtin (pfile, "__cplusplus 202002L"); + else if (CPP_OPTION (pfile, lang) == CLK_CXX17 + || CPP_OPTION (pfile, lang) == CLK_GNUCXX17) + _cpp_define_builtin (pfile, "__cplusplus 201703L"); + else if (CPP_OPTION (pfile, lang) == CLK_CXX14 + || CPP_OPTION (pfile, lang) == CLK_GNUCXX14) + _cpp_define_builtin (pfile, "__cplusplus 201402L"); + else if (CPP_OPTION (pfile, lang) == CLK_CXX11 + || CPP_OPTION (pfile, lang) == CLK_GNUCXX11) + _cpp_define_builtin (pfile, "__cplusplus 201103L"); + else + _cpp_define_builtin (pfile, "__cplusplus 199711L"); + } + else if (CPP_OPTION (pfile, lang) == CLK_ASM) + _cpp_define_builtin (pfile, "__ASSEMBLER__ 1"); + else if (CPP_OPTION (pfile, lang) == CLK_STDC94) + _cpp_define_builtin (pfile, "__STDC_VERSION__ 199409L"); + else if (CPP_OPTION (pfile, lang) == CLK_STDC2X + || CPP_OPTION (pfile, lang) == CLK_GNUC2X) + _cpp_define_builtin (pfile, "__STDC_VERSION__ 202000L"); + else if (CPP_OPTION (pfile, lang) == CLK_STDC17 + || CPP_OPTION (pfile, lang) == CLK_GNUC17) + _cpp_define_builtin (pfile, "__STDC_VERSION__ 201710L"); + else if (CPP_OPTION (pfile, lang) == CLK_STDC11 + || CPP_OPTION (pfile, lang) == CLK_GNUC11) + _cpp_define_builtin (pfile, "__STDC_VERSION__ 201112L"); + else if (CPP_OPTION (pfile, c99)) + _cpp_define_builtin (pfile, "__STDC_VERSION__ 199901L"); + + if (CPP_OPTION (pfile, uliterals) + && !(CPP_OPTION (pfile, cplusplus) + && (CPP_OPTION (pfile, lang) == CLK_GNUCXX + || CPP_OPTION (pfile, lang) == CLK_CXX98))) + { + _cpp_define_builtin (pfile, "__STDC_UTF_16__ 1"); + _cpp_define_builtin (pfile, "__STDC_UTF_32__ 1"); + } + + if (hosted) + _cpp_define_builtin (pfile, "__STDC_HOSTED__ 1"); + else + _cpp_define_builtin (pfile, "__STDC_HOSTED__ 0"); + + if (CPP_OPTION (pfile, objc)) + _cpp_define_builtin (pfile, "__OBJC__ 1"); +} + +/* Sanity-checks are dependent on command-line options, so it is + called as a subroutine of cpp_read_main_file. */ +#if CHECKING_P +static void sanity_checks (cpp_reader *); +static void sanity_checks (cpp_reader *pfile) +{ + cppchar_t test = 0; + size_t max_precision = 2 * CHAR_BIT * sizeof (cpp_num_part); + + /* Sanity checks for assumptions about CPP arithmetic and target + type precisions made by cpplib. */ + test--; + if (test < 1) + cpp_error (pfile, CPP_DL_ICE, "cppchar_t must be an unsigned type"); + + if (CPP_OPTION (pfile, precision) > max_precision) + cpp_error (pfile, CPP_DL_ICE, + "preprocessor arithmetic has maximum precision of %lu bits;" + " target requires %lu bits", + (unsigned long) max_precision, + (unsigned long) CPP_OPTION (pfile, precision)); + + if (CPP_OPTION (pfile, precision) < CPP_OPTION (pfile, int_precision)) + cpp_error (pfile, CPP_DL_ICE, + "CPP arithmetic must be at least as precise as a target int"); + + if (CPP_OPTION (pfile, char_precision) < 8) + cpp_error (pfile, CPP_DL_ICE, "target char is less than 8 bits wide"); + + if (CPP_OPTION (pfile, wchar_precision) < CPP_OPTION (pfile, char_precision)) + cpp_error (pfile, CPP_DL_ICE, + "target wchar_t is narrower than target char"); + + if (CPP_OPTION (pfile, int_precision) < CPP_OPTION (pfile, char_precision)) + cpp_error (pfile, CPP_DL_ICE, + "target int is narrower than target char"); + + /* This is assumed in eval_token() and could be fixed if necessary. */ + if (sizeof (cppchar_t) > sizeof (cpp_num_part)) + cpp_error (pfile, CPP_DL_ICE, + "CPP half-integer narrower than CPP character"); + + if (CPP_OPTION (pfile, wchar_precision) > BITS_PER_CPPCHAR_T) + cpp_error (pfile, CPP_DL_ICE, + "CPP on this host cannot handle wide character constants over" + " %lu bits, but the target requires %lu bits", + (unsigned long) BITS_PER_CPPCHAR_T, + (unsigned long) CPP_OPTION (pfile, wchar_precision)); +} +#else +# define sanity_checks(PFILE) +#endif + +/* This is called after options have been parsed, and partially + processed. */ +void +cpp_post_options (cpp_reader *pfile) +{ + int flags; + + sanity_checks (pfile); + + post_options (pfile); + + /* Mark named operators before handling command line macros. */ + flags = 0; + if (CPP_OPTION (pfile, cplusplus) && CPP_OPTION (pfile, operator_names)) + flags |= NODE_OPERATOR; + if (CPP_OPTION (pfile, warn_cxx_operator_names)) + flags |= NODE_DIAGNOSTIC | NODE_WARN_OPERATOR; + if (flags != 0) + mark_named_operators (pfile, flags); +} + +/* Setup for processing input from the file named FNAME, or stdin if + it is the empty string. Return the original filename on success + (e.g. foo.i->foo.c), or NULL on failure. INJECTING is true if + there may be injected headers before line 1 of the main file. */ +const char * +cpp_read_main_file (cpp_reader *pfile, const char *fname, bool injecting) +{ + if (mkdeps *deps = cpp_get_deps (pfile)) + /* Set the default target (if there is none already). */ + deps_add_default_target (deps, fname); + + pfile->main_file + = _cpp_find_file (pfile, fname, + CPP_OPTION (pfile, preprocessed) ? &pfile->no_search_path + : CPP_OPTION (pfile, main_search) == CMS_user + ? pfile->quote_include + : CPP_OPTION (pfile, main_search) == CMS_system + ? pfile->bracket_include : &pfile->no_search_path, + /*angle=*/0, _cpp_FFK_NORMAL, 0); + + if (_cpp_find_failed (pfile->main_file)) + return NULL; + + _cpp_stack_file (pfile, pfile->main_file, + injecting || CPP_OPTION (pfile, preprocessed) + ? IT_PRE_MAIN : IT_MAIN, 0); + + /* For foo.i, read the original filename foo.c now, for the benefit + of the front ends. */ + if (CPP_OPTION (pfile, preprocessed)) + if (!read_original_filename (pfile)) + { + /* We're on line 1 after all. */ + auto *last = linemap_check_ordinary + (LINEMAPS_LAST_MAP (pfile->line_table, false)); + last->to_line = 1; + /* Inform of as-if a file change. */ + _cpp_do_file_change (pfile, LC_RENAME_VERBATIM, LINEMAP_FILE (last), + LINEMAP_LINE (last), LINEMAP_SYSP (last)); + } + + auto *map = LINEMAPS_LAST_ORDINARY_MAP (pfile->line_table); + pfile->main_loc = MAP_START_LOCATION (map); + + return ORDINARY_MAP_FILE_NAME (map); +} + +location_t +cpp_main_loc (const cpp_reader *pfile) +{ + return pfile->main_loc; +} + +/* For preprocessed files, if the very first characters are + '#[01]', then handle a line directive so we know the + original file name. This will generate file_change callbacks, + which the front ends must handle appropriately given their state of + initialization. We peek directly into the character buffer, so + that we're not confused by otherwise-skipped white space & + comments. We can be very picky, because this should have been + machine-generated text (by us, no less). This way we do not + interfere with the module directive state machine. */ + +static bool +read_original_filename (cpp_reader *pfile) +{ + auto *buf = pfile->buffer->next_line; + + if (pfile->buffer->rlimit - buf > 4 + && buf[0] == '#' + && buf[1] == ' ' + // Also permit '1', as that's what used to be here + && (buf[2] == '0' || buf[2] == '1') + && buf[3] == ' ') + { + const cpp_token *token = _cpp_lex_direct (pfile); + gcc_checking_assert (token->type == CPP_HASH); + if (_cpp_handle_directive (pfile, token->flags & PREV_WHITE)) + { + read_original_directory (pfile); + + auto *penult = &linemap_check_ordinary + (LINEMAPS_LAST_MAP (pfile->line_table, false))[-1]; + if (penult[1].reason == LC_RENAME_VERBATIM) + { + /* Expunge any evidence of the original linemap. */ + pfile->line_table->highest_location + = pfile->line_table->highest_line + = penult[0].start_location; + + penult[1].start_location = penult[0].start_location; + penult[1].reason = penult[0].reason; + penult[0] = penult[1]; + pfile->line_table->info_ordinary.used--; + pfile->line_table->info_ordinary.cache = 0; + } + + return true; + } + } + + return false; +} + +/* For preprocessed files, if the tokens following the first filename + line is of the form # "/path/name//", handle the + directive so we know the original current directory. + + As with the first line peeking, we can do this without lexing by + being picky. */ +static void +read_original_directory (cpp_reader *pfile) +{ + auto *buf = pfile->buffer->next_line; + + if (pfile->buffer->rlimit - buf > 4 + && buf[0] == '#' + && buf[1] == ' ' + // Also permit '1', as that's what used to be here + && (buf[2] == '0' || buf[2] == '1') + && buf[3] == ' ') + { + const cpp_token *hash = _cpp_lex_direct (pfile); + gcc_checking_assert (hash->type == CPP_HASH); + pfile->state.in_directive = 1; + const cpp_token *number = _cpp_lex_direct (pfile); + gcc_checking_assert (number->type == CPP_NUMBER); + const cpp_token *string = _cpp_lex_direct (pfile); + pfile->state.in_directive = 0; + + const unsigned char *text = nullptr; + size_t len = 0; + if (string->type == CPP_STRING) + { + /* The string value includes the quotes. */ + text = string->val.str.text; + len = string->val.str.len; + } + if (len < 5 + || !IS_DIR_SEPARATOR (text[len - 2]) + || !IS_DIR_SEPARATOR (text[len - 3])) + { + /* That didn't work out, back out. */ + _cpp_backup_tokens (pfile, 3); + return; + } + + if (pfile->cb.dir_change) + { + /* Smash the string directly, it's dead at this point */ + char *smashy = (char *)text; + smashy[len - 3] = 0; + + pfile->cb.dir_change (pfile, smashy + 1); + } + + /* We should be at EOL. */ + } +} + +/* This is called at the end of preprocessing. It pops the last + buffer and writes dependency output. + + Maybe it should also reset state, such that you could call + cpp_start_read with a new filename to restart processing. */ +void +cpp_finish (cpp_reader *pfile, FILE *deps_stream) +{ + /* Warn about unused macros before popping the final buffer. */ + if (CPP_OPTION (pfile, warn_unused_macros)) + cpp_forall_identifiers (pfile, _cpp_warn_if_unused_macro, NULL); + + /* lex.cc leaves the final buffer on the stack. This it so that + it returns an unending stream of CPP_EOFs to the client. If we + popped the buffer, we'd dereference a NULL buffer pointer and + segfault. It's nice to allow the client to do worry-free excess + cpp_get_token calls. */ + while (pfile->buffer) + _cpp_pop_buffer (pfile); + + if (deps_stream) + deps_write (pfile, deps_stream, 72); + + /* Report on headers that could use multiple include guards. */ + if (CPP_OPTION (pfile, print_include_names)) + _cpp_report_missing_guards (pfile); +} + +static void +post_options (cpp_reader *pfile) +{ + /* -Wtraditional is not useful in C++ mode. */ + if (CPP_OPTION (pfile, cplusplus)) + CPP_OPTION (pfile, cpp_warn_traditional) = 0; + + /* Permanently disable macro expansion if we are rescanning + preprocessed text. Read preprocesed source in ISO mode. */ + if (CPP_OPTION (pfile, preprocessed)) + { + if (!CPP_OPTION (pfile, directives_only)) + pfile->state.prevent_expansion = 1; + CPP_OPTION (pfile, traditional) = 0; + } + + if (CPP_OPTION (pfile, warn_trigraphs) == 2) + CPP_OPTION (pfile, warn_trigraphs) = !CPP_OPTION (pfile, trigraphs); + + if (CPP_OPTION (pfile, traditional)) + { + CPP_OPTION (pfile, trigraphs) = 0; + CPP_OPTION (pfile, warn_trigraphs) = 0; + } + + if (CPP_OPTION (pfile, module_directives)) + { + /* These unspellable tokens have a leading space. */ + const char *const inits[spec_nodes::M_HWM] + = {"export ", "module ", "import ", "__import"}; + + for (int ix = 0; ix != spec_nodes::M_HWM; ix++) + { + cpp_hashnode *node = cpp_lookup (pfile, UC (inits[ix]), + strlen (inits[ix])); + + /* Token we pass to the compiler. */ + pfile->spec_nodes.n_modules[ix][1] = node; + + if (ix != spec_nodes::M__IMPORT) + /* Token we recognize when lexing, drop the trailing ' '. */ + node = cpp_lookup (pfile, NODE_NAME (node), NODE_LEN (node) - 1); + + node->flags |= NODE_MODULE; + pfile->spec_nodes.n_modules[ix][0] = node; + } + } +} diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-base-selected/libcpp/lex.cc b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-base-selected/libcpp/lex.cc new file mode 100644 index 0000000000..8951ac56ee --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-base-selected/libcpp/lex.cc @@ -0,0 +1,5660 @@ +/* CPP Library - lexical analysis. + Copyright (C) 2000-2023 Free Software Foundation, Inc. + Contributed by Per Bothner, 1994-95. + Based on CCCP program by Paul Rubin, June 1986 + Adapted to ANSI C, Richard Stallman, Jan 1987 + Broken out to separate file, Zack Weinberg, Mar 2000 + +This program is free software; you can redistribute it and/or modify it +under the terms of the GNU General Public License as published by the +Free Software Foundation; either version 3, or (at your option) any +later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; see the file COPYING3. If not see +. */ + +#include "config.h" +#include "system.h" +#include "cpplib.h" +#include "internal.h" + +enum spell_type +{ + SPELL_OPERATOR = 0, + SPELL_IDENT, + SPELL_LITERAL, + SPELL_NONE +}; + +struct token_spelling +{ + enum spell_type category; + const unsigned char *name; +}; + +static const unsigned char *const digraph_spellings[] = +{ UC"%:", UC"%:%:", UC"<:", UC":>", UC"<%", UC"%>" }; + +#define OP(e, s) { SPELL_OPERATOR, UC s }, +#define TK(e, s) { SPELL_ ## s, UC #e }, +static const struct token_spelling token_spellings[N_TTYPES] = { TTYPE_TABLE }; +#undef OP +#undef TK + +#define TOKEN_SPELL(token) (token_spellings[(token)->type].category) +#define TOKEN_NAME(token) (token_spellings[(token)->type].name) + +/* ISO 10646 defines the UCS codespace as the range 0-0x10FFFF inclusive. */ +#define UCS_LIMIT 0x10FFFF + +static void add_line_note (cpp_buffer *, const uchar *, unsigned int); +static int skip_line_comment (cpp_reader *); +static void skip_whitespace (cpp_reader *, cppchar_t); +static void lex_string (cpp_reader *, cpp_token *, const uchar *); +static void save_comment (cpp_reader *, cpp_token *, const uchar *, cppchar_t); +static void store_comment (cpp_reader *, cpp_token *); +static void create_literal (cpp_reader *, cpp_token *, const uchar *, + unsigned int, enum cpp_ttype); +static bool warn_in_comment (cpp_reader *, _cpp_line_note *); +static int name_p (cpp_reader *, const cpp_string *); +static tokenrun *next_tokenrun (tokenrun *); + +static _cpp_buff *new_buff (size_t); + + +/* Utility routine: + + Compares, the token TOKEN to the NUL-terminated string STRING. + TOKEN must be a CPP_NAME. Returns 1 for equal, 0 for unequal. */ +int +cpp_ideq (const cpp_token *token, const char *string) +{ + if (token->type != CPP_NAME) + return 0; + + return !ustrcmp (NODE_NAME (token->val.node.node), (const uchar *) string); +} + +/* Record a note TYPE at byte POS into the current cleaned logical + line. */ +static void +add_line_note (cpp_buffer *buffer, const uchar *pos, unsigned int type) +{ + if (buffer->notes_used == buffer->notes_cap) + { + buffer->notes_cap = buffer->notes_cap * 2 + 200; + buffer->notes = XRESIZEVEC (_cpp_line_note, buffer->notes, + buffer->notes_cap); + } + + buffer->notes[buffer->notes_used].pos = pos; + buffer->notes[buffer->notes_used].type = type; + buffer->notes_used++; +} + + +/* Fast path to find line special characters using optimized character + scanning algorithms. Anything complicated falls back to the slow + path below. Since this loop is very hot it's worth doing these kinds + of optimizations. + + One of the paths through the ifdefs should provide + + const uchar *search_line_fast (const uchar *s, const uchar *end); + + Between S and END, search for \n, \r, \\, ?. Return a pointer to + the found character. + + Note that the last character of the buffer is *always* a newline, + as forced by _cpp_convert_input. This fact can be used to avoid + explicitly looking for the end of the buffer. */ + +/* Configure gives us an ifdef test. */ +#ifndef WORDS_BIGENDIAN +#define WORDS_BIGENDIAN 0 +#endif + +/* We'd like the largest integer that fits into a register. There's nothing + in that gives us that. For most hosts this is unsigned long, + but MS decided on an LLP64 model. Thankfully when building with GCC we + can get the "real" word size. */ +#ifdef __GNUC__ +typedef unsigned int word_type __attribute__((__mode__(__word__))); +#else +typedef unsigned long word_type; +#endif + +/* The code below is only expecting sizes 4 or 8. + Die at compile-time if this expectation is violated. */ +typedef char check_word_type_size + [(sizeof(word_type) == 8 || sizeof(word_type) == 4) * 2 - 1]; + +/* Return X with the first N bytes forced to values that won't match one + of the interesting characters. Note that NUL is not interesting. */ + +static inline word_type +acc_char_mask_misalign (word_type val, unsigned int n) +{ + word_type mask = -1; + if (WORDS_BIGENDIAN) + mask >>= n * 8; + else + mask <<= n * 8; + return val & mask; +} + +/* Return X replicated to all byte positions within WORD_TYPE. */ + +static inline word_type +acc_char_replicate (uchar x) +{ + word_type ret; + + ret = (x << 24) | (x << 16) | (x << 8) | x; + if (sizeof(word_type) == 8) + ret = (ret << 16 << 16) | ret; + return ret; +} + +/* Return non-zero if some byte of VAL is (probably) C. */ + +static inline word_type +acc_char_cmp (word_type val, word_type c) +{ +#if defined(__GNUC__) && defined(__alpha__) + /* We can get exact results using a compare-bytes instruction. + Get (val == c) via (0 >= (val ^ c)). */ + return __builtin_alpha_cmpbge (0, val ^ c); +#else + word_type magic = 0x7efefefeU; + if (sizeof(word_type) == 8) + magic = (magic << 16 << 16) | 0xfefefefeU; + magic |= 1; + + val ^= c; + return ((val + magic) ^ ~val) & ~magic; +#endif +} + +/* Given the result of acc_char_cmp is non-zero, return the index of + the found character. If this was a false positive, return -1. */ + +static inline int +acc_char_index (word_type cmp ATTRIBUTE_UNUSED, + word_type val ATTRIBUTE_UNUSED) +{ +#if defined(__GNUC__) && defined(__alpha__) && !WORDS_BIGENDIAN + /* The cmpbge instruction sets *bits* of the result corresponding to + matches in the bytes with no false positives. */ + return __builtin_ctzl (cmp); +#else + unsigned int i; + + /* ??? It would be nice to force unrolling here, + and have all of these constants folded. */ + for (i = 0; i < sizeof(word_type); ++i) + { + uchar c; + if (WORDS_BIGENDIAN) + c = (val >> (sizeof(word_type) - i - 1) * 8) & 0xff; + else + c = (val >> i * 8) & 0xff; + + if (c == '\n' || c == '\r' || c == '\\' || c == '?') + return i; + } + + return -1; +#endif +} + +/* A version of the fast scanner using bit fiddling techniques. + + For 32-bit words, one would normally perform 16 comparisons and + 16 branches. With this algorithm one performs 24 arithmetic + operations and one branch. Whether this is faster with a 32-bit + word size is going to be somewhat system dependent. + + For 64-bit words, we eliminate twice the number of comparisons + and branches without increasing the number of arithmetic operations. + It's almost certainly going to be a win with 64-bit word size. */ + +static const uchar * search_line_acc_char (const uchar *, const uchar *) + ATTRIBUTE_UNUSED; + +static const uchar * +search_line_acc_char (const uchar *s, const uchar *end ATTRIBUTE_UNUSED) +{ + const word_type repl_nl = acc_char_replicate ('\n'); + const word_type repl_cr = acc_char_replicate ('\r'); + const word_type repl_bs = acc_char_replicate ('\\'); + const word_type repl_qm = acc_char_replicate ('?'); + + unsigned int misalign; + const word_type *p; + word_type val, t; + + /* Align the buffer. Mask out any bytes from before the beginning. */ + p = (word_type *)((uintptr_t)s & -sizeof(word_type)); + val = *p; + misalign = (uintptr_t)s & (sizeof(word_type) - 1); + if (misalign) + val = acc_char_mask_misalign (val, misalign); + + /* Main loop. */ + while (1) + { + t = acc_char_cmp (val, repl_nl); + t |= acc_char_cmp (val, repl_cr); + t |= acc_char_cmp (val, repl_bs); + t |= acc_char_cmp (val, repl_qm); + + if (__builtin_expect (t != 0, 0)) + { + int i = acc_char_index (t, val); + if (i >= 0) + return (const uchar *)p + i; + } + + val = *++p; + } +} + +/* Disable on Solaris 2/x86 until the following problem can be properly + autoconfed: + + The Solaris 10+ assembler tags objects with the instruction set + extensions used, so SSE4.2 executables cannot run on machines that + don't support that extension. */ + +#if (GCC_VERSION >= 4005) && (__GNUC__ >= 5 || !defined(__PIC__)) && (defined(__i386__) || defined(__x86_64__)) && !(defined(__sun__) && defined(__svr4__)) + +/* Replicated character data to be shared between implementations. + Recall that outside of a context with vector support we can't + define compatible vector types, therefore these are all defined + in terms of raw characters. */ +static const char repl_chars[4][16] __attribute__((aligned(16))) = { + { '\n', '\n', '\n', '\n', '\n', '\n', '\n', '\n', + '\n', '\n', '\n', '\n', '\n', '\n', '\n', '\n' }, + { '\r', '\r', '\r', '\r', '\r', '\r', '\r', '\r', + '\r', '\r', '\r', '\r', '\r', '\r', '\r', '\r' }, + { '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', + '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\' }, + { '?', '?', '?', '?', '?', '?', '?', '?', + '?', '?', '?', '?', '?', '?', '?', '?' }, +}; + +/* A version of the fast scanner using MMX vectorized byte compare insns. + + This uses the PMOVMSKB instruction which was introduced with "MMX2", + which was packaged into SSE1; it is also present in the AMD MMX + extension. Mark the function as using "sse" so that we emit a real + "emms" instruction, rather than the 3dNOW "femms" instruction. */ + +static const uchar * +#ifndef __SSE__ +__attribute__((__target__("sse"))) +#endif +search_line_mmx (const uchar *s, const uchar *end ATTRIBUTE_UNUSED) +{ + typedef char v8qi __attribute__ ((__vector_size__ (8))); + typedef int __m64 __attribute__ ((__vector_size__ (8), __may_alias__)); + + const v8qi repl_nl = *(const v8qi *)repl_chars[0]; + const v8qi repl_cr = *(const v8qi *)repl_chars[1]; + const v8qi repl_bs = *(const v8qi *)repl_chars[2]; + const v8qi repl_qm = *(const v8qi *)repl_chars[3]; + + unsigned int misalign, found, mask; + const v8qi *p; + v8qi data, t, c; + + /* Align the source pointer. While MMX doesn't generate unaligned data + faults, this allows us to safely scan to the end of the buffer without + reading beyond the end of the last page. */ + misalign = (uintptr_t)s & 7; + p = (const v8qi *)((uintptr_t)s & -8); + data = *p; + + /* Create a mask for the bytes that are valid within the first + 16-byte block. The Idea here is that the AND with the mask + within the loop is "free", since we need some AND or TEST + insn in order to set the flags for the branch anyway. */ + mask = -1u << misalign; + + /* Main loop processing 8 bytes at a time. */ + goto start; + do + { + data = *++p; + mask = -1; + + start: + t = __builtin_ia32_pcmpeqb(data, repl_nl); + c = __builtin_ia32_pcmpeqb(data, repl_cr); + t = (v8qi) __builtin_ia32_por ((__m64)t, (__m64)c); + c = __builtin_ia32_pcmpeqb(data, repl_bs); + t = (v8qi) __builtin_ia32_por ((__m64)t, (__m64)c); + c = __builtin_ia32_pcmpeqb(data, repl_qm); + t = (v8qi) __builtin_ia32_por ((__m64)t, (__m64)c); + found = __builtin_ia32_pmovmskb (t); + found &= mask; + } + while (!found); + + __builtin_ia32_emms (); + + /* FOUND contains 1 in bits for which we matched a relevant + character. Conversion to the byte index is trivial. */ + found = __builtin_ctz(found); + return (const uchar *)p + found; +} + +/* A version of the fast scanner using SSE2 vectorized byte compare insns. */ + +static const uchar * +#ifndef __SSE2__ +__attribute__((__target__("sse2"))) +#endif +search_line_sse2 (const uchar *s, const uchar *end ATTRIBUTE_UNUSED) +{ + typedef char v16qi __attribute__ ((__vector_size__ (16))); + + const v16qi repl_nl = *(const v16qi *)repl_chars[0]; + const v16qi repl_cr = *(const v16qi *)repl_chars[1]; + const v16qi repl_bs = *(const v16qi *)repl_chars[2]; + const v16qi repl_qm = *(const v16qi *)repl_chars[3]; + + unsigned int misalign, found, mask; + const v16qi *p; + v16qi data, t; + + /* Align the source pointer. */ + misalign = (uintptr_t)s & 15; + p = (const v16qi *)((uintptr_t)s & -16); + data = *p; + + /* Create a mask for the bytes that are valid within the first + 16-byte block. The Idea here is that the AND with the mask + within the loop is "free", since we need some AND or TEST + insn in order to set the flags for the branch anyway. */ + mask = -1u << misalign; + + /* Main loop processing 16 bytes at a time. */ + goto start; + do + { + data = *++p; + mask = -1; + + start: + t = data == repl_nl; + t |= data == repl_cr; + t |= data == repl_bs; + t |= data == repl_qm; + found = __builtin_ia32_pmovmskb128 (t); + found &= mask; + } + while (!found); + + /* FOUND contains 1 in bits for which we matched a relevant + character. Conversion to the byte index is trivial. */ + found = __builtin_ctz(found); + return (const uchar *)p + found; +} + +#ifdef HAVE_SSE4 +/* A version of the fast scanner using SSE 4.2 vectorized string insns. */ + +static const uchar * +#ifndef __SSE4_2__ +__attribute__((__target__("sse4.2"))) +#endif +search_line_sse42 (const uchar *s, const uchar *end) +{ + typedef char v16qi __attribute__ ((__vector_size__ (16))); + static const v16qi search = { '\n', '\r', '?', '\\' }; + + uintptr_t si = (uintptr_t)s; + uintptr_t index; + + /* Check for unaligned input. */ + if (si & 15) + { + v16qi sv; + + if (__builtin_expect (end - s < 16, 0) + && __builtin_expect ((si & 0xfff) > 0xff0, 0)) + { + /* There are less than 16 bytes left in the buffer, and less + than 16 bytes left on the page. Reading 16 bytes at this + point might generate a spurious page fault. Defer to the + SSE2 implementation, which already handles alignment. */ + return search_line_sse2 (s, end); + } + + /* ??? The builtin doesn't understand that the PCMPESTRI read from + memory need not be aligned. */ + sv = __builtin_ia32_loaddqu ((const char *) s); + index = __builtin_ia32_pcmpestri128 (search, 4, sv, 16, 0); + + if (__builtin_expect (index < 16, 0)) + goto found; + + /* Advance the pointer to an aligned address. We will re-scan a + few bytes, but we no longer need care for reading past the + end of a page, since we're guaranteed a match. */ + s = (const uchar *)((si + 15) & -16); + } + + /* Main loop, processing 16 bytes at a time. */ +#ifdef __GCC_ASM_FLAG_OUTPUTS__ + while (1) + { + char f; + + /* By using inline assembly instead of the builtin, + we can use the result, as well as the flags set. */ + __asm ("%vpcmpestri\t$0, %2, %3" + : "=c"(index), "=@ccc"(f) + : "m"(*s), "x"(search), "a"(4), "d"(16)); + if (f) + break; + + s += 16; + } +#else + s -= 16; + /* By doing the whole loop in inline assembly, + we can make proper use of the flags set. */ + __asm ( ".balign 16\n" + "0: add $16, %1\n" + " %vpcmpestri\t$0, (%1), %2\n" + " jnc 0b" + : "=&c"(index), "+r"(s) + : "x"(search), "a"(4), "d"(16)); +#endif + + found: + return s + index; +} + +#else +/* Work around out-dated assemblers without sse4 support. */ +#define search_line_sse42 search_line_sse2 +#endif + +/* Check the CPU capabilities. */ + +#include "../gcc/config/i386/cpuid.h" + +typedef const uchar * (*search_line_fast_type) (const uchar *, const uchar *); +static search_line_fast_type search_line_fast; + +#define HAVE_init_vectorized_lexer 1 +static inline void +init_vectorized_lexer (void) +{ + unsigned dummy, ecx = 0, edx = 0; + search_line_fast_type impl = search_line_acc_char; + int minimum = 0; + +#if defined(__SSE4_2__) + minimum = 3; +#elif defined(__SSE2__) + minimum = 2; +#elif defined(__SSE__) + minimum = 1; +#endif + + if (minimum == 3) + impl = search_line_sse42; + else if (__get_cpuid (1, &dummy, &dummy, &ecx, &edx) || minimum == 2) + { + if (minimum == 3 || (ecx & bit_SSE4_2)) + impl = search_line_sse42; + else if (minimum == 2 || (edx & bit_SSE2)) + impl = search_line_sse2; + else if (minimum == 1 || (edx & bit_SSE)) + impl = search_line_mmx; + } + else if (__get_cpuid (0x80000001, &dummy, &dummy, &dummy, &edx)) + { + if (minimum == 1 + || (edx & (bit_MMXEXT | bit_CMOV)) == (bit_MMXEXT | bit_CMOV)) + impl = search_line_mmx; + } + + search_line_fast = impl; +} + +#elif (GCC_VERSION >= 4005) && defined(_ARCH_PWR8) && defined(__ALTIVEC__) + +/* A vection of the fast scanner using AltiVec vectorized byte compares + and VSX unaligned loads (when VSX is available). This is otherwise + the same as the AltiVec version. */ + +ATTRIBUTE_NO_SANITIZE_UNDEFINED +static const uchar * +search_line_fast (const uchar *s, const uchar *end ATTRIBUTE_UNUSED) +{ + typedef __attribute__((altivec(vector))) unsigned char vc; + + const vc repl_nl = { + '\n', '\n', '\n', '\n', '\n', '\n', '\n', '\n', + '\n', '\n', '\n', '\n', '\n', '\n', '\n', '\n' + }; + const vc repl_cr = { + '\r', '\r', '\r', '\r', '\r', '\r', '\r', '\r', + '\r', '\r', '\r', '\r', '\r', '\r', '\r', '\r' + }; + const vc repl_bs = { + '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', + '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\' + }; + const vc repl_qm = { + '?', '?', '?', '?', '?', '?', '?', '?', + '?', '?', '?', '?', '?', '?', '?', '?', + }; + const vc zero = { 0 }; + + vc data, t; + + /* Main loop processing 16 bytes at a time. */ + do + { + vc m_nl, m_cr, m_bs, m_qm; + + data = __builtin_vec_vsx_ld (0, s); + s += 16; + + m_nl = (vc) __builtin_vec_cmpeq(data, repl_nl); + m_cr = (vc) __builtin_vec_cmpeq(data, repl_cr); + m_bs = (vc) __builtin_vec_cmpeq(data, repl_bs); + m_qm = (vc) __builtin_vec_cmpeq(data, repl_qm); + t = (m_nl | m_cr) | (m_bs | m_qm); + + /* T now contains 0xff in bytes for which we matched one of the relevant + characters. We want to exit the loop if any byte in T is non-zero. + Below is the expansion of vec_any_ne(t, zero). */ + } + while (!__builtin_vec_vcmpeq_p(/*__CR6_LT_REV*/3, t, zero)); + + /* Restore s to to point to the 16 bytes we just processed. */ + s -= 16; + + { +#define N (sizeof(vc) / sizeof(long)) + + union { + vc v; + /* Statically assert that N is 2 or 4. */ + unsigned long l[(N == 2 || N == 4) ? N : -1]; + } u; + unsigned long l, i = 0; + + u.v = t; + + /* Find the first word of T that is non-zero. */ + switch (N) + { + case 4: + l = u.l[i++]; + if (l != 0) + break; + s += sizeof(unsigned long); + l = u.l[i++]; + if (l != 0) + break; + s += sizeof(unsigned long); + /* FALLTHRU */ + case 2: + l = u.l[i++]; + if (l != 0) + break; + s += sizeof(unsigned long); + l = u.l[i]; + } + + /* L now contains 0xff in bytes for which we matched one of the + relevant characters. We can find the byte index by finding + its bit index and dividing by 8. */ +#ifdef __BIG_ENDIAN__ + l = __builtin_clzl(l) >> 3; +#else + l = __builtin_ctzl(l) >> 3; +#endif + return s + l; + +#undef N + } +} + +#elif (GCC_VERSION >= 4005) && defined(__ALTIVEC__) && defined (__BIG_ENDIAN__) + +/* A vection of the fast scanner using AltiVec vectorized byte compares. + This cannot be used for little endian because vec_lvsl/lvsr are + deprecated for little endian and the code won't work properly. */ +/* ??? Unfortunately, attribute(target("altivec")) is not yet supported, + so we can't compile this function without -maltivec on the command line + (or implied by some other switch). */ + +static const uchar * +search_line_fast (const uchar *s, const uchar *end ATTRIBUTE_UNUSED) +{ + typedef __attribute__((altivec(vector))) unsigned char vc; + + const vc repl_nl = { + '\n', '\n', '\n', '\n', '\n', '\n', '\n', '\n', + '\n', '\n', '\n', '\n', '\n', '\n', '\n', '\n' + }; + const vc repl_cr = { + '\r', '\r', '\r', '\r', '\r', '\r', '\r', '\r', + '\r', '\r', '\r', '\r', '\r', '\r', '\r', '\r' + }; + const vc repl_bs = { + '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\', + '\\', '\\', '\\', '\\', '\\', '\\', '\\', '\\' + }; + const vc repl_qm = { + '?', '?', '?', '?', '?', '?', '?', '?', + '?', '?', '?', '?', '?', '?', '?', '?', + }; + const vc ones = { + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + }; + const vc zero = { 0 }; + + vc data, mask, t; + + /* Altivec loads automatically mask addresses with -16. This lets us + issue the first load as early as possible. */ + data = __builtin_vec_ld(0, (const vc *)s); + + /* Discard bytes before the beginning of the buffer. Do this by + beginning with all ones and shifting in zeros according to the + mis-alignment. The LVSR instruction pulls the exact shift we + want from the address. */ + mask = __builtin_vec_lvsr(0, s); + mask = __builtin_vec_perm(zero, ones, mask); + data &= mask; + + /* While altivec loads mask addresses, we still need to align S so + that the offset we compute at the end is correct. */ + s = (const uchar *)((uintptr_t)s & -16); + + /* Main loop processing 16 bytes at a time. */ + goto start; + do + { + vc m_nl, m_cr, m_bs, m_qm; + + s += 16; + data = __builtin_vec_ld(0, (const vc *)s); + + start: + m_nl = (vc) __builtin_vec_cmpeq(data, repl_nl); + m_cr = (vc) __builtin_vec_cmpeq(data, repl_cr); + m_bs = (vc) __builtin_vec_cmpeq(data, repl_bs); + m_qm = (vc) __builtin_vec_cmpeq(data, repl_qm); + t = (m_nl | m_cr) | (m_bs | m_qm); + + /* T now contains 0xff in bytes for which we matched one of the relevant + characters. We want to exit the loop if any byte in T is non-zero. + Below is the expansion of vec_any_ne(t, zero). */ + } + while (!__builtin_vec_vcmpeq_p(/*__CR6_LT_REV*/3, t, zero)); + + { +#define N (sizeof(vc) / sizeof(long)) + + union { + vc v; + /* Statically assert that N is 2 or 4. */ + unsigned long l[(N == 2 || N == 4) ? N : -1]; + } u; + unsigned long l, i = 0; + + u.v = t; + + /* Find the first word of T that is non-zero. */ + switch (N) + { + case 4: + l = u.l[i++]; + if (l != 0) + break; + s += sizeof(unsigned long); + l = u.l[i++]; + if (l != 0) + break; + s += sizeof(unsigned long); + /* FALLTHROUGH */ + case 2: + l = u.l[i++]; + if (l != 0) + break; + s += sizeof(unsigned long); + l = u.l[i]; + } + + /* L now contains 0xff in bytes for which we matched one of the + relevant characters. We can find the byte index by finding + its bit index and dividing by 8. */ + l = __builtin_clzl(l) >> 3; + return s + l; + +#undef N + } +} + +#elif defined (__ARM_NEON) && defined (__ARM_64BIT_STATE) +#include "arm_neon.h" + +/* This doesn't have to be the exact page size, but no system may use + a size smaller than this. ARMv8 requires a minimum page size of + 4k. The impact of being conservative here is a small number of + cases will take the slightly slower entry path into the main + loop. */ + +#define AARCH64_MIN_PAGE_SIZE 4096 + +static const uchar * +search_line_fast (const uchar *s, const uchar *end ATTRIBUTE_UNUSED) +{ + const uint8x16_t repl_nl = vdupq_n_u8 ('\n'); + const uint8x16_t repl_cr = vdupq_n_u8 ('\r'); + const uint8x16_t repl_bs = vdupq_n_u8 ('\\'); + const uint8x16_t repl_qm = vdupq_n_u8 ('?'); + const uint8x16_t xmask = (uint8x16_t) vdupq_n_u64 (0x8040201008040201ULL); + +#ifdef __ARM_BIG_ENDIAN + const int16x8_t shift = {8, 8, 8, 8, 0, 0, 0, 0}; +#else + const int16x8_t shift = {0, 0, 0, 0, 8, 8, 8, 8}; +#endif + + unsigned int found; + const uint8_t *p; + uint8x16_t data; + uint8x16_t t; + uint16x8_t m; + uint8x16_t u, v, w; + + /* Align the source pointer. */ + p = (const uint8_t *)((uintptr_t)s & -16); + + /* Assuming random string start positions, with a 4k page size we'll take + the slow path about 0.37% of the time. */ + if (__builtin_expect ((AARCH64_MIN_PAGE_SIZE + - (((uintptr_t) s) & (AARCH64_MIN_PAGE_SIZE - 1))) + < 16, 0)) + { + /* Slow path: the string starts near a possible page boundary. */ + uint32_t misalign, mask; + + misalign = (uintptr_t)s & 15; + mask = (-1u << misalign) & 0xffff; + data = vld1q_u8 (p); + t = vceqq_u8 (data, repl_nl); + u = vceqq_u8 (data, repl_cr); + v = vorrq_u8 (t, vceqq_u8 (data, repl_bs)); + w = vorrq_u8 (u, vceqq_u8 (data, repl_qm)); + t = vorrq_u8 (v, w); + t = vandq_u8 (t, xmask); + m = vpaddlq_u8 (t); + m = vshlq_u16 (m, shift); + found = vaddvq_u16 (m); + found &= mask; + if (found) + return (const uchar*)p + __builtin_ctz (found); + } + else + { + data = vld1q_u8 ((const uint8_t *) s); + t = vceqq_u8 (data, repl_nl); + u = vceqq_u8 (data, repl_cr); + v = vorrq_u8 (t, vceqq_u8 (data, repl_bs)); + w = vorrq_u8 (u, vceqq_u8 (data, repl_qm)); + t = vorrq_u8 (v, w); + if (__builtin_expect (vpaddd_u64 ((uint64x2_t)t) != 0, 0)) + goto done; + } + + do + { + p += 16; + data = vld1q_u8 (p); + t = vceqq_u8 (data, repl_nl); + u = vceqq_u8 (data, repl_cr); + v = vorrq_u8 (t, vceqq_u8 (data, repl_bs)); + w = vorrq_u8 (u, vceqq_u8 (data, repl_qm)); + t = vorrq_u8 (v, w); + } while (!vpaddd_u64 ((uint64x2_t)t)); + +done: + /* Now that we've found the terminating substring, work out precisely where + we need to stop. */ + t = vandq_u8 (t, xmask); + m = vpaddlq_u8 (t); + m = vshlq_u16 (m, shift); + found = vaddvq_u16 (m); + return (((((uintptr_t) p) < (uintptr_t) s) ? s : (const uchar *)p) + + __builtin_ctz (found)); +} + +#elif defined (__ARM_NEON) +#include "arm_neon.h" + +static const uchar * +search_line_fast (const uchar *s, const uchar *end ATTRIBUTE_UNUSED) +{ + const uint8x16_t repl_nl = vdupq_n_u8 ('\n'); + const uint8x16_t repl_cr = vdupq_n_u8 ('\r'); + const uint8x16_t repl_bs = vdupq_n_u8 ('\\'); + const uint8x16_t repl_qm = vdupq_n_u8 ('?'); + const uint8x16_t xmask = (uint8x16_t) vdupq_n_u64 (0x8040201008040201ULL); + + unsigned int misalign, found, mask; + const uint8_t *p; + uint8x16_t data; + + /* Align the source pointer. */ + misalign = (uintptr_t)s & 15; + p = (const uint8_t *)((uintptr_t)s & -16); + data = vld1q_u8 (p); + + /* Create a mask for the bytes that are valid within the first + 16-byte block. The Idea here is that the AND with the mask + within the loop is "free", since we need some AND or TEST + insn in order to set the flags for the branch anyway. */ + mask = (-1u << misalign) & 0xffff; + + /* Main loop, processing 16 bytes at a time. */ + goto start; + + do + { + uint8x8_t l; + uint16x4_t m; + uint32x2_t n; + uint8x16_t t, u, v, w; + + p += 16; + data = vld1q_u8 (p); + mask = 0xffff; + + start: + t = vceqq_u8 (data, repl_nl); + u = vceqq_u8 (data, repl_cr); + v = vorrq_u8 (t, vceqq_u8 (data, repl_bs)); + w = vorrq_u8 (u, vceqq_u8 (data, repl_qm)); + t = vandq_u8 (vorrq_u8 (v, w), xmask); + l = vpadd_u8 (vget_low_u8 (t), vget_high_u8 (t)); + m = vpaddl_u8 (l); + n = vpaddl_u16 (m); + + found = vget_lane_u32 ((uint32x2_t) vorr_u64 ((uint64x1_t) n, + vshr_n_u64 ((uint64x1_t) n, 24)), 0); + found &= mask; + } + while (!found); + + /* FOUND contains 1 in bits for which we matched a relevant + character. Conversion to the byte index is trivial. */ + found = __builtin_ctz (found); + return (const uchar *)p + found; +} + +#else + +/* We only have one accelerated alternative. Use a direct call so that + we encourage inlining. */ + +#define search_line_fast search_line_acc_char + +#endif + +/* Initialize the lexer if needed. */ + +void +_cpp_init_lexer (void) +{ +#ifdef HAVE_init_vectorized_lexer + init_vectorized_lexer (); +#endif +} + +/* Returns with a logical line that contains no escaped newlines or + trigraphs. This is a time-critical inner loop. */ +void +_cpp_clean_line (cpp_reader *pfile) +{ + cpp_buffer *buffer; + const uchar *s; + uchar c, *d, *p; + + buffer = pfile->buffer; + buffer->cur_note = buffer->notes_used = 0; + buffer->cur = buffer->line_base = buffer->next_line; + buffer->need_line = false; + s = buffer->next_line; + + if (!buffer->from_stage3) + { + const uchar *pbackslash = NULL; + + /* Fast path. This is the common case of an un-escaped line with + no trigraphs. The primary win here is by not writing any + data back to memory until we have to. */ + while (1) + { + /* Perform an optimized search for \n, \r, \\, ?. */ + s = search_line_fast (s, buffer->rlimit); + + c = *s; + if (c == '\\') + { + /* Record the location of the backslash and continue. */ + pbackslash = s++; + } + else if (__builtin_expect (c == '?', 0)) + { + if (__builtin_expect (s[1] == '?', false) + && _cpp_trigraph_map[s[2]]) + { + /* Have a trigraph. We may or may not have to convert + it. Add a line note regardless, for -Wtrigraphs. */ + add_line_note (buffer, s, s[2]); + if (CPP_OPTION (pfile, trigraphs)) + { + /* We do, and that means we have to switch to the + slow path. */ + d = (uchar *) s; + *d = _cpp_trigraph_map[s[2]]; + s += 2; + goto slow_path; + } + } + /* Not a trigraph. Continue on fast-path. */ + s++; + } + else + break; + } + + /* This must be \r or \n. We're either done, or we'll be forced + to write back to the buffer and continue on the slow path. */ + d = (uchar *) s; + + if (__builtin_expect (s == buffer->rlimit, false)) + goto done; + + /* DOS line ending? */ + if (__builtin_expect (c == '\r', false) && s[1] == '\n') + { + s++; + if (s == buffer->rlimit) + goto done; + } + + if (__builtin_expect (pbackslash == NULL, true)) + goto done; + + /* Check for escaped newline. */ + p = d; + while (is_nvspace (p[-1])) + p--; + if (p - 1 != pbackslash) + goto done; + + /* Have an escaped newline; process it and proceed to + the slow path. */ + add_line_note (buffer, p - 1, p != d ? ' ' : '\\'); + d = p - 2; + buffer->next_line = p - 1; + + slow_path: + while (1) + { + c = *++s; + *++d = c; + + if (c == '\n' || c == '\r') + { + /* Handle DOS line endings. */ + if (c == '\r' && s != buffer->rlimit && s[1] == '\n') + s++; + if (s == buffer->rlimit) + break; + + /* Escaped? */ + p = d; + while (p != buffer->next_line && is_nvspace (p[-1])) + p--; + if (p == buffer->next_line || p[-1] != '\\') + break; + + add_line_note (buffer, p - 1, p != d ? ' ': '\\'); + d = p - 2; + buffer->next_line = p - 1; + } + else if (c == '?' && s[1] == '?' && _cpp_trigraph_map[s[2]]) + { + /* Add a note regardless, for the benefit of -Wtrigraphs. */ + add_line_note (buffer, d, s[2]); + if (CPP_OPTION (pfile, trigraphs)) + { + *d = _cpp_trigraph_map[s[2]]; + s += 2; + } + } + } + } + else + { + while (*s != '\n' && *s != '\r') + s++; + d = (uchar *) s; + + /* Handle DOS line endings. */ + if (*s == '\r' && s + 1 != buffer->rlimit && s[1] == '\n') + s++; + } + + done: + *d = '\n'; + /* A sentinel note that should never be processed. */ + add_line_note (buffer, d + 1, '\n'); + buffer->next_line = s + 1; +} + +template +static bool get_fresh_line_impl (cpp_reader *pfile); + +/* Return true if the trigraph indicated by NOTE should be warned + about in a comment. */ +static bool +warn_in_comment (cpp_reader *pfile, _cpp_line_note *note) +{ + const uchar *p; + + /* Within comments we don't warn about trigraphs, unless the + trigraph forms an escaped newline, as that may change + behavior. */ + if (note->type != '/') + return false; + + /* If -trigraphs, then this was an escaped newline iff the next note + is coincident. */ + if (CPP_OPTION (pfile, trigraphs)) + return note[1].pos == note->pos; + + /* Otherwise, see if this forms an escaped newline. */ + p = note->pos + 3; + while (is_nvspace (*p)) + p++; + + /* There might have been escaped newlines between the trigraph and the + newline we found. Hence the position test. */ + return (*p == '\n' && p < note[1].pos); +} + +/* Process the notes created by add_line_note as far as the current + location. */ +void +_cpp_process_line_notes (cpp_reader *pfile, int in_comment) +{ + cpp_buffer *buffer = pfile->buffer; + + for (;;) + { + _cpp_line_note *note = &buffer->notes[buffer->cur_note]; + unsigned int col; + + if (note->pos > buffer->cur) + break; + + buffer->cur_note++; + col = CPP_BUF_COLUMN (buffer, note->pos + 1); + + if (note->type == '\\' || note->type == ' ') + { + if (note->type == ' ' && !in_comment) + cpp_error_with_line (pfile, CPP_DL_WARNING, pfile->line_table->highest_line, col, + "backslash and newline separated by space"); + + if (buffer->next_line > buffer->rlimit) + { + cpp_error_with_line (pfile, CPP_DL_PEDWARN, pfile->line_table->highest_line, col, + "backslash-newline at end of file"); + /* Prevent "no newline at end of file" warning. */ + buffer->next_line = buffer->rlimit; + } + + buffer->line_base = note->pos; + CPP_INCREMENT_LINE (pfile, 0); + } + else if (_cpp_trigraph_map[note->type]) + { + if (CPP_OPTION (pfile, warn_trigraphs) + && (!in_comment || warn_in_comment (pfile, note))) + { + if (CPP_OPTION (pfile, trigraphs)) + cpp_warning_with_line (pfile, CPP_W_TRIGRAPHS, + pfile->line_table->highest_line, col, + "trigraph ??%c converted to %c", + note->type, + (int) _cpp_trigraph_map[note->type]); + else + { + cpp_warning_with_line + (pfile, CPP_W_TRIGRAPHS, + pfile->line_table->highest_line, col, + "trigraph ??%c ignored, use -trigraphs to enable", + note->type); + } + } + } + else if (note->type == 0) + /* Already processed in lex_raw_string. */; + else + abort (); + } +} + +namespace bidi { + enum class kind { + NONE, LRE, RLE, LRO, RLO, LRI, RLI, FSI, PDF, PDI, LTR, RTL + }; + + /* All the UTF-8 encodings of bidi characters start with E2. */ + constexpr uchar utf8_start = 0xe2; + + struct context + { + context () {} + context (location_t loc, kind k, bool pdf, bool ucn) + : m_loc (loc), m_kind (k), m_pdf (pdf), m_ucn (ucn) + { + } + + kind get_pop_kind () const + { + return m_pdf ? kind::PDF : kind::PDI; + } + bool ucn_p () const + { + return m_ucn; + } + + location_t m_loc; + kind m_kind; + unsigned m_pdf : 1; + unsigned m_ucn : 1; + }; + + /* A vector holding currently open bidi contexts. We use a char for + each context, its LSB is 1 if it represents a PDF context, 0 if it + represents a PDI context. The next bit is 1 if this context was open + by a bidi character written as a UCN, and 0 when it was UTF-8. */ + semi_embedded_vec vec; + + /* Close the whole comment/identifier/string literal/character constant + context. */ + void on_close () + { + vec.truncate (0); + } + + /* Pop the last element in the vector. */ + void pop () + { + unsigned int len = vec.count (); + gcc_checking_assert (len > 0); + vec.truncate (len - 1); + } + + /* Return the pop kind of the context of the Ith element. */ + kind pop_kind_at (unsigned int i) + { + return vec[i].get_pop_kind (); + } + + /* Return the pop kind of the context that is currently opened. */ + kind current_ctx () + { + unsigned int len = vec.count (); + if (len == 0) + return kind::NONE; + return vec[len - 1].get_pop_kind (); + } + + /* Return true if the current context comes from a UCN origin, that is, + the bidi char which started this bidi context was written as a UCN. */ + bool current_ctx_ucn_p () + { + unsigned int len = vec.count (); + gcc_checking_assert (len > 0); + return vec[len - 1].m_ucn; + } + + location_t current_ctx_loc () + { + unsigned int len = vec.count (); + gcc_checking_assert (len > 0); + return vec[len - 1].m_loc; + } + + /* We've read a bidi char, update the current vector as necessary. + LOC is only valid when K is not kind::NONE. */ + void on_char (kind k, bool ucn_p, location_t loc) + { + switch (k) + { + case kind::LRE: + case kind::RLE: + case kind::LRO: + case kind::RLO: + vec.push (context (loc, k, true, ucn_p)); + break; + case kind::LRI: + case kind::RLI: + case kind::FSI: + vec.push (context (loc, k, false, ucn_p)); + break; + /* PDF terminates the scope of the last LRE, RLE, LRO, or RLO + whose scope has not yet been terminated. */ + case kind::PDF: + if (current_ctx () == kind::PDF) + pop (); + break; + /* PDI terminates the scope of the last LRI, RLI, or FSI whose + scope has not yet been terminated, as well as the scopes of + any subsequent LREs, RLEs, LROs, or RLOs whose scopes have not + yet been terminated. */ + case kind::PDI: + for (int i = vec.count () - 1; i >= 0; --i) + if (pop_kind_at (i) == kind::PDI) + { + vec.truncate (i); + break; + } + break; + case kind::LTR: + case kind::RTL: + /* These aren't popped by a PDF/PDI. */ + break; + ATTR_LIKELY case kind::NONE: + break; + default: + abort (); + } + } + + /* Return a descriptive string for K. */ + const char *to_str (kind k) + { + switch (k) + { + case kind::LRE: + return "U+202A (LEFT-TO-RIGHT EMBEDDING)"; + case kind::RLE: + return "U+202B (RIGHT-TO-LEFT EMBEDDING)"; + case kind::LRO: + return "U+202D (LEFT-TO-RIGHT OVERRIDE)"; + case kind::RLO: + return "U+202E (RIGHT-TO-LEFT OVERRIDE)"; + case kind::LRI: + return "U+2066 (LEFT-TO-RIGHT ISOLATE)"; + case kind::RLI: + return "U+2067 (RIGHT-TO-LEFT ISOLATE)"; + case kind::FSI: + return "U+2068 (FIRST STRONG ISOLATE)"; + case kind::PDF: + return "U+202C (POP DIRECTIONAL FORMATTING)"; + case kind::PDI: + return "U+2069 (POP DIRECTIONAL ISOLATE)"; + case kind::LTR: + return "U+200E (LEFT-TO-RIGHT MARK)"; + case kind::RTL: + return "U+200F (RIGHT-TO-LEFT MARK)"; + default: + abort (); + } + } +} + +/* Get location_t for the range of bytes [START, START + NUM_BYTES) + within the current line in FILE, with the caret at START. */ + +static location_t +get_location_for_byte_range_in_cur_line (cpp_reader *pfile, + const unsigned char *const start, + size_t num_bytes) +{ + gcc_checking_assert (num_bytes > 0); + + /* CPP_BUF_COLUMN and linemap_position_for_column both refer + to offsets in bytes, but CPP_BUF_COLUMN is 0-based, + whereas linemap_position_for_column is 1-based. */ + + /* Get 0-based offsets within the line. */ + size_t start_offset = CPP_BUF_COLUMN (pfile->buffer, start); + size_t end_offset = start_offset + num_bytes - 1; + + /* Now convert to location_t, where "columns" are 1-based byte offsets. */ + location_t start_loc = linemap_position_for_column (pfile->line_table, + start_offset + 1); + location_t end_loc = linemap_position_for_column (pfile->line_table, + end_offset + 1); + + if (start_loc == end_loc) + return start_loc; + + source_range src_range; + src_range.m_start = start_loc; + src_range.m_finish = end_loc; + location_t combined_loc = COMBINE_LOCATION_DATA (pfile->line_table, + start_loc, + src_range, + NULL, + 0); + return combined_loc; +} + +/* Parse a sequence of 3 bytes starting with P and return its bidi code. */ + +static bidi::kind +get_bidi_utf8_1 (const unsigned char *const p) +{ + gcc_checking_assert (p[0] == bidi::utf8_start); + + if (p[1] == 0x80) + switch (p[2]) + { + case 0xaa: + return bidi::kind::LRE; + case 0xab: + return bidi::kind::RLE; + case 0xac: + return bidi::kind::PDF; + case 0xad: + return bidi::kind::LRO; + case 0xae: + return bidi::kind::RLO; + case 0x8e: + return bidi::kind::LTR; + case 0x8f: + return bidi::kind::RTL; + default: + break; + } + else if (p[1] == 0x81) + switch (p[2]) + { + case 0xa6: + return bidi::kind::LRI; + case 0xa7: + return bidi::kind::RLI; + case 0xa8: + return bidi::kind::FSI; + case 0xa9: + return bidi::kind::PDI; + default: + break; + } + + return bidi::kind::NONE; +} + +/* Parse a sequence of 3 bytes starting with P and return its bidi code. + If the kind is not NONE, write the location to *OUT.*/ + +static bidi::kind +get_bidi_utf8 (cpp_reader *pfile, const unsigned char *const p, location_t *out) +{ + bidi::kind result = get_bidi_utf8_1 (p); + if (result != bidi::kind::NONE) + { + /* We have a sequence of 3 bytes starting at P. */ + *out = get_location_for_byte_range_in_cur_line (pfile, p, 3); + } + return result; +} + +/* Parse a UCN where P points just past \u or \U and return its bidi code. */ + +static bidi::kind +get_bidi_ucn_1 (const unsigned char *p, bool is_U, const unsigned char **end) +{ + /* 6.4.3 Universal Character Names + \u hex-quad + \U hex-quad hex-quad + \u { simple-hexadecimal-digit-sequence } + where \unnnn means \U0000nnnn. */ + + *end = p + 4; + if (is_U) + { + if (p[0] != '0' || p[1] != '0' || p[2] != '0' || p[3] != '0') + return bidi::kind::NONE; + /* Skip 4B so we can treat \u and \U the same below. */ + p += 4; + *end += 4; + } + else if (p[0] == '{') + { + p++; + while (*p == '0') + p++; + if (p[0] != '2' + || p[1] != '0' + || !ISXDIGIT (p[2]) + || !ISXDIGIT (p[3]) + || p[4] != '}') + return bidi::kind::NONE; + *end = p + 5; + } + + /* All code points we are looking for start with 20xx. */ + if (p[0] != '2' || p[1] != '0') + return bidi::kind::NONE; + else if (p[2] == '2') + switch (p[3]) + { + case 'a': + case 'A': + return bidi::kind::LRE; + case 'b': + case 'B': + return bidi::kind::RLE; + case 'c': + case 'C': + return bidi::kind::PDF; + case 'd': + case 'D': + return bidi::kind::LRO; + case 'e': + case 'E': + return bidi::kind::RLO; + default: + break; + } + else if (p[2] == '6') + switch (p[3]) + { + case '6': + return bidi::kind::LRI; + case '7': + return bidi::kind::RLI; + case '8': + return bidi::kind::FSI; + case '9': + return bidi::kind::PDI; + default: + break; + } + else if (p[2] == '0') + switch (p[3]) + { + case 'e': + case 'E': + return bidi::kind::LTR; + case 'f': + case 'F': + return bidi::kind::RTL; + default: + break; + } + + return bidi::kind::NONE; +} + +/* Parse a UCN where P points just past \u or \U and return its bidi code. + If the kind is not NONE, write the location to *OUT. */ + +static bidi::kind +get_bidi_ucn (cpp_reader *pfile, const unsigned char *p, bool is_U, + location_t *out) +{ + const unsigned char *end; + bidi::kind result = get_bidi_ucn_1 (p, is_U, &end); + if (result != bidi::kind::NONE) + { + const unsigned char *start = p - 2; + size_t num_bytes = end - start; + *out = get_location_for_byte_range_in_cur_line (pfile, start, num_bytes); + } + return result; +} + +/* Parse a named universal character escape where P points just past \N and + return its bidi code. If the kind is not NONE, write the location to + *OUT. */ + +static bidi::kind +get_bidi_named (cpp_reader *pfile, const unsigned char *p, location_t *out) +{ + bidi::kind result = bidi::kind::NONE; + if (*p != '{') + return bidi::kind::NONE; + if (strncmp ((const char *) (p + 1), "LEFT-TO-RIGHT ", 14) == 0) + { + if (strncmp ((const char *) (p + 15), "MARK}", 5) == 0) + result = bidi::kind::LTR; + else if (strncmp ((const char *) (p + 15), "EMBEDDING}", 10) == 0) + result = bidi::kind::LRE; + else if (strncmp ((const char *) (p + 15), "OVERRIDE}", 9) == 0) + result = bidi::kind::LRO; + else if (strncmp ((const char *) (p + 15), "ISOLATE}", 8) == 0) + result = bidi::kind::LRI; + } + else if (strncmp ((const char *) (p + 1), "RIGHT-TO-LEFT ", 14) == 0) + { + if (strncmp ((const char *) (p + 15), "MARK}", 5) == 0) + result = bidi::kind::RTL; + else if (strncmp ((const char *) (p + 15), "EMBEDDING}", 10) == 0) + result = bidi::kind::RLE; + else if (strncmp ((const char *) (p + 15), "OVERRIDE}", 9) == 0) + result = bidi::kind::RLO; + else if (strncmp ((const char *) (p + 15), "ISOLATE}", 8) == 0) + result = bidi::kind::RLI; + } + else if (strncmp ((const char *) (p + 1), "POP DIRECTIONAL ", 16) == 0) + { + if (strncmp ((const char *) (p + 16), "FORMATTING}", 11) == 0) + result = bidi::kind::PDF; + else if (strncmp ((const char *) (p + 16), "ISOLATE}", 8) == 0) + result = bidi::kind::PDI; + } + else if (strncmp ((const char *) (p + 1), "FIRST STRONG ISOLATE}", 21) == 0) + result = bidi::kind::FSI; + if (result != bidi::kind::NONE) + *out = get_location_for_byte_range_in_cur_line (pfile, p - 2, + (strchr ((const char *) + (p + 1), '}') + - (const char *) p) + + 3); + return result; +} + +/* Subclass of rich_location for reporting on unpaired UTF-8 + bidirectional control character(s). + Escape the source lines on output, and show all unclosed + bidi context, labelling everything. */ + +class unpaired_bidi_rich_location : public rich_location +{ + public: + class custom_range_label : public range_label + { + public: + label_text get_text (unsigned range_idx) const final override + { + /* range 0 is the primary location; each subsequent range i + 1 + is for bidi::vec[i]. */ + if (range_idx > 0) + { + const bidi::context &ctxt (bidi::vec[range_idx - 1]); + return label_text::borrow (bidi::to_str (ctxt.m_kind)); + } + else + return label_text::borrow (_("end of bidirectional context")); + } + }; + + unpaired_bidi_rich_location (cpp_reader *pfile, location_t loc) + : rich_location (pfile->line_table, loc, &m_custom_label) + { + set_escape_on_output (true); + for (unsigned i = 0; i < bidi::vec.count (); i++) + add_range (bidi::vec[i].m_loc, + SHOW_RANGE_WITHOUT_CARET, + &m_custom_label); + } + + private: + custom_range_label m_custom_label; +}; + +/* We're closing a bidi context, that is, we've encountered a newline, + are closing a C-style comment, or are at the end of a string literal, + character constant, or identifier. Warn if this context was not + properly terminated by a PDI or PDF. P points to the last character + in this context. */ + +static void +maybe_warn_bidi_on_close (cpp_reader *pfile, const uchar *p) +{ + const auto warn_bidi = CPP_OPTION (pfile, cpp_warn_bidirectional); + if (bidi::vec.count () > 0 + && (warn_bidi & bidirectional_unpaired + && (!bidi::current_ctx_ucn_p () + || (warn_bidi & bidirectional_ucn)))) + { + const location_t loc + = linemap_position_for_column (pfile->line_table, + CPP_BUF_COLUMN (pfile->buffer, p)); + unpaired_bidi_rich_location rich_loc (pfile, loc); + /* cpp_callbacks doesn't yet have a way to handle singular vs plural + forms of a diagnostic, so fake it for now. */ + if (bidi::vec.count () > 1) + cpp_warning_at (pfile, CPP_W_BIDIRECTIONAL, &rich_loc, + "unpaired UTF-8 bidirectional control characters " + "detected"); + else + cpp_warning_at (pfile, CPP_W_BIDIRECTIONAL, &rich_loc, + "unpaired UTF-8 bidirectional control character " + "detected"); + } + /* We're done with this context. */ + bidi::on_close (); +} + +/* We're at the beginning or in the middle of an identifier/comment/string + literal/character constant. Warn if we've encountered a bidi character. + KIND says which bidi control character it was; UCN_P is true iff this bidi + control character was written as a UCN. LOC is the location of the + character, but is only valid if KIND != bidi::kind::NONE. */ + +static void +maybe_warn_bidi_on_char (cpp_reader *pfile, bidi::kind kind, + bool ucn_p, location_t loc) +{ + if (__builtin_expect (kind == bidi::kind::NONE, 1)) + return; + + const auto warn_bidi = CPP_OPTION (pfile, cpp_warn_bidirectional); + + if (warn_bidi & (bidirectional_unpaired|bidirectional_any)) + { + rich_location rich_loc (pfile->line_table, loc); + rich_loc.set_escape_on_output (true); + + /* It seems excessive to warn about a PDI/PDF that is closing + an opened context because we've already warned about the + opening character. Except warn when we have a UCN x UTF-8 + mismatch, if UCN checking is enabled. */ + if (kind == bidi::current_ctx ()) + { + if (warn_bidi == (bidirectional_unpaired|bidirectional_ucn) + && bidi::current_ctx_ucn_p () != ucn_p) + { + rich_loc.add_range (bidi::current_ctx_loc ()); + cpp_warning_at (pfile, CPP_W_BIDIRECTIONAL, &rich_loc, + "UTF-8 vs UCN mismatch when closing " + "a context by \"%s\"", bidi::to_str (kind)); + } + } + else if (warn_bidi & bidirectional_any + && (!ucn_p || (warn_bidi & bidirectional_ucn))) + { + if (kind == bidi::kind::PDF || kind == bidi::kind::PDI) + cpp_warning_at (pfile, CPP_W_BIDIRECTIONAL, &rich_loc, + "\"%s\" is closing an unopened context", + bidi::to_str (kind)); + else + cpp_warning_at (pfile, CPP_W_BIDIRECTIONAL, &rich_loc, + "found problematic Unicode character \"%s\"", + bidi::to_str (kind)); + } + } + /* We're done with this context. */ + bidi::on_char (kind, ucn_p, loc); +} + +static const cppchar_t utf8_continuation = 0x80; +static const cppchar_t utf8_signifier = 0xC0; + +/* Emit -Winvalid-utf8 warning on invalid UTF-8 character starting + at PFILE->buffer->cur. Return a pointer after the diagnosed + invalid character. */ + +static const uchar * +_cpp_warn_invalid_utf8 (cpp_reader *pfile) +{ + cpp_buffer *buffer = pfile->buffer; + const uchar *cur = buffer->cur; + bool pedantic = (CPP_PEDANTIC (pfile) + && CPP_OPTION (pfile, cpp_warn_invalid_utf8) == 2); + + if (cur[0] < utf8_signifier + || cur[1] < utf8_continuation || cur[1] >= utf8_signifier) + { + if (pedantic) + cpp_error_with_line (pfile, CPP_DL_PEDWARN, + pfile->line_table->highest_line, + CPP_BUF_COL (buffer), + "invalid UTF-8 character <%x>", + cur[0]); + else + cpp_warning_with_line (pfile, CPP_W_INVALID_UTF8, + pfile->line_table->highest_line, + CPP_BUF_COL (buffer), + "invalid UTF-8 character <%x>", + cur[0]); + return cur + 1; + } + else if (cur[2] < utf8_continuation || cur[2] >= utf8_signifier) + { + if (pedantic) + cpp_error_with_line (pfile, CPP_DL_PEDWARN, + pfile->line_table->highest_line, + CPP_BUF_COL (buffer), + "invalid UTF-8 character <%x><%x>", + cur[0], cur[1]); + else + cpp_warning_with_line (pfile, CPP_W_INVALID_UTF8, + pfile->line_table->highest_line, + CPP_BUF_COL (buffer), + "invalid UTF-8 character <%x><%x>", + cur[0], cur[1]); + return cur + 2; + } + else if (cur[3] < utf8_continuation || cur[3] >= utf8_signifier) + { + if (pedantic) + cpp_error_with_line (pfile, CPP_DL_PEDWARN, + pfile->line_table->highest_line, + CPP_BUF_COL (buffer), + "invalid UTF-8 character <%x><%x><%x>", + cur[0], cur[1], cur[2]); + else + cpp_warning_with_line (pfile, CPP_W_INVALID_UTF8, + pfile->line_table->highest_line, + CPP_BUF_COL (buffer), + "invalid UTF-8 character <%x><%x><%x>", + cur[0], cur[1], cur[2]); + return cur + 3; + } + else + { + if (pedantic) + cpp_error_with_line (pfile, CPP_DL_PEDWARN, + pfile->line_table->highest_line, + CPP_BUF_COL (buffer), + "invalid UTF-8 character <%x><%x><%x><%x>", + cur[0], cur[1], cur[2], cur[3]); + else + cpp_warning_with_line (pfile, CPP_W_INVALID_UTF8, + pfile->line_table->highest_line, + CPP_BUF_COL (buffer), + "invalid UTF-8 character <%x><%x><%x><%x>", + cur[0], cur[1], cur[2], cur[3]); + return cur + 4; + } +} + +/* Helper function of *skip_*_comment and lex*_string. For C, + character at CUR[-1] with MSB set handle -Wbidi-chars* and + -Winvalid-utf8 diagnostics and return pointer to first character + that should be processed next. */ + +static inline const uchar * +_cpp_handle_multibyte_utf8 (cpp_reader *pfile, uchar c, + const uchar *cur, bool warn_bidi_p, + bool warn_invalid_utf8_p) +{ + /* If this is a beginning of a UTF-8 encoding, it might be + a bidirectional control character. */ + if (c == bidi::utf8_start && warn_bidi_p) + { + location_t loc; + bidi::kind kind = get_bidi_utf8 (pfile, cur - 1, &loc); + maybe_warn_bidi_on_char (pfile, kind, /*ucn_p=*/false, loc); + } + if (!warn_invalid_utf8_p) + return cur; + if (c >= utf8_signifier) + { + cppchar_t s; + const uchar *pstr = cur - 1; + if (_cpp_valid_utf8 (pfile, &pstr, pfile->buffer->rlimit, 0, NULL, &s) + && s <= UCS_LIMIT) + return pstr; + } + pfile->buffer->cur = cur - 1; + return _cpp_warn_invalid_utf8 (pfile); +} + +/* Skip a C-style block comment. We find the end of the comment by + seeing if an asterisk is before every '/' we encounter. Returns + nonzero if comment terminated by EOF, zero otherwise. + + Buffer->cur points to the initial asterisk of the comment. */ +bool +_cpp_skip_block_comment (cpp_reader *pfile) +{ + cpp_buffer *buffer = pfile->buffer; + const uchar *cur = buffer->cur; + uchar c; + const bool warn_bidi_p = pfile->warn_bidi_p (); + const bool warn_invalid_utf8_p = CPP_OPTION (pfile, cpp_warn_invalid_utf8); + const bool warn_bidi_or_invalid_utf8_p = warn_bidi_p | warn_invalid_utf8_p; + + cur++; + if (*cur == '/') + cur++; + + for (;;) + { + /* People like decorating comments with '*', so check for '/' + instead for efficiency. */ + c = *cur++; + + if (c == '/') + { + if (cur[-2] == '*') + { + if (warn_bidi_p) + maybe_warn_bidi_on_close (pfile, cur); + break; + } + + /* Warn about potential nested comments, but not if the '/' + comes immediately before the true comment delimiter. + Don't bother to get it right across escaped newlines. */ + if (CPP_OPTION (pfile, warn_comments) + && cur[0] == '*' && cur[1] != '/') + { + buffer->cur = cur; + cpp_warning_with_line (pfile, CPP_W_COMMENTS, + pfile->line_table->highest_line, + CPP_BUF_COL (buffer), + "\"/*\" within comment"); + } + } + else if (c == '\n') + { + unsigned int cols; + buffer->cur = cur - 1; + if (warn_bidi_p) + maybe_warn_bidi_on_close (pfile, cur); + _cpp_process_line_notes (pfile, true); + if (buffer->next_line >= buffer->rlimit) + return true; + _cpp_clean_line (pfile); + + cols = buffer->next_line - buffer->line_base; + CPP_INCREMENT_LINE (pfile, cols); + + cur = buffer->cur; + } + else if (__builtin_expect (c >= utf8_continuation, 0) + && warn_bidi_or_invalid_utf8_p) + cur = _cpp_handle_multibyte_utf8 (pfile, c, cur, warn_bidi_p, + warn_invalid_utf8_p); + } + + buffer->cur = cur; + _cpp_process_line_notes (pfile, true); + return false; +} + +/* Skip a C++ line comment, leaving buffer->cur pointing to the + terminating newline. Handles escaped newlines. Returns nonzero + if a multiline comment. */ +static int +skip_line_comment (cpp_reader *pfile) +{ + cpp_buffer *buffer = pfile->buffer; + location_t orig_line = pfile->line_table->highest_line; + const bool warn_bidi_p = pfile->warn_bidi_p (); + const bool warn_invalid_utf8_p = CPP_OPTION (pfile, cpp_warn_invalid_utf8); + const bool warn_bidi_or_invalid_utf8_p = warn_bidi_p | warn_invalid_utf8_p; + + if (!warn_bidi_or_invalid_utf8_p) + while (*buffer->cur != '\n') + buffer->cur++; + else if (!warn_invalid_utf8_p) + { + while (*buffer->cur != '\n' + && *buffer->cur != bidi::utf8_start) + buffer->cur++; + if (__builtin_expect (*buffer->cur == bidi::utf8_start, 0)) + { + while (*buffer->cur != '\n') + { + if (__builtin_expect (*buffer->cur == bidi::utf8_start, 0)) + { + location_t loc; + bidi::kind kind = get_bidi_utf8 (pfile, buffer->cur, &loc); + maybe_warn_bidi_on_char (pfile, kind, /*ucn_p=*/false, loc); + } + buffer->cur++; + } + maybe_warn_bidi_on_close (pfile, buffer->cur); + } + } + else + { + while (*buffer->cur != '\n') + { + if (*buffer->cur < utf8_continuation) + { + buffer->cur++; + continue; + } + buffer->cur + = _cpp_handle_multibyte_utf8 (pfile, *buffer->cur, buffer->cur + 1, + warn_bidi_p, warn_invalid_utf8_p); + } + if (warn_bidi_p) + maybe_warn_bidi_on_close (pfile, buffer->cur); + } + + _cpp_process_line_notes (pfile, true); + return orig_line != pfile->line_table->highest_line; +} + +/* Skips whitespace, saving the next non-whitespace character. */ +static void +skip_whitespace (cpp_reader *pfile, cppchar_t c) +{ + cpp_buffer *buffer = pfile->buffer; + bool saw_NUL = false; + + do + { + /* Horizontal space always OK. */ + if (c == ' ' || c == '\t') + ; + /* Just \f \v or \0 left. */ + else if (c == '\0') + saw_NUL = true; + else if (pfile->state.in_directive && CPP_PEDANTIC (pfile)) + cpp_error_with_line (pfile, CPP_DL_PEDWARN, pfile->line_table->highest_line, + CPP_BUF_COL (buffer), + "%s in preprocessing directive", + c == '\f' ? "form feed" : "vertical tab"); + + c = *buffer->cur++; + } + /* We only want non-vertical space, i.e. ' ' \t \f \v \0. */ + while (is_nvspace (c)); + + if (saw_NUL) + { + encoding_rich_location rich_loc (pfile); + cpp_error_at (pfile, CPP_DL_WARNING, &rich_loc, + "null character(s) ignored"); + } + + buffer->cur--; +} + +/* See if the characters of a number token are valid in a name (no + '.', '+' or '-'). */ +static int +name_p (cpp_reader *pfile, const cpp_string *string) +{ + unsigned int i; + + for (i = 0; i < string->len; i++) + if (!is_idchar (string->text[i])) + return 0; + + return 1; +} + +/* After parsing an identifier or other sequence, produce a warning about + sequences not in NFC/NFKC. */ +static void +warn_about_normalization (cpp_reader *pfile, + const cpp_token *token, + const struct normalize_state *s, + bool identifier) +{ + if (CPP_OPTION (pfile, warn_normalize) < NORMALIZE_STATE_RESULT (s) + && !pfile->state.skipping) + { + location_t loc = token->src_loc; + + /* If possible, create a location range for the token. */ + if (loc >= RESERVED_LOCATION_COUNT + && token->type != CPP_EOF + /* There must be no line notes to process. */ + && (!(pfile->buffer->cur + >= pfile->buffer->notes[pfile->buffer->cur_note].pos + && !pfile->overlaid_buffer))) + { + source_range tok_range; + tok_range.m_start = loc; + tok_range.m_finish + = linemap_position_for_column (pfile->line_table, + CPP_BUF_COLUMN (pfile->buffer, + pfile->buffer->cur)); + loc = COMBINE_LOCATION_DATA (pfile->line_table, + loc, tok_range, NULL, 0); + } + + encoding_rich_location rich_loc (pfile, loc); + + /* Make sure that the token is printed using UCNs, even + if we'd otherwise happily print UTF-8. */ + unsigned char *buf = XNEWVEC (unsigned char, cpp_token_len (token)); + size_t sz; + + sz = cpp_spell_token (pfile, token, buf, false) - buf; + if (NORMALIZE_STATE_RESULT (s) == normalized_C) + cpp_warning_at (pfile, CPP_W_NORMALIZE, &rich_loc, + "`%.*s' is not in NFKC", (int) sz, buf); + else if (identifier && CPP_OPTION (pfile, xid_identifiers)) + cpp_pedwarning_at (pfile, CPP_W_NORMALIZE, &rich_loc, + "`%.*s' is not in NFC", (int) sz, buf); + else + cpp_warning_at (pfile, CPP_W_NORMALIZE, &rich_loc, + "`%.*s' is not in NFC", (int) sz, buf); + free (buf); + } +} + +/* Returns TRUE if the sequence starting at buffer->cur is valid in + an identifier. FIRST is TRUE if this starts an identifier. */ + +static bool +forms_identifier_p (cpp_reader *pfile, int first, + struct normalize_state *state) +{ + cpp_buffer *buffer = pfile->buffer; + const bool warn_bidi_p = pfile->warn_bidi_p (); + + if (*buffer->cur == '$') + { + if (!CPP_OPTION (pfile, dollars_in_ident)) + return false; + + buffer->cur++; + if (CPP_OPTION (pfile, warn_dollars) && !pfile->state.skipping) + { + CPP_OPTION (pfile, warn_dollars) = 0; + cpp_error (pfile, CPP_DL_PEDWARN, "'$' in identifier or number"); + } + + return true; + } + + /* Is this a syntactically valid UCN or a valid UTF-8 char? */ + if (CPP_OPTION (pfile, extended_identifiers)) + { + cppchar_t s; + if (*buffer->cur >= utf8_signifier) + { + if (__builtin_expect (*buffer->cur == bidi::utf8_start, 0) + && warn_bidi_p) + { + location_t loc; + bidi::kind kind = get_bidi_utf8 (pfile, buffer->cur, &loc); + maybe_warn_bidi_on_char (pfile, kind, /*ucn_p=*/false, loc); + } + if (_cpp_valid_utf8 (pfile, &buffer->cur, buffer->rlimit, 1 + !first, + state, &s)) + return true; + } + else if (*buffer->cur == '\\' + && (buffer->cur[1] == 'u' + || buffer->cur[1] == 'U' + || buffer->cur[1] == 'N')) + { + buffer->cur += 2; + if (warn_bidi_p) + { + location_t loc; + bidi::kind kind; + if (buffer->cur[-1] == 'N') + kind = get_bidi_named (pfile, buffer->cur, &loc); + else + kind = get_bidi_ucn (pfile, buffer->cur, + buffer->cur[-1] == 'U', &loc); + maybe_warn_bidi_on_char (pfile, kind, /*ucn_p=*/true, loc); + } + if (_cpp_valid_ucn (pfile, &buffer->cur, buffer->rlimit, 1 + !first, + state, &s, NULL, NULL)) + return true; + buffer->cur -= 2; + } + } + + return false; +} + +/* Helper function to issue error about improper __VA_OPT__ use. */ +static void +maybe_va_opt_error (cpp_reader *pfile) +{ + if (CPP_PEDANTIC (pfile) && !CPP_OPTION (pfile, va_opt)) + { + /* __VA_OPT__ should not be accepted at all, but allow it in + system headers. */ + if (!_cpp_in_system_header (pfile)) + { + if (CPP_OPTION (pfile, cplusplus)) + cpp_error (pfile, CPP_DL_PEDWARN, + "__VA_OPT__ is not available until C++20"); + else + cpp_error (pfile, CPP_DL_PEDWARN, + "__VA_OPT__ is not available until C2X"); + } + } + else if (!pfile->state.va_args_ok) + { + /* __VA_OPT__ should only appear in the replacement list of a + variadic macro. */ + cpp_error (pfile, CPP_DL_PEDWARN, + "__VA_OPT__ can only appear in the expansion" + " of a C++20 variadic macro"); + } +} + +/* Helper function to get the cpp_hashnode of the identifier BASE. */ +static cpp_hashnode * +lex_identifier_intern (cpp_reader *pfile, const uchar *base) +{ + cpp_hashnode *result; + const uchar *cur; + unsigned int len; + unsigned int hash = HT_HASHSTEP (0, *base); + + cur = base + 1; + while (ISIDNUM (*cur)) + { + hash = HT_HASHSTEP (hash, *cur); + cur++; + } + len = cur - base; + hash = HT_HASHFINISH (hash, len); + result = CPP_HASHNODE (ht_lookup_with_hash (pfile->hash_table, + base, len, hash, HT_ALLOC)); + + /* Rarely, identifiers require diagnostics when lexed. */ + if (__builtin_expect ((result->flags & NODE_DIAGNOSTIC) + && !pfile->state.skipping, 0)) + { + /* It is allowed to poison the same identifier twice. */ + if ((result->flags & NODE_POISONED) && !pfile->state.poisoned_ok) + cpp_error (pfile, CPP_DL_ERROR, "attempt to use poisoned \"%s\"", + NODE_NAME (result)); + + /* Constraint 6.10.3.5: __VA_ARGS__ should only appear in the + replacement list of a variadic macro. */ + if (result == pfile->spec_nodes.n__VA_ARGS__ + && !pfile->state.va_args_ok) + { + if (CPP_OPTION (pfile, cplusplus)) + cpp_error (pfile, CPP_DL_PEDWARN, + "__VA_ARGS__ can only appear in the expansion" + " of a C++11 variadic macro"); + else + cpp_error (pfile, CPP_DL_PEDWARN, + "__VA_ARGS__ can only appear in the expansion" + " of a C99 variadic macro"); + } + + if (result == pfile->spec_nodes.n__VA_OPT__) + maybe_va_opt_error (pfile); + + /* For -Wc++-compat, warn about use of C++ named operators. */ + if (result->flags & NODE_WARN_OPERATOR) + cpp_warning (pfile, CPP_W_CXX_OPERATOR_NAMES, + "identifier \"%s\" is a special operator name in C++", + NODE_NAME (result)); + } + + return result; +} + +/* Get the cpp_hashnode of an identifier specified by NAME in + the current cpp_reader object. If none is found, NULL is returned. */ +cpp_hashnode * +_cpp_lex_identifier (cpp_reader *pfile, const char *name) +{ + cpp_hashnode *result; + result = lex_identifier_intern (pfile, (uchar *) name); + return result; +} + +/* Lex an identifier starting at BUFFER->CUR - 1. */ +static cpp_hashnode * +lex_identifier (cpp_reader *pfile, const uchar *base, bool starts_ucn, + struct normalize_state *nst, cpp_hashnode **spelling) +{ + cpp_hashnode *result; + const uchar *cur; + unsigned int len; + unsigned int hash = HT_HASHSTEP (0, *base); + const bool warn_bidi_p = pfile->warn_bidi_p (); + + cur = pfile->buffer->cur; + if (! starts_ucn) + { + while (ISIDNUM (*cur)) + { + hash = HT_HASHSTEP (hash, *cur); + cur++; + } + NORMALIZE_STATE_UPDATE_IDNUM (nst, *(cur - 1)); + } + pfile->buffer->cur = cur; + if (starts_ucn || forms_identifier_p (pfile, false, nst)) + { + /* Slower version for identifiers containing UCNs + or extended chars (including $). */ + do { + while (ISIDNUM (*pfile->buffer->cur)) + { + NORMALIZE_STATE_UPDATE_IDNUM (nst, *pfile->buffer->cur); + pfile->buffer->cur++; + } + } while (forms_identifier_p (pfile, false, nst)); + if (warn_bidi_p) + maybe_warn_bidi_on_close (pfile, pfile->buffer->cur); + result = _cpp_interpret_identifier (pfile, base, + pfile->buffer->cur - base); + *spelling = cpp_lookup (pfile, base, pfile->buffer->cur - base); + } + else + { + len = cur - base; + hash = HT_HASHFINISH (hash, len); + + result = CPP_HASHNODE (ht_lookup_with_hash (pfile->hash_table, + base, len, hash, HT_ALLOC)); + *spelling = result; + } + + /* Rarely, identifiers require diagnostics when lexed. */ + if (__builtin_expect ((result->flags & NODE_DIAGNOSTIC) + && !pfile->state.skipping, 0)) + { + /* It is allowed to poison the same identifier twice. */ + if ((result->flags & NODE_POISONED) && !pfile->state.poisoned_ok) + cpp_error (pfile, CPP_DL_ERROR, "attempt to use poisoned \"%s\"", + NODE_NAME (result)); + + /* Constraint 6.10.3.5: __VA_ARGS__ should only appear in the + replacement list of a variadic macro. */ + if (result == pfile->spec_nodes.n__VA_ARGS__ + && !pfile->state.va_args_ok) + { + if (CPP_OPTION (pfile, cplusplus)) + cpp_error (pfile, CPP_DL_PEDWARN, + "__VA_ARGS__ can only appear in the expansion" + " of a C++11 variadic macro"); + else + cpp_error (pfile, CPP_DL_PEDWARN, + "__VA_ARGS__ can only appear in the expansion" + " of a C99 variadic macro"); + } + + /* __VA_OPT__ should only appear in the replacement list of a + variadic macro. */ + if (result == pfile->spec_nodes.n__VA_OPT__) + maybe_va_opt_error (pfile); + + /* For -Wc++-compat, warn about use of C++ named operators. */ + if (result->flags & NODE_WARN_OPERATOR) + cpp_warning (pfile, CPP_W_CXX_OPERATOR_NAMES, + "identifier \"%s\" is a special operator name in C++", + NODE_NAME (result)); + } + + return result; +} + +/* Lex a number to NUMBER starting at BUFFER->CUR - 1. */ +static void +lex_number (cpp_reader *pfile, cpp_string *number, + struct normalize_state *nst) +{ + const uchar *cur; + const uchar *base; + uchar *dest; + + base = pfile->buffer->cur - 1; + do + { + const uchar *adj_digit_sep = NULL; + cur = pfile->buffer->cur; + + /* N.B. ISIDNUM does not include $. */ + while (ISIDNUM (*cur) + || (*cur == '.' && !DIGIT_SEP (cur[-1])) + || DIGIT_SEP (*cur) + || (VALID_SIGN (*cur, cur[-1]) && !DIGIT_SEP (cur[-2]))) + { + NORMALIZE_STATE_UPDATE_IDNUM (nst, *cur); + /* Adjacent digit separators do not form part of the pp-number syntax. + However, they can safely be diagnosed here as an error, since '' is + not a valid preprocessing token. */ + if (DIGIT_SEP (*cur) && DIGIT_SEP (cur[-1]) && !adj_digit_sep) + adj_digit_sep = cur; + cur++; + } + /* A number can't end with a digit separator. */ + while (cur > pfile->buffer->cur && DIGIT_SEP (cur[-1])) + --cur; + if (adj_digit_sep && adj_digit_sep < cur) + cpp_error (pfile, CPP_DL_ERROR, "adjacent digit separators"); + + pfile->buffer->cur = cur; + } + while (forms_identifier_p (pfile, false, nst)); + + number->len = cur - base; + dest = _cpp_unaligned_alloc (pfile, number->len + 1); + memcpy (dest, base, number->len); + dest[number->len] = '\0'; + number->text = dest; +} + +/* Create a token of type TYPE with a literal spelling. */ +static void +create_literal (cpp_reader *pfile, cpp_token *token, const uchar *base, + unsigned int len, enum cpp_ttype type) +{ + token->type = type; + token->val.str.len = len; + token->val.str.text = cpp_alloc_token_string (pfile, base, len); +} + +const uchar * +cpp_alloc_token_string (cpp_reader *pfile, + const unsigned char *ptr, unsigned len) +{ + uchar *dest = _cpp_unaligned_alloc (pfile, len + 1); + + dest[len] = 0; + memcpy (dest, ptr, len); + return dest; +} + +/* A pair of raw buffer pointers. The currently open one is [1], the + first one is [0]. Used for string literal lexing. */ +struct lit_accum { + _cpp_buff *first; + _cpp_buff *last; + const uchar *rpos; + size_t accum; + + lit_accum () + : first (NULL), last (NULL), rpos (0), accum (0) + { + } + + void append (cpp_reader *, const uchar *, size_t); + + void read_begin (cpp_reader *); + bool reading_p () const + { + return rpos != NULL; + } + char read_char () + { + char c = *rpos++; + if (rpos == BUFF_FRONT (last)) + rpos = NULL; + return c; + } +}; + +/* Subroutine of lex_raw_string: Append LEN chars from BASE to the buffer + sequence from *FIRST_BUFF_P to LAST_BUFF_P. */ + +void +lit_accum::append (cpp_reader *pfile, const uchar *base, size_t len) +{ + if (!last) + /* Starting. */ + first = last = _cpp_get_buff (pfile, len); + else if (len > BUFF_ROOM (last)) + { + /* There is insufficient room in the buffer. Copy what we can, + and then either extend or create a new one. */ + size_t room = BUFF_ROOM (last); + memcpy (BUFF_FRONT (last), base, room); + BUFF_FRONT (last) += room; + base += room; + len -= room; + accum += room; + + gcc_checking_assert (!rpos); + + last = _cpp_append_extend_buff (pfile, last, len); + } + + memcpy (BUFF_FRONT (last), base, len); + BUFF_FRONT (last) += len; + accum += len; +} + +void +lit_accum::read_begin (cpp_reader *pfile) +{ + /* We never accumulate more than 4 chars to read. */ + if (BUFF_ROOM (last) < 4) + + last = _cpp_append_extend_buff (pfile, last, 4); + rpos = BUFF_FRONT (last); +} + +/* Returns true if a macro has been defined. + This might not work if compile with -save-temps, + or preprocess separately from compilation. */ + +static bool +is_macro(cpp_reader *pfile, const uchar *base) +{ + const uchar *cur = base; + if (! ISIDST (*cur)) + return false; + unsigned int hash = HT_HASHSTEP (0, *cur); + ++cur; + while (ISIDNUM (*cur)) + { + hash = HT_HASHSTEP (hash, *cur); + ++cur; + } + hash = HT_HASHFINISH (hash, cur - base); + + cpp_hashnode *result = CPP_HASHNODE (ht_lookup_with_hash (pfile->hash_table, + base, cur - base, hash, HT_NO_INSERT)); + + return result && cpp_macro_p (result); +} + +/* Returns true if a literal suffix does not have the expected form + and is defined as a macro. */ + +static bool +is_macro_not_literal_suffix(cpp_reader *pfile, const uchar *base) +{ + /* User-defined literals outside of namespace std must start with a single + underscore, so assume anything of that form really is a UDL suffix. + We don't need to worry about UDLs defined inside namespace std because + their names are reserved, so cannot be used as macro names in valid + programs. */ + if (base[0] == '_' && base[1] != '_') + return false; + return is_macro (pfile, base); +} + +/* Lexes a raw string. The stored string contains the spelling, + including double quotes, delimiter string, '(' and ')', any leading + 'L', 'u', 'U' or 'u8' and 'R' modifier. The created token contains + the type of the literal, or CPP_OTHER if it was not properly + terminated. + + BASE is the start of the token. Updates pfile->buffer->cur to just + after the lexed string. + + The spelling is NUL-terminated, but it is not guaranteed that this + is the first NUL since embedded NULs are preserved. */ + +static void +lex_raw_string (cpp_reader *pfile, cpp_token *token, const uchar *base) +{ + const uchar *pos = base; + const bool warn_bidi_p = pfile->warn_bidi_p (); + const bool warn_invalid_utf8_p = CPP_OPTION (pfile, cpp_warn_invalid_utf8); + const bool warn_bidi_or_invalid_utf8_p = warn_bidi_p | warn_invalid_utf8_p; + + /* 'tis a pity this information isn't passed down from the lexer's + initial categorization of the token. */ + enum cpp_ttype type = CPP_STRING; + + if (*pos == 'L') + { + type = CPP_WSTRING; + pos++; + } + else if (*pos == 'U') + { + type = CPP_STRING32; + pos++; + } + else if (*pos == 'u') + { + if (pos[1] == '8') + { + type = CPP_UTF8STRING; + pos++; + } + else + type = CPP_STRING16; + pos++; + } + + gcc_checking_assert (pos[0] == 'R' && pos[1] == '"'); + pos += 2; + + _cpp_line_note *note = &pfile->buffer->notes[pfile->buffer->cur_note]; + + /* Skip notes before the ". */ + while (note->pos < pos) + ++note; + + lit_accum accum; + + uchar prefix[17]; + unsigned prefix_len = 0; + enum Phase + { + PHASE_PREFIX = -2, + PHASE_NONE = -1, + PHASE_SUFFIX = 0 + } phase = PHASE_PREFIX; + + for (;;) + { + gcc_checking_assert (note->pos >= pos); + + /* Undo any escaped newlines and trigraphs. */ + if (!accum.reading_p () && note->pos == pos) + switch (note->type) + { + case '\\': + case ' ': + /* Restore backslash followed by newline. */ + accum.append (pfile, base, pos - base); + base = pos; + accum.read_begin (pfile); + accum.append (pfile, UC"\\", 1); + + after_backslash: + if (note->type == ' ') + /* GNU backslash whitespace newline extension. FIXME + could be any sequence of non-vertical space. When we + can properly restore any such sequence, we should + mark this note as handled so _cpp_process_line_notes + doesn't warn. */ + accum.append (pfile, UC" ", 1); + + accum.append (pfile, UC"\n", 1); + note++; + break; + + case '\n': + /* This can happen for ??/ when trigraphs are not + being interpretted. */ + gcc_checking_assert (!CPP_OPTION (pfile, trigraphs)); + note->type = 0; + note++; + break; + + default: + gcc_checking_assert (_cpp_trigraph_map[note->type]); + + /* Don't warn about this trigraph in + _cpp_process_line_notes, since trigraphs show up as + trigraphs in raw strings. */ + uchar type = note->type; + note->type = 0; + + if (CPP_OPTION (pfile, trigraphs)) + { + accum.append (pfile, base, pos - base); + base = pos; + accum.read_begin (pfile); + accum.append (pfile, UC"??", 2); + accum.append (pfile, &type, 1); + + /* ??/ followed by newline gets two line notes, one for + the trigraph and one for the backslash/newline. */ + if (type == '/' && note[1].pos == pos) + { + note++; + gcc_assert (note->type == '\\' || note->type == ' '); + goto after_backslash; + } + /* Skip the replacement character. */ + base = ++pos; + } + + note++; + break; + } + + /* Now get a char to process. Either from an expanded note, or + from the line buffer. */ + bool read_note = accum.reading_p (); + char c = read_note ? accum.read_char () : *pos++; + + if (phase == PHASE_PREFIX) + { + if (c == '(') + { + /* Done. */ + phase = PHASE_NONE; + prefix[prefix_len++] = '"'; + } + else if (prefix_len < 16 + /* Prefix chars are any of the basic character set, + [lex.charset] except for ' + ()\\\t\v\f\n'. Optimized for a contiguous + alphabet. */ + /* Unlike a switch, this collapses down to one or + two shift and bitmask operations on an ASCII + system, with an outlier or two. */ + && (('Z' - 'A' == 25 + ? ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')) + : ISIDST (c)) + || (c >= '0' && c <= '9') + || c == '_' || c == '{' || c == '}' + || c == '[' || c == ']' || c == '#' + || c == '<' || c == '>' || c == '%' + || c == ':' || c == ';' || c == '.' || c == '?' + || c == '*' || c == '+' || c == '-' || c == '/' + || c == '^' || c == '&' || c == '|' || c == '~' + || c == '!' || c == '=' || c == ',' + || c == '"' || c == '\'')) + prefix[prefix_len++] = c; + else + { + /* Something is wrong. */ + int col = CPP_BUF_COLUMN (pfile->buffer, pos) + read_note; + if (prefix_len == 16) + cpp_error_with_line (pfile, CPP_DL_ERROR, token->src_loc, + col, "raw string delimiter longer " + "than 16 characters"); + else if (c == '\n') + cpp_error_with_line (pfile, CPP_DL_ERROR, token->src_loc, + col, "invalid new-line in raw " + "string delimiter"); + else + cpp_error_with_line (pfile, CPP_DL_ERROR, token->src_loc, + col, "invalid character '%c' in " + "raw string delimiter", c); + type = CPP_OTHER; + phase = PHASE_NONE; + /* Continue until we get a close quote, that's probably + the best failure mode. */ + prefix_len = 0; + } + if (c != '\n') + continue; + } + + if (phase != PHASE_NONE) + { + if (prefix[phase] != c) + phase = PHASE_NONE; + else if (unsigned (phase + 1) == prefix_len) + break; + else + { + phase = Phase (phase + 1); + continue; + } + } + + if (!prefix_len && c == '"') + /* Failure mode lexing. */ + goto out; + else if (prefix_len && c == ')') + phase = PHASE_SUFFIX; + else if (!read_note && c == '\n') + { + pos--; + pfile->buffer->cur = pos; + if ((pfile->state.in_directive || pfile->state.parsing_args) + && pfile->buffer->next_line >= pfile->buffer->rlimit) + { + cpp_error_with_line (pfile, CPP_DL_ERROR, token->src_loc, 0, + "unterminated raw string"); + type = CPP_OTHER; + goto out; + } + + accum.append (pfile, base, pos - base + 1); + _cpp_process_line_notes (pfile, false); + + if (pfile->buffer->next_line < pfile->buffer->rlimit) + CPP_INCREMENT_LINE (pfile, 0); + pfile->buffer->need_line = true; + + if (!get_fresh_line_impl (pfile)) + { + /* We ran out of file and failed to get a line. */ + location_t src_loc = token->src_loc; + token->type = CPP_EOF; + /* Tell the compiler the line number of the EOF token. */ + token->src_loc = pfile->line_table->highest_line; + token->flags = BOL; + if (accum.first) + _cpp_release_buff (pfile, accum.first); + cpp_error_with_line (pfile, CPP_DL_ERROR, src_loc, 0, + "unterminated raw string"); + + /* Now pop the buffer that get_fresh_line_impl() did not. Popping + is not safe if processing a directive, however this cannot + happen as we already checked above that a line would be + available, and get_fresh_line_impl() can't fail in this + case. */ + gcc_assert (!pfile->state.in_directive); + _cpp_pop_buffer (pfile); + + return; + } + + pos = base = pfile->buffer->cur; + note = &pfile->buffer->notes[pfile->buffer->cur_note]; + } + else if (__builtin_expect ((unsigned char) c >= utf8_continuation, 0) + && warn_bidi_or_invalid_utf8_p) + pos = _cpp_handle_multibyte_utf8 (pfile, c, pos, warn_bidi_p, + warn_invalid_utf8_p); + } + + if (warn_bidi_p) + maybe_warn_bidi_on_close (pfile, pos); + + if (CPP_OPTION (pfile, user_literals)) + { + /* If a string format macro, say from inttypes.h, is placed touching + a string literal it could be parsed as a C++11 user-defined string + literal thus breaking the program. */ + if (is_macro_not_literal_suffix (pfile, pos)) + { + /* Raise a warning, but do not consume subsequent tokens. */ + if (CPP_OPTION (pfile, warn_literal_suffix) && !pfile->state.skipping) + cpp_warning_with_line (pfile, CPP_W_LITERAL_SUFFIX, + token->src_loc, 0, + "invalid suffix on literal; C++11 requires " + "a space between literal and string macro"); + } + /* Grab user defined literal suffix. */ + else if (ISIDST (*pos)) + { + type = cpp_userdef_string_add_type (type); + ++pos; + + while (ISIDNUM (*pos)) + ++pos; + } + } + + out: + pfile->buffer->cur = pos; + if (!accum.accum) + create_literal (pfile, token, base, pos - base, type); + else + { + size_t extra_len = pos - base; + uchar *dest = _cpp_unaligned_alloc (pfile, accum.accum + extra_len + 1); + + token->type = type; + token->val.str.len = accum.accum + extra_len; + token->val.str.text = dest; + for (_cpp_buff *buf = accum.first; buf; buf = buf->next) + { + size_t len = BUFF_FRONT (buf) - buf->base; + memcpy (dest, buf->base, len); + dest += len; + } + _cpp_release_buff (pfile, accum.first); + memcpy (dest, base, extra_len); + dest[extra_len] = '\0'; + } +} + +/* Lexes a string, character constant, or angle-bracketed header file + name. The stored string contains the spelling, including opening + quote and any leading 'L', 'u', 'U' or 'u8' and optional + 'R' modifier. It returns the type of the literal, or CPP_OTHER + if it was not properly terminated, or CPP_LESS for an unterminated + header name which must be relexed as normal tokens. + + The spelling is NUL-terminated, but it is not guaranteed that this + is the first NUL since embedded NULs are preserved. */ +static void +lex_string (cpp_reader *pfile, cpp_token *token, const uchar *base) +{ + bool saw_NUL = false; + const uchar *cur; + cppchar_t terminator; + enum cpp_ttype type; + + cur = base; + terminator = *cur++; + if (terminator == 'L' || terminator == 'U') + terminator = *cur++; + else if (terminator == 'u') + { + terminator = *cur++; + if (terminator == '8') + terminator = *cur++; + } + if (terminator == 'R') + { + lex_raw_string (pfile, token, base); + return; + } + if (terminator == '"') + type = (*base == 'L' ? CPP_WSTRING : + *base == 'U' ? CPP_STRING32 : + *base == 'u' ? (base[1] == '8' ? CPP_UTF8STRING : CPP_STRING16) + : CPP_STRING); + else if (terminator == '\'') + type = (*base == 'L' ? CPP_WCHAR : + *base == 'U' ? CPP_CHAR32 : + *base == 'u' ? (base[1] == '8' ? CPP_UTF8CHAR : CPP_CHAR16) + : CPP_CHAR); + else + terminator = '>', type = CPP_HEADER_NAME; + + const bool warn_bidi_p = pfile->warn_bidi_p (); + const bool warn_invalid_utf8_p = CPP_OPTION (pfile, cpp_warn_invalid_utf8); + const bool warn_bidi_or_invalid_utf8_p = warn_bidi_p | warn_invalid_utf8_p; + for (;;) + { + cppchar_t c = *cur++; + + /* In #include-style directives, terminators are not escapable. */ + if (c == '\\' && !pfile->state.angled_headers && *cur != '\n') + { + if ((cur[0] == 'u' || cur[0] == 'U' || cur[0] == 'N') && warn_bidi_p) + { + location_t loc; + bidi::kind kind; + if (cur[0] == 'N') + kind = get_bidi_named (pfile, cur + 1, &loc); + else + kind = get_bidi_ucn (pfile, cur + 1, cur[0] == 'U', &loc); + maybe_warn_bidi_on_char (pfile, kind, /*ucn_p=*/true, loc); + } + cur++; + } + else if (c == terminator) + { + if (warn_bidi_p) + maybe_warn_bidi_on_close (pfile, cur - 1); + break; + } + else if (c == '\n') + { + cur--; + /* Unmatched quotes always yield undefined behavior, but + greedy lexing means that what appears to be an unterminated + header name may actually be a legitimate sequence of tokens. */ + if (terminator == '>') + { + token->type = CPP_LESS; + return; + } + type = CPP_OTHER; + break; + } + else if (c == '\0') + saw_NUL = true; + else if (__builtin_expect (c >= utf8_continuation, 0) + && warn_bidi_or_invalid_utf8_p) + cur = _cpp_handle_multibyte_utf8 (pfile, c, cur, warn_bidi_p, + warn_invalid_utf8_p); + } + + if (saw_NUL && !pfile->state.skipping) + cpp_error (pfile, CPP_DL_WARNING, + "null character(s) preserved in literal"); + + if (type == CPP_OTHER && CPP_OPTION (pfile, lang) != CLK_ASM) + cpp_error (pfile, CPP_DL_PEDWARN, "missing terminating %c character", + (int) terminator); + + if (CPP_OPTION (pfile, user_literals)) + { + /* If a string format macro, say from inttypes.h, is placed touching + a string literal it could be parsed as a C++11 user-defined string + literal thus breaking the program. */ + if (is_macro_not_literal_suffix (pfile, cur)) + { + /* Raise a warning, but do not consume subsequent tokens. */ + if (CPP_OPTION (pfile, warn_literal_suffix) && !pfile->state.skipping) + cpp_warning_with_line (pfile, CPP_W_LITERAL_SUFFIX, + token->src_loc, 0, + "invalid suffix on literal; C++11 requires " + "a space between literal and string macro"); + } + /* Grab user defined literal suffix. */ + else if (ISIDST (*cur)) + { + type = cpp_userdef_char_add_type (type); + type = cpp_userdef_string_add_type (type); + ++cur; + + while (ISIDNUM (*cur)) + ++cur; + } + } + else if (CPP_OPTION (pfile, cpp_warn_cxx11_compat) + && is_macro (pfile, cur) + && !pfile->state.skipping) + cpp_warning_with_line (pfile, CPP_W_CXX11_COMPAT, + token->src_loc, 0, "C++11 requires a space " + "between string literal and macro"); + + pfile->buffer->cur = cur; + create_literal (pfile, token, base, cur - base, type); +} + +/* Return the comment table. The client may not make any assumption + about the ordering of the table. */ +cpp_comment_table * +cpp_get_comments (cpp_reader *pfile) +{ + return &pfile->comments; +} + +/* Append a comment to the end of the comment table. */ +static void +store_comment (cpp_reader *pfile, cpp_token *token) +{ + int len; + + if (pfile->comments.allocated == 0) + { + pfile->comments.allocated = 256; + pfile->comments.entries = (cpp_comment *) xmalloc + (pfile->comments.allocated * sizeof (cpp_comment)); + } + + if (pfile->comments.count == pfile->comments.allocated) + { + pfile->comments.allocated *= 2; + pfile->comments.entries = (cpp_comment *) xrealloc + (pfile->comments.entries, + pfile->comments.allocated * sizeof (cpp_comment)); + } + + len = token->val.str.len; + + /* Copy comment. Note, token may not be NULL terminated. */ + pfile->comments.entries[pfile->comments.count].comment = + (char *) xmalloc (sizeof (char) * (len + 1)); + memcpy (pfile->comments.entries[pfile->comments.count].comment, + token->val.str.text, len); + pfile->comments.entries[pfile->comments.count].comment[len] = '\0'; + + /* Set source location. */ + pfile->comments.entries[pfile->comments.count].sloc = token->src_loc; + + /* Increment the count of entries in the comment table. */ + pfile->comments.count++; +} + +/* The stored comment includes the comment start and any terminator. */ +static void +save_comment (cpp_reader *pfile, cpp_token *token, const unsigned char *from, + cppchar_t type) +{ + unsigned char *buffer; + unsigned int len, clen, i; + + len = pfile->buffer->cur - from + 1; /* + 1 for the initial '/'. */ + + /* C++ comments probably (not definitely) have moved past a new + line, which we don't want to save in the comment. */ + if (is_vspace (pfile->buffer->cur[-1])) + len--; + + /* If we are currently in a directive or in argument parsing, then + we need to store all C++ comments as C comments internally, and + so we need to allocate a little extra space in that case. + + Note that the only time we encounter a directive here is + when we are saving comments in a "#define". */ + clen = ((pfile->state.in_directive || pfile->state.parsing_args) + && type == '/') ? len + 2 : len; + + buffer = _cpp_unaligned_alloc (pfile, clen); + + token->type = CPP_COMMENT; + token->val.str.len = clen; + token->val.str.text = buffer; + + buffer[0] = '/'; + memcpy (buffer + 1, from, len - 1); + + /* Finish conversion to a C comment, if necessary. */ + if ((pfile->state.in_directive || pfile->state.parsing_args) && type == '/') + { + buffer[1] = '*'; + buffer[clen - 2] = '*'; + buffer[clen - 1] = '/'; + /* As there can be in a C++ comments illegal sequences for C comments + we need to filter them out. */ + for (i = 2; i < (clen - 2); i++) + if (buffer[i] == '/' && (buffer[i - 1] == '*' || buffer[i + 1] == '*')) + buffer[i] = '|'; + } + + /* Finally store this comment for use by clients of libcpp. */ + store_comment (pfile, token); +} + +/* Returns true if comment at COMMENT_START is a recognized FALLTHROUGH + comment. */ + +static bool +fallthrough_comment_p (cpp_reader *pfile, const unsigned char *comment_start) +{ + const unsigned char *from = comment_start + 1; + + switch (CPP_OPTION (pfile, cpp_warn_implicit_fallthrough)) + { + /* For both -Wimplicit-fallthrough=0 and -Wimplicit-fallthrough=5 we + don't recognize any comments. The latter only checks attributes, + the former doesn't warn. */ + case 0: + default: + return false; + /* -Wimplicit-fallthrough=1 considers any comment, no matter what + content it has. */ + case 1: + return true; + case 2: + /* -Wimplicit-fallthrough=2 looks for (case insensitive) + .*falls?[ \t-]*thr(u|ough).* regex. */ + for (; (size_t) (pfile->buffer->cur - from) >= sizeof "fallthru" - 1; + from++) + { + /* Is there anything like strpbrk with upper boundary, or + memchr looking for 2 characters rather than just one? */ + if (from[0] != 'f' && from[0] != 'F') + continue; + if (from[1] != 'a' && from[1] != 'A') + continue; + if (from[2] != 'l' && from[2] != 'L') + continue; + if (from[3] != 'l' && from[3] != 'L') + continue; + from += sizeof "fall" - 1; + if (from[0] == 's' || from[0] == 'S') + from++; + while (*from == ' ' || *from == '\t' || *from == '-') + from++; + if (from[0] != 't' && from[0] != 'T') + continue; + if (from[1] != 'h' && from[1] != 'H') + continue; + if (from[2] != 'r' && from[2] != 'R') + continue; + if (from[3] == 'u' || from[3] == 'U') + return true; + if (from[3] != 'o' && from[3] != 'O') + continue; + if (from[4] != 'u' && from[4] != 'U') + continue; + if (from[5] != 'g' && from[5] != 'G') + continue; + if (from[6] != 'h' && from[6] != 'H') + continue; + return true; + } + return false; + case 3: + case 4: + break; + } + + /* Whole comment contents: + -fallthrough + @fallthrough@ + */ + if (*from == '-' || *from == '@') + { + size_t len = sizeof "fallthrough" - 1; + if ((size_t) (pfile->buffer->cur - from - 1) < len) + return false; + if (memcmp (from + 1, "fallthrough", len)) + return false; + if (*from == '@') + { + if (from[len + 1] != '@') + return false; + len++; + } + from += 1 + len; + } + /* Whole comment contents (regex): + lint -fallthrough[ \t]* + */ + else if (*from == 'l') + { + size_t len = sizeof "int -fallthrough" - 1; + if ((size_t) (pfile->buffer->cur - from - 1) < len) + return false; + if (memcmp (from + 1, "int -fallthrough", len)) + return false; + from += 1 + len; + while (*from == ' ' || *from == '\t') + from++; + } + /* Whole comment contents (regex): + [ \t]*FALLTHR(U|OUGH)[ \t]* + */ + else if (CPP_OPTION (pfile, cpp_warn_implicit_fallthrough) == 4) + { + while (*from == ' ' || *from == '\t') + from++; + if ((size_t) (pfile->buffer->cur - from) < sizeof "FALLTHRU" - 1) + return false; + if (memcmp (from, "FALLTHR", sizeof "FALLTHR" - 1)) + return false; + from += sizeof "FALLTHR" - 1; + if (*from == 'U') + from++; + else if ((size_t) (pfile->buffer->cur - from) < sizeof "OUGH" - 1) + return false; + else if (memcmp (from, "OUGH", sizeof "OUGH" - 1)) + return false; + else + from += sizeof "OUGH" - 1; + while (*from == ' ' || *from == '\t') + from++; + } + /* Whole comment contents (regex): + [ \t.!]*(ELSE,? |INTENTIONAL(LY)? )?FALL(S | |-)?THR(OUGH|U)[ \t.!]*(-[^\n\r]*)? + [ \t.!]*(Else,? |Intentional(ly)? )?Fall((s | |-)[Tt]|t)hr(ough|u)[ \t.!]*(-[^\n\r]*)? + [ \t.!]*([Ee]lse,? |[Ii]ntentional(ly)? )?fall(s | |-)?thr(ough|u)[ \t.!]*(-[^\n\r]*)? + */ + else + { + while (*from == ' ' || *from == '\t' || *from == '.' || *from == '!') + from++; + unsigned char f = *from; + bool all_upper = false; + if (f == 'E' || f == 'e') + { + if ((size_t) (pfile->buffer->cur - from) + < sizeof "else fallthru" - 1) + return false; + if (f == 'E' && memcmp (from + 1, "LSE", sizeof "LSE" - 1) == 0) + all_upper = true; + else if (memcmp (from + 1, "lse", sizeof "lse" - 1)) + return false; + from += sizeof "else" - 1; + if (*from == ',') + from++; + if (*from != ' ') + return false; + from++; + if (all_upper && *from == 'f') + return false; + if (f == 'e' && *from == 'F') + return false; + f = *from; + } + else if (f == 'I' || f == 'i') + { + if ((size_t) (pfile->buffer->cur - from) + < sizeof "intentional fallthru" - 1) + return false; + if (f == 'I' && memcmp (from + 1, "NTENTIONAL", + sizeof "NTENTIONAL" - 1) == 0) + all_upper = true; + else if (memcmp (from + 1, "ntentional", + sizeof "ntentional" - 1)) + return false; + from += sizeof "intentional" - 1; + if (*from == ' ') + { + from++; + if (all_upper && *from == 'f') + return false; + } + else if (all_upper) + { + if (memcmp (from, "LY F", sizeof "LY F" - 1)) + return false; + from += sizeof "LY " - 1; + } + else + { + if (memcmp (from, "ly ", sizeof "ly " - 1)) + return false; + from += sizeof "ly " - 1; + } + if (f == 'i' && *from == 'F') + return false; + f = *from; + } + if (f != 'F' && f != 'f') + return false; + if ((size_t) (pfile->buffer->cur - from) < sizeof "fallthru" - 1) + return false; + if (f == 'F' && memcmp (from + 1, "ALL", sizeof "ALL" - 1) == 0) + all_upper = true; + else if (all_upper) + return false; + else if (memcmp (from + 1, "all", sizeof "all" - 1)) + return false; + from += sizeof "fall" - 1; + if (*from == (all_upper ? 'S' : 's') && from[1] == ' ') + from += 2; + else if (*from == ' ' || *from == '-') + from++; + else if (*from != (all_upper ? 'T' : 't')) + return false; + if ((f == 'f' || *from != 'T') && (all_upper || *from != 't')) + return false; + if ((size_t) (pfile->buffer->cur - from) < sizeof "thru" - 1) + return false; + if (memcmp (from + 1, all_upper ? "HRU" : "hru", sizeof "hru" - 1)) + { + if ((size_t) (pfile->buffer->cur - from) < sizeof "through" - 1) + return false; + if (memcmp (from + 1, all_upper ? "HROUGH" : "hrough", + sizeof "hrough" - 1)) + return false; + from += sizeof "through" - 1; + } + else + from += sizeof "thru" - 1; + while (*from == ' ' || *from == '\t' || *from == '.' || *from == '!') + from++; + if (*from == '-') + { + from++; + if (*comment_start == '*') + { + do + { + while (*from && *from != '*' + && *from != '\n' && *from != '\r') + from++; + if (*from != '*' || from[1] == '/') + break; + from++; + } + while (1); + } + else + while (*from && *from != '\n' && *from != '\r') + from++; + } + } + /* C block comment. */ + if (*comment_start == '*') + { + if (*from != '*' || from[1] != '/') + return false; + } + /* C++ line comment. */ + else if (*from != '\n') + return false; + + return true; +} + +/* Allocate COUNT tokens for RUN. */ +void +_cpp_init_tokenrun (tokenrun *run, unsigned int count) +{ + run->base = XNEWVEC (cpp_token, count); + run->limit = run->base + count; + run->next = NULL; +} + +/* Returns the next tokenrun, or creates one if there is none. */ +static tokenrun * +next_tokenrun (tokenrun *run) +{ + if (run->next == NULL) + { + run->next = XNEW (tokenrun); + run->next->prev = run; + _cpp_init_tokenrun (run->next, 250); + } + + return run->next; +} + +/* Return the number of not yet processed token in a given + context. */ +int +_cpp_remaining_tokens_num_in_context (cpp_context *context) +{ + if (context->tokens_kind == TOKENS_KIND_DIRECT) + return (LAST (context).token - FIRST (context).token); + else if (context->tokens_kind == TOKENS_KIND_INDIRECT + || context->tokens_kind == TOKENS_KIND_EXTENDED) + return (LAST (context).ptoken - FIRST (context).ptoken); + else + abort (); +} + +/* Returns the token present at index INDEX in a given context. If + INDEX is zero, the next token to be processed is returned. */ +static const cpp_token* +_cpp_token_from_context_at (cpp_context *context, int index) +{ + if (context->tokens_kind == TOKENS_KIND_DIRECT) + return &(FIRST (context).token[index]); + else if (context->tokens_kind == TOKENS_KIND_INDIRECT + || context->tokens_kind == TOKENS_KIND_EXTENDED) + return FIRST (context).ptoken[index]; + else + abort (); +} + +/* Look ahead in the input stream. */ +const cpp_token * +cpp_peek_token (cpp_reader *pfile, int index) +{ + cpp_context *context = pfile->context; + const cpp_token *peektok; + int count; + + /* First, scan through any pending cpp_context objects. */ + while (context->prev) + { + ptrdiff_t sz = _cpp_remaining_tokens_num_in_context (context); + + if (index < (int) sz) + return _cpp_token_from_context_at (context, index); + index -= (int) sz; + context = context->prev; + } + + /* We will have to read some new tokens after all (and do so + without invalidating preceding tokens). */ + count = index; + pfile->keep_tokens++; + + /* For peeked tokens temporarily disable line_change reporting, + until the tokens are parsed for real. */ + void (*line_change) (cpp_reader *, const cpp_token *, int) + = pfile->cb.line_change; + pfile->cb.line_change = NULL; + + do + { + peektok = _cpp_lex_token (pfile); + if (peektok->type == CPP_EOF) + { + index--; + break; + } + else if (peektok->type == CPP_PRAGMA) + { + /* Don't peek past a pragma. */ + if (peektok == &pfile->directive_result) + /* Save the pragma in the buffer. */ + *pfile->cur_token++ = *peektok; + index--; + break; + } + } + while (index--); + + _cpp_backup_tokens_direct (pfile, count - index); + pfile->keep_tokens--; + pfile->cb.line_change = line_change; + + return peektok; +} + +/* Allocate a single token that is invalidated at the same time as the + rest of the tokens on the line. Has its line and col set to the + same as the last lexed token, so that diagnostics appear in the + right place. */ +cpp_token * +_cpp_temp_token (cpp_reader *pfile) +{ + cpp_token *old, *result; + ptrdiff_t sz = pfile->cur_run->limit - pfile->cur_token; + ptrdiff_t la = (ptrdiff_t) pfile->lookaheads; + + old = pfile->cur_token - 1; + /* Any pre-existing lookaheads must not be clobbered. */ + if (la) + { + if (sz <= la) + { + tokenrun *next = next_tokenrun (pfile->cur_run); + + if (sz < la) + memmove (next->base + 1, next->base, + (la - sz) * sizeof (cpp_token)); + + next->base[0] = pfile->cur_run->limit[-1]; + } + + if (sz > 1) + memmove (pfile->cur_token + 1, pfile->cur_token, + MIN (la, sz - 1) * sizeof (cpp_token)); + } + + if (!sz && pfile->cur_token == pfile->cur_run->limit) + { + pfile->cur_run = next_tokenrun (pfile->cur_run); + pfile->cur_token = pfile->cur_run->base; + } + + result = pfile->cur_token++; + result->src_loc = old->src_loc; + return result; +} + +/* We're at the beginning of a logical line (so not in + directives-mode) and RESULT is a CPP_NAME with NODE_MODULE set. See + if we should enter deferred_pragma mode to tokenize the rest of the + line as a module control-line. */ + +static void +cpp_maybe_module_directive (cpp_reader *pfile, cpp_token *result) +{ + unsigned backup = 0; /* Tokens we peeked. */ + cpp_hashnode *node = result->val.node.node; + cpp_token *peek = result; + cpp_token *keyword = peek; + cpp_hashnode *(&n_modules)[spec_nodes::M_HWM][2] = pfile->spec_nodes.n_modules; + int header_count = 0; + + /* Make sure the incoming state is as we expect it. This way we + can restore it using constants. */ + gcc_checking_assert (!pfile->state.in_deferred_pragma + && !pfile->state.skipping + && !pfile->state.parsing_args + && !pfile->state.angled_headers + && (pfile->state.save_comments + == !CPP_OPTION (pfile, discard_comments))); + + /* Enter directives mode sufficiently for peeking. We don't have + to actually set in_directive. */ + pfile->state.in_deferred_pragma = true; + + /* These two fields are needed to process tokenization in deferred + pragma mode. They are not used outside deferred pragma mode or + directives mode. */ + pfile->state.pragma_allow_expansion = true; + pfile->directive_line = result->src_loc; + + /* Saving comments is incompatible with directives mode. */ + pfile->state.save_comments = 0; + + if (node == n_modules[spec_nodes::M_EXPORT][0]) + { + peek = _cpp_lex_direct (pfile); + keyword = peek; + backup++; + if (keyword->type != CPP_NAME) + goto not_module; + node = keyword->val.node.node; + if (!(node->flags & NODE_MODULE)) + goto not_module; + } + + if (node == n_modules[spec_nodes::M__IMPORT][0]) + /* __import */ + header_count = backup + 2 + 16; + else if (node == n_modules[spec_nodes::M_IMPORT][0]) + /* import */ + header_count = backup + 2 + (CPP_OPTION (pfile, preprocessed) ? 16 : 0); + else if (node == n_modules[spec_nodes::M_MODULE][0]) + ; /* module */ + else + goto not_module; + + /* We've seen [export] {module|import|__import}. Check the next token. */ + if (header_count) + /* After '{,__}import' a header name may appear. */ + pfile->state.angled_headers = true; + peek = _cpp_lex_direct (pfile); + backup++; + + /* ... import followed by identifier, ':', '<' or + header-name preprocessing tokens, or module + followed by cpp-identifier, ':' or ';' preprocessing + tokens. C++ keywords are not yet relevant. */ + if (peek->type == CPP_NAME + || peek->type == CPP_COLON + || (header_count + ? (peek->type == CPP_LESS + || (peek->type == CPP_STRING && peek->val.str.text[0] != 'R') + || peek->type == CPP_HEADER_NAME) + : peek->type == CPP_SEMICOLON)) + { + pfile->state.pragma_allow_expansion = !CPP_OPTION (pfile, preprocessed); + if (!pfile->state.pragma_allow_expansion) + pfile->state.prevent_expansion++; + + if (!header_count && linemap_included_from + (LINEMAPS_LAST_ORDINARY_MAP (pfile->line_table))) + cpp_error_with_line (pfile, CPP_DL_ERROR, keyword->src_loc, 0, + "module control-line cannot be in included file"); + + /* The first one or two tokens cannot be macro names. */ + for (int ix = backup; ix--;) + { + cpp_token *tok = ix ? keyword : result; + cpp_hashnode *node = tok->val.node.node; + + /* Don't attempt to expand the token. */ + tok->flags |= NO_EXPAND; + if (_cpp_defined_macro_p (node) + && _cpp_maybe_notify_macro_use (pfile, node, tok->src_loc) + && !cpp_fun_like_macro_p (node)) + cpp_error_with_line (pfile, CPP_DL_ERROR, tok->src_loc, 0, + "module control-line \"%s\" cannot be" + " an object-like macro", + NODE_NAME (node)); + } + + /* Map to underbar variants. */ + keyword->val.node.node = n_modules[header_count + ? spec_nodes::M_IMPORT + : spec_nodes::M_MODULE][1]; + if (backup != 1) + result->val.node.node = n_modules[spec_nodes::M_EXPORT][1]; + + /* Maybe tell the tokenizer we expect a header-name down the + road. */ + pfile->state.directive_file_token = header_count; + } + else + { + not_module: + /* Drop out of directive mode. */ + /* We aaserted save_comments had this value upon entry. */ + pfile->state.save_comments + = !CPP_OPTION (pfile, discard_comments); + pfile->state.in_deferred_pragma = false; + /* Do not let this remain on. */ + pfile->state.angled_headers = false; + } + + /* In either case we want to backup the peeked tokens. */ + if (backup) + { + /* If we saw EOL, we should drop it, because this isn't a module + control-line after all. */ + bool eol = peek->type == CPP_PRAGMA_EOL; + if (!eol || backup > 1) + { + /* Put put the peeked tokens back */ + _cpp_backup_tokens_direct (pfile, backup); + /* But if the last one was an EOL, forget it. */ + if (eol) + pfile->lookaheads--; + } + } +} + +/* Lex a token into RESULT (external interface). Takes care of issues + like directive handling, token lookahead, multiple include + optimization and skipping. */ +const cpp_token * +_cpp_lex_token (cpp_reader *pfile) +{ + cpp_token *result; + + for (;;) + { + if (pfile->cur_token == pfile->cur_run->limit) + { + pfile->cur_run = next_tokenrun (pfile->cur_run); + pfile->cur_token = pfile->cur_run->base; + } + /* We assume that the current token is somewhere in the current + run. */ + if (pfile->cur_token < pfile->cur_run->base + || pfile->cur_token >= pfile->cur_run->limit) + abort (); + + if (pfile->lookaheads) + { + pfile->lookaheads--; + result = pfile->cur_token++; + } + else + result = _cpp_lex_direct (pfile); + + if (result->flags & BOL) + { + /* Is this a directive. If _cpp_handle_directive returns + false, it is an assembler #. */ + if (result->type == CPP_HASH + /* 6.10.3 p 11: Directives in a list of macro arguments + gives undefined behavior. This implementation + handles the directive as normal. */ + && pfile->state.parsing_args != 1) + { + if (_cpp_handle_directive (pfile, result->flags & PREV_WHITE)) + { + if (pfile->directive_result.type == CPP_PADDING) + continue; + result = &pfile->directive_result; + } + } + else if (pfile->state.in_deferred_pragma) + result = &pfile->directive_result; + else if (result->type == CPP_NAME + && (result->val.node.node->flags & NODE_MODULE) + && !pfile->state.skipping + /* Unlike regular directives, we do not deal with + tokenizing module directives as macro arguments. + That's not permitted. */ + && !pfile->state.parsing_args) + { + /* P1857. Before macro expansion, At start of logical + line ... */ + /* We don't have to consider lookaheads at this point. */ + gcc_checking_assert (!pfile->lookaheads); + + cpp_maybe_module_directive (pfile, result); + } + + if (pfile->cb.line_change && !pfile->state.skipping) + pfile->cb.line_change (pfile, result, pfile->state.parsing_args); + } + + /* We don't skip tokens in directives. */ + if (pfile->state.in_directive || pfile->state.in_deferred_pragma) + break; + + /* Outside a directive, invalidate controlling macros. At file + EOF, _cpp_lex_direct takes care of popping the buffer, so we never + get here and MI optimization works. */ + pfile->mi_valid = false; + + if (!pfile->state.skipping || result->type == CPP_EOF) + break; + } + + return result; +} + +/* Returns true if a fresh line has been loaded. */ +template +static bool +get_fresh_line_impl (cpp_reader *pfile) +{ + /* We can't get a new line until we leave the current directive, unless we + are lexing a raw string, in which case it will be OK as long as we don't + pop the current buffer. */ + if (!lexing_raw_string && pfile->state.in_directive) + return false; + + for (;;) + { + cpp_buffer *buffer = pfile->buffer; + + if (!buffer->need_line) + return true; + + if (buffer->next_line < buffer->rlimit) + { + _cpp_clean_line (pfile); + return true; + } + + /* We can't change buffers until we leave the current directive. */ + if (lexing_raw_string && pfile->state.in_directive) + return false; + + /* First, get out of parsing arguments state. */ + if (pfile->state.parsing_args) + return false; + + /* End of buffer. Non-empty files should end in a newline. */ + if (buffer->buf != buffer->rlimit + && buffer->next_line > buffer->rlimit + && !buffer->from_stage3) + { + /* Clip to buffer size. */ + buffer->next_line = buffer->rlimit; + } + + if (buffer->prev && !buffer->return_at_eof) + _cpp_pop_buffer (pfile); + else + { + /* End of translation. Do not pop the buffer yet. Increment + line number so that the EOF token is on a line of its own + (_cpp_lex_direct doesn't increment in that case, because + it's hard for it to distinguish this special case). */ + CPP_INCREMENT_LINE (pfile, 0); + return false; + } + } +} + +bool +_cpp_get_fresh_line (cpp_reader *pfile) +{ + return get_fresh_line_impl (pfile); +} + + +#define IF_NEXT_IS(CHAR, THEN_TYPE, ELSE_TYPE) \ + do \ + { \ + result->type = ELSE_TYPE; \ + if (*buffer->cur == CHAR) \ + buffer->cur++, result->type = THEN_TYPE; \ + } \ + while (0) + +/* Lex a token into pfile->cur_token, which is also incremented, to + get diagnostics pointing to the correct location. + + Does not handle issues such as token lookahead, multiple-include + optimization, directives, skipping etc. This function is only + suitable for use by _cpp_lex_token, and in special cases like + lex_expansion_token which doesn't care for any of these issues. + + When meeting a newline, returns CPP_EOF if parsing a directive, + otherwise returns to the start of the token buffer if permissible. + Returns the location of the lexed token. */ +cpp_token * +_cpp_lex_direct (cpp_reader *pfile) +{ + cppchar_t c; + cpp_buffer *buffer; + const unsigned char *comment_start; + bool fallthrough_comment = false; + cpp_token *result = pfile->cur_token++; + + fresh_line: + result->flags = 0; + buffer = pfile->buffer; + if (buffer->need_line) + { + if (pfile->state.in_deferred_pragma) + { + /* This can happen in cases like: + #define loop(x) whatever + #pragma omp loop + where when trying to expand loop we need to peek + next token after loop, but aren't still in_deferred_pragma + mode but are in in_directive mode, so buffer->need_line + is set, a CPP_EOF is peeked. */ + result->type = CPP_PRAGMA_EOL; + pfile->state.in_deferred_pragma = false; + if (!pfile->state.pragma_allow_expansion) + pfile->state.prevent_expansion--; + return result; + } + if (!_cpp_get_fresh_line (pfile)) + { + result->type = CPP_EOF; + /* Not a real EOF in a directive or arg parsing -- we refuse + to advance to the next file now, and will once we're out + of those modes. */ + if (!pfile->state.in_directive && !pfile->state.parsing_args) + { + /* Tell the compiler the line number of the EOF token. */ + result->src_loc = pfile->line_table->highest_line; + result->flags = BOL; + /* Now pop the buffer that _cpp_get_fresh_line did not. */ + _cpp_pop_buffer (pfile); + } + return result; + } + if (buffer != pfile->buffer) + fallthrough_comment = false; + if (!pfile->keep_tokens) + { + pfile->cur_run = &pfile->base_run; + result = pfile->base_run.base; + pfile->cur_token = result + 1; + } + result->flags = BOL; + if (pfile->state.parsing_args == 2) + result->flags |= PREV_WHITE; + } + buffer = pfile->buffer; + update_tokens_line: + result->src_loc = pfile->line_table->highest_line; + + skipped_white: + if (buffer->cur >= buffer->notes[buffer->cur_note].pos + && !pfile->overlaid_buffer) + { + _cpp_process_line_notes (pfile, false); + result->src_loc = pfile->line_table->highest_line; + } + c = *buffer->cur++; + + if (pfile->forced_token_location) + result->src_loc = pfile->forced_token_location; + else + result->src_loc = linemap_position_for_column (pfile->line_table, + CPP_BUF_COLUMN (buffer, buffer->cur)); + + switch (c) + { + case ' ': case '\t': case '\f': case '\v': case '\0': + result->flags |= PREV_WHITE; + skip_whitespace (pfile, c); + goto skipped_white; + + case '\n': + /* Increment the line, unless this is the last line ... */ + if (buffer->cur < buffer->rlimit + /* ... or this is a #include, (where _cpp_stack_file needs to + unwind by one line) ... */ + || (pfile->state.in_directive > 1 + /* ... except traditional-cpp increments this elsewhere. */ + && !CPP_OPTION (pfile, traditional))) + CPP_INCREMENT_LINE (pfile, 0); + buffer->need_line = true; + if (pfile->state.in_deferred_pragma) + { + /* Produce the PRAGMA_EOL on this line. File reading + ensures there is always a \n at end of the buffer, thus + in a deferred pragma we always see CPP_PRAGMA_EOL before + any CPP_EOF. */ + result->type = CPP_PRAGMA_EOL; + result->flags &= ~PREV_WHITE; + pfile->state.in_deferred_pragma = false; + if (!pfile->state.pragma_allow_expansion) + pfile->state.prevent_expansion--; + return result; + } + goto fresh_line; + + case '0': case '1': case '2': case '3': case '4': + case '5': case '6': case '7': case '8': case '9': + { + struct normalize_state nst = INITIAL_NORMALIZE_STATE; + result->type = CPP_NUMBER; + lex_number (pfile, &result->val.str, &nst); + warn_about_normalization (pfile, result, &nst, false); + break; + } + + case 'L': + case 'u': + case 'U': + case 'R': + /* 'L', 'u', 'U', 'u8' or 'R' may introduce wide characters, + wide strings or raw strings. */ + if (c == 'L' || CPP_OPTION (pfile, rliterals) + || (c != 'R' && CPP_OPTION (pfile, uliterals))) + { + if ((*buffer->cur == '\'' && c != 'R') + || *buffer->cur == '"' + || (*buffer->cur == 'R' + && c != 'R' + && buffer->cur[1] == '"' + && CPP_OPTION (pfile, rliterals)) + || (*buffer->cur == '8' + && c == 'u' + && ((buffer->cur[1] == '"' || (buffer->cur[1] == '\'' + && CPP_OPTION (pfile, utf8_char_literals))) + || (buffer->cur[1] == 'R' && buffer->cur[2] == '"' + && CPP_OPTION (pfile, rliterals))))) + { + lex_string (pfile, result, buffer->cur - 1); + break; + } + } + /* Fall through. */ + + case '_': + case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': + case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': + case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': + case 's': case 't': case 'v': case 'w': case 'x': + case 'y': case 'z': + case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': + case 'G': case 'H': case 'I': case 'J': case 'K': + case 'M': case 'N': case 'O': case 'P': case 'Q': + case 'S': case 'T': case 'V': case 'W': case 'X': + case 'Y': case 'Z': + result->type = CPP_NAME; + { + struct normalize_state nst = INITIAL_NORMALIZE_STATE; + result->val.node.node = lex_identifier (pfile, buffer->cur - 1, false, + &nst, + &result->val.node.spelling); + warn_about_normalization (pfile, result, &nst, true); + } + + /* Convert named operators to their proper types. */ + if (result->val.node.node->flags & NODE_OPERATOR) + { + result->flags |= NAMED_OP; + result->type = (enum cpp_ttype) result->val.node.node->directive_index; + } + + /* Signal FALLTHROUGH comment followed by another token. */ + if (fallthrough_comment) + result->flags |= PREV_FALLTHROUGH; + break; + + case '\'': + case '"': + lex_string (pfile, result, buffer->cur - 1); + break; + + case '/': + /* A potential block or line comment. */ + comment_start = buffer->cur; + c = *buffer->cur; + + if (c == '*') + { + if (_cpp_skip_block_comment (pfile)) + cpp_error (pfile, CPP_DL_ERROR, "unterminated comment"); + } + else if (c == '/' && ! CPP_OPTION (pfile, traditional)) + { + /* Don't warn for system headers. */ + if (_cpp_in_system_header (pfile)) + ; + /* Warn about comments if pedantically GNUC89, and not + in system headers. */ + else if (CPP_OPTION (pfile, lang) == CLK_GNUC89 + && CPP_PEDANTIC (pfile) + && ! buffer->warned_cplusplus_comments) + { + if (cpp_error (pfile, CPP_DL_PEDWARN, + "C++ style comments are not allowed in ISO C90")) + cpp_error (pfile, CPP_DL_NOTE, + "(this will be reported only once per input file)"); + buffer->warned_cplusplus_comments = 1; + } + /* Or if specifically desired via -Wc90-c99-compat. */ + else if (CPP_OPTION (pfile, cpp_warn_c90_c99_compat) > 0 + && ! CPP_OPTION (pfile, cplusplus) + && ! buffer->warned_cplusplus_comments) + { + if (cpp_error (pfile, CPP_DL_WARNING, + "C++ style comments are incompatible with C90")) + cpp_error (pfile, CPP_DL_NOTE, + "(this will be reported only once per input file)"); + buffer->warned_cplusplus_comments = 1; + } + /* In C89/C94, C++ style comments are forbidden. */ + else if ((CPP_OPTION (pfile, lang) == CLK_STDC89 + || CPP_OPTION (pfile, lang) == CLK_STDC94)) + { + /* But don't be confused about valid code such as + - // immediately followed by *, + - // in a preprocessing directive, + - // in an #if 0 block. */ + if (buffer->cur[1] == '*' + || pfile->state.in_directive + || pfile->state.skipping) + { + result->type = CPP_DIV; + break; + } + else if (! buffer->warned_cplusplus_comments) + { + if (cpp_error (pfile, CPP_DL_ERROR, + "C++ style comments are not allowed in " + "ISO C90")) + cpp_error (pfile, CPP_DL_NOTE, + "(this will be reported only once per input " + "file)"); + buffer->warned_cplusplus_comments = 1; + } + } + if (skip_line_comment (pfile) && CPP_OPTION (pfile, warn_comments)) + cpp_warning (pfile, CPP_W_COMMENTS, "multi-line comment"); + } + else if (c == '=') + { + buffer->cur++; + result->type = CPP_DIV_EQ; + break; + } + else + { + result->type = CPP_DIV; + break; + } + + if (fallthrough_comment_p (pfile, comment_start)) + fallthrough_comment = true; + + if (pfile->cb.comment) + { + size_t len = pfile->buffer->cur - comment_start; + pfile->cb.comment (pfile, result->src_loc, comment_start - 1, + len + 1); + } + + if (!pfile->state.save_comments) + { + result->flags |= PREV_WHITE; + goto update_tokens_line; + } + + if (fallthrough_comment) + result->flags |= PREV_FALLTHROUGH; + + /* Save the comment as a token in its own right. */ + save_comment (pfile, result, comment_start, c); + break; + + case '<': + if (pfile->state.angled_headers) + { + lex_string (pfile, result, buffer->cur - 1); + if (result->type != CPP_LESS) + break; + } + + result->type = CPP_LESS; + if (*buffer->cur == '=') + { + buffer->cur++, result->type = CPP_LESS_EQ; + if (*buffer->cur == '>' + && CPP_OPTION (pfile, cplusplus) + && CPP_OPTION (pfile, lang) >= CLK_GNUCXX20) + buffer->cur++, result->type = CPP_SPACESHIP; + } + else if (*buffer->cur == '<') + { + buffer->cur++; + IF_NEXT_IS ('=', CPP_LSHIFT_EQ, CPP_LSHIFT); + } + else if (CPP_OPTION (pfile, digraphs)) + { + if (*buffer->cur == ':') + { + /* C++11 [2.5/3 lex.pptoken], "Otherwise, if the next + three characters are <:: and the subsequent character + is neither : nor >, the < is treated as a preprocessor + token by itself". */ + if (CPP_OPTION (pfile, cplusplus) + && CPP_OPTION (pfile, lang) != CLK_CXX98 + && CPP_OPTION (pfile, lang) != CLK_GNUCXX + && buffer->cur[1] == ':' + && buffer->cur[2] != ':' && buffer->cur[2] != '>') + break; + + buffer->cur++; + result->flags |= DIGRAPH; + result->type = CPP_OPEN_SQUARE; + } + else if (*buffer->cur == '%') + { + buffer->cur++; + result->flags |= DIGRAPH; + result->type = CPP_OPEN_BRACE; + } + } + break; + + case '>': + result->type = CPP_GREATER; + if (*buffer->cur == '=') + buffer->cur++, result->type = CPP_GREATER_EQ; + else if (*buffer->cur == '>') + { + buffer->cur++; + IF_NEXT_IS ('=', CPP_RSHIFT_EQ, CPP_RSHIFT); + } + break; + + case '%': + result->type = CPP_MOD; + if (*buffer->cur == '=') + buffer->cur++, result->type = CPP_MOD_EQ; + else if (CPP_OPTION (pfile, digraphs)) + { + if (*buffer->cur == ':') + { + buffer->cur++; + result->flags |= DIGRAPH; + result->type = CPP_HASH; + if (*buffer->cur == '%' && buffer->cur[1] == ':') + buffer->cur += 2, result->type = CPP_PASTE, result->val.token_no = 0; + } + else if (*buffer->cur == '>') + { + buffer->cur++; + result->flags |= DIGRAPH; + result->type = CPP_CLOSE_BRACE; + } + } + break; + + case '.': + result->type = CPP_DOT; + if (ISDIGIT (*buffer->cur)) + { + struct normalize_state nst = INITIAL_NORMALIZE_STATE; + result->type = CPP_NUMBER; + lex_number (pfile, &result->val.str, &nst); + warn_about_normalization (pfile, result, &nst, false); + } + else if (*buffer->cur == '.' && buffer->cur[1] == '.') + buffer->cur += 2, result->type = CPP_ELLIPSIS; + else if (*buffer->cur == '*' && CPP_OPTION (pfile, cplusplus)) + buffer->cur++, result->type = CPP_DOT_STAR; + break; + + case '+': + result->type = CPP_PLUS; + if (*buffer->cur == '+') + buffer->cur++, result->type = CPP_PLUS_PLUS; + else if (*buffer->cur == '=') + buffer->cur++, result->type = CPP_PLUS_EQ; + break; + + case '-': + result->type = CPP_MINUS; + if (*buffer->cur == '>') + { + buffer->cur++; + result->type = CPP_DEREF; + if (*buffer->cur == '*' && CPP_OPTION (pfile, cplusplus)) + buffer->cur++, result->type = CPP_DEREF_STAR; + } + else if (*buffer->cur == '-') + buffer->cur++, result->type = CPP_MINUS_MINUS; + else if (*buffer->cur == '=') + buffer->cur++, result->type = CPP_MINUS_EQ; + break; + + case '&': + result->type = CPP_AND; + if (*buffer->cur == '&') + buffer->cur++, result->type = CPP_AND_AND; + else if (*buffer->cur == '=') + buffer->cur++, result->type = CPP_AND_EQ; + break; + + case '|': + result->type = CPP_OR; + if (*buffer->cur == '|') + buffer->cur++, result->type = CPP_OR_OR; + else if (*buffer->cur == '=') + buffer->cur++, result->type = CPP_OR_EQ; + break; + + case ':': + result->type = CPP_COLON; + if (*buffer->cur == ':') + { + if (CPP_OPTION (pfile, scope)) + buffer->cur++, result->type = CPP_SCOPE; + else + result->flags |= COLON_SCOPE; + } + else if (*buffer->cur == '>' && CPP_OPTION (pfile, digraphs)) + { + buffer->cur++; + result->flags |= DIGRAPH; + result->type = CPP_CLOSE_SQUARE; + } + break; + + case '*': IF_NEXT_IS ('=', CPP_MULT_EQ, CPP_MULT); break; + case '=': IF_NEXT_IS ('=', CPP_EQ_EQ, CPP_EQ); break; + case '!': IF_NEXT_IS ('=', CPP_NOT_EQ, CPP_NOT); break; + case '^': IF_NEXT_IS ('=', CPP_XOR_EQ, CPP_XOR); break; + case '#': IF_NEXT_IS ('#', CPP_PASTE, CPP_HASH); result->val.token_no = 0; break; + + case '?': result->type = CPP_QUERY; break; + case '~': result->type = CPP_COMPL; break; + case ',': result->type = CPP_COMMA; break; + case '(': result->type = CPP_OPEN_PAREN; break; + case ')': result->type = CPP_CLOSE_PAREN; break; + case '[': result->type = CPP_OPEN_SQUARE; break; + case ']': result->type = CPP_CLOSE_SQUARE; break; + case '{': result->type = CPP_OPEN_BRACE; break; + case '}': result->type = CPP_CLOSE_BRACE; break; + case ';': result->type = CPP_SEMICOLON; break; + + /* @ is a punctuator in Objective-C. */ + case '@': result->type = CPP_ATSIGN; break; + + default: + { + const uchar *base = --buffer->cur; + static int no_warn_cnt; + + /* Check for an extended identifier ($ or UCN or UTF-8). */ + struct normalize_state nst = INITIAL_NORMALIZE_STATE; + if (forms_identifier_p (pfile, true, &nst)) + { + result->type = CPP_NAME; + result->val.node.node = lex_identifier (pfile, base, true, &nst, + &result->val.node.spelling); + warn_about_normalization (pfile, result, &nst, true); + break; + } + + /* Otherwise this will form a CPP_OTHER token. Parse valid UTF-8 as a + single token. */ + buffer->cur++; + if (c >= utf8_signifier) + { + const uchar *pstr = base; + cppchar_t s; + if (_cpp_valid_utf8 (pfile, &pstr, buffer->rlimit, 0, NULL, &s)) + { + if (s > UCS_LIMIT && CPP_OPTION (pfile, cpp_warn_invalid_utf8)) + { + buffer->cur = base; + _cpp_warn_invalid_utf8 (pfile); + } + buffer->cur = pstr; + } + else if (CPP_OPTION (pfile, cpp_warn_invalid_utf8)) + { + buffer->cur = base; + const uchar *end = _cpp_warn_invalid_utf8 (pfile); + buffer->cur = base + 1; + no_warn_cnt = end - buffer->cur; + } + } + else if (c >= utf8_continuation + && CPP_OPTION (pfile, cpp_warn_invalid_utf8)) + { + if (no_warn_cnt) + --no_warn_cnt; + else + { + buffer->cur = base; + _cpp_warn_invalid_utf8 (pfile); + buffer->cur = base + 1; + } + } + create_literal (pfile, result, base, buffer->cur - base, CPP_OTHER); + break; + } + + } + + /* Potentially convert the location of the token to a range. */ + if (result->src_loc >= RESERVED_LOCATION_COUNT + && result->type != CPP_EOF) + { + /* Ensure that any line notes are processed, so that we have the + correct physical line/column for the end-point of the token even + when a logical line is split via one or more backslashes. */ + if (buffer->cur >= buffer->notes[buffer->cur_note].pos + && !pfile->overlaid_buffer) + _cpp_process_line_notes (pfile, false); + + source_range tok_range; + tok_range.m_start = result->src_loc; + tok_range.m_finish + = linemap_position_for_column (pfile->line_table, + CPP_BUF_COLUMN (buffer, buffer->cur)); + + result->src_loc = COMBINE_LOCATION_DATA (pfile->line_table, + result->src_loc, + tok_range, NULL, 0); + } + + return result; +} + +/* An upper bound on the number of bytes needed to spell TOKEN. + Does not include preceding whitespace. */ +unsigned int +cpp_token_len (const cpp_token *token) +{ + unsigned int len; + + switch (TOKEN_SPELL (token)) + { + default: len = 6; break; + case SPELL_LITERAL: len = token->val.str.len; break; + case SPELL_IDENT: len = NODE_LEN (token->val.node.node) * 10; break; + } + + return len; +} + +/* Parse UTF-8 out of NAMEP and place a \U escape in BUFFER. + Return the number of bytes read out of NAME. (There are always + 10 bytes written to BUFFER.) */ + +static size_t +utf8_to_ucn (unsigned char *buffer, const unsigned char *name) +{ + int j; + int ucn_len = 0; + int ucn_len_c; + unsigned t; + unsigned long utf32; + + /* Compute the length of the UTF-8 sequence. */ + for (t = *name; t & 0x80; t <<= 1) + ucn_len++; + + utf32 = *name & (0x7F >> ucn_len); + for (ucn_len_c = 1; ucn_len_c < ucn_len; ucn_len_c++) + { + utf32 = (utf32 << 6) | (*++name & 0x3F); + + /* Ill-formed UTF-8. */ + if ((*name & ~0x3F) != 0x80) + abort (); + } + + *buffer++ = '\\'; + *buffer++ = 'U'; + for (j = 7; j >= 0; j--) + *buffer++ = "0123456789abcdef"[(utf32 >> (4 * j)) & 0xF]; + return ucn_len; +} + +/* Given a token TYPE corresponding to a digraph, return a pointer to + the spelling of the digraph. */ +static const unsigned char * +cpp_digraph2name (enum cpp_ttype type) +{ + return digraph_spellings[(int) type - (int) CPP_FIRST_DIGRAPH]; +} + +/* Write the spelling of an identifier IDENT, using UCNs, to BUFFER. + The buffer must already contain the enough space to hold the + token's spelling. Returns a pointer to the character after the + last character written. */ +unsigned char * +_cpp_spell_ident_ucns (unsigned char *buffer, cpp_hashnode *ident) +{ + size_t i; + const unsigned char *name = NODE_NAME (ident); + + for (i = 0; i < NODE_LEN (ident); i++) + if (name[i] & ~0x7F) + { + i += utf8_to_ucn (buffer, name + i) - 1; + buffer += 10; + } + else + *buffer++ = name[i]; + + return buffer; +} + +/* Write the spelling of a token TOKEN to BUFFER. The buffer must + already contain the enough space to hold the token's spelling. + Returns a pointer to the character after the last character written. + FORSTRING is true if this is to be the spelling after translation + phase 1 (with the original spelling of extended identifiers), false + if extended identifiers should always be written using UCNs (there is + no option for always writing them in the internal UTF-8 form). + FIXME: Would be nice if we didn't need the PFILE argument. */ +unsigned char * +cpp_spell_token (cpp_reader *pfile, const cpp_token *token, + unsigned char *buffer, bool forstring) +{ + switch (TOKEN_SPELL (token)) + { + case SPELL_OPERATOR: + { + const unsigned char *spelling; + unsigned char c; + + if (token->flags & DIGRAPH) + spelling = cpp_digraph2name (token->type); + else if (token->flags & NAMED_OP) + goto spell_ident; + else + spelling = TOKEN_NAME (token); + + while ((c = *spelling++) != '\0') + *buffer++ = c; + } + break; + + spell_ident: + case SPELL_IDENT: + if (forstring) + { + memcpy (buffer, NODE_NAME (token->val.node.spelling), + NODE_LEN (token->val.node.spelling)); + buffer += NODE_LEN (token->val.node.spelling); + } + else + buffer = _cpp_spell_ident_ucns (buffer, token->val.node.node); + break; + + case SPELL_LITERAL: + memcpy (buffer, token->val.str.text, token->val.str.len); + buffer += token->val.str.len; + break; + + case SPELL_NONE: + cpp_error (pfile, CPP_DL_ICE, + "unspellable token %s", TOKEN_NAME (token)); + break; + } + + return buffer; +} + +/* Returns TOKEN spelt as a null-terminated string. The string is + freed when the reader is destroyed. Useful for diagnostics. */ +unsigned char * +cpp_token_as_text (cpp_reader *pfile, const cpp_token *token) +{ + unsigned int len = cpp_token_len (token) + 1; + unsigned char *start = _cpp_unaligned_alloc (pfile, len), *end; + + end = cpp_spell_token (pfile, token, start, false); + end[0] = '\0'; + + return start; +} + +/* Returns a pointer to a string which spells the token defined by + TYPE and FLAGS. Used by C front ends, which really should move to + using cpp_token_as_text. */ +const char * +cpp_type2name (enum cpp_ttype type, unsigned char flags) +{ + if (flags & DIGRAPH) + return (const char *) cpp_digraph2name (type); + else if (flags & NAMED_OP) + return cpp_named_operator2name (type); + + return (const char *) token_spellings[type].name; +} + +/* Writes the spelling of token to FP, without any preceding space. + Separated from cpp_spell_token for efficiency - to avoid stdio + double-buffering. */ +void +cpp_output_token (const cpp_token *token, FILE *fp) +{ + switch (TOKEN_SPELL (token)) + { + case SPELL_OPERATOR: + { + const unsigned char *spelling; + int c; + + if (token->flags & DIGRAPH) + spelling = cpp_digraph2name (token->type); + else if (token->flags & NAMED_OP) + goto spell_ident; + else + spelling = TOKEN_NAME (token); + + c = *spelling; + do + putc (c, fp); + while ((c = *++spelling) != '\0'); + } + break; + + spell_ident: + case SPELL_IDENT: + { + size_t i; + const unsigned char * name = NODE_NAME (token->val.node.node); + + for (i = 0; i < NODE_LEN (token->val.node.node); i++) + if (name[i] & ~0x7F) + { + unsigned char buffer[10]; + i += utf8_to_ucn (buffer, name + i) - 1; + fwrite (buffer, 1, 10, fp); + } + else + fputc (NODE_NAME (token->val.node.node)[i], fp); + } + break; + + case SPELL_LITERAL: + if (token->type == CPP_HEADER_NAME) + fputc ('"', fp); + fwrite (token->val.str.text, 1, token->val.str.len, fp); + if (token->type == CPP_HEADER_NAME) + fputc ('"', fp); + break; + + case SPELL_NONE: + /* An error, most probably. */ + break; + } +} + +/* Compare two tokens. */ +int +_cpp_equiv_tokens (const cpp_token *a, const cpp_token *b) +{ + if (a->type == b->type && a->flags == b->flags) + switch (TOKEN_SPELL (a)) + { + default: /* Keep compiler happy. */ + case SPELL_OPERATOR: + /* token_no is used to track where multiple consecutive ## + tokens were originally located. */ + return (a->type != CPP_PASTE || a->val.token_no == b->val.token_no); + case SPELL_NONE: + return (a->type != CPP_MACRO_ARG + || (a->val.macro_arg.arg_no == b->val.macro_arg.arg_no + && a->val.macro_arg.spelling == b->val.macro_arg.spelling)); + case SPELL_IDENT: + return (a->val.node.node == b->val.node.node + && a->val.node.spelling == b->val.node.spelling); + case SPELL_LITERAL: + return (a->val.str.len == b->val.str.len + && !memcmp (a->val.str.text, b->val.str.text, + a->val.str.len)); + } + + return 0; +} + +/* Returns nonzero if a space should be inserted to avoid an + accidental token paste for output. For simplicity, it is + conservative, and occasionally advises a space where one is not + needed, e.g. "." and ".2". */ +int +cpp_avoid_paste (cpp_reader *pfile, const cpp_token *token1, + const cpp_token *token2) +{ + enum cpp_ttype a = token1->type, b = token2->type; + cppchar_t c; + + if (token1->flags & NAMED_OP) + a = CPP_NAME; + if (token2->flags & NAMED_OP) + b = CPP_NAME; + + c = EOF; + if (token2->flags & DIGRAPH) + c = digraph_spellings[(int) b - (int) CPP_FIRST_DIGRAPH][0]; + else if (token_spellings[b].category == SPELL_OPERATOR) + c = token_spellings[b].name[0]; + + /* Quickly get everything that can paste with an '='. */ + if ((int) a <= (int) CPP_LAST_EQ && c == '=') + return 1; + + switch (a) + { + case CPP_GREATER: return c == '>'; + case CPP_LESS: return c == '<' || c == '%' || c == ':'; + case CPP_PLUS: return c == '+'; + case CPP_MINUS: return c == '-' || c == '>'; + case CPP_DIV: return c == '/' || c == '*'; /* Comments. */ + case CPP_MOD: return c == ':' || c == '>'; + case CPP_AND: return c == '&'; + case CPP_OR: return c == '|'; + case CPP_COLON: return c == ':' || c == '>'; + case CPP_DEREF: return c == '*'; + case CPP_DOT: return c == '.' || c == '%' || b == CPP_NUMBER; + case CPP_HASH: return c == '#' || c == '%'; /* Digraph form. */ + case CPP_PRAGMA: + case CPP_NAME: return ((b == CPP_NUMBER + && name_p (pfile, &token2->val.str)) + || b == CPP_NAME + || b == CPP_CHAR || b == CPP_STRING); /* L */ + case CPP_NUMBER: return (b == CPP_NUMBER || b == CPP_NAME + || b == CPP_CHAR + || c == '.' || c == '+' || c == '-'); + /* UCNs */ + case CPP_OTHER: return ((token1->val.str.text[0] == '\\' + && b == CPP_NAME) + || (CPP_OPTION (pfile, objc) + && token1->val.str.text[0] == '@' + && (b == CPP_NAME || b == CPP_STRING))); + case CPP_LESS_EQ: return c == '>'; + case CPP_STRING: + case CPP_WSTRING: + case CPP_UTF8STRING: + case CPP_STRING16: + case CPP_STRING32: return (CPP_OPTION (pfile, user_literals) + && (b == CPP_NAME + || (TOKEN_SPELL (token2) == SPELL_LITERAL + && ISIDST (token2->val.str.text[0])))); + + default: break; + } + + return 0; +} + +/* Output all the remaining tokens on the current line, and a newline + character, to FP. Leading whitespace is removed. If there are + macros, special token padding is not performed. */ +void +cpp_output_line (cpp_reader *pfile, FILE *fp) +{ + const cpp_token *token; + + token = cpp_get_token (pfile); + while (token->type != CPP_EOF) + { + cpp_output_token (token, fp); + token = cpp_get_token (pfile); + if (token->flags & PREV_WHITE) + putc (' ', fp); + } + + putc ('\n', fp); +} + +/* Return a string representation of all the remaining tokens on the + current line. The result is allocated using xmalloc and must be + freed by the caller. */ +unsigned char * +cpp_output_line_to_string (cpp_reader *pfile, const unsigned char *dir_name) +{ + const cpp_token *token; + unsigned int out = dir_name ? ustrlen (dir_name) : 0; + unsigned int alloced = 120 + out; + unsigned char *result = (unsigned char *) xmalloc (alloced); + + /* If DIR_NAME is empty, there are no initial contents. */ + if (dir_name) + { + sprintf ((char *) result, "#%s ", dir_name); + out += 2; + } + + token = cpp_get_token (pfile); + while (token->type != CPP_EOF) + { + unsigned char *last; + /* Include room for a possible space and the terminating nul. */ + unsigned int len = cpp_token_len (token) + 2; + + if (out + len > alloced) + { + alloced *= 2; + if (out + len > alloced) + alloced = out + len; + result = (unsigned char *) xrealloc (result, alloced); + } + + last = cpp_spell_token (pfile, token, &result[out], 0); + out = last - result; + + token = cpp_get_token (pfile); + if (token->flags & PREV_WHITE) + result[out++] = ' '; + } + + result[out] = '\0'; + return result; +} + +/* Memory buffers. Changing these three constants can have a dramatic + effect on performance. The values here are reasonable defaults, + but might be tuned. If you adjust them, be sure to test across a + range of uses of cpplib, including heavy nested function-like macro + expansion. Also check the change in peak memory usage (NJAMD is a + good tool for this). */ +#define MIN_BUFF_SIZE 8000 +#define BUFF_SIZE_UPPER_BOUND(MIN_SIZE) (MIN_BUFF_SIZE + (MIN_SIZE) * 3 / 2) +#define EXTENDED_BUFF_SIZE(BUFF, MIN_EXTRA) \ + (MIN_EXTRA + ((BUFF)->limit - (BUFF)->cur) * 2) + +#if MIN_BUFF_SIZE > BUFF_SIZE_UPPER_BOUND (0) + #error BUFF_SIZE_UPPER_BOUND must be at least as large as MIN_BUFF_SIZE! +#endif + +/* Create a new allocation buffer. Place the control block at the end + of the buffer, so that buffer overflows will cause immediate chaos. */ +static _cpp_buff * +new_buff (size_t len) +{ + _cpp_buff *result; + unsigned char *base; + + if (len < MIN_BUFF_SIZE) + len = MIN_BUFF_SIZE; + len = CPP_ALIGN (len); + +#ifdef ENABLE_VALGRIND_ANNOTATIONS + /* Valgrind warns about uses of interior pointers, so put _cpp_buff + struct first. */ + size_t slen = CPP_ALIGN2 (sizeof (_cpp_buff), 2 * DEFAULT_ALIGNMENT); + base = XNEWVEC (unsigned char, len + slen); + result = (_cpp_buff *) base; + base += slen; +#else + base = XNEWVEC (unsigned char, len + sizeof (_cpp_buff)); + result = (_cpp_buff *) (base + len); +#endif + result->base = base; + result->cur = base; + result->limit = base + len; + result->next = NULL; + return result; +} + +/* Place a chain of unwanted allocation buffers on the free list. */ +void +_cpp_release_buff (cpp_reader *pfile, _cpp_buff *buff) +{ + _cpp_buff *end = buff; + + while (end->next) + end = end->next; + end->next = pfile->free_buffs; + pfile->free_buffs = buff; +} + +/* Return a free buffer of size at least MIN_SIZE. */ +_cpp_buff * +_cpp_get_buff (cpp_reader *pfile, size_t min_size) +{ + _cpp_buff *result, **p; + + for (p = &pfile->free_buffs;; p = &(*p)->next) + { + size_t size; + + if (*p == NULL) + return new_buff (min_size); + result = *p; + size = result->limit - result->base; + /* Return a buffer that's big enough, but don't waste one that's + way too big. */ + if (size >= min_size && size <= BUFF_SIZE_UPPER_BOUND (min_size)) + break; + } + + *p = result->next; + result->next = NULL; + result->cur = result->base; + return result; +} + +/* Creates a new buffer with enough space to hold the uncommitted + remaining bytes of BUFF, and at least MIN_EXTRA more bytes. Copies + the excess bytes to the new buffer. Chains the new buffer after + BUFF, and returns the new buffer. */ +_cpp_buff * +_cpp_append_extend_buff (cpp_reader *pfile, _cpp_buff *buff, size_t min_extra) +{ + size_t size = EXTENDED_BUFF_SIZE (buff, min_extra); + _cpp_buff *new_buff = _cpp_get_buff (pfile, size); + + buff->next = new_buff; + memcpy (new_buff->base, buff->cur, BUFF_ROOM (buff)); + return new_buff; +} + +/* Creates a new buffer with enough space to hold the uncommitted + remaining bytes of the buffer pointed to by BUFF, and at least + MIN_EXTRA more bytes. Copies the excess bytes to the new buffer. + Chains the new buffer before the buffer pointed to by BUFF, and + updates the pointer to point to the new buffer. */ +void +_cpp_extend_buff (cpp_reader *pfile, _cpp_buff **pbuff, size_t min_extra) +{ + _cpp_buff *new_buff, *old_buff = *pbuff; + size_t size = EXTENDED_BUFF_SIZE (old_buff, min_extra); + + new_buff = _cpp_get_buff (pfile, size); + memcpy (new_buff->base, old_buff->cur, BUFF_ROOM (old_buff)); + new_buff->next = old_buff; + *pbuff = new_buff; +} + +/* Free a chain of buffers starting at BUFF. */ +void +_cpp_free_buff (_cpp_buff *buff) +{ + _cpp_buff *next; + + for (; buff; buff = next) + { + next = buff->next; +#ifdef ENABLE_VALGRIND_ANNOTATIONS + free (buff); +#else + free (buff->base); +#endif + } +} + +/* Allocate permanent, unaligned storage of length LEN. */ +unsigned char * +_cpp_unaligned_alloc (cpp_reader *pfile, size_t len) +{ + _cpp_buff *buff = pfile->u_buff; + unsigned char *result = buff->cur; + + if (len > (size_t) (buff->limit - result)) + { + buff = _cpp_get_buff (pfile, len); + buff->next = pfile->u_buff; + pfile->u_buff = buff; + result = buff->cur; + } + + buff->cur = result + len; + return result; +} + +/* Allocate permanent, unaligned storage of length LEN from a_buff. + That buffer is used for growing allocations when saving macro + replacement lists in a #define, and when parsing an answer to an + assertion in #assert, #unassert or #if (and therefore possibly + whilst expanding macros). It therefore must not be used by any + code that they might call: specifically the lexer and the guts of + the macro expander. + + All existing other uses clearly fit this restriction: storing + registered pragmas during initialization. */ +unsigned char * +_cpp_aligned_alloc (cpp_reader *pfile, size_t len) +{ + _cpp_buff *buff = pfile->a_buff; + unsigned char *result = buff->cur; + + if (len > (size_t) (buff->limit - result)) + { + buff = _cpp_get_buff (pfile, len); + buff->next = pfile->a_buff; + pfile->a_buff = buff; + result = buff->cur; + } + + buff->cur = result + len; + return result; +} + +/* Commit or allocate storage from a buffer. */ + +void * +_cpp_commit_buff (cpp_reader *pfile, size_t size) +{ + void *ptr = BUFF_FRONT (pfile->a_buff); + + if (pfile->hash_table->alloc_subobject) + { + void *copy = pfile->hash_table->alloc_subobject (size); + memcpy (copy, ptr, size); + ptr = copy; + } + else + BUFF_FRONT (pfile->a_buff) += size; + + return ptr; +} + +/* Say which field of TOK is in use. */ + +enum cpp_token_fld_kind +cpp_token_val_index (const cpp_token *tok) +{ + switch (TOKEN_SPELL (tok)) + { + case SPELL_IDENT: + return CPP_TOKEN_FLD_NODE; + case SPELL_LITERAL: + return CPP_TOKEN_FLD_STR; + case SPELL_OPERATOR: + /* Operands which were originally spelled as ident keep around + the node for the exact spelling. */ + if (tok->flags & NAMED_OP) + return CPP_TOKEN_FLD_NODE; + else if (tok->type == CPP_PASTE) + return CPP_TOKEN_FLD_TOKEN_NO; + else + return CPP_TOKEN_FLD_NONE; + case SPELL_NONE: + if (tok->type == CPP_MACRO_ARG) + return CPP_TOKEN_FLD_ARG_NO; + else if (tok->type == CPP_PADDING) + return CPP_TOKEN_FLD_SOURCE; + else if (tok->type == CPP_PRAGMA) + return CPP_TOKEN_FLD_PRAGMA; + /* fall through */ + default: + return CPP_TOKEN_FLD_NONE; + } +} + +/* All tokens lexed in R after calling this function will be forced to + have their location_t to be P, until + cpp_stop_forcing_token_locations is called for R. */ + +void +cpp_force_token_locations (cpp_reader *r, location_t loc) +{ + r->forced_token_location = loc; +} + +/* Go back to assigning locations naturally for lexed tokens. */ + +void +cpp_stop_forcing_token_locations (cpp_reader *r) +{ + r->forced_token_location = 0; +} + +/* We're looking at \, if it's escaping EOL, look past it. If at + LIMIT, don't advance. */ + +static const unsigned char * +do_peek_backslash (const unsigned char *peek, const unsigned char *limit) +{ + const unsigned char *probe = peek; + + if (__builtin_expect (peek[1] == '\n', true)) + { + eol: + probe += 2; + if (__builtin_expect (probe < limit, true)) + { + peek = probe; + if (*peek == '\\') + /* The user might be perverse. */ + return do_peek_backslash (peek, limit); + } + } + else if (__builtin_expect (peek[1] == '\r', false)) + { + if (probe[2] == '\n') + probe++; + goto eol; + } + + return peek; +} + +static const unsigned char * +do_peek_next (const unsigned char *peek, const unsigned char *limit) +{ + if (__builtin_expect (*peek == '\\', false)) + peek = do_peek_backslash (peek, limit); + return peek; +} + +static const unsigned char * +do_peek_prev (const unsigned char *peek, const unsigned char *bound) +{ + if (peek == bound) + return NULL; + + unsigned char c = *--peek; + if (__builtin_expect (c == '\n', false) + || __builtin_expect (c == 'r', false)) + { + if (peek == bound) + return peek; + int ix = -1; + if (c == '\n' && peek[ix] == '\r') + { + if (peek + ix == bound) + return peek; + ix--; + } + + if (peek[ix] == '\\') + return do_peek_prev (peek + ix, bound); + + return peek; + } + else + return peek; +} + +/* If PEEK[-1] is identifier MATCH, scan past it and trailing white + space. Otherwise return NULL. */ + +static const unsigned char * +do_peek_ident (const char *match, const unsigned char *peek, + const unsigned char *limit) +{ + for (; *++match; peek++) + if (*peek != *match) + { + peek = do_peek_next (peek, limit); + if (*peek != *match) + return NULL; + } + + /* Must now not be looking at an identifier char. */ + peek = do_peek_next (peek, limit); + if (ISIDNUM (*peek)) + return NULL; + + /* Skip control-line whitespace. */ + ws: + while (*peek == ' ' || *peek == '\t') + peek++; + if (__builtin_expect (*peek == '\\', false)) + { + peek = do_peek_backslash (peek, limit); + if (*peek != '\\') + goto ws; + } + + return peek; +} + +/* Are we looking at a module control line starting as PEEK - 1? */ + +static bool +do_peek_module (cpp_reader *pfile, unsigned char c, + const unsigned char *peek, const unsigned char *limit) +{ + bool import = false; + + if (__builtin_expect (c == 'e', false)) + { + if (!((peek[0] == 'x' || peek[0] == '\\') + && (peek = do_peek_ident ("export", peek, limit)))) + return false; + + /* export, peek for import or module. No need to peek __import + here. */ + if (peek[0] == 'i') + { + if (!((peek[1] == 'm' || peek[1] == '\\') + && (peek = do_peek_ident ("import", peek + 1, limit)))) + return false; + import = true; + } + else if (peek[0] == 'm') + { + if (!((peek[1] == 'o' || peek[1] == '\\') + && (peek = do_peek_ident ("module", peek + 1, limit)))) + return false; + } + else + return false; + } + else if (__builtin_expect (c == 'i', false)) + { + if (!((peek[0] == 'm' || peek[0] == '\\') + && (peek = do_peek_ident ("import", peek, limit)))) + return false; + import = true; + } + else if (__builtin_expect (c == '_', false)) + { + /* Needed for translated includes. */ + if (!((peek[0] == '_' || peek[0] == '\\') + && (peek = do_peek_ident ("__import", peek, limit)))) + return false; + import = true; + } + else if (__builtin_expect (c == 'm', false)) + { + if (!((peek[0] == 'o' || peek[0] == '\\') + && (peek = do_peek_ident ("module", peek, limit)))) + return false; + } + else + return false; + + /* Peek the next character to see if it's good enough. We'll be at + the first non-whitespace char, including skipping an escaped + newline. */ + /* ... import followed by identifier, ':', '<' or header-name + preprocessing tokens, or module followed by identifier, ':' or + ';' preprocessing tokens. */ + unsigned char p = *peek++; + + /* A character literal is ... single quotes, ... optionally preceded + by u8, u, U, or L */ + /* A string-literal is a ... double quotes, optionally prefixed by + R, u8, u8R, u, uR, U, UR, L, or LR */ + if (p == 'u') + { + peek = do_peek_next (peek, limit); + if (*peek == '8') + { + peek++; + goto peek_u8; + } + goto peek_u; + } + else if (p == 'U' || p == 'L') + { + peek_u8: + peek = do_peek_next (peek, limit); + peek_u: + if (*peek == '\"' || *peek == '\'') + return false; + + if (*peek == 'R') + goto peek_R; + /* Identifier. Ok. */ + } + else if (p == 'R') + { + peek_R: + if (CPP_OPTION (pfile, rliterals)) + { + peek = do_peek_next (peek, limit); + if (*peek == '\"') + return false; + } + /* Identifier. Ok. */ + } + else if ('Z' - 'A' == 25 + ? ((p >= 'A' && p <= 'Z') || (p >= 'a' && p <= 'z') || p == '_') + : ISIDST (p)) + { + /* Identifier. Ok. */ + } + else if (p == '<') + { + /* Maybe angle header, ok for import. Reject + '<=', '<<' digraph:'<:'. */ + if (!import) + return false; + peek = do_peek_next (peek, limit); + if (*peek == '=' || *peek == '<' + || (*peek == ':' && CPP_OPTION (pfile, digraphs))) + return false; + } + else if (p == ';') + { + /* SEMICOLON, ok for module. */ + if (import) + return false; + } + else if (p == '"') + { + /* STRING, ok for import. */ + if (!import) + return false; + } + else if (p == ':') + { + /* Maybe COLON, ok. Reject '::', digraph:':>'. */ + peek = do_peek_next (peek, limit); + if (*peek == ':' || (*peek == '>' && CPP_OPTION (pfile, digraphs))) + return false; + } + else + /* FIXME: Detect a unicode character, excluding those not + permitted as the initial character. [lex.name]/1. I presume + we need to check the \[uU] spellings, and directly using + Unicode in say UTF8 form? Or perhaps we do the phase-1 + conversion of UTF8 to universal-character-names? */ + return false; + + return true; +} + +/* Directives-only scanning. Somewhat more relaxed than correct + parsing -- some ill-formed programs will not be rejected. */ + +void +cpp_directive_only_process (cpp_reader *pfile, + void *data, + void (*cb) (cpp_reader *, CPP_DO_task, void *, ...)) +{ + bool module_p = CPP_OPTION (pfile, module_directives); + + do + { + restart: + /* Buffer initialization, but no line cleaning. */ + cpp_buffer *buffer = pfile->buffer; + buffer->cur_note = buffer->notes_used = 0; + buffer->cur = buffer->line_base = buffer->next_line; + buffer->need_line = false; + /* Files always end in a newline or carriage return. We rely on this for + character peeking safety. */ + gcc_assert (buffer->rlimit[0] == '\n' || buffer->rlimit[0] == '\r'); + + const unsigned char *base = buffer->cur; + unsigned line_count = 0; + const unsigned char *line_start = base; + + bool bol = true; + bool raw = false; + + const unsigned char *lwm = base; + for (const unsigned char *pos = base, *limit = buffer->rlimit; + pos < limit;) + { + unsigned char c = *pos++; + /* This matches the switch in _cpp_lex_direct. */ + switch (c) + { + case ' ': case '\t': case '\f': case '\v': + /* Whitespace, do nothing. */ + break; + + case '\r': /* MAC line ending, or Windows \r\n */ + if (*pos == '\n') + pos++; + /* FALLTHROUGH */ + + case '\n': + bol = true; + + next_line: + CPP_INCREMENT_LINE (pfile, 0); + line_count++; + line_start = pos; + break; + + case '\\': + /* is removed, and doesn't undo any + preceeding escape or whatnot. */ + if (*pos == '\n') + { + pos++; + goto next_line; + } + else if (*pos == '\r') + { + if (pos[1] == '\n') + pos++; + pos++; + goto next_line; + } + goto dflt; + + case '#': + if (bol) + { + /* Line directive. */ + if (pos - 1 > base && !pfile->state.skipping) + cb (pfile, CPP_DO_print, data, + line_count, base, pos - 1 - base); + + /* Prep things for directive handling. */ + buffer->next_line = pos; + buffer->need_line = true; + bool ok = _cpp_get_fresh_line (pfile); + gcc_checking_assert (ok); + + /* Ensure proper column numbering for generated + error messages. */ + buffer->line_base -= pos - line_start; + + _cpp_handle_directive (pfile, line_start + 1 != pos); + + /* Sanitize the line settings. Duplicate #include's can + mess things up. */ + // FIXME: Necessary? + pfile->line_table->highest_location + = pfile->line_table->highest_line; + + if (!pfile->state.skipping + && pfile->buffer->next_line < pfile->buffer->rlimit) + cb (pfile, CPP_DO_location, data, + pfile->line_table->highest_line); + + goto restart; + } + goto dflt; + + case '/': + { + const unsigned char *peek = do_peek_next (pos, limit); + if (!(*peek == '/' || *peek == '*')) + goto dflt; + + /* Line or block comment */ + bool is_block = *peek == '*'; + bool star = false; + bool esc = false; + location_t sloc + = linemap_position_for_column (pfile->line_table, + pos - line_start); + + while (pos < limit) + { + char c = *pos++; + switch (c) + { + case '\\': + esc = true; + break; + + case '\r': + if (*pos == '\n') + pos++; + /* FALLTHROUGH */ + + case '\n': + { + CPP_INCREMENT_LINE (pfile, 0); + line_count++; + line_start = pos; + if (!esc && !is_block) + { + bol = true; + goto done_comment; + } + } + if (!esc) + star = false; + esc = false; + break; + + case '*': + if (pos > peek) + star = is_block; + esc = false; + break; + + case '/': + if (star) + goto done_comment; + /* FALLTHROUGH */ + + default: + star = false; + esc = false; + break; + } + } + if (pos < limit || is_block) + cpp_error_with_line (pfile, CPP_DL_ERROR, sloc, 0, + "unterminated comment"); + done_comment: + lwm = pos; + break; + } + + case '\'': + if (!CPP_OPTION (pfile, digit_separators)) + goto delimited_string; + + /* Possibly a number punctuator. */ + if (!ISIDNUM (*do_peek_next (pos, limit))) + goto delimited_string; + + goto quote_peek; + + case '\"': + if (!CPP_OPTION (pfile, rliterals)) + goto delimited_string; + + quote_peek: + { + /* For ' see if it's a number punctuator + \.?(| + |'|'|[eEpP]|\.)* */ + /* For " see if it's a raw string + {U,L,u,u8}R. This includes CPP_NUMBER detection, + because that could be 0e+R. */ + const unsigned char *peek = pos - 1; + bool quote_first = c == '"'; + bool quote_eight = false; + bool maybe_number_start = false; + bool want_number = false; + + while ((peek = do_peek_prev (peek, lwm))) + { + unsigned char p = *peek; + if (quote_first) + { + if (!raw) + { + if (p != 'R') + break; + raw = true; + continue; + } + + quote_first = false; + if (p == 'L' || p == 'U' || p == 'u') + ; + else if (p == '8') + quote_eight = true; + else + goto second_raw; + } + else if (quote_eight) + { + if (p != 'u') + { + raw = false; + break; + } + quote_eight = false; + } + else if (c == '"') + { + second_raw:; + if (!want_number && ISIDNUM (p)) + { + raw = false; + break; + } + } + + if (ISDIGIT (p)) + maybe_number_start = true; + else if (p == '.') + want_number = true; + else if (ISIDNUM (p)) + maybe_number_start = false; + else if (p == '+' || p == '-') + { + if (const unsigned char *peek_prev + = do_peek_prev (peek, lwm)) + { + p = *peek_prev; + if (p == 'e' || p == 'E' + || p == 'p' || p == 'P') + { + want_number = true; + maybe_number_start = false; + } + else + break; + } + else + break; + } + else if (p == '\'' || p == '\"') + { + /* If this is lwm, this must be the end of a + previous string. So this is a trailing + literal type, (a) if those are allowed, + and (b) maybe_start is false. Otherwise + this must be a CPP_NUMBER because we've + met another ', and we'd have checked that + in its own right. */ + if (peek == lwm && CPP_OPTION (pfile, uliterals)) + { + if (!maybe_number_start && !want_number) + /* Must be a literal type. */ + raw = false; + } + else if (p == '\'' + && CPP_OPTION (pfile, digit_separators)) + maybe_number_start = true; + break; + } + else if (c == '\'') + break; + else if (!quote_first && !quote_eight) + break; + } + + if (maybe_number_start) + { + if (c == '\'') + /* A CPP NUMBER. */ + goto dflt; + raw = false; + } + + goto delimited_string; + } + + delimited_string: + { + /* (Possibly raw) string or char literal. */ + unsigned char end = c; + int delim_len = -1; + const unsigned char *delim = NULL; + location_t sloc = linemap_position_for_column (pfile->line_table, + pos - line_start); + int esc = 0; + + if (raw) + { + /* There can be no line breaks in the delimiter. */ + delim = pos; + for (delim_len = 0; (c = *pos++) != '('; delim_len++) + { + if (delim_len == 16) + { + cpp_error_with_line (pfile, CPP_DL_ERROR, + sloc, 0, + "raw string delimiter" + " longer than %d" + " characters", + delim_len); + raw = false; + pos = delim; + break; + } + if (strchr (") \\\t\v\f\n", c)) + { + cpp_error_with_line (pfile, CPP_DL_ERROR, + sloc, 0, + "invalid character '%c'" + " in raw string" + " delimiter", c); + raw = false; + pos = delim; + break; + } + if (pos >= limit) + goto bad_string; + } + } + + while (pos < limit) + { + char c = *pos++; + switch (c) + { + case '\\': + if (!raw) + esc++; + break; + + case '\r': + if (*pos == '\n') + pos++; + /* FALLTHROUGH */ + + case '\n': + { + CPP_INCREMENT_LINE (pfile, 0); + line_count++; + line_start = pos; + } + if (esc) + esc--; + break; + + case ')': + if (raw + && pos + delim_len + 1 < limit + && pos[delim_len] == end + && !memcmp (delim, pos, delim_len)) + { + pos += delim_len + 1; + raw = false; + goto done_string; + } + break; + + default: + if (!raw && !(esc & 1) && c == end) + goto done_string; + esc = 0; + break; + } + } + bad_string: + cpp_error_with_line (pfile, CPP_DL_ERROR, sloc, 0, + "unterminated literal"); + + done_string: + raw = false; + lwm = pos - 1; + } + goto dflt; + + case '_': + case 'e': + case 'i': + case 'm': + if (bol && module_p && !pfile->state.skipping + && do_peek_module (pfile, c, pos, limit)) + { + /* We've seen the start of a module control line. + Start up the tokenizer. */ + pos--; /* Backup over the first character. */ + + /* Backup over whitespace to start of line. */ + while (pos > line_start + && (pos[-1] == ' ' || pos[-1] == '\t')) + pos--; + + if (pos > base) + cb (pfile, CPP_DO_print, data, line_count, base, pos - base); + + /* Prep things for directive handling. */ + buffer->next_line = pos; + buffer->need_line = true; + + /* Now get tokens until the PRAGMA_EOL. */ + do + { + location_t spelling; + const cpp_token *tok + = cpp_get_token_with_location (pfile, &spelling); + + gcc_assert (pfile->state.in_deferred_pragma + || tok->type == CPP_PRAGMA_EOL); + cb (pfile, CPP_DO_token, data, tok, spelling); + } + while (pfile->state.in_deferred_pragma); + + if (pfile->buffer->next_line < pfile->buffer->rlimit) + cb (pfile, CPP_DO_location, data, + pfile->line_table->highest_line); + + pfile->mi_valid = false; + goto restart; + } + goto dflt; + + default: + dflt: + bol = false; + pfile->mi_valid = false; + break; + } + } + + if (buffer->rlimit > base && !pfile->state.skipping) + { + const unsigned char *limit = buffer->rlimit; + /* If the file was not newline terminated, add rlimit, which is + guaranteed to point to a newline, to the end of our range. */ + if (limit[-1] != '\n') + { + limit++; + CPP_INCREMENT_LINE (pfile, 0); + line_count++; + } + cb (pfile, CPP_DO_print, data, line_count, base, limit - base); + } + + _cpp_pop_buffer (pfile); + } + while (pfile->buffer); +} diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-base-selected/libcpp/pch.cc b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-base-selected/libcpp/pch.cc new file mode 100644 index 0000000000..595afefab7 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-base-selected/libcpp/pch.cc @@ -0,0 +1,878 @@ +/* Part of CPP library. (Precompiled header reading/writing.) + Copyright (C) 2000-2023 Free Software Foundation, Inc. + +This program is free software; you can redistribute it and/or modify it +under the terms of the GNU General Public License as published by the +Free Software Foundation; either version 3, or (at your option) any +later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; see the file COPYING3. If not see +. */ + +#include "config.h" +#include "system.h" +#include "cpplib.h" +#include "internal.h" +#include "hashtab.h" +#include "mkdeps.h" + +static int write_macdef (cpp_reader *, cpp_hashnode *, void *); +static int save_idents (cpp_reader *, cpp_hashnode *, void *); +static hashval_t hashmem (const void *, size_t); +static hashval_t cpp_string_hash (const void *); +static int cpp_string_eq (const void *, const void *); +static int count_defs (cpp_reader *, cpp_hashnode *, void *); +static int comp_hashnodes (const void *, const void *); +static int collect_ht_nodes (cpp_reader *, cpp_hashnode *, void *); +static int write_defs (cpp_reader *, cpp_hashnode *, void *); +static int save_macros (cpp_reader *, cpp_hashnode *, void *); +static int _cpp_save_pushed_macros (cpp_reader *, FILE *); +static int _cpp_restore_pushed_macros (cpp_reader *, FILE *); + +/* This structure represents a macro definition on disk. */ +struct macrodef_struct +{ + unsigned int definition_length; + unsigned short name_length; + unsigned short flags; +}; + +/* This is how we write out a macro definition. + Suitable for being called by cpp_forall_identifiers. */ + +static int +write_macdef (cpp_reader *pfile, cpp_hashnode *hn, void *file_p) +{ + FILE *f = (FILE *) file_p; + bool is_void = false; + switch (hn->type) + { + case NT_VOID: + if (! (hn->flags & NODE_POISONED)) + return 1; + is_void = true; + goto poisoned; + + case NT_BUILTIN_MACRO: + return 1; + + case NT_USER_MACRO: + if (hn->value.macro->kind != cmk_assert) + { + poisoned: + struct macrodef_struct s; + const unsigned char *defn; + + s.name_length = NODE_LEN (hn); + s.flags = hn->flags & NODE_POISONED; + + if (is_void) + { + defn = NODE_NAME (hn); + s.definition_length = s.name_length; + } + else + { + defn = cpp_macro_definition (pfile, hn); + s.definition_length = ustrlen (defn); + } + + if (fwrite (&s, sizeof (s), 1, f) != 1 + || fwrite (defn, 1, s.definition_length, f) != s.definition_length) + { + cpp_errno (pfile, CPP_DL_ERROR, + "while writing precompiled header"); + return 0; + } + } + return 1; + + default: + abort (); + } +} + +/* This structure records the names of the defined macros. + It's also used as a callback structure for size_initial_idents + and save_idents. */ + +struct cpp_savedstate +{ + /* A hash table of the defined identifiers. */ + htab_t definedhash; + /* The size of the definitions of those identifiers (the size of + 'definedstrs'). */ + size_t hashsize; + /* Number of definitions */ + size_t n_defs; + /* Array of definitions. In cpp_write_pch_deps it is used for sorting. */ + cpp_hashnode **defs; + /* Space for the next definition. Definitions are null-terminated + strings. */ + unsigned char *definedstrs; +}; + +/* Save this identifier into the state: put it in the hash table, + put the definition in 'definedstrs'. */ + +static int +save_idents (cpp_reader *pfile ATTRIBUTE_UNUSED, cpp_hashnode *hn, void *ss_p) +{ + struct cpp_savedstate *const ss = (struct cpp_savedstate *)ss_p; + + if (hn->type != NT_VOID) + { + struct cpp_string news; + void **slot; + + news.len = NODE_LEN (hn); + news.text= NODE_NAME (hn); + slot = htab_find_slot (ss->definedhash, &news, INSERT); + if (*slot == NULL) + { + struct cpp_string *sp; + unsigned char *text; + + sp = XNEW (struct cpp_string); + *slot = sp; + + sp->len = NODE_LEN (hn); + sp->text = text = XNEWVEC (unsigned char, NODE_LEN (hn)); + memcpy (text, NODE_NAME (hn), NODE_LEN (hn)); + } + } + + return 1; +} + +/* Hash some memory in a generic way. */ + +static hashval_t +hashmem (const void *p_p, size_t sz) +{ + const unsigned char *p = (const unsigned char *)p_p; + size_t i; + hashval_t h; + + h = 0; + for (i = 0; i < sz; i++) + h = h * 67 - (*p++ - 113); + return h; +} + +/* Hash a cpp string for the hashtable machinery. */ + +static hashval_t +cpp_string_hash (const void *a_p) +{ + const struct cpp_string *a = (const struct cpp_string *) a_p; + return hashmem (a->text, a->len); +} + +/* Compare two cpp strings for the hashtable machinery. */ + +static int +cpp_string_eq (const void *a_p, const void *b_p) +{ + const struct cpp_string *a = (const struct cpp_string *) a_p; + const struct cpp_string *b = (const struct cpp_string *) b_p; + return (a->len == b->len + && memcmp (a->text, b->text, a->len) == 0); +} + +/* Free memory associated with cpp_string. */ + +static void +cpp_string_free (void *a_p) +{ + struct cpp_string *a = (struct cpp_string *) a_p; + free ((void *) a->text); + free (a); +} + +/* Save the current definitions of the cpp_reader for dependency + checking purposes. When writing a precompiled header, this should + be called at the same point in the compilation as cpp_valid_state + would be called when reading the precompiled header back in. */ + +int +cpp_save_state (cpp_reader *r, FILE *f) +{ + /* Save the list of non-void identifiers for the dependency checking. */ + r->savedstate = XNEW (struct cpp_savedstate); + r->savedstate->definedhash = htab_create (100, cpp_string_hash, + cpp_string_eq, cpp_string_free); + cpp_forall_identifiers (r, save_idents, r->savedstate); + + /* Write out the list of defined identifiers. */ + cpp_forall_identifiers (r, write_macdef, f); + + return 0; +} + +/* Calculate the 'hashsize' field of the saved state. */ + +static int +count_defs (cpp_reader *pfile ATTRIBUTE_UNUSED, cpp_hashnode *hn, void *ss_p) +{ + struct cpp_savedstate *const ss = (struct cpp_savedstate *)ss_p; + + switch (hn->type) + { + case NT_BUILTIN_MACRO: + return 1; + + case NT_USER_MACRO: + if (hn->value.macro->kind == cmk_assert) + return 1; + + /* fall through. */ + + case NT_VOID: + { + struct cpp_string news; + void **slot; + + news.len = NODE_LEN (hn); + news.text = NODE_NAME (hn); + slot = (void **) htab_find (ss->definedhash, &news); + if (slot == NULL) + { + ss->hashsize += NODE_LEN (hn) + 1; + ss->n_defs += 1; + } + } + return 1; + + default: + abort (); + } +} + +/* Collect the identifiers into the state's string table. */ +static int +write_defs (cpp_reader *pfile ATTRIBUTE_UNUSED, cpp_hashnode *hn, void *ss_p) +{ + struct cpp_savedstate *const ss = (struct cpp_savedstate *)ss_p; + + switch (hn->type) + { + case NT_BUILTIN_MACRO: + return 1; + + case NT_USER_MACRO: + if (hn->value.macro->kind == cmk_assert) + return 1; + + /* fall through. */ + + case NT_VOID: + { + struct cpp_string news; + void **slot; + + news.len = NODE_LEN (hn); + news.text = NODE_NAME (hn); + slot = (void **) htab_find (ss->definedhash, &news); + if (slot == NULL) + { + ss->defs[ss->n_defs] = hn; + ss->n_defs += 1; + } + } + return 1; + + default: + abort (); + } +} + +/* Comparison function for qsort. The arguments point to pointers of + type ht_hashnode *. */ +static int +comp_hashnodes (const void *px, const void *py) +{ + cpp_hashnode *x = *(cpp_hashnode **) px; + cpp_hashnode *y = *(cpp_hashnode **) py; + return ustrcmp (NODE_NAME (x), NODE_NAME (y)); +} + +/* Write out the remainder of the dependency information. This should be + called after the PCH is ready to be saved. */ + +int +cpp_write_pch_deps (cpp_reader *r, FILE *f) +{ + struct macrodef_struct z; + struct cpp_savedstate *const ss = r->savedstate; + unsigned char *definedstrs; + size_t i; + + /* Collect the list of identifiers which have been seen and + weren't defined to anything previously. */ + ss->hashsize = 0; + ss->n_defs = 0; + cpp_forall_identifiers (r, count_defs, ss); + + ss->defs = XNEWVEC (cpp_hashnode *, ss->n_defs); + ss->n_defs = 0; + cpp_forall_identifiers (r, write_defs, ss); + + /* Sort the list, copy it into a buffer, and write it out. */ + qsort (ss->defs, ss->n_defs, sizeof (cpp_hashnode *), &comp_hashnodes); + definedstrs = ss->definedstrs = XNEWVEC (unsigned char, ss->hashsize); + for (i = 0; i < ss->n_defs; ++i) + { + size_t len = NODE_LEN (ss->defs[i]); + memcpy (definedstrs, NODE_NAME (ss->defs[i]), len + 1); + definedstrs += len + 1; + } + + memset (&z, 0, sizeof (z)); + z.definition_length = ss->hashsize; + if (fwrite (&z, sizeof (z), 1, f) != 1 + || fwrite (ss->definedstrs, ss->hashsize, 1, f) != 1) + { + cpp_errno (r, CPP_DL_ERROR, "while writing precompiled header"); + return -1; + } + free (ss->definedstrs); + free (ss->defs); + htab_delete (ss->definedhash); + + /* Free the saved state. */ + free (ss); + r->savedstate = NULL; + + /* Save the next value of __COUNTER__. */ + if (fwrite (&r->counter, sizeof (r->counter), 1, f) != 1) + { + cpp_errno (r, CPP_DL_ERROR, "while writing precompiled header"); + return -1; + } + + return 0; +} + +/* Write out the definitions of the preprocessor, in a form suitable for + cpp_read_state. */ + +int +cpp_write_pch_state (cpp_reader *r, FILE *f) +{ + if (!r->deps) + r->deps = deps_init (); + + if (deps_save (r->deps, f) != 0) + { + cpp_errno (r, CPP_DL_ERROR, "while writing precompiled header"); + return -1; + } + + if (! _cpp_save_file_entries (r, f)) + { + cpp_errno (r, CPP_DL_ERROR, "while writing precompiled header"); + return -1; + } + + /* Save the next __COUNTER__ value. When we include a precompiled header, + we need to start at the offset we would have if the header had been + included normally. */ + if (fwrite (&r->counter, sizeof (r->counter), 1, f) != 1) + { + cpp_errno (r, CPP_DL_ERROR, "while writing precompiled header"); + return -1; + } + + /* Write saved macros. */ + if (! _cpp_save_pushed_macros (r, f)) + { + cpp_errno (r, CPP_DL_ERROR, "while writing precompiled header"); + return -1; + } + + return 0; +} + +static int +_cpp_restore_pushed_macros (cpp_reader *r, FILE *f) +{ + size_t count_saved = 0; + size_t i; + struct def_pragma_macro *p; + size_t nlen; + uchar *defn; + size_t defnlen; + + if (fread (&count_saved, sizeof (count_saved), 1, f) != 1) + return 0; + if (! count_saved) + return 1; + for (i = 0; i < count_saved; i++) + { + if (fread (&nlen, sizeof (nlen), 1, f) != 1) + return 0; + p = XNEW (struct def_pragma_macro); + memset (p, 0, sizeof (struct def_pragma_macro)); + p->name = XNEWVAR (char, nlen + 1); + p->name[nlen] = 0; + if (fread (p->name, nlen, 1, f) != 1) + return 0; + if (fread (&defnlen, sizeof (defnlen), 1, f) != 1) + return 0; + if (defnlen == 0) + p->is_undef = 1; + else + { + defn = XNEWVEC (uchar, defnlen + 1); + defn[defnlen] = 0; + + if (fread (defn, defnlen, 1, f) != 1) + return 0; + + p->definition = defn; + if (fread (&(p->line), sizeof (location_t), 1, f) != 1) + return 0; + defnlen = 0; + if (fread (&defnlen, sizeof (defnlen), 1, f) != 1) + return 0; + p->syshdr = ((defnlen & 1) != 0 ? 1 : 0); + p->used = ((defnlen & 2) != 0 ? 1 : 0); + } + + p->next = r->pushed_macros; + r->pushed_macros = p; + } + return 1; +} + +static int +_cpp_save_pushed_macros (cpp_reader *r, FILE *f) +{ + size_t count_saved = 0; + size_t i; + struct def_pragma_macro *p,**pp; + size_t defnlen; + + /* Get count. */ + p = r->pushed_macros; + while (p != NULL) + { + count_saved++; + p = p->next; + } + if (fwrite (&count_saved, sizeof (count_saved), 1, f) != 1) + return 0; + if (!count_saved) + return 1; + + pp = (struct def_pragma_macro **) alloca (sizeof (struct def_pragma_macro *) + * count_saved); + /* Store them in reverse order. */ + p = r->pushed_macros; + i = count_saved; + while (p != NULL) + { + --i; + pp[i] = p; + p = p->next; + } + for (i = 0; i < count_saved; i++) + { + defnlen = strlen (pp[i]->name); + if (fwrite (&defnlen, sizeof (size_t), 1, f) != 1 + || fwrite (pp[i]->name, defnlen, 1, f) != 1) + return 0; + if (pp[i]->is_undef) + { + defnlen = 0; + if (fwrite (&defnlen, sizeof (size_t), 1, f) != 1) + return 0; + } + else + { + defnlen = ustrlen (pp[i]->definition); + if (fwrite (&defnlen, sizeof (size_t), 1, f) != 1 + || fwrite (pp[i]->definition, defnlen, 1, f) != 1) + return 0; + if (fwrite (&(pp[i]->line), sizeof (location_t), 1, f) != 1) + return 0; + defnlen = 0; + defnlen |= (pp[i]->syshdr != 0 ? 1 : 0); + defnlen |= (pp[i]->used != 0 ? 2 : 0); + if (fwrite (&defnlen, sizeof (defnlen), 1, f) != 1) + return 0; + } + } + return 1; +} + + +/* Data structure to transform hash table nodes into a sorted list */ + +struct ht_node_list +{ + /* Array of nodes */ + cpp_hashnode **defs; + /* Number of nodes in the array */ + size_t n_defs; + /* Size of the allocated array */ + size_t asize; +}; + +/* Callback for collecting identifiers from hash table */ + +static int +collect_ht_nodes (cpp_reader *pfile ATTRIBUTE_UNUSED, cpp_hashnode *hn, + void *nl_p) +{ + struct ht_node_list *const nl = (struct ht_node_list *)nl_p; + + if (hn->type != NT_VOID || hn->flags & NODE_POISONED) + { + if (nl->n_defs == nl->asize) + { + nl->asize *= 2; + nl->defs = XRESIZEVEC (cpp_hashnode *, nl->defs, nl->asize); + } + + nl->defs[nl->n_defs] = hn; + ++nl->n_defs; + } + return 1; +} + + +/* Return nonzero if FD is a precompiled header which is consistent + with the preprocessor's current definitions. It will be consistent + when: + + - anything that was defined just before the PCH was generated + is defined the same way now; and + - anything that was not defined then, but is defined now, was not + used by the PCH. + + NAME is used to print warnings if `warn_invalid_pch' is set in the + reader's flags. +*/ + +int +cpp_valid_state (cpp_reader *r, const char *name, int fd) +{ + struct macrodef_struct m; + size_t namebufsz = 256; + unsigned char *namebuf = XNEWVEC (unsigned char, namebufsz); + unsigned char *undeftab = NULL; + struct ht_node_list nl = { 0, 0, 0 }; + unsigned char *first, *last; + unsigned int i; + unsigned int counter; + + /* Read in the list of identifiers that must be defined + Check that they are defined in the same way. */ + for (;;) + { + cpp_hashnode *h; + const unsigned char *newdefn; + + if (read (fd, &m, sizeof (m)) != sizeof (m)) + goto error; + + if (m.name_length == 0) + break; + + /* If this file is already preprocessed, there won't be any + macros defined, and that's OK. */ + if (CPP_OPTION (r, preprocessed)) + { + if (lseek (fd, m.definition_length, SEEK_CUR) == -1) + goto error; + continue; + } + + if (m.definition_length > namebufsz) + { + free (namebuf); + namebufsz = m.definition_length + 256; + namebuf = XNEWVEC (unsigned char, namebufsz); + } + + if ((size_t)read (fd, namebuf, m.definition_length) + != m.definition_length) + goto error; + + h = cpp_lookup (r, namebuf, m.name_length); + if (m.flags & NODE_POISONED + || h->flags & NODE_POISONED) + { + if (CPP_OPTION (r, warn_invalid_pch)) + cpp_warning_syshdr (r, CPP_W_INVALID_PCH, + "%s: not used because `%.*s' is poisoned", + name, m.name_length, namebuf); + goto fail; + } + + if (h->type == NT_VOID) + { + /* It's ok if __GCC_HAVE_DWARF2_CFI_ASM becomes undefined, + as in, when the PCH file is created with -g and we're + attempting to use it without -g. Restoring the PCH file + is supposed to bring in this definition *and* enable the + generation of call frame information, so that precompiled + definitions that take this macro into account, to decide + what asm to emit, won't issue .cfi directives when the + compiler doesn't. */ + if (!(h->flags & NODE_USED) + && m.name_length == sizeof ("__GCC_HAVE_DWARF2_CFI_ASM") - 1 + && !memcmp (namebuf, "__GCC_HAVE_DWARF2_CFI_ASM", m.name_length)) + continue; + + if (CPP_OPTION (r, warn_invalid_pch)) + cpp_warning_syshdr (r, CPP_W_INVALID_PCH, + "%s: not used because `%.*s' not defined", + name, m.name_length, namebuf); + goto fail; + } + + newdefn = cpp_macro_definition (r, h); + + if (m.definition_length != ustrlen (newdefn) + || memcmp (namebuf, newdefn, m.definition_length) != 0) + { + if (CPP_OPTION (r, warn_invalid_pch)) + cpp_warning_syshdr (r, CPP_W_INVALID_PCH, + "%s: not used because `%.*s' defined as `%s' not `%.*s'", + name, m.name_length, namebuf, newdefn + m.name_length, + m.definition_length - m.name_length, + namebuf + m.name_length); + goto fail; + } + } + free (namebuf); + namebuf = NULL; + + /* Read in the list of identifiers that must not be defined. + Check that they really aren't. */ + undeftab = XNEWVEC (unsigned char, m.definition_length); + if ((size_t) read (fd, undeftab, m.definition_length) != m.definition_length) + goto error; + + /* Collect identifiers from the current hash table. */ + nl.n_defs = 0; + nl.asize = 10; + nl.defs = XNEWVEC (cpp_hashnode *, nl.asize); + cpp_forall_identifiers (r, &collect_ht_nodes, &nl); + qsort (nl.defs, nl.n_defs, sizeof (cpp_hashnode *), &comp_hashnodes); + + /* Loop through nl.defs and undeftab, both of which are sorted lists. + There should be no matches. */ + first = undeftab; + last = undeftab + m.definition_length; + i = 0; + + while (first < last && i < nl.n_defs) + { + int cmp = ustrcmp (first, NODE_NAME (nl.defs[i])); + + if (cmp < 0) + first += ustrlen (first) + 1; + else if (cmp > 0) + ++i; + else + { + if (CPP_OPTION (r, warn_invalid_pch)) + cpp_warning_syshdr (r, CPP_W_INVALID_PCH, + "%s: not used because `%s' is defined", + name, first); + goto fail; + } + } + + free(nl.defs); + nl.defs = NULL; + free (undeftab); + undeftab = NULL; + + /* Read in the next value of __COUNTER__. + Check that (a) __COUNTER__ was not used in the pch or (b) __COUNTER__ + has not been used in this translation unit. */ + if (read (fd, &counter, sizeof (counter)) != sizeof (counter)) + goto error; + if (counter && r->counter) + { + if (CPP_OPTION (r, warn_invalid_pch)) + cpp_warning_syshdr (r, CPP_W_INVALID_PCH, + "%s: not used because `__COUNTER__' is invalid", + name); + goto fail; + } + + /* We win! */ + return 0; + + error: + cpp_errno (r, CPP_DL_ERROR, "while reading precompiled header"); + + fail: + free (namebuf); + free (undeftab); + free (nl.defs); + return 1; +} + +/* Save all the existing macros. */ + +struct save_macro_data +{ + uchar **defns; + size_t count; + size_t array_size; + char **saved_pragmas; +}; + +/* Save the definition of a single macro, so that it will persist + across a PCH restore. Because macro data is in GCed memory, which + will be blown away by PCH, it must be temporarily copied to + malloced memory. (The macros will refer to identifier nodes which + are also GCed and so on, so the copying is done by turning them + into self-contained strings.) The assumption is that most macro + definitions will come from the PCH file, not from the compilation + before the PCH file is loaded, so it doesn't matter that this is + a little expensive. + + It would reduce the cost even further if macros defined in the PCH + file were not saved in this way, but this is not done (yet), except + for builtins, and for #assert by default. */ + +static int +save_macros (cpp_reader *r, cpp_hashnode *h, void *data_p) +{ + struct save_macro_data *data = (struct save_macro_data *)data_p; + + if (cpp_user_macro_p (h)) + { + if (data->count == data->array_size) + { + data->array_size *= 2; + data->defns = XRESIZEVEC (uchar *, data->defns, (data->array_size)); + } + + const uchar * defn = cpp_macro_definition (r, h); + size_t defnlen = ustrlen (defn); + + data->defns[data->count] = (uchar *) xmemdup (defn, defnlen, defnlen + 2); + data->defns[data->count][defnlen] = '\n'; + data->count++; + } + + return 1; +} + +/* Prepare to restore the state, by saving the currently-defined + macros in 'data'. */ + +void +cpp_prepare_state (cpp_reader *r, struct save_macro_data **data) +{ + struct save_macro_data *d = XNEW (struct save_macro_data); + + d->array_size = 512; + d->defns = XNEWVEC (uchar *, d->array_size); + d->count = 0; + cpp_forall_identifiers (r, save_macros, d); + d->saved_pragmas = _cpp_save_pragma_names (r); + *data = d; +} + +/* Given a precompiled header that was previously determined to be valid, + apply all its definitions (and undefinitions) to the current state. + DEPNAME is passed to deps_restore. */ + +int +cpp_read_state (cpp_reader *r, const char *name, FILE *f, + struct save_macro_data *data) +{ + size_t i; + struct lexer_state old_state; + unsigned int counter; + + /* Restore spec_nodes, which will be full of references to the old + hashtable entries and so will now be invalid. */ + { + struct spec_nodes *s = &r->spec_nodes; + s->n_defined = cpp_lookup (r, DSC("defined")); + s->n_true = cpp_lookup (r, DSC("true")); + s->n_false = cpp_lookup (r, DSC("false")); + s->n__VA_ARGS__ = cpp_lookup (r, DSC("__VA_ARGS__")); + s->n__VA_OPT__ = cpp_lookup (r, DSC("__VA_OPT__")); + } + + old_state = r->state; + r->state.in_directive = 1; + r->state.prevent_expansion = 1; + r->state.angled_headers = 0; + + /* Run through the carefully-saved macros, insert them. */ + for (i = 0; i < data->count; i++) + { + cpp_hashnode *h; + size_t namelen; + uchar *defn; + + namelen = ustrcspn (data->defns[i], "( \n"); + h = cpp_lookup (r, data->defns[i], namelen); + defn = data->defns[i] + namelen; + + /* The PCH file is valid, so we know that if there is a definition + from the PCH file it must be the same as the one we had + originally, and so do not need to restore it. */ + if (h->type == NT_VOID) + { + if (cpp_push_buffer (r, defn, ustrchr (defn, '\n') - defn, true) + != NULL) + { + _cpp_clean_line (r); + if (!_cpp_create_definition (r, h)) + abort (); + _cpp_pop_buffer (r); + } + else + abort (); + } + + free (data->defns[i]); + } + r->state = old_state; + + _cpp_restore_pragma_names (r, data->saved_pragmas); + + free (data); + + if (deps_restore (r->deps, f, CPP_OPTION (r, restore_pch_deps) ? name : NULL) + != 0) + goto error; + + if (! _cpp_read_file_entries (r, f)) + goto error; + + if (fread (&counter, sizeof (counter), 1, f) != 1) + goto error; + + if (!r->counter) + r->counter = counter; + + /* Read pushed macros. */ + if (! _cpp_restore_pushed_macros (r, f)) + goto error; + return 0; + + error: + cpp_errno (r, CPP_DL_ERROR, "while reading precompiled header"); + return -1; +} diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/0001-Ada-remove-conversions-with-C-struct-timeval-from-GN.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/0001-Ada-remove-conversions-with-C-struct-timeval-from-GN.diff new file mode 100644 index 0000000000..bd66a364df --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/0001-Ada-remove-conversions-with-C-struct-timeval-from-GN.diff @@ -0,0 +1,135 @@ +From 0f091cc96b343275ecbe94d1c79fd5559b494b8b Mon Sep 17 00:00:00 2001 +From: Nicolas Boulenguez +Date: Fri, 5 Apr 2024 16:51:54 +0200 +Subject: [PATCH 1/8] Ada: remove conversions with C struct timeval from + GNAT.Calendar +Bug-Debian: https://bugs.debian.org/1067453 + +--- + gcc/ada/doc/gnat_rm/the_gnat_library.rst | 2 - + gcc/ada/libgnat/g-calend.adb | 58 ------------------------ + gcc/ada/libgnat/g-calend.ads | 18 -------- + 3 files changed, 78 deletions(-) + +--- a/src/gcc/ada/doc/gnat_rm/the_gnat_library.rst ++++ b/src/gcc/ada/doc/gnat_rm/the_gnat_library.rst +@@ -674,8 +674,6 @@ Machine-specific implementations are ava + + Extends the facilities provided by ``Ada.Calendar`` to include handling + of days of the week, an extended ``Split`` and ``Time_Of`` capability. +-Also provides conversion of ``Ada.Calendar.Time`` values to and from the +-C ``timeval`` format. + + .. _`GNAT.Calendar.Time_IO_(g-catiio.ads)`: + +--- a/src/gcc/ada/libgnat/g-calend.adb ++++ b/src/gcc/ada/libgnat/g-calend.adb +@@ -29,11 +29,8 @@ + -- -- + ------------------------------------------------------------------------------ + +-with Interfaces.C.Extensions; +- + package body GNAT.Calendar is + use Ada.Calendar; +- use Interfaces; + + ----------------- + -- Day_In_Year -- +@@ -328,61 +325,6 @@ package body GNAT.Calendar is + Time_Zone => 0); + end Time_Of_At_Locale; + +- ----------------- +- -- To_Duration -- +- ----------------- +- +- function To_Duration (T : not null access timeval) return Duration is +- +- procedure timeval_to_duration +- (T : not null access timeval; +- sec : not null access C.Extensions.long_long; +- usec : not null access C.long); +- pragma Import (C, timeval_to_duration, "__gnat_timeval_to_duration"); +- +- Micro : constant := 10**6; +- sec : aliased C.Extensions.long_long; +- usec : aliased C.long; +- +- begin +- timeval_to_duration (T, sec'Access, usec'Access); +- pragma Annotate (CodePeer, Modified, sec); +- pragma Annotate (CodePeer, Modified, usec); +- +- return Duration (sec) + Duration (usec) / Micro; +- end To_Duration; +- +- ---------------- +- -- To_Timeval -- +- ---------------- +- +- function To_Timeval (D : Duration) return timeval is +- +- procedure duration_to_timeval +- (Sec : C.Extensions.long_long; +- Usec : C.long; +- T : not null access timeval); +- pragma Import (C, duration_to_timeval, "__gnat_duration_to_timeval"); +- +- Micro : constant := 10**6; +- Result : aliased timeval; +- sec : C.Extensions.long_long; +- usec : C.long; +- +- begin +- if D = 0.0 then +- sec := 0; +- usec := 0; +- else +- sec := C.Extensions.long_long (D - 0.5); +- usec := C.long ((D - Duration (sec)) * Micro - 0.5); +- end if; +- +- duration_to_timeval (sec, usec, Result'Access); +- +- return Result; +- end To_Timeval; +- + ------------------ + -- Week_In_Year -- + ------------------ +--- a/src/gcc/ada/libgnat/g-calend.ads ++++ b/src/gcc/ada/libgnat/g-calend.ads +@@ -40,7 +40,6 @@ + -- Day_Of_Week, Day_In_Year and Week_In_Year. + + with Ada.Calendar.Formatting; +-with Interfaces.C; + + package GNAT.Calendar is + +@@ -145,24 +144,7 @@ package GNAT.Calendar is + -- Return the week number as defined in ISO 8601 along with the year in + -- which the week occurs. + +- -- C timeval conversion +- +- -- C timeval represent a duration (used in Select for example). This +- -- structure is composed of a number of seconds and a number of micro +- -- seconds. The timeval structure is not exposed here because its +- -- definition is target dependent. Interface to C programs is done via a +- -- pointer to timeval structure. +- +- type timeval is private; +- +- function To_Duration (T : not null access timeval) return Duration; +- function To_Timeval (D : Duration) return timeval; +- + private +- -- This is a dummy declaration that should be the largest possible timeval +- -- structure of all supported targets. +- +- type timeval is array (1 .. 3) of Interfaces.C.long; + + function Julian_Day + (Year : Ada.Calendar.Year_Number; diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/0002-Ada-remove-C-conversions-with-C-struct-timespec-from.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/0002-Ada-remove-C-conversions-with-C-struct-timespec-from.diff new file mode 100644 index 0000000000..8aa29248ab --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/0002-Ada-remove-C-conversions-with-C-struct-timespec-from.diff @@ -0,0 +1,148 @@ +From: Nicolas Boulenguez +Subject: [PATCH 2/8] Ada: remove C conversions with C struct timespec from + Ada.Calendar +Bug-Debian: https://bugs.debian.org/1067453 + +--- a/src/gcc/ada/libgnat/a-calcon.adb ++++ b/src/gcc/ada/libgnat/a-calcon.adb +@@ -69,39 +69,6 @@ package body Ada.Calendar.Conversions is + (Year, Month, Day, Hour, Minute, Second, DST); + end To_Ada_Time; + +- ----------------- +- -- To_Duration -- +- ----------------- +- +- function To_Duration +- (tv_sec : long; +- tv_nsec : long) return Duration +- is +- Secs : constant Long_Integer := Long_Integer (tv_sec); +- Nano_Secs : constant Long_Integer := Long_Integer (tv_nsec); +- begin +- return Conversion_Operations.To_Duration (Secs, Nano_Secs); +- end To_Duration; +- +- ------------------------ +- -- To_Struct_Timespec -- +- ------------------------ +- +- procedure To_Struct_Timespec +- (D : Duration; +- tv_sec : out long; +- tv_nsec : out long) +- is +- Secs : Long_Integer; +- Nano_Secs : Long_Integer; +- +- begin +- Conversion_Operations.To_Struct_Timespec (D, Secs, Nano_Secs); +- +- tv_sec := long (Secs); +- tv_nsec := long (Nano_Secs); +- end To_Struct_Timespec; +- + ------------------ + -- To_Struct_Tm -- + ------------------ +--- a/src/gcc/ada/libgnat/a-calcon.ads ++++ b/src/gcc/ada/libgnat/a-calcon.ads +@@ -30,7 +30,7 @@ + ------------------------------------------------------------------------------ + + -- This package provides various routines for conversion between Ada and Unix +--- time models - Time, Duration, struct tm and struct timespec. ++-- time models - Time, Duration and struct tm. + + with Interfaces.C; + +@@ -67,22 +67,6 @@ package Ada.Calendar.Conversions is + -- the input values are out of the defined ranges or if tm_sec equals 60 + -- and the instance in time is not a leap second occurrence. + +- function To_Duration +- (tv_sec : Interfaces.C.long; +- tv_nsec : Interfaces.C.long) return Duration; +- -- Convert an elapsed time value expressed in Unix-like fields of struct +- -- timespec into a Duration value. The expected ranges are: +- +- -- tv_sec - seconds +- -- tv_nsec - nanoseconds +- +- procedure To_Struct_Timespec +- (D : Duration; +- tv_sec : out Interfaces.C.long; +- tv_nsec : out Interfaces.C.long); +- -- Convert a Duration value into the constituents of struct timespec. +- -- Formal tv_sec denotes seconds and tv_nsecs denotes nanoseconds. +- + procedure To_Struct_Tm + (T : Time; + tm_year : out Interfaces.C.int; +--- a/src/gcc/ada/libgnat/a-calend.adb ++++ b/src/gcc/ada/libgnat/a-calend.adb +@@ -990,44 +990,6 @@ is + raise Time_Error; + end To_Ada_Time; + +- ----------------- +- -- To_Duration -- +- ----------------- +- +- function To_Duration +- (tv_sec : Long_Integer; +- tv_nsec : Long_Integer) return Duration +- is +- pragma Unsuppress (Overflow_Check); +- begin +- return Duration (tv_sec) + Duration (tv_nsec) / Nano_F; +- end To_Duration; +- +- ------------------------ +- -- To_Struct_Timespec -- +- ------------------------ +- +- procedure To_Struct_Timespec +- (D : Duration; +- tv_sec : out Long_Integer; +- tv_nsec : out Long_Integer) +- is +- pragma Unsuppress (Overflow_Check); +- Secs : Duration; +- Nano_Secs : Duration; +- +- begin +- -- Seconds extraction, avoid potential rounding errors +- +- Secs := D - 0.5; +- tv_sec := Long_Integer (Secs); +- +- -- Nanoseconds extraction +- +- Nano_Secs := D - Duration (tv_sec); +- tv_nsec := Long_Integer (Nano_Secs * Nano); +- end To_Struct_Timespec; +- + ------------------ + -- To_Struct_Tm -- + ------------------ +--- a/src/gcc/ada/libgnat/a-calend.ads ++++ b/src/gcc/ada/libgnat/a-calend.ads +@@ -303,17 +303,6 @@ private + tm_isdst : Integer) return Time; + -- Struct tm to Ada Epoch conversion + +- function To_Duration +- (tv_sec : Long_Integer; +- tv_nsec : Long_Integer) return Duration; +- -- Struct timespec to Duration conversion +- +- procedure To_Struct_Timespec +- (D : Duration; +- tv_sec : out Long_Integer; +- tv_nsec : out Long_Integer); +- -- Duration to struct timespec conversion +- + procedure To_Struct_Tm + (T : Time; + tm_year : out Integer; diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/0003-Ada-define-time_t-timeval-timespec-C-types-in-a-sing.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/0003-Ada-define-time_t-timeval-timespec-C-types-in-a-sing.diff new file mode 100644 index 0000000000..aefa2557ac --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/0003-Ada-define-time_t-timeval-timespec-C-types-in-a-sing.diff @@ -0,0 +1,3919 @@ +From: Nicolas Boulenguez +Subject: [PATCH 3/8] Ada: define time_t timeval timespec C types in a single + place +Bug-Debian: https://bugs.debian.org/1067453 + +Add a new System.C_Time unit in libgnat, + * not in libgnarl like OS_Interface, + * not used by the host compiler like System.CRTL + (because it requires the target System.OS_Constants) +OS_Primitives is a candidate, but has several variants +and would cause duplication again. + +The System.OS_Interface specification for Android now forbids a body. + +Remove lots of variants of the conversion functions with Duration. +Remove the C wrapper using long long int as an intermediate 64 bits type. +When Duration'Size = 32 bits + * round correctly in both variants of To_Duration. + * prevent an overflow in To_Duration when nsec = 999_999_999. + * prevent an overflow in To_Timespec without intermediate 64 bits. + +Provide direct conversions for System.OS_Interface (Darwin) and +GNAt.Sockets.Poll.G_Wait, replacing an intermediate Duration that may +loose overflow or loose precision. + +Provide a test checking if a timeval value can be converted to +Duration for GNAT.Sockets. + +--- a/src/gcc/ada/Makefile.rtl ++++ b/src/gcc/ada/Makefile.rtl +@@ -751,6 +751,7 @@ GNATRTL_NONTASKING_OBJS= \ + s-string$(objext) \ + s-ststop$(objext) \ + s-tasloc$(objext) \ ++ s-c_time$(objext) \ + s-traceb$(objext) \ + s-traent$(objext) \ + s-trasym$(objext) \ +@@ -1376,7 +1377,6 @@ ifeq ($(strip $(filter-out arm% linux-an + s-inmaop.adb. * +- * * +- * GNAT was originally developed by the GNAT team at New York University. * +- * Extensive contributions were provided by Ada Core Technologies Inc. * +- * * +- ****************************************************************************/ +- +-/* This file contains routines marked with pragmas Import in package */ +-/* GNAT.Calendar. It is used to do Duration to timeval conversion. */ +-/* These are simple wrapper functions to abstract the fact that the C */ +-/* struct timeval fields are not normalized (they are generally */ +-/* defined as int or long values). */ +- +-#if defined (__vxworks) +-#ifdef __RTP__ +-#include +-#include +-#if (_WRS_VXWORKS_MAJOR == 7) || (_WRS_VXWORKS_MINOR != 0) +-#include +-#endif +-#else +-#include +-#endif +-#elif defined (__nucleus__) +-#include +-#else +-#include +-#endif +- +-#ifdef __MINGW32__ +-#include "mingw32.h" +-#include +-#endif +- +-void +-__gnat_timeval_to_duration (struct timeval *t, long long *sec, long *usec) +-{ +- *sec = (long long) t->tv_sec; +- *usec = (long) t->tv_usec; +-} +- +-void +-__gnat_duration_to_timeval (long long sec, long usec, struct timeval *t) +-{ +- /* here we are doing implicit conversion to the struct timeval +- fields types. */ +- +- t->tv_sec = sec; +- t->tv_usec = usec; +-} +--- a/src/gcc/ada/gcc-interface/Makefile.in ++++ b/src/gcc/ada/gcc-interface/Makefile.in +@@ -910,7 +910,6 @@ tracebak.o : tracebak.c + adadecode.o : adadecode.c adadecode.h + aux-io.o : aux-io.c + argv.o : argv.c +-cal.o : cal.c + deftarg.o : deftarg.c + errno.o : errno.c + exit.o : adaint.h exit.c +--- a/src/gcc/ada/libgnarl/a-exetim__posix.adb ++++ b/src/gcc/ada/libgnarl/a-exetim__posix.adb +@@ -34,6 +34,7 @@ + with Ada.Task_Identification; use Ada.Task_Identification; + with Ada.Unchecked_Conversion; + ++with System.C_Time; + with System.Tasking; + with System.OS_Interface; use System.OS_Interface; + with System.Task_Primitives.Operations; use System.Task_Primitives.Operations; +@@ -98,7 +99,7 @@ package body Ada.Execution_Time is + (T : Ada.Task_Identification.Task_Id := + Ada.Task_Identification.Current_Task) return CPU_Time + is +- TS : aliased timespec; ++ TS : aliased System.C_Time.timespec; + Clock_Id : aliased Interfaces.C.int; + Result : Interfaces.C.int; + +@@ -112,7 +113,7 @@ package body Ada.Execution_Time is + + function clock_gettime + (clock_id : Interfaces.C.int; +- tp : access timespec) ++ tp : access System.C_Time.timespec) + return int; + pragma Import (C, clock_gettime, "clock_gettime"); + -- Function from the POSIX.1b Realtime Extensions library +@@ -139,7 +140,7 @@ package body Ada.Execution_Time is + (clock_id => Clock_Id, tp => TS'Unchecked_Access); + pragma Assert (Result = 0); + +- return To_CPU_Time (To_Duration (TS)); ++ return To_CPU_Time (System.C_Time.To_Duration (TS)); + end Clock; + + -------------------------- +--- a/src/gcc/ada/libgnarl/s-linux.ads ++++ b/src/gcc/ada/libgnarl/s-linux.ads +@@ -36,7 +36,6 @@ + -- Preelaborate. This package is designed to be a bottom-level (leaf) package + + with Interfaces.C; +-with System.Parameters; + + package System.Linux is + pragma Preelaborate; +@@ -45,24 +44,8 @@ package System.Linux is + -- Time -- + ---------- + +- subtype long is Interfaces.C.long; +- subtype suseconds_t is Interfaces.C.long; +- type time_t is range -2 ** (System.Parameters.time_t_bits - 1) +- .. 2 ** (System.Parameters.time_t_bits - 1) - 1; + subtype clockid_t is Interfaces.C.int; + +- type timespec is record +- tv_sec : time_t; +- tv_nsec : long; +- end record; +- pragma Convention (C, timespec); +- +- type timeval is record +- tv_sec : time_t; +- tv_usec : suseconds_t; +- end record; +- pragma Convention (C, timeval); +- + ----------- + -- Errno -- + ----------- +--- a/src/gcc/ada/libgnarl/s-linux__alpha.ads ++++ b/src/gcc/ada/libgnarl/s-linux__alpha.ads +@@ -36,7 +36,6 @@ + -- Preelaborate. This package is designed to be a bottom-level (leaf) package. + + with Interfaces.C; +-with System.Parameters; + + package System.Linux is + pragma Preelaborate; +@@ -45,24 +44,8 @@ package System.Linux is + -- Time -- + ---------- + +- subtype long is Interfaces.C.long; +- subtype suseconds_t is Interfaces.C.long; +- type time_t is range -2 ** (System.Parameters.time_t_bits - 1) +- .. 2 ** (System.Parameters.time_t_bits - 1) - 1; + subtype clockid_t is Interfaces.C.int; + +- type timespec is record +- tv_sec : time_t; +- tv_nsec : long; +- end record; +- pragma Convention (C, timespec); +- +- type timeval is record +- tv_sec : time_t; +- tv_usec : suseconds_t; +- end record; +- pragma Convention (C, timeval); +- + ----------- + -- Errno -- + ----------- +--- a/src/gcc/ada/libgnarl/s-linux__android.ads ++++ b/src/gcc/ada/libgnarl/s-linux__android.ads +@@ -36,7 +36,6 @@ + -- Preelaborate. This package is designed to be a bottom-level (leaf) package + + with Interfaces.C; +-with System.Parameters; + + package System.Linux is + pragma Preelaborate; +@@ -45,24 +44,8 @@ package System.Linux is + -- Time -- + ---------- + +- subtype long is Interfaces.C.long; +- subtype suseconds_t is Interfaces.C.long; +- type time_t is range -2 ** (System.Parameters.time_t_bits - 1) +- .. 2 ** (System.Parameters.time_t_bits - 1) - 1; + subtype clockid_t is Interfaces.C.int; + +- type timespec is record +- tv_sec : time_t; +- tv_nsec : long; +- end record; +- pragma Convention (C, timespec); +- +- type timeval is record +- tv_sec : time_t; +- tv_usec : suseconds_t; +- end record; +- pragma Convention (C, timeval); +- + ----------- + -- Errno -- + ----------- +--- a/src/gcc/ada/libgnarl/s-linux__hppa.ads ++++ b/src/gcc/ada/libgnarl/s-linux__hppa.ads +@@ -36,7 +36,6 @@ + -- Preelaborate. This package is designed to be a bottom-level (leaf) package. + + with Interfaces.C; +-with System.Parameters; + + package System.Linux is + pragma Preelaborate; +@@ -45,24 +44,8 @@ package System.Linux is + -- Time -- + ---------- + +- subtype long is Interfaces.C.long; +- subtype suseconds_t is Interfaces.C.long; +- type time_t is range -2 ** (System.Parameters.time_t_bits - 1) +- .. 2 ** (System.Parameters.time_t_bits - 1) - 1; + subtype clockid_t is Interfaces.C.int; + +- type timespec is record +- tv_sec : time_t; +- tv_nsec : long; +- end record; +- pragma Convention (C, timespec); +- +- type timeval is record +- tv_sec : time_t; +- tv_usec : suseconds_t; +- end record; +- pragma Convention (C, timeval); +- + ----------- + -- Errno -- + ----------- +--- a/src/gcc/ada/libgnarl/s-linux__mips.ads ++++ b/src/gcc/ada/libgnarl/s-linux__mips.ads +@@ -35,7 +35,6 @@ + -- Preelaborate. This package is designed to be a bottom-level (leaf) package + + with Interfaces.C; +-with System.Parameters; + + package System.Linux is + pragma Preelaborate; +@@ -44,25 +43,8 @@ package System.Linux is + -- Time -- + ---------- + +- subtype int is Interfaces.C.int; +- subtype long is Interfaces.C.long; +- subtype suseconds_t is Interfaces.C.long; +- type time_t is range -2 ** (System.Parameters.time_t_bits - 1) +- .. 2 ** (System.Parameters.time_t_bits - 1) - 1; + subtype clockid_t is Interfaces.C.int; + +- type timespec is record +- tv_sec : time_t; +- tv_nsec : long; +- end record; +- pragma Convention (C, timespec); +- +- type timeval is record +- tv_sec : time_t; +- tv_usec : suseconds_t; +- end record; +- pragma Convention (C, timeval); +- + ----------- + -- Errno -- + ----------- +@@ -125,8 +107,8 @@ package System.Linux is + + -- struct_sigaction offsets + +- sa_handler_pos : constant := int'Size / 8; +- sa_mask_pos : constant := int'Size / 8 + ++ sa_handler_pos : constant := Interfaces.C.int'Size / 8; ++ sa_mask_pos : constant := Interfaces.C.int'Size / 8 + + Standard'Address_Size / 8; + sa_flags_pos : constant := 0; + +--- a/src/gcc/ada/libgnarl/s-linux__riscv.ads ++++ b/src/gcc/ada/libgnarl/s-linux__riscv.ads +@@ -35,7 +35,6 @@ + -- Preelaborate. This package is designed to be a bottom-level (leaf) package + + with Interfaces.C; +-with System.Parameters; + + package System.Linux is + pragma Preelaborate; +@@ -44,25 +43,8 @@ package System.Linux is + -- Time -- + ---------- + +- subtype int is Interfaces.C.int; +- subtype long is Interfaces.C.long; +- subtype suseconds_t is Interfaces.C.long; +- type time_t is range -2 ** (System.Parameters.time_t_bits - 1) +- .. 2 ** (System.Parameters.time_t_bits - 1) - 1; + subtype clockid_t is Interfaces.C.int; + +- type timespec is record +- tv_sec : time_t; +- tv_nsec : long; +- end record; +- pragma Convention (C, timespec); +- +- type timeval is record +- tv_sec : time_t; +- tv_usec : suseconds_t; +- end record; +- pragma Convention (C, timeval); +- + ----------- + -- Errno -- + ----------- +@@ -125,8 +107,8 @@ package System.Linux is + -- struct_sigaction offsets + + sa_handler_pos : constant := 0; +- sa_mask_pos : constant := long'Size / 8; +- sa_flags_pos : constant := long'Size / 8 + 128; ++ sa_mask_pos : constant := Interfaces.C.long'Size / 8; ++ sa_flags_pos : constant := Interfaces.C.long'Size / 8 + 128; + + SA_SIGINFO : constant := 16#04#; + SA_ONSTACK : constant := 16#08000000#; +--- a/src/gcc/ada/libgnarl/s-linux__sparc.ads ++++ b/src/gcc/ada/libgnarl/s-linux__sparc.ads +@@ -36,7 +36,6 @@ + -- Preelaborate. This package is designed to be a bottom-level (leaf) package + + with Interfaces.C; +-with System.Parameters; + + package System.Linux is + pragma Preelaborate; +@@ -45,24 +44,8 @@ package System.Linux is + -- Time -- + ---------- + +- subtype long is Interfaces.C.long; +- subtype suseconds_t is Interfaces.C.long; +- type time_t is range -2 ** (System.Parameters.time_t_bits - 1) +- .. 2 ** (System.Parameters.time_t_bits - 1) - 1; + subtype clockid_t is Interfaces.C.int; + +- type timespec is record +- tv_sec : time_t; +- tv_nsec : long; +- end record; +- pragma Convention (C, timespec); +- +- type timeval is record +- tv_sec : time_t; +- tv_usec : suseconds_t; +- end record; +- pragma Convention (C, timeval); +- + ----------- + -- Errno -- + ----------- +--- a/src/gcc/ada/libgnarl/s-linux__x32.ads ++++ b/src/gcc/ada/libgnarl/s-linux__x32.ads +@@ -38,8 +38,6 @@ + + with Interfaces.C; + +-with System.Parameters; +- + package System.Linux is + pragma Preelaborate; + +@@ -47,25 +45,8 @@ package System.Linux is + -- Time -- + ---------- + +- subtype suseconds_t is Long_Long_Integer; +- -- Note that suseconds_t is 64 bits. +- type time_t is range -2 ** (System.Parameters.time_t_bits - 1) +- .. 2 ** (System.Parameters.time_t_bits - 1) - 1; + subtype clockid_t is Interfaces.C.int; + +- type timespec is record +- tv_sec : time_t; +- tv_nsec : Long_Long_Integer; +- -- Note that tv_nsec is 64 bits. +- end record; +- pragma Convention (C, timespec); +- +- type timeval is record +- tv_sec : time_t; +- tv_usec : suseconds_t; +- end record; +- pragma Convention (C, timeval); +- + ----------- + -- Errno -- + ----------- +--- a/src/gcc/ada/libgnarl/s-osinte__aix.adb ++++ b/src/gcc/ada/libgnarl/s-osinte__aix.adb +@@ -35,15 +35,6 @@ package body System.OS_Interface is + + use Interfaces.C; + +- ----------------- +- -- To_Duration -- +- ----------------- +- +- function To_Duration (TS : timespec) return Duration is +- begin +- return Duration (TS.tv_sec) + Duration (TS.tv_nsec) / 10#1#E9; +- end To_Duration; +- + ------------------------ + -- To_Target_Priority -- + ------------------------ +@@ -73,29 +64,6 @@ package body System.OS_Interface is + end To_Target_Priority; + + ----------------- +- -- To_Timespec -- +- ----------------- +- +- function To_Timespec (D : Duration) return timespec is +- S : time_t; +- F : Duration; +- +- begin +- S := time_t (Long_Long_Integer (D)); +- F := D - Duration (S); +- +- -- If F is negative due to a round-up, adjust for positive F value +- +- if F < 0.0 then +- S := S - 1; +- F := F + 1.0; +- end if; +- +- return timespec'(tv_sec => S, +- tv_nsec => long (Long_Long_Integer (F * 10#1#E9))); +- end To_Timespec; +- +- ----------------- + -- sched_yield -- + ----------------- + +--- a/src/gcc/ada/libgnarl/s-osinte__aix.ads ++++ b/src/gcc/ada/libgnarl/s-osinte__aix.ads +@@ -43,7 +43,7 @@ with Ada.Unchecked_Conversion; + with Interfaces.C; + with Interfaces.C.Extensions; + +-with System.Parameters; ++with System.C_Time; + + package System.OS_Interface is + pragma Preelaborate; +@@ -199,26 +199,18 @@ package System.OS_Interface is + Time_Slice_Supported : constant Boolean := True; + -- Indicates whether time slicing is supported + +- type timespec is private; +- + type clockid_t is new long_long; + + function clock_gettime + (clock_id : clockid_t; +- tp : access timespec) return int; ++ tp : access C_Time.timespec) return int; + pragma Import (C, clock_gettime, "clock_gettime"); + + function clock_getres + (clock_id : clockid_t; +- res : access timespec) return int; ++ res : access C_Time.timespec) return int; + pragma Import (C, clock_getres, "clock_getres"); + +- function To_Duration (TS : timespec) return Duration; +- pragma Inline (To_Duration); +- +- function To_Timespec (D : Duration) return timespec; +- pragma Inline (To_Timespec); +- + type struct_timezone is record + tz_minuteswest : int; + tz_dsttime : int; +@@ -419,7 +411,7 @@ package System.OS_Interface is + function pthread_cond_timedwait + (cond : access pthread_cond_t; + mutex : access pthread_mutex_t; +- abstime : access timespec) return int; ++ abstime : access C_Time.timespec) return int; + pragma Import (C, pthread_cond_timedwait, "pthread_cond_timedwait"); + + -------------------------- +@@ -542,15 +534,6 @@ private + + type pid_t is new int; + +- type time_t is range -2 ** (System.Parameters.time_t_bits - 1) +- .. 2 ** (System.Parameters.time_t_bits - 1) - 1; +- +- type timespec is record +- tv_sec : time_t; +- tv_nsec : long; +- end record; +- pragma Convention (C, timespec); +- + type pthread_attr_t is new System.Address; + pragma Convention (C, pthread_attr_t); + -- typedef struct __pt_attr *pthread_attr_t; +--- a/src/gcc/ada/libgnarl/s-osinte__android.adb ++++ /dev/null +@@ -1,74 +0,0 @@ +------------------------------------------------------------------------------- +--- -- +--- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS -- +--- -- +--- S Y S T E M . O S _ I N T E R F A C E -- +--- -- +--- B o d y -- +--- -- +--- Copyright (C) 1995-2023, AdaCore -- +--- -- +--- GNAT is free software; you can redistribute it and/or modify it under -- +--- terms of the GNU General Public License as published by the Free Soft- -- +--- ware Foundation; either version 3, or (at your option) any later ver- -- +--- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- +--- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- +--- or FITNESS FOR A PARTICULAR PURPOSE. -- +--- -- +--- As a special exception under Section 7 of GPL version 3, you are granted -- +--- additional permissions described in the GCC Runtime Library Exception, -- +--- version 3.1, as published by the Free Software Foundation. -- +--- -- +--- You should have received a copy of the GNU General Public License and -- +--- a copy of the GCC Runtime Library Exception along with this program; -- +--- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- +--- . -- +--- -- +--- GNARL was developed by the GNARL team at Florida State University. -- +--- Extensive contributions were provided by Ada Core Technologies, Inc. -- +--- -- +------------------------------------------------------------------------------- +- +--- This is an Android version of this package. +- +--- This package encapsulates all direct interfaces to OS services +--- that are needed by children of System. +- +-with Interfaces.C; use Interfaces.C; +- +-package body System.OS_Interface is +- +- ----------------- +- -- To_Duration -- +- ----------------- +- +- function To_Duration (TS : timespec) return Duration is +- begin +- return Duration (TS.tv_sec) + Duration (TS.tv_nsec) / 10#1#E9; +- end To_Duration; +- +- ----------------- +- -- To_Timespec -- +- ----------------- +- +- function To_Timespec (D : Duration) return timespec is +- S : time_t; +- F : Duration; +- +- begin +- S := time_t (Long_Long_Integer (D)); +- F := D - Duration (S); +- +- -- If F has negative value due to a round-up, adjust for positive F +- -- value. +- +- if F < 0.0 then +- S := S - 1; +- F := F + 1.0; +- end if; +- +- return timespec'(tv_sec => S, +- tv_nsec => long (Long_Long_Integer (F * 10#1#E9))); +- end To_Timespec; +- +-end System.OS_Interface; +--- a/src/gcc/ada/libgnarl/s-osinte__android.ads ++++ b/src/gcc/ada/libgnarl/s-osinte__android.ads +@@ -40,9 +40,9 @@ + + with Ada.Unchecked_Conversion; + with Interfaces.C; ++with System.C_Time; + with System.Linux; + with System.OS_Constants; +-with System.Parameters; + + package System.OS_Interface is + pragma Preelaborate; +@@ -204,25 +204,17 @@ package System.OS_Interface is + Time_Slice_Supported : constant Boolean := True; + -- Indicates whether time slicing is supported + +- type timespec is private; +- + type clockid_t is new int; + + function clock_gettime +- (clock_id : clockid_t; tp : access timespec) return int; ++ (clock_id : clockid_t; tp : access C_time.timespec) return int; + pragma Import (C, clock_gettime, "clock_gettime"); + + function clock_getres + (clock_id : clockid_t; +- res : access timespec) return int; ++ res : access C_Time.timespec) return int; + pragma Import (C, clock_getres, "clock_getres"); + +- function To_Duration (TS : timespec) return Duration; +- pragma Inline (To_Duration); +- +- function To_Timespec (D : Duration) return timespec; +- pragma Inline (To_Timespec); +- + function sysconf (name : int) return long; + pragma Import (C, sysconf); + +@@ -412,7 +404,7 @@ package System.OS_Interface is + function pthread_cond_timedwait + (cond : access pthread_cond_t; + mutex : access pthread_mutex_t; +- abstime : access timespec) return int; ++ abstime : access C_Time.timespec) return int; + pragma Import (C, pthread_cond_timedwait, "pthread_cond_timedwait"); + + -------------------------- +@@ -594,15 +586,6 @@ private + + type pid_t is new int; + +- type time_t is range -2 ** (System.Parameters.time_t_bits - 1) +- .. 2 ** (System.Parameters.time_t_bits - 1) - 1; +- +- type timespec is record +- tv_sec : time_t; +- tv_nsec : long; +- end record; +- pragma Convention (C, timespec); +- + type unsigned_long_long_t is mod 2 ** 64; + -- Local type only used to get the alignment of this type below + +--- a/src/gcc/ada/libgnarl/s-osinte__darwin.adb ++++ b/src/gcc/ada/libgnarl/s-osinte__darwin.adb +@@ -36,15 +36,6 @@ with Interfaces.C.Extensions; + package body System.OS_Interface is + use Interfaces.C; + +- ----------------- +- -- To_Duration -- +- ----------------- +- +- function To_Duration (TS : timespec) return Duration is +- begin +- return Duration (TS.tv_sec) + Duration (TS.tv_nsec) / 10#1#E9; +- end To_Duration; +- + ------------------------ + -- To_Target_Priority -- + ------------------------ +@@ -56,37 +47,13 @@ package body System.OS_Interface is + return Interfaces.C.int (Prio); + end To_Target_Priority; + +- ----------------- +- -- To_Timespec -- +- ----------------- +- +- function To_Timespec (D : Duration) return timespec is +- S : time_t; +- F : Duration; +- +- begin +- S := time_t (Long_Long_Integer (D)); +- F := D - Duration (S); +- +- -- If F has negative value due to a round-up, adjust for positive F +- -- value. +- +- if F < 0.0 then +- S := S - 1; +- F := F + 1.0; +- end if; +- +- return timespec'(tv_sec => S, +- tv_nsec => long (Long_Long_Integer (F * 10#1#E9))); +- end To_Timespec; +- + ------------------- + -- clock_gettime -- + ------------------- + + function clock_gettime + (clock_id : clockid_t; +- tp : access timespec) return int ++ tp : access C_Time.timespec) return int + is + pragma Unreferenced (clock_id); + +@@ -94,33 +61,18 @@ package body System.OS_Interface is + + use Interfaces; + +- type timeval is array (1 .. 3) of C.long; +- -- The timeval array is sized to contain long_long sec and long usec. +- -- If long_long'Size = long'Size then it will be overly large but that +- -- won't effect the implementation since it's not accessed directly. +- +- procedure timeval_to_duration +- (T : not null access timeval; +- sec : not null access C.Extensions.long_long; +- usec : not null access C.long); +- pragma Import (C, timeval_to_duration, "__gnat_timeval_to_duration"); +- +- Micro : constant := 10**6; +- sec : aliased C.Extensions.long_long; +- usec : aliased C.long; +- TV : aliased timeval; ++ TV : aliased C_Time.timeval; + Result : int; + + function gettimeofday +- (Tv : access timeval; ++ (Tv : access C_Time.timeval; + Tz : System.Address := System.Null_Address) return int; + pragma Import (C, gettimeofday, "gettimeofday"); + + begin + Result := gettimeofday (TV'Access, System.Null_Address); + pragma Assert (Result = 0); +- timeval_to_duration (TV'Access, sec'Access, usec'Access); +- tp.all := To_Timespec (Duration (sec) + Duration (usec) / Micro); ++ tp.all := C_Time.To_Timespec (TV); + return Result; + end clock_gettime; + +@@ -130,13 +82,12 @@ package body System.OS_Interface is + + function clock_getres + (clock_id : clockid_t; +- res : access timespec) return int ++ res : access C_Time.timespec) return int + is + pragma Unreferenced (clock_id); + + -- Darwin Threads don't have clock_getres. + +- Nano : constant := 10**9; + nsec : int := 0; + Result : int := -1; + +@@ -145,7 +96,7 @@ package body System.OS_Interface is + + begin + nsec := clock_get_res; +- res.all := To_Timespec (Duration (0.0) + Duration (nsec) / Nano); ++ res.all := C_Time.Nanoseconds_To_Timespec (nsec); + + if nsec > 0 then + Result := 0; +--- a/src/gcc/ada/libgnarl/s-osinte__darwin.ads ++++ b/src/gcc/ada/libgnarl/s-osinte__darwin.ads +@@ -39,8 +39,8 @@ + -- Elaborate_Body. It is designed to be a bottom-level (leaf) package. + + with Interfaces.C; ++with System.C_Time; + with System.OS_Constants; +-with System.Parameters; + + package System.OS_Interface is + pragma Preelaborate; +@@ -182,23 +182,15 @@ package System.OS_Interface is + Time_Slice_Supported : constant Boolean := True; + -- Indicates whether time slicing is supported + +- type timespec is private; +- + type clockid_t is new int; + + function clock_gettime + (clock_id : clockid_t; +- tp : access timespec) return int; ++ tp : access C_Time.timespec) return int; + + function clock_getres + (clock_id : clockid_t; +- res : access timespec) return int; +- +- function To_Duration (TS : timespec) return Duration; +- pragma Inline (To_Duration); +- +- function To_Timespec (D : Duration) return timespec; +- pragma Inline (To_Timespec); ++ res : access C_Time.timespec) return int; + + ------------------------- + -- Priority Scheduling -- +@@ -395,7 +387,7 @@ package System.OS_Interface is + function pthread_cond_timedwait + (cond : access pthread_cond_t; + mutex : access pthread_mutex_t; +- abstime : access timespec) return int; ++ abstime : access C_Time.timespec) return int; + pragma Import (C, pthread_cond_timedwait, "pthread_cond_timedwait"); + + -------------------------- +@@ -515,15 +507,6 @@ private + + type pid_t is new int32_t; + +- type time_t is range -2 ** (System.Parameters.time_t_bits - 1) +- .. 2 ** (System.Parameters.time_t_bits - 1) - 1; +- +- type timespec is record +- tv_sec : time_t; +- tv_nsec : long; +- end record; +- pragma Convention (C, timespec); +- + -- + -- Darwin specific signal implementation + -- +--- a/src/gcc/ada/libgnarl/s-osinte__dragonfly.adb ++++ b/src/gcc/ada/libgnarl/s-osinte__dragonfly.adb +@@ -69,15 +69,6 @@ package body System.OS_Interface is + null; + end pthread_init; + +- ----------------- +- -- To_Duration -- +- ----------------- +- +- function To_Duration (TS : timespec) return Duration is +- begin +- return Duration (TS.ts_sec) + Duration (TS.ts_nsec) / 10#1#E9; +- end To_Duration; +- + ------------------------ + -- To_Target_Priority -- + ------------------------ +@@ -89,28 +80,4 @@ package body System.OS_Interface is + return Interfaces.C.int (Prio); + end To_Target_Priority; + +- ----------------- +- -- To_Timespec -- +- ----------------- +- +- function To_Timespec (D : Duration) return timespec is +- S : time_t; +- F : Duration; +- +- begin +- S := time_t (Long_Long_Integer (D)); +- F := D - Duration (S); +- +- -- If F has negative value due to a round-up, adjust for positive F +- -- value. +- +- if F < 0.0 then +- S := S - 1; +- F := F + 1.0; +- end if; +- +- return timespec'(ts_sec => S, +- ts_nsec => long (Long_Long_Integer (F * 10#1#E9))); +- end To_Timespec; +- + end System.OS_Interface; +--- a/src/gcc/ada/libgnarl/s-osinte__dragonfly.ads ++++ b/src/gcc/ada/libgnarl/s-osinte__dragonfly.ads +@@ -43,7 +43,7 @@ with Ada.Unchecked_Conversion; + + with Interfaces.C; + +-with System.Parameters; ++with System.C_Time; + + package System.OS_Interface is + pragma Preelaborate; +@@ -197,30 +197,22 @@ package System.OS_Interface is + Time_Slice_Supported : constant Boolean := True; + -- Indicates whether time slicing is supported (i.e SCHED_RR is supported) + +- type timespec is private; +- +- function nanosleep (rqtp, rmtp : access timespec) return int; ++ function nanosleep (rqtp, rmtp : access C_Time.timespec) return int; + pragma Import (C, nanosleep, "nanosleep"); + + type clockid_t is new unsigned_long; + + function clock_getres + (clock_id : clockid_t; +- res : access timespec) return int; ++ res : access C_Time.timespec) return int; + pragma Import (C, clock_getres, "clock_getres"); + + function clock_gettime + (clock_id : clockid_t; +- tp : access timespec) ++ tp : access C_Time.timespec) + return int; + pragma Import (C, clock_gettime, "clock_gettime"); + +- function To_Duration (TS : timespec) return Duration; +- pragma Inline (To_Duration); +- +- function To_Timespec (D : Duration) return timespec; +- pragma Inline (To_Timespec); +- + type struct_timezone is record + tz_minuteswest : int; + tz_dsttime : int; +@@ -431,7 +423,7 @@ package System.OS_Interface is + function pthread_cond_timedwait + (cond : access pthread_cond_t; + mutex : access pthread_mutex_t; +- abstime : access timespec) return int; ++ abstime : access C_Time.timespec) return int; + pragma Import (C, pthread_cond_timedwait, "pthread_cond_timedwait"); + + Relative_Timed_Wait : constant Boolean := False; +@@ -635,15 +627,6 @@ private + + type pid_t is new int; + +- type time_t is range -2 ** (System.Parameters.time_t_bits - 1) +- .. 2 ** (System.Parameters.time_t_bits - 1) - 1; +- +- type timespec is record +- ts_sec : time_t; +- ts_nsec : long; +- end record; +- pragma Convention (C, timespec); +- + type pthread_t is new System.Address; + type pthread_attr_t is new System.Address; + type pthread_mutex_t is new System.Address; +--- a/src/gcc/ada/libgnarl/s-osinte__freebsd.adb ++++ b/src/gcc/ada/libgnarl/s-osinte__freebsd.adb +@@ -69,15 +69,6 @@ package body System.OS_Interface is + null; + end pthread_init; + +- ----------------- +- -- To_Duration -- +- ----------------- +- +- function To_Duration (TS : timespec) return Duration is +- begin +- return Duration (TS.ts_sec) + Duration (TS.ts_nsec) / 10#1#E9; +- end To_Duration; +- + ------------------------ + -- To_Target_Priority -- + ------------------------ +@@ -89,27 +80,4 @@ package body System.OS_Interface is + return Interfaces.C.int (Prio); + end To_Target_Priority; + +- ----------------- +- -- To_Timespec -- +- ----------------- +- +- function To_Timespec (D : Duration) return timespec is +- S : time_t; +- F : Duration; +- +- begin +- S := time_t (Long_Long_Integer (D)); +- F := D - Duration (S); +- +- -- If F has negative value due to a round-up, adjust for positive F +- +- if F < 0.0 then +- S := S - 1; +- F := F + 1.0; +- end if; +- +- return timespec'(ts_sec => S, +- ts_nsec => long (Long_Long_Integer (F * 10#1#E9))); +- end To_Timespec; +- + end System.OS_Interface; +--- a/src/gcc/ada/libgnarl/s-osinte__freebsd.ads ++++ b/src/gcc/ada/libgnarl/s-osinte__freebsd.ads +@@ -43,7 +43,7 @@ with Ada.Unchecked_Conversion; + + with Interfaces.C; + +-with System.Parameters; ++with System.C_Time; + + package System.OS_Interface is + pragma Preelaborate; +@@ -197,30 +197,22 @@ package System.OS_Interface is + Time_Slice_Supported : constant Boolean := True; + -- Indicates whether time slicing is supported (i.e SCHED_RR is supported) + +- type timespec is private; +- +- function nanosleep (rqtp, rmtp : access timespec) return int; ++ function nanosleep (rqtp, rmtp : access C_Time.timespec) return int; + pragma Import (C, nanosleep, "nanosleep"); + + type clockid_t is new int; + + function clock_getres + (clock_id : clockid_t; +- res : access timespec) return int; ++ res : access C_Time.timespec) return int; + pragma Import (C, clock_getres, "clock_getres"); + + function clock_gettime + (clock_id : clockid_t; +- tp : access timespec) ++ tp : access C_Time.timespec) + return int; + pragma Import (C, clock_gettime, "clock_gettime"); + +- function To_Duration (TS : timespec) return Duration; +- pragma Inline (To_Duration); +- +- function To_Timespec (D : Duration) return timespec; +- pragma Inline (To_Timespec); +- + type struct_timezone is record + tz_minuteswest : int; + tz_dsttime : int; +@@ -430,7 +422,7 @@ package System.OS_Interface is + function pthread_cond_timedwait + (cond : access pthread_cond_t; + mutex : access pthread_mutex_t; +- abstime : access timespec) return int; ++ abstime : access C_Time.timespec) return int; + pragma Import (C, pthread_cond_timedwait, "pthread_cond_timedwait"); + + -------------------------- +@@ -632,15 +624,6 @@ private + type pid_t is new int; + Self_PID : constant pid_t := 0; + +- type time_t is range -2 ** (System.Parameters.time_t_bits - 1) +- .. 2 ** (System.Parameters.time_t_bits - 1) - 1; +- +- type timespec is record +- ts_sec : time_t; +- ts_nsec : long; +- end record; +- pragma Convention (C, timespec); +- + type pthread_t is new System.Address; + type pthread_attr_t is new System.Address; + type pthread_mutex_t is new System.Address; +--- a/src/gcc/ada/libgnarl/s-osinte__gnu.adb ++++ b/src/gcc/ada/libgnarl/s-osinte__gnu.adb +@@ -93,15 +93,6 @@ package body System.OS_Interface is + return 0; + end pthread_setschedparam; + +- ----------------- +- -- To_Duration -- +- ----------------- +- +- function To_Duration (TS : timespec) return Duration is +- begin +- return Duration (TS.tv_sec) + Duration (TS.tv_nsec) / 10#1#E9; +- end To_Duration; +- + ------------------------ + -- To_Target_Priority -- + ------------------------ +@@ -113,28 +104,4 @@ package body System.OS_Interface is + return Interfaces.C.int (Prio); + end To_Target_Priority; + +- ----------------- +- -- To_Timespec -- +- ----------------- +- +- function To_Timespec (D : Duration) return timespec is +- S : time_t; +- F : Duration; +- +- begin +- S := time_t (Long_Long_Integer (D)); +- F := D - Duration (S); +- +- -- If F has negative value due to a round-up, adjust for positive F +- -- value. +- +- if F < 0.0 then +- S := S - 1; +- F := F + 1.0; +- end if; +- +- return timespec'(tv_sec => S, +- tv_nsec => long (Long_Long_Integer (F * 10#1#E9))); +- end To_Timespec; +- + end System.OS_Interface; +--- a/src/gcc/ada/libgnarl/s-osinte__gnu.ads ++++ b/src/gcc/ada/libgnarl/s-osinte__gnu.ads +@@ -39,7 +39,7 @@ + -- Preelaborate. This package is designed to be a bottom-level (leaf) package + + with Interfaces.C; +-with System.Parameters; ++with System.C_Time; + with Ada.Unchecked_Conversion; + + package System.OS_Interface is +@@ -207,9 +207,7 @@ package System.OS_Interface is + Time_Slice_Supported : constant Boolean := True; + -- Indicates whether time slicing is supported (i.e SCHED_RR is supported) + +- type timespec is private; +- +- function nanosleep (rqtp, rmtp : access timespec) return int; ++ function nanosleep (rqtp, rmtp : access C_Time.timespec) return int; + pragma Import (C, nanosleep, "nanosleep"); + + type clockid_t is new int; +@@ -218,21 +216,15 @@ package System.OS_Interface is + -- From: /usr/include/time.h + function clock_gettime + (clock_id : clockid_t; +- tp : access timespec) ++ tp : access C_Time.timespec) + return int; + pragma Import (C, clock_gettime, "clock_gettime"); + + function clock_getres + (clock_id : clockid_t; +- res : access timespec) return int; ++ res : access C_Time.timespec) return int; + pragma Import (C, clock_getres, "clock_getres"); + +- function To_Duration (TS : timespec) return Duration; +- pragma Inline (To_Duration); +- +- function To_Timespec (D : Duration) return timespec; +- pragma Inline (To_Timespec); +- + -- From: /usr/include/unistd.h + function sysconf (name : int) return long; + pragma Import (C, sysconf); +@@ -484,7 +476,7 @@ package System.OS_Interface is + function pthread_cond_timedwait + (cond : access pthread_cond_t; + mutex : access pthread_mutex_t; +- abstime : access timespec) return int; ++ abstime : access C_Time.timespec) return int; + pragma Import (C, pthread_cond_timedwait, "pthread_cond_timedwait"); + + Relative_Timed_Wait : constant Boolean := False; +@@ -653,15 +645,6 @@ private + + type pid_t is new int; + +- type time_t is range -2 ** (System.Parameters.time_t_bits - 1) +- .. 2 ** (System.Parameters.time_t_bits - 1) - 1; +- +- type timespec is record +- tv_sec : time_t; +- tv_nsec : long; +- end record; +- pragma Convention (C, timespec); +- + -- From: /usr/include/pthread/pthreadtypes.h: + -- typedef struct __pthread_attr pthread_attr_t; + -- /usr/include/i386-gnu/bits/thread-attr.h: struct __pthread_attr... +--- a/src/gcc/ada/libgnarl/s-osinte__hpux-dce.adb ++++ b/src/gcc/ada/libgnarl/s-osinte__hpux-dce.adb +@@ -40,38 +40,6 @@ with Interfaces.C; use Interfaces.C; + + package body System.OS_Interface is + +- ----------------- +- -- To_Duration -- +- ----------------- +- +- function To_Duration (TS : timespec) return Duration is +- begin +- return Duration (TS.tv_sec) + Duration (TS.tv_nsec) / 10#1#E9; +- end To_Duration; +- +- ----------------- +- -- To_Timespec -- +- ----------------- +- +- function To_Timespec (D : Duration) return timespec is +- S : time_t; +- F : Duration; +- +- begin +- S := time_t (Long_Long_Integer (D)); +- F := D - Duration (S); +- +- -- If F has negative value due to a round-up, adjust for positive F +- -- value. +- if F < 0.0 then +- S := S - 1; +- F := F + 1.0; +- end if; +- +- return timespec'(tv_sec => S, +- tv_nsec => long (Long_Long_Integer (F * 10#1#E9))); +- end To_Timespec; +- + ------------------------- + -- POSIX.1c Section 3 -- + ------------------------- +@@ -298,12 +266,12 @@ package body System.OS_Interface is + function pthread_cond_timedwait + (cond : access pthread_cond_t; + mutex : access pthread_mutex_t; +- abstime : access timespec) return int ++ abstime : access C_Time.timespec) return int + is + function pthread_cond_timedwait_base + (cond : access pthread_cond_t; + mutex : access pthread_mutex_t; +- abstime : access timespec) return int; ++ abstime : access C_Time.timespec) return int; + pragma Import (C, pthread_cond_timedwait_base, "pthread_cond_timedwait"); + + begin +--- a/src/gcc/ada/libgnarl/s-osinte__hpux-dce.ads ++++ b/src/gcc/ada/libgnarl/s-osinte__hpux-dce.ads +@@ -42,7 +42,7 @@ with Ada.Unchecked_Conversion; + + with Interfaces.C; + +-with System.Parameters; ++with System.C_Time; + + package System.OS_Interface is + pragma Preelaborate; +@@ -188,23 +188,15 @@ package System.OS_Interface is + -- Time -- + ---------- + +- type timespec is private; +- +- function nanosleep (rqtp, rmtp : access timespec) return int; ++ function nanosleep (rqtp, rmtp : access C_Time.timespec) return int; + pragma Import (C, nanosleep); + + type clockid_t is new int; + + function Clock_Gettime +- (Clock_Id : clockid_t; Tp : access timespec) return int; ++ (Clock_Id : clockid_t; Tp : access C_Time.timespec) return int; + pragma Import (C, Clock_Gettime); + +- function To_Duration (TS : timespec) return Duration; +- pragma Inline (To_Duration); +- +- function To_Timespec (D : Duration) return timespec; +- pragma Inline (To_Timespec); +- + ------------------------- + -- Priority Scheduling -- + ------------------------- +@@ -354,7 +346,7 @@ package System.OS_Interface is + function pthread_cond_timedwait + (cond : access pthread_cond_t; + mutex : access pthread_mutex_t; +- abstime : access timespec) return int; ++ abstime : access C_Time.timespec) return int; + pragma Inline (pthread_cond_timedwait); + -- DCE_THREADS has a nonstandard pthread_cond_timedwait + +@@ -446,15 +438,6 @@ private + + type pid_t is new int; + +- type time_t is range -2 ** (System.Parameters.time_t_bits - 1) +- .. 2 ** (System.Parameters.time_t_bits - 1) - 1; +- +- type timespec is record +- tv_sec : time_t; +- tv_nsec : long; +- end record; +- pragma Convention (C, timespec); +- + CLOCK_REALTIME : constant clockid_t := 1; + + type cma_t_address is new System.Address; +--- a/src/gcc/ada/libgnarl/s-osinte__hpux.ads ++++ b/src/gcc/ada/libgnarl/s-osinte__hpux.ads +@@ -42,7 +42,7 @@ with Ada.Unchecked_Conversion; + + with Interfaces.C; + +-with System.Parameters; ++with System.C_Time; + + package System.OS_Interface is + pragma Preelaborate; +@@ -180,26 +180,18 @@ package System.OS_Interface is + Time_Slice_Supported : constant Boolean := True; + -- Indicates whether time slicing is supported + +- type timespec is private; +- + type clockid_t is new int; + + function clock_gettime + (clock_id : clockid_t; +- tp : access timespec) return int; ++ tp : access C_Time.timespec) return int; + pragma Import (C, clock_gettime, "clock_gettime"); + + function clock_getres + (clock_id : clockid_t; +- res : access timespec) return int; ++ res : access C_Time.timespec) return int; + pragma Import (C, clock_getres, "clock_getres"); + +- function To_Duration (TS : timespec) return Duration; +- pragma Inline (To_Duration); +- +- function To_Timespec (D : Duration) return timespec; +- pragma Inline (To_Timespec); +- + type struct_timezone is record + tz_minuteswest : int; + tz_dsttime : int; +@@ -399,7 +391,7 @@ package System.OS_Interface is + function pthread_cond_timedwait + (cond : access pthread_cond_t; + mutex : access pthread_mutex_t; +- abstime : access timespec) return int; ++ abstime : access C_Time.timespec) return int; + pragma Import (C, pthread_cond_timedwait, "pthread_cond_timedwait"); + + -------------------------- +@@ -516,15 +508,6 @@ private + + type pid_t is new int; + +- type time_t is range -2 ** (System.Parameters.time_t_bits - 1) +- .. 2 ** (System.Parameters.time_t_bits - 1) - 1; +- +- type timespec is record +- tv_sec : time_t; +- tv_nsec : long; +- end record; +- pragma Convention (C, timespec); +- + type pthread_attr_t is new int; + type pthread_condattr_t is new int; + type pthread_mutexattr_t is new int; +--- a/src/gcc/ada/libgnarl/s-osinte__kfreebsd-gnu.ads ++++ b/src/gcc/ada/libgnarl/s-osinte__kfreebsd-gnu.ads +@@ -40,7 +40,7 @@ + + with Ada.Unchecked_Conversion; + with Interfaces.C; +-with System.Parameters; ++with System.C_Time; + + package System.OS_Interface is + pragma Preelaborate; +@@ -202,9 +202,7 @@ package System.OS_Interface is + Time_Slice_Supported : constant Boolean := True; + -- Indicates whether time slicing is supported (i.e SCHED_RR is supported) + +- type timespec is private; +- +- function nanosleep (rqtp, rmtp : access timespec) return int; ++ function nanosleep (rqtp, rmtp : access C_Time.timespec) return int; + pragma Import (C, nanosleep, "nanosleep"); + + type clockid_t is new int; +@@ -212,21 +210,15 @@ package System.OS_Interface is + + function clock_gettime + (clock_id : clockid_t; +- tp : access timespec) ++ tp : access C_Time.timespec) + return int; + pragma Import (C, clock_gettime, "clock_gettime"); + + function clock_getres + (clock_id : clockid_t; +- res : access timespec) return int; ++ res : access C_Time.timespec) return int; + pragma Import (C, clock_getres, "clock_getres"); + +- function To_Duration (TS : timespec) return Duration; +- pragma Inline (To_Duration); +- +- function To_Timespec (D : Duration) return timespec; +- pragma Inline (To_Timespec); +- + function sysconf (name : int) return long; + pragma Import (C, sysconf); + +@@ -427,7 +419,7 @@ package System.OS_Interface is + function pthread_cond_timedwait + (cond : access pthread_cond_t; + mutex : access pthread_mutex_t; +- abstime : access timespec) return int; ++ abstime : access C_Time.timespec) return int; + pragma Import (C, pthread_cond_timedwait, "pthread_cond_timedwait"); + + -------------------------- +@@ -599,15 +591,6 @@ private + + type pid_t is new int; + +- type time_t is range -2 ** (System.Parameters.time_t_bits - 1) +- .. 2 ** (System.Parameters.time_t_bits - 1) - 1; +- +- type timespec is record +- tv_sec : time_t; +- tv_nsec : long; +- end record; +- pragma Convention (C, timespec); +- + type pthread_attr_t is record + detachstate : int; + schedpolicy : int; +--- a/src/gcc/ada/libgnarl/s-osinte__linux.ads ++++ b/src/gcc/ada/libgnarl/s-osinte__linux.ads +@@ -40,6 +40,7 @@ + + with Ada.Unchecked_Conversion; + with Interfaces.C; ++with System.C_Time; + with System.Linux; + with System.OS_Constants; + +@@ -51,8 +52,6 @@ package System.OS_Interface is + + pragma Linker_Options ("-lpthread"); + +- use type System.Linux.time_t; +- + subtype int is Interfaces.C.int; + subtype char is Interfaces.C.char; + subtype short is Interfaces.C.short; +@@ -226,26 +225,17 @@ package System.OS_Interface is + -- Time -- + ---------- + +- subtype time_t is System.Linux.time_t; +- subtype timespec is System.Linux.timespec; +- subtype timeval is System.Linux.timeval; + subtype clockid_t is System.Linux.clockid_t; + + function clock_gettime +- (clock_id : clockid_t; tp : access timespec) return int; ++ (clock_id : clockid_t; tp : access C_Time.timespec) return int; + pragma Import (C, clock_gettime, "clock_gettime"); + + function clock_getres + (clock_id : clockid_t; +- res : access timespec) return int; ++ res : access C_Time.timespec) return int; + pragma Import (C, clock_getres, "clock_getres"); + +- function To_Duration (TS : timespec) return Duration; +- pragma Inline (To_Duration); +- +- function To_Timespec (D : Duration) return timespec; +- pragma Inline (To_Timespec); +- + function sysconf (name : int) return long; + pragma Import (C, sysconf); + +@@ -454,7 +444,7 @@ package System.OS_Interface is + function pthread_cond_timedwait + (cond : access pthread_cond_t; + mutex : access pthread_mutex_t; +- abstime : access timespec) return int; ++ abstime : access C_Time.timespec) return int; + pragma Import (C, pthread_cond_timedwait, "pthread_cond_timedwait"); + + -------------------------- +--- a/src/gcc/ada/libgnarl/s-osinte__lynxos178.adb ++++ b/src/gcc/ada/libgnarl/s-osinte__lynxos178.adb +@@ -85,15 +85,6 @@ package body System.OS_Interface is + return int (sysconf (SC_PAGESIZE)); + end Get_Page_Size; + +- ----------------- +- -- To_Duration -- +- ----------------- +- +- function To_Duration (TS : timespec) return Duration is +- begin +- return Duration (TS.tv_sec) + Duration (TS.tv_nsec) / 10#1#E9; +- end To_Duration; +- + ------------------------ + -- To_Target_Priority -- + ------------------------ +@@ -105,29 +96,6 @@ package body System.OS_Interface is + return Interfaces.C.int (Prio); + end To_Target_Priority; + +- ----------------- +- -- To_Timespec -- +- ----------------- +- +- function To_Timespec (D : Duration) return timespec is +- S : time_t; +- F : Duration; +- +- begin +- S := time_t (Long_Long_Integer (D)); +- F := D - Duration (S); +- +- -- If F is negative due to a round-up, adjust for positive F value +- +- if F < 0.0 then +- S := S - 1; +- F := F + 1.0; +- end if; +- +- return timespec'(tv_sec => S, +- tv_nsec => long (Long_Long_Integer (F * 10#1#E9))); +- end To_Timespec; +- + ------------- + -- sigwait -- + ------------- +--- a/src/gcc/ada/libgnarl/s-osinte__lynxos178e.ads ++++ b/src/gcc/ada/libgnarl/s-osinte__lynxos178e.ads +@@ -42,8 +42,8 @@ with Ada.Unchecked_Conversion; + + with Interfaces.C; + ++with System.C_Time; + with System.Multiprocessors; +-with System.Parameters; + + package System.OS_Interface is + pragma Preelaborate; +@@ -192,26 +192,18 @@ package System.OS_Interface is + Time_Slice_Supported : constant Boolean := True; + -- Indicates whether time slicing is supported + +- type timespec is private; +- + type clockid_t is new int; + + function clock_gettime + (clock_id : clockid_t; +- tp : access timespec) return int; ++ tp : access C_Time.timespec) return int; + pragma Import (C, clock_gettime, "clock_gettime"); + + function clock_getres + (clock_id : clockid_t; +- res : access timespec) return int; ++ res : access C_Time.timespec) return int; + pragma Import (C, clock_getres, "clock_getres"); + +- function To_Duration (TS : timespec) return Duration; +- pragma Inline (To_Duration); +- +- function To_Timespec (D : Duration) return timespec; +- pragma Inline (To_Timespec); +- + type struct_timezone is record + tz_minuteswest : int; + tz_dsttime : int; +@@ -219,8 +211,6 @@ package System.OS_Interface is + pragma Convention (C, struct_timezone); + type struct_timezone_ptr is access all struct_timezone; + +- type struct_timeval is private; +- + ------------------------- + -- Priority Scheduling -- + ------------------------- +@@ -414,7 +404,7 @@ package System.OS_Interface is + function pthread_cond_timedwait + (cond : access pthread_cond_t; + mutex : access pthread_mutex_t; +- abstime : access timespec) return int; ++ abstime : access C_Time.timespec) return int; + pragma Import (C, pthread_cond_timedwait, "pthread_cond_timedwait"); + + -------------------------- +@@ -540,23 +530,6 @@ private + + type pid_t is new long; + +- type time_t is range -2 ** (System.Parameters.time_t_bits - 1) +- .. 2 ** (System.Parameters.time_t_bits - 1) - 1; +- +- type suseconds_t is new int; +- +- type timespec is record +- tv_sec : time_t; +- tv_nsec : long; +- end record; +- pragma Convention (C, timespec); +- +- type struct_timeval is record +- tv_sec : time_t; +- tv_usec : suseconds_t; +- end record; +- pragma Convention (C, struct_timeval); +- + type st_attr is record + stksize : int; + prio : int; +--- a/src/gcc/ada/libgnarl/s-osinte__posix.adb ++++ b/src/gcc/ada/libgnarl/s-osinte__posix.adb +@@ -58,15 +58,6 @@ package body System.OS_Interface is + null; + end pthread_init; + +- ----------------- +- -- To_Duration -- +- ----------------- +- +- function To_Duration (TS : timespec) return Duration is +- begin +- return Duration (TS.tv_sec) + Duration (TS.tv_nsec) / 10#1#E9; +- end To_Duration; +- + ------------------------ + -- To_Target_Priority -- + ------------------------ +@@ -78,28 +69,4 @@ package body System.OS_Interface is + return Interfaces.C.int (Prio); + end To_Target_Priority; + +- ----------------- +- -- To_Timespec -- +- ----------------- +- +- function To_Timespec (D : Duration) return timespec is +- S : time_t; +- F : Duration; +- +- begin +- S := time_t (Long_Long_Integer (D)); +- F := D - Duration (S); +- +- -- If F has negative value due to a round-up, adjust for positive F +- -- value. +- +- if F < 0.0 then +- S := S - 1; +- F := F + 1.0; +- end if; +- +- return timespec'(tv_sec => S, +- tv_nsec => long (Long_Long_Integer (F * 10#1#E9))); +- end To_Timespec; +- + end System.OS_Interface; +--- a/src/gcc/ada/libgnarl/s-osinte__qnx.adb ++++ b/src/gcc/ada/libgnarl/s-osinte__qnx.adb +@@ -70,15 +70,6 @@ package body System.OS_Interface is + null; + end pthread_init; + +- ----------------- +- -- To_Duration -- +- ----------------- +- +- function To_Duration (TS : timespec) return Duration is +- begin +- return Duration (TS.tv_sec) + Duration (TS.tv_nsec) / 10#1#E9; +- end To_Duration; +- + ------------------------ + -- To_Target_Priority -- + ------------------------ +@@ -90,28 +81,4 @@ package body System.OS_Interface is + return Interfaces.C.int (Prio) + 1; + end To_Target_Priority; + +- ----------------- +- -- To_Timespec -- +- ----------------- +- +- function To_Timespec (D : Duration) return timespec is +- S : time_t; +- F : Duration; +- +- begin +- S := time_t (Long_Long_Integer (D)); +- F := D - Duration (S); +- +- -- If F has negative value due to a round-up, adjust for positive F +- -- value. +- +- if F < 0.0 then +- S := S - 1; +- F := F + 1.0; +- end if; +- +- return timespec'(tv_sec => S, +- tv_nsec => long (Long_Long_Integer (F * 10#1#E9))); +- end To_Timespec; +- + end System.OS_Interface; +--- a/src/gcc/ada/libgnarl/s-osinte__qnx.ads ++++ b/src/gcc/ada/libgnarl/s-osinte__qnx.ads +@@ -40,7 +40,7 @@ + with Ada.Unchecked_Conversion; + with Interfaces.C; + with System.OS_Constants; +-with System.Parameters; ++with System.C_Time; + + package System.OS_Interface is + pragma Preelaborate; +@@ -210,25 +210,17 @@ package System.OS_Interface is + Time_Slice_Supported : constant Boolean := True; + -- Indicates whether time slicing is supported + +- type timespec is private; +- + type clockid_t is new int; + + function clock_gettime +- (clock_id : clockid_t; tp : access timespec) return int; ++ (clock_id : clockid_t; tp : access C_Time.timespec) return int; + pragma Import (C, clock_gettime, "clock_gettime"); + + function clock_getres + (clock_id : clockid_t; +- res : access timespec) return int; ++ res : access C_Time.timespec) return int; + pragma Import (C, clock_getres, "clock_getres"); + +- function To_Duration (TS : timespec) return Duration; +- pragma Inline (To_Duration); +- +- function To_Timespec (D : Duration) return timespec; +- pragma Inline (To_Timespec); +- + ------------------------- + -- Priority Scheduling -- + ------------------------- +@@ -415,7 +407,7 @@ package System.OS_Interface is + function pthread_cond_timedwait + (cond : access pthread_cond_t; + mutex : access pthread_mutex_t; +- abstime : access timespec) return int; ++ abstime : access C_Time.timespec) return int; + pragma Import (C, pthread_cond_timedwait, "pthread_cond_timedwait"); + + -------------------------- +@@ -567,15 +559,6 @@ private + + type pid_t is new int; + +- type time_t is range -2 ** (System.Parameters.time_t_bits - 1) +- .. 2 ** (System.Parameters.time_t_bits - 1) - 1; +- +- type timespec is record +- tv_sec : time_t; +- tv_nsec : long; +- end record; +- pragma Convention (C, timespec); +- + type unsigned_long_long_t is mod 2 ** 64; + -- Local type only used to get the alignment of this type below + +--- a/src/gcc/ada/libgnarl/s-osinte__rtems.adb ++++ b/src/gcc/ada/libgnarl/s-osinte__rtems.adb +@@ -92,15 +92,6 @@ package body System.OS_Interface is + return int + with Import, External_Name => "rtems_semaphore_release", Convention => C; + +- ----------------- +- -- To_Duration -- +- ----------------- +- +- function To_Duration (TS : timespec) return Duration is +- begin +- return Duration (TS.tv_sec) + Duration (TS.tv_nsec) / 10#1#E9; +- end To_Duration; +- + ------------------------ + -- To_Target_Priority -- + ------------------------ +@@ -112,27 +103,6 @@ package body System.OS_Interface is + return Interfaces.C.int (Prio); + end To_Target_Priority; + +- ----------------- +- -- To_Timespec -- +- ----------------- +- +- function To_Timespec (D : Duration) return timespec is +- S : time_t; +- F : Duration; +- begin +- S := time_t (Long_Long_Integer (D)); +- F := D - Duration (S); +- +- -- If F has negative value due to round-up, adjust for positive F value +- +- if F < 0.0 then +- S := S - 1; +- F := F + 1.0; +- end if; +- return timespec'(tv_sec => S, +- tv_nsec => long (Long_Long_Integer (F * 10#1#E9))); +- end To_Timespec; +- + ----------------------------- + -- Binary_Semaphore_Create -- + ----------------------------- +--- a/src/gcc/ada/libgnarl/s-osinte__rtems.ads ++++ b/src/gcc/ada/libgnarl/s-osinte__rtems.ads +@@ -51,8 +51,8 @@ + -- It is designed to be a bottom-level (leaf) package. + + with Interfaces.C; ++with System.C_Time; + with System.OS_Constants; +-with System.Parameters; + + package System.OS_Interface is + pragma Preelaborate; +@@ -179,8 +179,6 @@ package System.OS_Interface is + Time_Slice_Supported : constant Boolean := True; + -- Indicates whether time slicing is supported (i.e SCHED_RR is supported) + +- type timespec is private; +- + type clockid_t is new int; + + CLOCK_REALTIME : constant clockid_t; +@@ -188,20 +186,14 @@ package System.OS_Interface is + + function clock_gettime + (clock_id : clockid_t; +- tp : access timespec) return int; ++ tp : access C_Time.timespec) return int; + pragma Import (C, clock_gettime, "clock_gettime"); + + function clock_getres + (clock_id : clockid_t; +- res : access timespec) return int; ++ res : access C_Time.timespec) return int; + pragma Import (C, clock_getres, "clock_getres"); + +- function To_Duration (TS : timespec) return Duration; +- pragma Inline (To_Duration); +- +- function To_Timespec (D : Duration) return timespec; +- pragma Inline (To_Timespec); +- + ------------------------- + -- Priority Scheduling -- + ------------------------- +@@ -426,7 +418,7 @@ package System.OS_Interface is + function pthread_cond_timedwait + (cond : access pthread_cond_t; + mutex : access pthread_mutex_t; +- abstime : access timespec) return int; ++ abstime : access C_Time.timespec) return int; + pragma Import (C, pthread_cond_timedwait, "pthread_cond_timedwait"); + + -------------------------- +@@ -452,8 +444,8 @@ package System.OS_Interface is + type struct_sched_param is record + sched_priority : int; + ss_low_priority : int; +- ss_replenish_period : timespec; +- ss_initial_budget : timespec; ++ ss_replenish_period : C_Time.timespec; ++ ss_initial_budget : C_Time.timespec; + sched_ss_max_repl : int; + end record; + pragma Convention (C, struct_sched_param); +@@ -589,15 +581,6 @@ private + + type pid_t is new int; + +- type time_t is range -2 ** (System.Parameters.time_t_bits - 1) +- .. 2 ** (System.Parameters.time_t_bits - 1) - 1; +- +- type timespec is record +- tv_sec : time_t; +- tv_nsec : long; +- end record; +- pragma Convention (C, timespec); +- + CLOCK_REALTIME : constant clockid_t := System.OS_Constants.CLOCK_REALTIME; + CLOCK_MONOTONIC : constant clockid_t := System.OS_Constants.CLOCK_MONOTONIC; + +--- a/src/gcc/ada/libgnarl/s-osinte__solaris.adb ++++ b/src/gcc/ada/libgnarl/s-osinte__solaris.adb +@@ -35,42 +35,8 @@ + -- This package encapsulates all direct interfaces to OS services + -- that are needed by children of System. + +-with Interfaces.C; use Interfaces.C; +- + package body System.OS_Interface is + +- ----------------- +- -- To_Duration -- +- ----------------- +- +- function To_Duration (TS : timespec) return Duration is +- begin +- return Duration (TS.tv_sec) + Duration (TS.tv_nsec) / 10#1#E9; +- end To_Duration; +- +- ----------------- +- -- To_Timespec -- +- ----------------- +- +- function To_Timespec (D : Duration) return timespec is +- S : time_t; +- F : Duration; +- +- begin +- S := time_t (Long_Long_Integer (D)); +- F := D - Duration (S); +- +- -- If F has negative value due to a round-up, adjust for positive F +- +- if F < 0.0 then +- S := S - 1; +- F := F + 1.0; +- end if; +- +- return timespec'(tv_sec => S, +- tv_nsec => long (Long_Long_Integer (F * 10#1#E9))); +- end To_Timespec; +- + ------------------ + -- pthread_init -- + ------------------ +--- a/src/gcc/ada/libgnarl/s-osinte__solaris.ads ++++ b/src/gcc/ada/libgnarl/s-osinte__solaris.ads +@@ -42,7 +42,7 @@ with Interfaces.C; + + with Ada.Unchecked_Conversion; + +-with System.Parameters; ++with System.C_Time; + + package System.OS_Interface is + pragma Preelaborate; +@@ -240,24 +240,16 @@ package System.OS_Interface is + -- Time -- + ---------- + +- type timespec is private; +- + type clockid_t is new int; + + function clock_gettime +- (clock_id : clockid_t; tp : access timespec) return int; ++ (clock_id : clockid_t; tp : access C_Time.timespec) return int; + pragma Import (C, clock_gettime, "clock_gettime"); + + function clock_getres +- (clock_id : clockid_t; res : access timespec) return int; ++ (clock_id : clockid_t; res : access C_Time.timespec) return int; + pragma Import (C, clock_getres, "clock_getres"); + +- function To_Duration (TS : timespec) return Duration; +- pragma Inline (To_Duration); +- +- function To_Timespec (D : Duration) return timespec; +- pragma Inline (To_Timespec); +- + function sysconf (name : int) return long; + pragma Import (C, sysconf); + +@@ -346,7 +338,7 @@ package System.OS_Interface is + function cond_timedwait + (cond : access cond_t; + mutex : access mutex_t; +- abstime : access timespec) return int; ++ abstime : access C_Time.timespec) return int; + pragma Import (C, cond_timedwait, "cond_timedwait"); + + function cond_signal (cond : access cond_t) return int; +@@ -525,15 +517,6 @@ private + + type pid_t is new long; + +- type time_t is range -2 ** (System.Parameters.time_t_bits - 1) +- .. 2 ** (System.Parameters.time_t_bits - 1) - 1; +- +- type timespec is record +- tv_sec : time_t; +- tv_nsec : long; +- end record; +- pragma Convention (C, timespec); +- + type array_type_9 is array (0 .. 3) of unsigned_char; + type record_type_3 is record + flag : array_type_9; +--- a/src/gcc/ada/libgnarl/s-osinte__vxworks.adb ++++ b/src/gcc/ada/libgnarl/s-osinte__vxworks.adb +@@ -41,38 +41,6 @@ package body System.OS_Interface is + Low_Priority : constant := 255; + -- VxWorks native (default) lowest scheduling priority + +- ----------------- +- -- To_Duration -- +- ----------------- +- +- function To_Duration (TS : timespec) return Duration is +- begin +- return Duration (TS.ts_sec) + Duration (TS.ts_nsec) / 10#1#E9; +- end To_Duration; +- +- ----------------- +- -- To_Timespec -- +- ----------------- +- +- function To_Timespec (D : Duration) return timespec is +- S : time_t; +- F : Duration; +- +- begin +- S := time_t (Long_Long_Integer (D)); +- F := D - Duration (S); +- +- -- If F is negative due to a round-up, adjust for positive F value +- +- if F < 0.0 then +- S := S - 1; +- F := F + 1.0; +- end if; +- +- return timespec'(ts_sec => S, +- ts_nsec => long (Long_Long_Integer (F * 10#1#E9))); +- end To_Timespec; +- + ------------------------- + -- To_VxWorks_Priority -- + ------------------------- +--- a/src/gcc/ada/libgnarl/s-osinte__vxworks.ads ++++ b/src/gcc/ada/libgnarl/s-osinte__vxworks.ads +@@ -39,10 +39,10 @@ + -- Preelaborate. This package is designed to be a bottom-level (leaf) package. + + with Interfaces.C; ++with System.C_Time; + with System.VxWorks; + with System.VxWorks.Ext; + with System.Multiprocessors; +-with System.Parameters; + + package System.OS_Interface is + pragma Preelaborate; +@@ -243,37 +243,13 @@ package System.OS_Interface is + -- Time -- + ---------- + +- type time_t is range -2 ** (System.Parameters.time_t_bits - 1) +- .. 2 ** (System.Parameters.time_t_bits - 1) - 1; +- -- Time_t here used to be unsigned to match the VxWorks header declaration. +- -- The header declaration has changed in newer releases and is now signed +- -- for applications. +- +- type timespec is record +- ts_sec : time_t; +- ts_nsec : long; +- end record; +- pragma Convention (C, timespec); +- + type clockid_t is new int; + +- function To_Duration (TS : timespec) return Duration; +- pragma Inline (To_Duration); +- +- function To_Timespec (D : Duration) return timespec; +- pragma Inline (To_Timespec); +- -- Convert a Duration value to a timespec value. Note that in VxWorks, +- -- timespec is always non-negative (since time_t is defined above as +- -- unsigned long). This means that there is a potential problem if a +- -- negative argument is passed for D. However, in actual usage, the +- -- value of the input argument D is always non-negative, so no problem +- -- arises in practice. +- + function To_Clock_Ticks (D : Duration) return int; + -- Convert a duration value (in seconds) into clock ticks + + function clock_gettime +- (clock_id : clockid_t; tp : access timespec) return int; ++ (clock_id : clockid_t; tp : access C_Time.timespec) return int; + pragma Import (C, clock_gettime, "clock_gettime"); + + ---------------------- +--- a/src/gcc/ada/libgnarl/s-osinte__x32.adb ++++ b/src/gcc/ada/libgnarl/s-osinte__x32.adb +@@ -59,15 +59,6 @@ package body System.OS_Interface is + null; + end pthread_init; + +- ----------------- +- -- To_Duration -- +- ----------------- +- +- function To_Duration (TS : timespec) return Duration is +- begin +- return Duration (TS.tv_sec) + Duration (TS.tv_nsec) / 10#1#E9; +- end To_Duration; +- + ------------------------ + -- To_Target_Priority -- + ------------------------ +@@ -79,28 +70,4 @@ package body System.OS_Interface is + return Interfaces.C.int (Prio); + end To_Target_Priority; + +- ----------------- +- -- To_Timespec -- +- ----------------- +- +- function To_Timespec (D : Duration) return timespec is +- S : time_t; +- F : Duration; +- +- begin +- S := time_t (Long_Long_Integer (D)); +- F := D - Duration (S); +- +- -- If F has negative value due to a round-up, adjust for positive F +- -- value. +- +- if F < 0.0 then +- S := S - 1; +- F := F + 1.0; +- end if; +- +- return timespec'(tv_sec => S, +- tv_nsec => Long_Long_Integer (F * 10#1#E9)); +- end To_Timespec; +- + end System.OS_Interface; +--- a/src/gcc/ada/libgnarl/s-qnx.ads ++++ b/src/gcc/ada/libgnarl/s-qnx.ads +@@ -37,8 +37,6 @@ + + with Interfaces.C; + +-with System.Parameters; +- + package System.QNX is + pragma Preelaborate; + +@@ -47,23 +45,8 @@ package System.QNX is + ---------- + + subtype long is Interfaces.C.long; +- subtype suseconds_t is Interfaces.C.long; +- type time_t is range -2 ** (System.Parameters.time_t_bits - 1) +- .. 2 ** (System.Parameters.time_t_bits - 1) - 1; + subtype clockid_t is Interfaces.C.int; + +- type timespec is record +- tv_sec : time_t; +- tv_nsec : long; +- end record; +- pragma Convention (C, timespec); +- +- type timeval is record +- tv_sec : time_t; +- tv_usec : suseconds_t; +- end record; +- pragma Convention (C, timeval); +- + ----------- + -- Errno -- + ----------- +--- a/src/gcc/ada/libgnarl/s-taprop__hpux-dce.adb ++++ b/src/gcc/ada/libgnarl/s-taprop__hpux-dce.adb +@@ -38,6 +38,7 @@ with Ada.Unchecked_Conversion; + + with Interfaces.C; + ++with System.C_Time; + with System.Tasking.Debug; + with System.Interrupt_Management; + with System.OS_Constants; +@@ -426,7 +427,7 @@ package body System.Task_Primitives.Oper + + Check_Time : constant Duration := Monotonic_Clock; + Abs_Time : Duration; +- Request : aliased timespec; ++ Request : aliased C_Time.timespec; + Result : Interfaces.C.int; + + begin +@@ -439,7 +440,7 @@ package body System.Task_Primitives.Oper + else Duration'Min (Check_Time + Max_Sensible_Delay, Time)); + + if Abs_Time > Check_Time then +- Request := To_Timespec (Abs_Time); ++ Request := C_Time.To_Timespec (Abs_Time); + + loop + exit when Self_ID.Pending_ATC_Level < Self_ID.ATC_Nesting_Level; +@@ -476,7 +477,7 @@ package body System.Task_Primitives.Oper + is + Check_Time : constant Duration := Monotonic_Clock; + Abs_Time : Duration; +- Request : aliased timespec; ++ Request : aliased C_Time.timespec; + + Result : Interfaces.C.int; + pragma Warnings (Off, Result); +@@ -490,7 +491,7 @@ package body System.Task_Primitives.Oper + else Duration'Min (Check_Time + Max_Sensible_Delay, Time)); + + if Abs_Time > Check_Time then +- Request := To_Timespec (Abs_Time); ++ Request := C_Time.To_Timespec (Abs_Time); + Self_ID.Common.State := Delay_Sleep; + + loop +@@ -521,12 +522,12 @@ package body System.Task_Primitives.Oper + --------------------- + + function Monotonic_Clock return Duration is +- TS : aliased timespec; ++ TS : aliased C_Time.timespec; + Result : Interfaces.C.int; + begin + Result := Clock_Gettime (OSC.CLOCK_RT_Ada, TS'Unchecked_Access); + pragma Assert (Result = 0); +- return To_Duration (TS); ++ return C_Time.To_Duration (TS); + end Monotonic_Clock; + + ------------------- +--- a/src/gcc/ada/libgnarl/s-taprop__solaris.adb ++++ b/src/gcc/ada/libgnarl/s-taprop__solaris.adb +@@ -36,6 +36,7 @@ + + with Interfaces.C; + ++with System.C_Time; + with System.Multiprocessors; + with System.Tasking.Debug; + with System.Interrupt_Management; +@@ -759,12 +760,12 @@ package body System.Task_Primitives.Oper + --------------------- + + function Monotonic_Clock return Duration is +- TS : aliased timespec; ++ TS : aliased C_Time.timespec; + Result : Interfaces.C.int; + begin + Result := clock_gettime (OSC.CLOCK_RT_Ada, TS'Unchecked_Access); + pragma Assert (Result = 0); +- return To_Duration (TS); ++ return C_Time.To_Duration (TS); + end Monotonic_Clock; + + ------------------- +@@ -772,13 +773,13 @@ package body System.Task_Primitives.Oper + ------------------- + + function RT_Resolution return Duration is +- TS : aliased timespec; ++ TS : aliased C_Time.timespec; + Result : Interfaces.C.int; + begin + Result := clock_getres (OSC.CLOCK_REALTIME, TS'Unchecked_Access); + pragma Assert (Result = 0); + +- return To_Duration (TS); ++ return C_Time.To_Duration (TS); + end RT_Resolution; + + ----------- +@@ -1173,7 +1174,7 @@ package body System.Task_Primitives.Oper + Base_Time : constant Duration := Monotonic_Clock; + Check_Time : Duration := Base_Time; + Abs_Time : Duration; +- Request : aliased timespec; ++ Request : aliased C_Time.timespec; + Result : Interfaces.C.int; + + begin +@@ -1187,7 +1188,7 @@ package body System.Task_Primitives.Oper + else Duration'Min (Check_Time + Max_Sensible_Delay, Time)); + + if Abs_Time > Check_Time then +- Request := To_Timespec (Abs_Time); ++ Request := C_Time.To_Timespec (Abs_Time); + loop + exit when Self_ID.Pending_ATC_Level < Self_ID.ATC_Nesting_Level; + +@@ -1228,7 +1229,7 @@ package body System.Task_Primitives.Oper + Base_Time : constant Duration := Monotonic_Clock; + Check_Time : Duration := Base_Time; + Abs_Time : Duration; +- Request : aliased timespec; ++ Request : aliased C_Time.timespec; + Result : Interfaces.C.int; + Yielded : Boolean := False; + +@@ -1241,7 +1242,7 @@ package body System.Task_Primitives.Oper + else Duration'Min (Check_Time + Max_Sensible_Delay, Time)); + + if Abs_Time > Check_Time then +- Request := To_Timespec (Abs_Time); ++ Request := C_Time.To_Timespec (Abs_Time); + Self_ID.Common.State := Delay_Sleep; + + pragma Assert (Check_Sleep (Delay_Sleep)); +--- a/src/gcc/ada/libgnarl/s-taprop__vxworks.adb ++++ b/src/gcc/ada/libgnarl/s-taprop__vxworks.adb +@@ -38,6 +38,7 @@ with Ada.Unchecked_Conversion; + + with Interfaces.C; + ++with System.C_Time; + with System.Multiprocessors; + with System.Tasking.Debug; + with System.Interrupt_Management; +@@ -679,12 +680,12 @@ package body System.Task_Primitives.Oper + --------------------- + + function Monotonic_Clock return Duration is +- TS : aliased timespec; ++ TS : aliased C_Time.timespec; + Result : int; + begin + Result := clock_gettime (OSC.CLOCK_RT_Ada, TS'Unchecked_Access); + pragma Assert (Result = 0); +- return To_Duration (TS); ++ return C_Time.To_Duration (TS); + end Monotonic_Clock; + + ------------------- +--- a/src/gcc/ada/libgnarl/s-tpopmo.adb ++++ b/src/gcc/ada/libgnarl/s-tpopmo.adb +@@ -31,6 +31,8 @@ + + -- This is the Monotonic version of this package for Posix and Linux targets. + ++with System.C_Time; ++ + separate (System.Task_Primitives.Operations) + package body Monotonic is + +@@ -54,14 +56,14 @@ package body Monotonic is + --------------------- + + function Monotonic_Clock return Duration is +- TS : aliased timespec; ++ TS : aliased C_Time.timespec; + Result : Interfaces.C.int; + begin + Result := clock_gettime + (clock_id => OSC.CLOCK_RT_Ada, tp => TS'Unchecked_Access); + pragma Assert (Result = 0); + +- return To_Duration (TS); ++ return C_Time.To_Duration (TS); + end Monotonic_Clock; + + ------------------- +@@ -69,14 +71,14 @@ package body Monotonic is + ------------------- + + function RT_Resolution return Duration is +- TS : aliased timespec; ++ TS : aliased C_Time.timespec; + Result : Interfaces.C.int; + + begin + Result := clock_getres (OSC.CLOCK_REALTIME, TS'Unchecked_Access); + pragma Assert (Result = 0); + +- return To_Duration (TS); ++ return C_Time.To_Duration (TS); + end RT_Resolution; + + ---------------------- +@@ -150,7 +152,7 @@ package body Monotonic is + Abs_Time : Duration; + P_Abs_Time : Duration; + +- Request : aliased timespec; ++ Request : aliased C_Time.timespec; + Result : Interfaces.C.int; + Exit_Outer : Boolean := False; + +@@ -184,7 +186,7 @@ package body Monotonic is + end if; + pragma Warnings (On); + +- Request := To_Timespec (P_Abs_Time); ++ Request := C_Time.To_Timespec (P_Abs_Time); + + Inner : loop + exit Outer +@@ -236,7 +238,7 @@ package body Monotonic is + Check_Time : Duration; + Abs_Time : Duration; + P_Abs_Time : Duration; +- Request : aliased timespec; ++ Request : aliased C_Time.timespec; + + Result : Interfaces.C.int; + Exit_Outer : Boolean := False; +@@ -271,7 +273,7 @@ package body Monotonic is + end if; + pragma Warnings (On); + +- Request := To_Timespec (P_Abs_Time); ++ Request := C_Time.To_Timespec (P_Abs_Time); + + Inner : loop + exit Outer +--- a/src/gcc/ada/libgnat/g-socket.adb ++++ b/src/gcc/ada/libgnat/g-socket.adb +@@ -45,6 +45,7 @@ pragma Warnings (Off, GNAT.Sockets.Linke + with GNAT.Sockets.Poll; + + with System; use System; ++with System.C_Time; + with System.Communication; use System.Communication; + with System.CRTL; use System.CRTL; + with System.Task_Lock; +@@ -178,13 +179,6 @@ package body GNAT.Sockets is + function Value (S : System.Address) return String; + -- Same as Interfaces.C.Strings.Value but taking a System.Address + +- function To_Timeval (Val : Timeval_Duration) return Timeval; +- -- Separate Val in seconds and microseconds +- +- function To_Duration (Val : Timeval) return Timeval_Duration; +- -- Reconstruct a Duration value from a Timeval record (seconds and +- -- microseconds). +- + function Dedot (Value : String) return String + is (if Value /= "" and then Value (Value'Last) = '.' + then Value (Value'First .. Value'Last - 1) +@@ -527,7 +521,7 @@ package body GNAT.Sockets is + Res : C.int; + Last : C.int; + RSig : Socket_Type := No_Socket; +- TVal : aliased Timeval; ++ TVal : aliased System.C_Time.timeval; + TPtr : Timeval_Access; + + begin +@@ -542,7 +536,7 @@ package body GNAT.Sockets is + if Timeout = Forever then + TPtr := null; + else +- TVal := To_Timeval (Timeout); ++ TVal := System.C_Time.To_Timeval (Timeout); + TPtr := TVal'Unchecked_Access; + end if; + +@@ -1417,7 +1411,7 @@ package body GNAT.Sockets is + V4 : aliased C.int; + U4 : aliased C.unsigned; + V1 : aliased C.unsigned_char; +- VT : aliased Timeval; ++ VT : aliased System.C_Time.timeval; + Len : aliased C.int; + Add : System.Address; + Res : C.int; +@@ -1586,8 +1580,10 @@ package body GNAT.Sockets is + Opt.Timeout := Duration (U4) / 1000; + end if; + ++ elsif System.C_Time.In_Duration (VT) then ++ Opt.Timeout := System.C_Time.To_Duration (VT); + else +- Opt.Timeout := To_Duration (VT); ++ Opt.Timeout := Forever; + end if; + end case; + +@@ -2616,7 +2612,7 @@ package body GNAT.Sockets is + V4 : aliased C.int; + U4 : aliased C.unsigned; + V1 : aliased C.unsigned_char; +- VT : aliased Timeval; ++ VT : aliased System.C_Time.timeval; + Len : C.int; + Add : System.Address := Null_Address; + Res : C.int; +@@ -2750,7 +2746,7 @@ package body GNAT.Sockets is + end if; + + else +- VT := To_Timeval (Option.Timeout); ++ VT := System.C_Time.To_Timeval (Option.Timeout); + Len := VT'Size / 8; + Add := VT'Address; + end if; +@@ -2843,33 +2839,6 @@ package body GNAT.Sockets is + return Integer (Socket); + end To_C; + +- ----------------- +- -- To_Duration -- +- ----------------- +- +- function To_Duration (Val : Timeval) return Timeval_Duration is +- Max_D : constant Long_Long_Integer := Long_Long_Integer (Forever - 0.5); +- Tv_sec_64 : constant Boolean := SOSC.SIZEOF_tv_sec = 8; +- -- Need to separate this condition into the constant declaration to +- -- avoid GNAT warning about "always true" or "always false". +- begin +- if Tv_sec_64 then +- -- Check for possible Duration overflow when Tv_Sec field is 64 bit +- -- integer. +- +- if Val.Tv_Sec > time_t (Max_D) +- or else +- (Val.Tv_Sec = time_t (Max_D) +- and then +- Val.Tv_Usec > suseconds_t ((Forever - Duration (Max_D)) * 1E6)) +- then +- return Forever; +- end if; +- end if; +- +- return Duration (Val.Tv_Sec) + Duration (Val.Tv_Usec) * 1.0E-6; +- end To_Duration; +- + ------------------- + -- To_Host_Entry -- + ------------------- +@@ -3019,36 +2988,6 @@ package body GNAT.Sockets is + return HN.Name (1 .. HN.Length); + end To_String; + +- ---------------- +- -- To_Timeval -- +- ---------------- +- +- function To_Timeval (Val : Timeval_Duration) return Timeval is +- S : time_t; +- uS : suseconds_t; +- +- begin +- -- If zero, set result as zero (otherwise it gets rounded down to -1) +- +- if Val = 0.0 then +- S := 0; +- uS := 0; +- +- -- Normal case where we do round down +- +- else +- S := time_t (Val - 0.5); +- uS := suseconds_t (1_000_000 * (Val - Selector_Duration (S)) - 0.5); +- +- if uS = -1 then +- -- It happen on integer duration +- uS := 0; +- end if; +- end if; +- +- return (S, uS); +- end To_Timeval; +- + ----------- + -- Value -- + ----------- +--- a/src/gcc/ada/libgnat/g-socthi.adb ++++ b/src/gcc/ada/libgnat/g-socthi.adb +@@ -40,6 +40,8 @@ with GNAT.Task_Lock; + + with Interfaces.C; use Interfaces.C; + ++with System.C_Time; ++ + package body GNAT.Sockets.Thin is + + Non_Blocking_Sockets : aliased Fd_Set; +@@ -191,7 +193,7 @@ package body GNAT.Sockets.Thin is + declare -- unreachable if Thread_Blocking_IO is statically True + pragma Warnings (On, "unreachable code"); + WSet : aliased Fd_Set; +- Now : aliased Timeval; ++ Now : aliased System.C_Time.timeval; + + begin + Reset_Socket_Set (WSet'Access); +--- a/src/gcc/ada/libgnat/g-socthi__vxworks.adb ++++ b/src/gcc/ada/libgnat/g-socthi__vxworks.adb +@@ -40,6 +40,8 @@ with GNAT.Task_Lock; + + with Interfaces.C; use Interfaces.C; + ++with System.C_Time; ++ + package body GNAT.Sockets.Thin is + + Non_Blocking_Sockets : aliased Fd_Set; +@@ -194,7 +196,7 @@ package body GNAT.Sockets.Thin is + declare -- unreachable if Thread_Blocking_IO is statically True + pragma Warnings (On, "unreachable code"); + WSet : aliased Fd_Set; +- Now : aliased Timeval; ++ Now : aliased System.C_Time.timeval; + begin + Reset_Socket_Set (WSet'Access); + loop +--- a/src/gcc/ada/libgnat/g-sothco.ads ++++ b/src/gcc/ada/libgnat/g-sothco.ads +@@ -34,7 +34,7 @@ + + with Ada.Unchecked_Conversion; + with Interfaces.C.Strings; +-with System.Parameters; ++with System.C_Time; + + package GNAT.Sockets.Thin_Common is + +@@ -44,31 +44,13 @@ package GNAT.Sockets.Thin_Common is + Success : constant C.int := 0; + Failure : constant C.int := -1; + +- type time_t is +- range -2 ** (System.Parameters.time_t_bits - 1) +- .. 2 ** (System.Parameters.time_t_bits - 1) - 1; +- for time_t'Size use System.Parameters.time_t_bits; +- pragma Convention (C, time_t); +- +- type suseconds_t is +- range -2 ** (8 * SOSC.SIZEOF_tv_usec - 1) +- .. 2 ** (8 * SOSC.SIZEOF_tv_usec - 1) - 1; +- for suseconds_t'Size use 8 * SOSC.SIZEOF_tv_usec; +- pragma Convention (C, suseconds_t); +- +- type Timeval is record +- Tv_Sec : time_t; +- Tv_Usec : suseconds_t; +- end record; +- pragma Convention (C, Timeval); +- +- type Timeval_Access is access all Timeval; ++ type Timeval_Access is access all System.C_Time.timeval; + pragma Convention (C, Timeval_Access); + + type socklen_t is mod 2 ** (8 * SOSC.SIZEOF_socklen_t); + for socklen_t'Size use (8 * SOSC.SIZEOF_socklen_t); + +- Immediat : constant Timeval := (0, 0); ++ Immediat : System.C_Time.timeval renames System.C_Time.Timeval_Zero; + + ------------------------------------------- + -- Mapping tables to low level constants -- +--- a/src/gcc/ada/libgnat/g-spogwa.adb ++++ b/src/gcc/ada/libgnat/g-spogwa.adb +@@ -29,7 +29,7 @@ + -- -- + ------------------------------------------------------------------------------ + +-with GNAT.Sockets.Thin_Common; ++with System.C_Time; + + procedure GNAT.Sockets.Poll.G_Wait + (Fds : in out Set; Timeout : Interfaces.C.int; Result : out Integer) +@@ -41,11 +41,11 @@ is + readfds : access FD_Set_Type; + writefds : access FD_Set_Type; + exceptfds : access FD_Set_Type; +- timeout : access Thin_Common.Timeval) return Integer ++ timeout : access System.C_Time.timeval) return Integer + with Import => True, Convention => Stdcall, External_Name => "select"; + +- Timeout_V : aliased Thin_Common.Timeval; +- Timeout_A : access Thin_Common.Timeval; ++ Timeout_V : aliased System.C_Time.timeval; ++ Timeout_A : access System.C_Time.timeval; + + Rfds : aliased FD_Set_Type; + Rcount : Natural := 0; +@@ -63,8 +63,7 @@ begin + + if Timeout >= 0 then + Timeout_A := Timeout_V'Access; +- Timeout_V.Tv_Sec := Thin_Common.time_t (Timeout / 1000); +- Timeout_V.Tv_Usec := Thin_Common.suseconds_t (Timeout rem 1000 * 1000); ++ Timeout_V := System.C_Time.Milliseconds_To_Timeval (Timeout); + end if; + + Reset_Socket_Set (Rfds); +--- /dev/null ++++ b/src/gcc/ada/libgnat/s-c_time.adb +@@ -0,0 +1,188 @@ ++------------------------------------------------------------------------------ ++-- -- ++-- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS -- ++-- -- ++-- S Y S T E M . C _ T I M E -- ++-- -- ++-- B o d y -- ++-- -- ++-- Copyright (C) 1998-2024, Free Software Foundation, Inc. -- ++-- -- ++-- GNARL is free software; you can redistribute it and/or modify it under -- ++-- terms of the GNU General Public License as published by the Free Soft- -- ++-- ware Foundation; either version 3, or (at your option) any later ver- -- ++-- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- ++-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- ++-- or FITNESS FOR A PARTICULAR PURPOSE. -- ++-- -- ++-- As a special exception under Section 7 of GPL version 3, you are granted -- ++-- additional permissions described in the GCC Runtime Library Exception, -- ++-- version 3.1, as published by the Free Software Foundation. -- ++-- -- ++-- You should have received a copy of the GNU General Public License and -- ++-- a copy of the GCC Runtime Library Exception along with this program; -- ++-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- ++-- . -- ++-- -- ++-- GNARL was developed by the GNARL team at Florida State University. -- ++-- Extensive contributions were provided by Ada Core Technologies, Inc. -- ++-- -- ++------------------------------------------------------------------------------ ++ ++package body System.C_Time is ++ ++ -- Two Duration representations are described in targparm.ads. ++ -- Size Delta Last = (2**(Size - 1) - 1) * Delta ++ -- 32 0.02 42_949_672.94 ++ -- 64 0.000_000_001 9_223_372_036.854_775_807 ++ ++ ----------------- ++ -- In_Duration -- ++ ----------------- ++ ++ function In_Duration (T : timeval) return Boolean is ++ ++ -- Mimic To_Timeval (Duration'Last), except that ++ -- * this computation happens at compile time ++ -- * Sec may be far above MAX_tv_sec ++ -- * on 64 bits, Usec is truncated instead of rounded up ++ Sec : constant := (if Duration'Size = 64 ++ then (2**63 - 1) / 1_000_000_000 ++ else (2**31 - 1) / 50); ++ Usec : constant := (if Duration'Size = 64 ++ then (2**63 - 1) mod 1_000_000_000 / 1_000 ++ else (2**31 - 1) mod 50 * 20_000); ++ ++ pragma Warnings (Off, "condition is always"); ++ Dur_Covers_Tv_Sec : constant Boolean := OS_Constants.MAX_tv_sec < Sec; ++ pragma Warnings (On, "condition is always"); ++ ++ -- When Duration'Size = 64 and time_t'Size = 32, the compiler ++ -- complains that Sec does not fit in time_t, hence cannot be ++ -- compared with T.tv_sec. But then Dur_Covers_Tv_Sec is True ++ -- and the following comparisons are skipped. ++ Maybe_Sec : constant := (if Dur_Covers_Tv_Sec then 1 else Sec); ++ begin ++ return Dur_Covers_Tv_Sec ++ or else T.tv_sec < Maybe_Sec ++ or else (T.tv_sec = Maybe_Sec and then T.tv_usec <= Usec); ++ end In_Duration; ++ ++ ----------------------------- ++ -- Milliseconds_To_Timeval -- ++ ----------------------------- ++ ++ function Milliseconds_To_Timeval (M : Interfaces.C.int) return timeval is ++ use Interfaces.C; ++ Q : constant int range 0 .. int'Last / 1_000 := M / 1_000; ++ R : constant int range 0 .. 999 := M mod 1_000; ++ begin ++ return (tv_sec => time_t (Q), ++ tv_usec => 1_000 * suseconds_t (R)); ++ end Milliseconds_To_Timeval; ++ ++ ----------------------------- ++ -- Nanoseconds_To_Timespec -- ++ ----------------------------- ++ ++ function Nanoseconds_To_Timespec (N : Interfaces.C.int) return timespec is ++ use Interfaces.C; ++ Q : constant int range 0 .. int'Last / 10**9 := N / 10**9; ++ R : constant int range 0 .. 999_999_999 := N mod 10**9; ++ begin ++ return (tv_sec => time_t (Q), ++ tv_nsec => snseconds_t (R)); ++ end Nanoseconds_To_Timespec; ++ ++ ----------------- ++ -- To_Duration -- ++ ----------------- ++ ++ function To_Duration (T : timeval) return Duration is ++ Frac : Duration range 0.0 .. 1.0; ++ begin ++ if Duration'Size = 64 then ++ Frac := Duration (T.tv_usec) / 1_000_000; ++ else ++ -- Fix the rounding (999_999.0 / 1_000_000 = 0.98). ++ Frac := Duration (T.tv_usec + 10_000) / 1_000_000; ++ end if; ++ return Duration (T.tv_sec) + Frac; ++ end To_Duration; ++ ++ function To_Duration (T : timespec) return Duration is ++ Frac : Duration range 0.0 .. 1.0; ++ begin ++ if Duration'Size = 64 then ++ Frac := Duration (T.tv_nsec) / 1_000_000_000; ++ else ++ -- Avoid an overflow (Duration'Last < 999_999_999). ++ -- Fix the rounding (999_999_999.0 / 1_000_000_000 = 0.98). ++ Frac := Duration (T.tv_nsec / 10_000_000 + 1) / 100; ++ end if; ++ return Duration (T.tv_sec) + Frac; ++ end To_Duration; ++ ++ ----------------- ++ -- To_Timespec -- ++ ----------------- ++ ++ function To_Timespec (T : timeval) return timespec is ++ begin ++ return (tv_sec => T.tv_sec, ++ tv_nsec => 1_000 * snseconds_t (T.tv_usec)); ++ end To_Timespec; ++ ++ function To_Timespec (D : Duration) return timespec is ++ -- See To_Timeval. ++ Dm1 : constant Duration range -1.0 .. Duration'Last - 1.0 := D - 1.0; ++ Sec : constant time_t range -1 .. time_t'Last := time_t (Dm1); ++ Frac : constant Duration range -0.5 .. 0.5 := Dm1 - Duration (Sec); ++ Nsec : snseconds_t range -500_000_000 .. 500_000_000; ++ begin ++ if Duration'Size = 64 then ++ Nsec := snseconds_t (1_000_000_000 * Frac); ++ else ++ -- Avoid an overflow when Duration'Last < 999_999_999. ++ Nsec := 10_000_000 * snseconds_t (100 * Frac); ++ end if; ++ if Nsec < 0 then ++ return (Sec, Nsec + 1_000_000_000); ++ else ++ return (Sec + 1, Nsec); ++ end if; ++ end To_Timespec; ++ ++ ----------------- ++ -- To_Timeval -- ++ ----------------- ++ ++ function To_Timeval (D : Duration) return timeval is ++ ++ -- Sec := time_t (D); ++ -- Usec := suseconds_t (1_000_000 * (D - Duration (Sec))); ++ -- fails when D is ++ -- Duration'Last (Sec is rounded up and Duration (Sec) overflows) ++ -- 0.9 (Sec is rounded up and Usec < 0) ++ ++ -- Sec := time_t (D - 0.5); ++ -- Usec := suseconds_t (1_000_000 * (D - Duration (Sec))); ++ -- fails when D is ++ -- 0.0 (Sec is rounded down and Usec = 1_000_000) ++ -- 0.999_999_999 (Usec is rounded up to 1_000_000) ++ ++ -- Converting D - 1 seems to solve overflow and simplify roundings. ++ Dm1 : constant Duration range -1.0 .. Duration'Last - 1.0 := D - 1.0; ++ Sec : constant time_t range -1 .. time_t'Last := time_t (Dm1); ++ Frac : constant Duration range -0.5 .. 0.5 := Dm1 - Duration (Sec); ++ Usec : constant suseconds_t range -500_000 .. 500_000 ++ := suseconds_t (1_000_000 * Frac); ++ begin ++ if Usec < 0 then ++ return (tv_sec => Sec, tv_usec => Usec + 1_000_000); ++ else ++ return (tv_sec => Sec + 1, tv_usec => Usec); ++ end if; ++ end To_Timeval; ++ ++end System.C_Time; +--- /dev/null ++++ b/src/gcc/ada/libgnat/s-c_time.ads +@@ -0,0 +1,112 @@ ++------------------------------------------------------------------------------ ++-- -- ++-- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS -- ++-- -- ++-- S Y S T E M . C _ T I M E -- ++-- -- ++-- S p e c -- ++-- -- ++-- Copyright (C) 1998-2024, Free Software Foundation, Inc. -- ++-- -- ++-- GNARL is free software; you can redistribute it and/or modify it under -- ++-- terms of the GNU General Public License as published by the Free Soft- -- ++-- ware Foundation; either version 3, or (at your option) any later ver- -- ++-- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- ++-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- ++-- or FITNESS FOR A PARTICULAR PURPOSE. -- ++-- -- ++-- As a special exception under Section 7 of GPL version 3, you are granted -- ++-- additional permissions described in the GCC Runtime Library Exception, -- ++-- version 3.1, as published by the Free Software Foundation. -- ++-- -- ++-- You should have received a copy of the GNU General Public License and -- ++-- a copy of the GCC Runtime Library Exception along with this program; -- ++-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- ++-- . -- ++-- -- ++-- GNARL was developed by the GNARL team at Florida State University. -- ++-- Extensive contributions were provided by Ada Core Technologies, Inc. -- ++-- -- ++------------------------------------------------------------------------------ ++ ++-- This package provides the timeval, timespec C types and conversions. ++-- It hides all details about time_t, suseconds_t. ++ ++with Interfaces.C; ++private with System.OS_Constants; ++ ++package System.C_Time ++ with Preelaborate ++is ++ ++ type timeval is private; -- Non negative duration in microseconds. ++ ++ Timeval_Zero : constant timeval; ++ -- g-sothco.ads ++ ++ function To_Timeval (D : Duration) return timeval ++ with Pre => 0.0 <= D; ++ -- The value is rounded if Duration'Size = 64. ++ ++ function In_Duration (T : timeval) return Boolean ++ with Inline; ++ -- True if computing To_Duration (T) is safe, ++ -- False if Constraint Error would be raised. ++ ++ function To_Duration (T : timeval) return Duration ++ with Post => 0.0 <= To_Duration'Result; ++ -- The value is rounded if Duration'Size = 32. ++ ++ type timespec is private; -- Non negative duration in nanoseconds. ++ ++ function To_Timespec (D : Duration) return timespec ++ with Pre => 0.0 <= D; ++ ++ function To_Duration (T : timespec) return Duration ++ with Post => 0.0 <= To_Duration'Result; ++ -- The value is rounded if Duration'Size = 32. ++ ++ -- Direct conversions avoiding an intermediate Duration that may ++ -- loose precision (when Duration'Size = 32) or overflow (when ++ -- time_t'Size = 64). ++ ++ function Milliseconds_To_Timeval (M : Interfaces.C.int) return timeval ++ with Inline, ++ Pre => Interfaces.C."<=" (0, M); ++ ++ function Nanoseconds_To_Timespec (N : Interfaces.C.int) return timespec ++ with Inline, ++ Pre => Interfaces.C."<=" (0, N); ++ ++ function To_Timespec (T : timeval) return timespec ++ with Inline; ++ ++private ++ ++ type time_t is range -2 ** (OS_Constants.SIZEOF_tv_sec * 8 - 1) .. ++ 2 ** (OS_Constants.SIZEOF_tv_sec * 8 - 1) - 1 ++ with Convention => C, Size => OS_Constants.SIZEOF_tv_sec * 8; ++ ++ type suseconds_t is range -2 ** (OS_Constants.SIZEOF_tv_usec * 8 - 1) .. ++ 2 ** (OS_Constants.SIZEOF_tv_usec * 8 - 1) - 1 ++ with Convention => C, Size => OS_Constants.SIZEOF_tv_usec * 8; ++ ++ type snseconds_t is range -2 ** (OS_Constants.SIZEOF_tv_nsec * 8 - 1) .. ++ 2 ** (OS_Constants.SIZEOF_tv_nsec * 8 - 1) - 1 ++ with Convention => C, Size => OS_Constants.SIZEOF_tv_nsec * 8; ++ ++ type timeval is record ++ tv_sec : time_t range 0 .. OS_Constants.MAX_tv_sec; -- seconds ++ tv_usec : suseconds_t range 0 .. 999_999; -- microseconds ++ end record ++ with Convention => C; ++ ++ type timespec is record ++ tv_sec : time_t range 0 .. OS_Constants.MAX_tv_sec; -- seconds ++ tv_nsec : snseconds_t range 0 .. 999_999_999; -- nanoseconds ++ end record ++ with Convention => C; ++ ++ Timeval_Zero : constant timeval := (tv_sec => 0, tv_usec => 0); ++ ++end System.C_Time; +--- a/src/gcc/ada/libgnat/s-optide.adb ++++ b/src/gcc/ada/libgnat/s-optide.adb +@@ -36,8 +36,8 @@ procedure Timed_Delay + (Time : Duration; + Mode : Integer) + is +- Request : aliased timespec; +- Remaind : aliased timespec; ++ Request : aliased C_Time.timespec; ++ Remaind : aliased C_Time.timespec; + Rel_Time : Duration; + Abs_Time : Duration; + Base_Time : constant Duration := Clock; +@@ -71,7 +71,7 @@ begin + end if; + pragma Warnings (On); + +- Request := To_Timespec (Time_Chunk); ++ Request := C_Time.To_Timespec (Time_Chunk); + Result := nanosleep (Request'Access, Remaind'Access); + + Check_Time := Clock; +--- a/src/gcc/ada/libgnat/s-osprim__darwin.adb ++++ b/src/gcc/ada/libgnat/s-osprim__darwin.adb +@@ -31,7 +31,7 @@ + + -- This version is for darwin + +-with System.Parameters; ++with System.C_Time; + package body System.OS_Primitives is + + -- ??? These definitions are duplicated from System.OS_Interface +@@ -46,27 +46,13 @@ package body System.OS_Primitives is + pragma Convention (C, struct_timezone); + type struct_timezone_ptr is access all struct_timezone; + +- type time_t is range -2 ** (System.Parameters.time_t_bits - 1) +- .. 2 ** (System.Parameters.time_t_bits - 1) - 1; +- +- type struct_timeval is record +- tv_sec : time_t; +- tv_usec : Integer; +- end record; +- pragma Convention (C, struct_timeval); +- + function gettimeofday +- (tv : not null access struct_timeval; ++ (tv : not null access C_Time.timeval; + tz : struct_timezone_ptr) return Integer; + pragma Import (C, gettimeofday, "gettimeofday"); + +- type timespec is record +- tv_sec : time_t; +- tv_nsec : Long_Integer; +- end record; +- pragma Convention (C, timespec); +- +- function nanosleep (rqtp, rmtp : not null access timespec) return Integer; ++ function nanosleep (rqtp, rmtp : not null access C_Time.timespec) ++ return Integer; + pragma Import (C, nanosleep, "nanosleep"); + + ----------- +@@ -74,7 +60,7 @@ package body System.OS_Primitives is + ----------- + + function Clock return Duration is +- TV : aliased struct_timeval; ++ TV : aliased C_Time.timeval; + + Result : Integer; + pragma Unreferenced (Result); +@@ -89,37 +75,10 @@ package body System.OS_Primitives is + -- value is never checked. + + Result := gettimeofday (TV'Access, null); +- return Duration (TV.tv_sec) + Duration (TV.tv_usec) / 10#1#E6; ++ return C_Time.To_Duration (TV); + end Clock; + + ----------------- +- -- To_Timespec -- +- ----------------- +- +- function To_Timespec (D : Duration) return timespec; +- +- function To_Timespec (D : Duration) return timespec is +- S : time_t; +- F : Duration; +- +- begin +- S := time_t (Long_Long_Integer (D)); +- F := D - Duration (S); +- +- -- If F has negative value due to a round-up, adjust for positive F +- -- value. +- +- if F < 0.0 then +- S := S - 1; +- F := F + 1.0; +- end if; +- +- return +- timespec'(tv_sec => S, +- tv_nsec => Long_Integer (Long_Long_Integer (F * 10#1#E9))); +- end To_Timespec; +- +- ----------------- + -- Timed_Delay -- + ----------------- + +@@ -127,8 +86,8 @@ package body System.OS_Primitives is + (Time : Duration; + Mode : Integer) + is +- Request : aliased timespec; +- Remaind : aliased timespec; ++ Request : aliased C_Time.timespec; ++ Remaind : aliased C_Time.timespec; + Rel_Time : Duration; + Abs_Time : Duration; + Base_Time : constant Duration := Clock; +@@ -148,7 +107,7 @@ package body System.OS_Primitives is + + if Rel_Time > 0.0 then + loop +- Request := To_Timespec (Rel_Time); ++ Request := C_Time.To_Timespec (Rel_Time); + Result := nanosleep (Request'Access, Remaind'Access); + Check_Time := Clock; + +--- a/src/gcc/ada/libgnat/s-osprim__posix.adb ++++ b/src/gcc/ada/libgnat/s-osprim__posix.adb +@@ -30,7 +30,7 @@ + ------------------------------------------------------------------------------ + + -- This version is for POSIX-like operating systems +-with System.Parameters; ++with System.C_Time; + + package body System.OS_Primitives is + +@@ -39,16 +39,8 @@ package body System.OS_Primitives is + -- these declarations in System.OS_Interface and move these ones in + -- the spec. + +- type time_t is range -2 ** (System.Parameters.time_t_bits - 1) +- .. 2 ** (System.Parameters.time_t_bits - 1) - 1; +- +- type timespec is record +- tv_sec : time_t; +- tv_nsec : Long_Integer; +- end record; +- pragma Convention (C, timespec); +- +- function nanosleep (rqtp, rmtp : not null access timespec) return Integer; ++ function nanosleep (rqtp, rmtp : not null access C_Time.timespec) ++ return Integer; + pragma Import (C, nanosleep, "nanosleep"); + + ----------- +@@ -57,27 +49,12 @@ package body System.OS_Primitives is + + function Clock return Duration is + +- type timeval is array (1 .. 3) of Long_Integer; +- -- The timeval array is sized to contain Long_Long_Integer sec and +- -- Long_Integer usec. If Long_Long_Integer'Size = Long_Integer'Size then +- -- it will be overly large but that will not effect the implementation +- -- since it is not accessed directly. +- +- procedure timeval_to_duration +- (T : not null access timeval; +- sec : not null access Long_Long_Integer; +- usec : not null access Long_Integer); +- pragma Import (C, timeval_to_duration, "__gnat_timeval_to_duration"); +- +- Micro : constant := 10**6; +- sec : aliased Long_Long_Integer; +- usec : aliased Long_Integer; +- TV : aliased timeval; ++ TV : aliased C_Time.timeval; + Result : Integer; + pragma Unreferenced (Result); + + function gettimeofday +- (Tv : access timeval; ++ (Tv : access C_Time.timeval; + Tz : System.Address := System.Null_Address) return Integer; + pragma Import (C, gettimeofday, "gettimeofday"); + +@@ -91,38 +68,10 @@ package body System.OS_Primitives is + -- value is never checked. + + Result := gettimeofday (TV'Access, System.Null_Address); +- timeval_to_duration (TV'Access, sec'Access, usec'Access); +- return Duration (sec) + Duration (usec) / Micro; ++ return C_Time.To_Duration (TV); + end Clock; + + ----------------- +- -- To_Timespec -- +- ----------------- +- +- function To_Timespec (D : Duration) return timespec; +- +- function To_Timespec (D : Duration) return timespec is +- S : time_t; +- F : Duration; +- +- begin +- S := time_t (Long_Long_Integer (D)); +- F := D - Duration (S); +- +- -- If F has negative value due to a round-up, adjust for positive F +- -- value. +- +- if F < 0.0 then +- S := S - 1; +- F := F + 1.0; +- end if; +- +- return +- timespec'(tv_sec => S, +- tv_nsec => Long_Integer (Long_Long_Integer (F * 10#1#E9))); +- end To_Timespec; +- +- ----------------- + -- Timed_Delay -- + ----------------- + +--- a/src/gcc/ada/libgnat/s-osprim__posix2008.adb ++++ b/src/gcc/ada/libgnat/s-osprim__posix2008.adb +@@ -31,9 +31,10 @@ + + -- This version is for POSIX.1-2008-like operating systems + ++with System.C_Time; + with System.CRTL; + with System.OS_Constants; +-with System.Parameters; ++ + package body System.OS_Primitives is + + subtype int is System.CRTL.int; +@@ -42,16 +43,8 @@ package body System.OS_Primitives is + -- we don't want to depend on any package. Consider removing these + -- declarations in System.OS_Interface and move these ones to the spec. + +- type time_t is range -2 ** (System.Parameters.time_t_bits - 1) +- .. 2 ** (System.Parameters.time_t_bits - 1) - 1; +- +- type timespec is record +- tv_sec : time_t; +- tv_nsec : Long_Integer; +- end record; +- pragma Convention (C, timespec); +- +- function nanosleep (rqtp, rmtp : not null access timespec) return Integer; ++ function nanosleep (rqtp, rmtp : not null access C_Time.timespec) ++ return Integer; + pragma Import (C, nanosleep, "nanosleep"); + + ----------- +@@ -59,7 +52,7 @@ package body System.OS_Primitives is + ----------- + + function Clock return Duration is +- TS : aliased timespec; ++ TS : aliased C_Time.timespec; + Result : int; + + type clockid_t is new int; +@@ -68,43 +61,16 @@ package body System.OS_Primitives is + + function clock_gettime + (clock_id : clockid_t; +- tp : access timespec) return int; ++ tp : access C_Time.timespec) return int; + pragma Import (C, clock_gettime, "clock_gettime"); + + begin + Result := clock_gettime (CLOCK_REALTIME, TS'Unchecked_Access); + pragma Assert (Result = 0); +- return Duration (TS.tv_sec) + Duration (TS.tv_nsec) / 10#1#E9; ++ return C_Time.To_Duration (TS); + end Clock; + + ----------------- +- -- To_Timespec -- +- ----------------- +- +- function To_Timespec (D : Duration) return timespec; +- +- function To_Timespec (D : Duration) return timespec is +- S : time_t; +- F : Duration; +- +- begin +- S := time_t (Long_Long_Integer (D)); +- F := D - Duration (S); +- +- -- If F has negative value due to a round-up, adjust for positive F +- -- value. +- +- if F < 0.0 then +- S := S - 1; +- F := F + 1.0; +- end if; +- +- return +- timespec'(tv_sec => S, +- tv_nsec => Long_Integer (Long_Long_Integer (F * 10#1#E9))); +- end To_Timespec; +- +- ----------------- + -- Timed_Delay -- + ----------------- + +--- a/src/gcc/ada/libgnat/s-osprim__rtems.adb ++++ b/src/gcc/ada/libgnat/s-osprim__rtems.adb +@@ -31,7 +31,8 @@ + + -- This version is for POSIX-like operating systems + +-with System.Parameters; ++with System.C_Time; ++ + package body System.OS_Primitives is + + -- ??? These definitions are duplicated from System.OS_Interface +@@ -39,16 +40,8 @@ package body System.OS_Primitives is + -- these declarations in System.OS_Interface and move these ones in + -- the spec. + +- type time_t is range -2 ** (System.Parameters.time_t_bits - 1) +- .. 2 ** (System.Parameters.time_t_bits - 1) - 1; +- +- type timespec is record +- tv_sec : time_t; +- tv_nsec : Long_Integer; +- end record; +- pragma Convention (C, timespec); +- +- function nanosleep (rqtp, rmtp : not null access timespec) return Integer; ++ function nanosleep (rqtp, rmtp : not null access C_Time.timespec) ++ return Integer; + pragma Import (C, nanosleep, "nanosleep"); + + ----------- +@@ -56,28 +49,12 @@ package body System.OS_Primitives is + ----------- + + function Clock return Duration is +- +- type timeval is record +- tv_sec : time_t; +- tv_usec : Long_Integer; +- end record; +- pragma Convention (C, timeval); +- +- procedure timeval_to_duration +- (T : not null access timeval; +- sec : not null access Long_Long_Integer; +- usec : not null access Long_Integer); +- pragma Import (C, timeval_to_duration, "__gnat_timeval_to_duration"); +- +- Micro : constant := 10**6; +- sec : aliased Long_Long_Integer; +- usec : aliased Long_Integer; +- TV : aliased timeval; ++ TV : aliased C_Time.timeval; + Result : Integer; + pragma Unreferenced (Result); + + function gettimeofday +- (Tv : access timeval; ++ (Tv : access C_Time.timeval; + Tz : System.Address := System.Null_Address) return Integer; + pragma Import (C, gettimeofday, "gettimeofday"); + +@@ -91,38 +68,10 @@ package body System.OS_Primitives is + -- value is never checked. + + Result := gettimeofday (TV'Access, System.Null_Address); +- timeval_to_duration (TV'Access, sec'Access, usec'Access); +- return Duration (sec) + Duration (usec) / Micro; ++ return C_Time.To_Duration (TV); + end Clock; + + ----------------- +- -- To_Timespec -- +- ----------------- +- +- function To_Timespec (D : Duration) return timespec; +- +- function To_Timespec (D : Duration) return timespec is +- S : time_t; +- F : Duration; +- +- begin +- S := time_t (Long_Long_Integer (D)); +- F := D - Duration (S); +- +- -- If F has negative value due to a round-up, adjust for positive F +- -- value. +- +- if F < 0.0 then +- S := S - 1; +- F := F + 1.0; +- end if; +- +- return +- timespec'(tv_sec => S, +- tv_nsec => Long_Integer (Long_Long_Integer (F * 10#1#E9))); +- end To_Timespec; +- +- ----------------- + -- Timed_Delay -- + ----------------- + +@@ -130,8 +79,8 @@ package body System.OS_Primitives is + (Time : Duration; + Mode : Integer) + is +- Request : aliased timespec; +- Remaind : aliased timespec; ++ Request : aliased C_Time.timespec; ++ Remaind : aliased C_Time.timespec; + Rel_Time : Duration; + Abs_Time : Duration; + Base_Time : constant Duration := Clock; +@@ -151,7 +100,7 @@ package body System.OS_Primitives is + + if Rel_Time > 0.0 then + loop +- Request := To_Timespec (Rel_Time); ++ Request := C_Time.To_Timespec (Rel_Time); + Result := nanosleep (Request'Access, Remaind'Access); + Check_Time := Clock; + +--- a/src/gcc/ada/libgnat/s-osprim__solaris.adb ++++ b/src/gcc/ada/libgnat/s-osprim__solaris.adb +@@ -32,6 +32,8 @@ + -- This version uses gettimeofday and select + -- This file is suitable for Solaris (32 and 64 bits). + ++with System.C_Time; ++ + package body System.OS_Primitives is + + -- ??? These definitions are duplicated from System.OS_Interface +@@ -39,14 +41,8 @@ package body System.OS_Primitives is + -- these declarations in System.OS_Interface and move these ones in + -- the spec. + +- type struct_timeval is record +- tv_sec : Long_Integer; +- tv_usec : Long_Integer; +- end record; +- pragma Convention (C, struct_timeval); +- + procedure gettimeofday +- (tv : not null access struct_timeval; ++ (tv : not null access C_Time.timeval; + tz : Address := Null_Address); + pragma Import (C, gettimeofday, "gettimeofday"); + +@@ -55,7 +51,7 @@ package body System.OS_Primitives is + readfds, + writefds, + exceptfds : Address := Null_Address; +- timeout : not null access struct_timeval); ++ timeout : not null access C_Time.timeval); + pragma Import (C, C_select, "select"); + + ----------- +@@ -63,11 +59,11 @@ package body System.OS_Primitives is + ----------- + + function Clock return Duration is +- TV : aliased struct_timeval; ++ TV : aliased C_Time.timeval; + + begin + gettimeofday (TV'Access); +- return Duration (TV.tv_sec) + Duration (TV.tv_usec) / 10#1#E6; ++ return C_Time.To_Duration (TV); + end Clock; + + ----------------- +@@ -82,7 +78,7 @@ package body System.OS_Primitives is + Abs_Time : Duration; + Base_Time : constant Duration := Clock; + Check_Time : Duration := Base_Time; +- timeval : aliased struct_timeval; ++ timeval : aliased C_Time.timeval; + + begin + if Mode = Relative then +@@ -95,14 +91,7 @@ package body System.OS_Primitives is + + if Rel_Time > 0.0 then + loop +- timeval.tv_sec := Long_Integer (Rel_Time); +- +- if Duration (timeval.tv_sec) > Rel_Time then +- timeval.tv_sec := timeval.tv_sec - 1; +- end if; +- +- timeval.tv_usec := +- Long_Integer ((Rel_Time - Duration (timeval.tv_sec)) * 10#1#E6); ++ timeval := C_Time.To_Timeval (Rel_Time); + + C_select (timeout => timeval'Unchecked_Access); + Check_Time := Clock; +--- a/src/gcc/ada/libgnat/s-osprim__unix.adb ++++ b/src/gcc/ada/libgnat/s-osprim__unix.adb +@@ -32,6 +32,8 @@ + -- This version uses gettimeofday and select + -- This file is suitable for OpenNT, Dec Unix and SCO UnixWare. + ++with System.C_Time; ++ + package body System.OS_Primitives is + + -- ??? These definitions are duplicated from System.OS_Interface +@@ -39,14 +41,8 @@ package body System.OS_Primitives is + -- these declarations in System.OS_Interface and move these ones in + -- the spec. + +- type struct_timeval is record +- tv_sec : Integer; +- tv_usec : Integer; +- end record; +- pragma Convention (C, struct_timeval); +- + procedure gettimeofday +- (tv : not null access struct_timeval; ++ (tv : not null access C_Time.timeval; + tz : Address := Null_Address); + pragma Import (C, gettimeofday, "gettimeofday"); + +@@ -55,7 +51,7 @@ package body System.OS_Primitives is + readfds, + writefds, + exceptfds : Address := Null_Address; +- timeout : not null access struct_timeval); ++ timeout : not null access C_Time.timeval); + pragma Import (C, C_select, "select"); + + ----------- +@@ -63,11 +59,11 @@ package body System.OS_Primitives is + ----------- + + function Clock return Duration is +- TV : aliased struct_timeval; ++ TV : aliased C_Time.timeval; + + begin + gettimeofday (TV'Access); +- return Duration (TV.tv_sec) + Duration (TV.tv_usec) / 10#1#E6; ++ return C_Time.To_Duration (TV); + end Clock; + + ----------------- +@@ -82,7 +78,7 @@ package body System.OS_Primitives is + Abs_Time : Duration; + Base_Time : constant Duration := Clock; + Check_Time : Duration := Base_Time; +- timeval : aliased struct_timeval; ++ timeval : aliased C_Time.timeval; + + begin + if Mode = Relative then +@@ -95,14 +91,7 @@ package body System.OS_Primitives is + + if Rel_Time > 0.0 then + loop +- timeval.tv_sec := Integer (Rel_Time); +- +- if Duration (timeval.tv_sec) > Rel_Time then +- timeval.tv_sec := timeval.tv_sec - 1; +- end if; +- +- timeval.tv_usec := +- Integer ((Rel_Time - Duration (timeval.tv_sec)) * 10#1#E6); ++ timeval := C_Time.To_Timeval (Rel_Time); + + C_select (timeout => timeval'Unchecked_Access); + Check_Time := Clock; +--- a/src/gcc/ada/libgnat/s-osprim__x32.adb ++++ b/src/gcc/ada/libgnat/s-osprim__x32.adb +@@ -31,7 +31,7 @@ + + -- This version is for Linux/x32 + +-with System.Parameters; ++with System.C_Time; + + package body System.OS_Primitives is + +@@ -40,16 +40,8 @@ package body System.OS_Primitives is + -- these declarations in System.OS_Interface and move these ones in + -- the spec. + +- type time_t is range -2 ** (System.Parameters.time_t_bits - 1) +- .. 2 ** (System.Parameters.time_t_bits - 1) - 1; +- +- type timespec is record +- tv_sec : time_t; +- tv_nsec : Long_Long_Integer; +- end record; +- pragma Convention (C, timespec); +- +- function nanosleep (rqtp, rmtp : not null access timespec) return Integer; ++ function nanosleep (rqtp, rmtp : not null access C_Time.timespec) ++ return Integer; + pragma Import (C, nanosleep, "nanosleep"); + + ----------- +@@ -57,23 +49,12 @@ package body System.OS_Primitives is + ----------- + + function Clock return Duration is +- type timeval is array (1 .. 2) of Long_Long_Integer; +- +- procedure timeval_to_duration +- (T : not null access timeval; +- sec : not null access Long_Integer; +- usec : not null access Long_Integer); +- pragma Import (C, timeval_to_duration, "__gnat_timeval_to_duration"); +- +- Micro : constant := 10**6; +- sec : aliased Long_Integer; +- usec : aliased Long_Integer; +- TV : aliased timeval; ++ TV : aliased C_Time.timeval; + Result : Integer; + pragma Unreferenced (Result); + + function gettimeofday +- (Tv : access timeval; ++ (Tv : access C_Time.timeval; + Tz : System.Address := System.Null_Address) return Integer; + pragma Import (C, gettimeofday, "gettimeofday"); + +@@ -87,38 +68,10 @@ package body System.OS_Primitives is + -- value is never checked. + + Result := gettimeofday (TV'Access, System.Null_Address); +- timeval_to_duration (TV'Access, sec'Access, usec'Access); +- return Duration (sec) + Duration (usec) / Micro; ++ return C_Time.To_Duration (TV); + end Clock; + + ----------------- +- -- To_Timespec -- +- ----------------- +- +- function To_Timespec (D : Duration) return timespec; +- +- function To_Timespec (D : Duration) return timespec is +- S : time_t; +- F : Duration; +- +- begin +- S := time_t (Long_Long_Integer (D)); +- F := D - Duration (S); +- +- -- If F has negative value due to a round-up, adjust for positive F +- -- value. +- +- if F < 0.0 then +- S := S - 1; +- F := F + 1.0; +- end if; +- +- return +- timespec'(tv_sec => S, +- tv_nsec => Long_Long_Integer (F * 10#1#E9)); +- end To_Timespec; +- +- ----------------- + -- Timed_Delay -- + ----------------- + +@@ -126,8 +79,8 @@ package body System.OS_Primitives is + (Time : Duration; + Mode : Integer) + is +- Request : aliased timespec; +- Remaind : aliased timespec; ++ Request : aliased C_Time.timespec; ++ Remaind : aliased C_Time.timespec; + Rel_Time : Duration; + Abs_Time : Duration; + Base_Time : constant Duration := Clock; +@@ -147,7 +100,7 @@ package body System.OS_Primitives is + + if Rel_Time > 0.0 then + loop +- Request := To_Timespec (Rel_Time); ++ Request := C_Time.To_Timespec (Rel_Time); + Result := nanosleep (Request'Access, Remaind'Access); + Check_Time := Clock; + +--- a/src/gcc/ada/libgnat/s-parame.ads ++++ b/src/gcc/ada/libgnat/s-parame.ads +@@ -98,13 +98,6 @@ package System.Parameters is + -- Indicates if secondary stacks can grow and shrink at run-time. If False, + -- the size of a secondary stack is fixed at the point of its creation. + +- ------------------------------------ +- -- Characteristics of time_t type -- +- ------------------------------------ +- +- time_t_bits : constant := Long_Integer'Size; +- -- Number of bits in type time_t +- + ---------------------------------------------- + -- Characteristics of types in Interfaces.C -- + ---------------------------------------------- +--- a/src/gcc/ada/libgnat/s-parame__hpux.ads ++++ b/src/gcc/ada/libgnat/s-parame__hpux.ads +@@ -98,13 +98,6 @@ package System.Parameters is + -- Indicates if secondary stacks can grow and shrink at run-time. If False, + -- the size of a secondary stack is fixed at the point of its creation. + +- ------------------------------------ +- -- Characteristics of time_t type -- +- ------------------------------------ +- +- time_t_bits : constant := Long_Integer'Size; +- -- Number of bits in type time_t +- + ---------------------------------------------- + -- Characteristics of Types in Interfaces.C -- + ---------------------------------------------- +--- a/src/gcc/ada/libgnat/s-parame__posix2008.ads ++++ b/src/gcc/ada/libgnat/s-parame__posix2008.ads +@@ -98,14 +98,6 @@ package System.Parameters is + -- Indicates if secondary stacks can grow and shrink at run-time. If False, + -- the size of a secondary stack is fixed at the point of its creation. + +- ------------------------------------ +- -- Characteristics of time_t type -- +- ------------------------------------ +- +- time_t_bits : constant := Long_Long_Integer'Size; +- -- Number of bits in type time_t. Use for targets that are Posix 2008 +- -- compliant (fixes the year 2038 time_t overflow). +- + ---------------------------------------------- + -- Characteristics of types in Interfaces.C -- + ---------------------------------------------- +--- a/src/gcc/ada/libgnat/s-parame__vxworks.ads ++++ b/src/gcc/ada/libgnat/s-parame__vxworks.ads +@@ -100,21 +100,6 @@ package System.Parameters is + -- Indicates if secondary stacks can grow and shrink at run-time. If False, + -- the size of a secondary stack is fixed at the point of its creation. + +- ------------------------------------ +- -- Characteristics of time_t type -- +- ------------------------------------ +- +- -- IMPORTANT NOTE: +- -- Select the appropriate time_t_bits for the VSB in use, then rebuild +- -- the runtime using instructions in adainclude/libada.gpr. +- +- -- time_t_bits : constant := Long_Integer'Size; +- -- Number of bits in type time_t for SR0650 and before and SR0660 with +- -- non-default configuration. +- +- time_t_bits : constant := Long_Long_Integer'Size; +- -- Number of bits in type time_t for SR0660 with default configuration. +- + ---------------------------------------------- + -- Characteristics of types in Interfaces.C -- + ---------------------------------------------- +--- a/src/gcc/ada/s-oscons-tmplt.c ++++ b/src/gcc/ada/s-oscons-tmplt.c +@@ -1735,9 +1735,9 @@ CND(IPV6_V6ONLY, "Restricted to IPv6 com + -- Sizes (in bytes) of the components of struct timeval + */ + #define SIZEOF_tv_sec (sizeof tv.tv_sec) +-CND(SIZEOF_tv_sec, "tv_sec") ++CND(SIZEOF_tv_sec, "tv_sec, time_t") + #define SIZEOF_tv_usec (sizeof tv.tv_usec) +-CND(SIZEOF_tv_usec, "tv_usec") ++CND(SIZEOF_tv_usec, "tv_usec, suseconds_t") + /* + + -- Maximum allowed value for tv_sec +@@ -1759,6 +1759,17 @@ CND(SIZEOF_tv_usec, "tv_usec") + #endif + CNS(MAX_tv_sec, "") + } ++ ++{ ++ struct timespec ts; ++/* ++ -- Sizes (in bytes) of the components of struct timespec. ++ -- The tv_sec field is the same than in struct timeval. ++*/ ++#define SIZEOF_tv_nsec (sizeof (ts.tv_nsec)) ++CND(SIZEOF_tv_nsec, "tv_nsec, long except on x32"); ++} ++ + /* + + -- Sizes of various data types diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/0003-Ada-remove-conversions-with-C-time_t-from-System.OS_.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/0003-Ada-remove-conversions-with-C-time_t-from-System.OS_.diff new file mode 100644 index 0000000000..a4cf61a41c --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/0003-Ada-remove-conversions-with-C-time_t-from-System.OS_.diff @@ -0,0 +1,67 @@ +From: Nicolas Boulenguez +Subject: [PATCH 3/8] Ada: remove conversions with C time_t from System.OS_Lib +Bug-Debian: https://bugs.debian.org/1067453 + +Only one conversion is used by Ada.Calendar, and it is unrelated with +the C time_t type. + +--- a/src/gcc/ada/libgnat/s-os_lib.adb ++++ b/src/gcc/ada/libgnat/s-os_lib.adb +@@ -2980,7 +2980,7 @@ package body System.OS_Lib is + -- To_Ada -- + ------------ + +- function To_Ada (Time : time_t) return OS_Time is ++ function To_Ada (Time : Long_Long_Integer) return OS_Time is + begin + return OS_Time (Time); + end To_Ada; +@@ -3014,15 +3014,6 @@ package body System.OS_Lib is + return Return_Val; + end To_Path_String_Access; + +- ---------- +- -- To_C -- +- ---------- +- +- function To_C (Time : OS_Time) return time_t is +- begin +- return time_t (Time); +- end To_C; +- + ------------------ + -- Wait_Process -- + ------------------ +--- a/src/gcc/ada/libgnat/s-os_lib.ads ++++ b/src/gcc/ada/libgnat/s-os_lib.ads +@@ -165,21 +165,7 @@ package System.OS_Lib is + -- Time_t Stuff -- + ------------------ + +- -- Note: Do not use time_t in the compiler and host-based tools; instead +- -- use OS_Time. +- +- subtype time_t is Long_Long_Integer; +- -- C time_t can be either long or long long, so we choose the Ada +- -- equivalent of the latter because eventually that will be the +- -- type used out of necessity. This may affect some user code on 32-bit +- -- targets that have not yet migrated to the Posix 2008 standard, +- -- particularly pre version 5 32-bit Linux. Do not change this +- -- declaration without coordinating it with conversions in Ada.Calendar. +- +- function To_C (Time : OS_Time) return time_t; +- -- Convert OS_Time to C time_t type +- +- function To_Ada (Time : time_t) return OS_Time; ++ function To_Ada (Time : Long_Long_Integer) return OS_Time; + -- Convert C time_t type to OS_Time + + ---------------- +@@ -1119,7 +1105,6 @@ private + pragma Import (Intrinsic, ">"); + pragma Import (Intrinsic, "<="); + pragma Import (Intrinsic, ">="); +- pragma Inline (To_C); + pragma Inline (To_Ada); + + type Process_Id is new Integer; diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/0005-Ada-import-nanosleep-from-System.OS_Primitives.Timed_.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/0005-Ada-import-nanosleep-from-System.OS_Primitives.Timed_.diff new file mode 100644 index 0000000000..47076495a1 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/0005-Ada-import-nanosleep-from-System.OS_Primitives.Timed_.diff @@ -0,0 +1,61 @@ +From: Nicolas Boulenguez +Subject: Ada: import nanosleep from System.OS_Primitives.Timed_Delay +Bug-Debian: https://bugs.debian.org/1067453 + +It improves readability to import this C function in the file where it +is actually used. + +This patch is only applied as a prerequisite for +0006-Ada-select-64-bits-time-functions-from-GNU-libc-when-.diff. + +--- a/src/gcc/ada/libgnat/s-optide.adb ++++ b/src/gcc/ada/libgnat/s-optide.adb +@@ -36,6 +36,13 @@ procedure Timed_Delay + (Time : Duration; + Mode : Integer) + is ++ ++ function nanosleep (rqtp, rmtp : not null access C_Time.timespec) ++ return Integer ++ with Import, ++ Convention => C, ++ External_Name => "nanosleep"; ++ + Request : aliased C_Time.timespec; + Remaind : aliased C_Time.timespec; + Rel_Time : Duration; +--- a/src/gcc/ada/libgnat/s-osprim__posix.adb ++++ b/src/gcc/ada/libgnat/s-osprim__posix.adb +@@ -34,15 +34,6 @@ with System.C_Time; + + package body System.OS_Primitives is + +- -- ??? These definitions are duplicated from System.OS_Interface +- -- because we don't want to depend on any package. Consider removing +- -- these declarations in System.OS_Interface and move these ones in +- -- the spec. +- +- function nanosleep (rqtp, rmtp : not null access C_Time.timespec) +- return Integer; +- pragma Import (C, nanosleep, "nanosleep"); +- + ----------- + -- Clock -- + ----------- +--- a/src/gcc/ada/libgnat/s-osprim__posix2008.adb ++++ b/src/gcc/ada/libgnat/s-osprim__posix2008.adb +@@ -39,14 +39,6 @@ package body System.OS_Primitives is + + subtype int is System.CRTL.int; + +- -- ??? These definitions are duplicated from System.OS_Interface because +- -- we don't want to depend on any package. Consider removing these +- -- declarations in System.OS_Interface and move these ones to the spec. +- +- function nanosleep (rqtp, rmtp : not null access C_Time.timespec) +- return Integer; +- pragma Import (C, nanosleep, "nanosleep"); +- + ----------- + -- Clock -- + ----------- diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/0006-Ada-select-64-bits-time-functions-from-GNU-libc-when-.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/0006-Ada-select-64-bits-time-functions-from-GNU-libc-when-.diff new file mode 100644 index 0000000000..fb5d53cfe8 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/0006-Ada-select-64-bits-time-functions-from-GNU-libc-when-.diff @@ -0,0 +1,236 @@ +From: Nicolas Boulenguez +Subject: Ada: select 64 bits time functions from GNU libc when __USE_TIME_BITS64 +Bug-Debian: https://bugs.debian.org/1067453 + +else Ada.Calendar returns random dates on system affected by the +Y2038 Glibc transition (pr114065). + +--- a/src/gcc/ada/libgnarl/a-exetim__posix.adb ++++ b/src/gcc/ada/libgnarl/a-exetim__posix.adb +@@ -35,6 +35,7 @@ with Ada.Task_Identification; use Ada.Task_Identification; + with Ada.Unchecked_Conversion; + + with System.C_Time; ++with System.OS_Constants; + with System.Tasking; + with System.OS_Interface; use System.OS_Interface; + with System.Task_Primitives.Operations; use System.Task_Primitives.Operations; +@@ -115,7 +116,9 @@ package body Ada.Execution_Time is + (clock_id : Interfaces.C.int; + tp : access System.C_Time.timespec) + return int; +- pragma Import (C, clock_gettime, "clock_gettime"); ++ pragma Import (C, clock_gettime, ++ (if System.OS_Constants.Glibc_Use_Time_Bits64 ++ then "__clock_gettime64" else "clock_gettime")); + -- Function from the POSIX.1b Realtime Extensions library + + function pthread_getcpuclockid +--- a/src/gcc/ada/libgnarl/s-osinte__gnu.ads ++++ b/src/gcc/ada/libgnarl/s-osinte__gnu.ads +@@ -39,6 +39,7 @@ + -- Preelaborate. This package is designed to be a bottom-level (leaf) package + + with Interfaces.C; ++with System.OS_Constants; + with System.C_Time; + with Ada.Unchecked_Conversion; + +@@ -208,7 +209,8 @@ package System.OS_Interface is + -- Indicates whether time slicing is supported (i.e SCHED_RR is supported) + + function nanosleep (rqtp, rmtp : access C_Time.timespec) return int; +- pragma Import (C, nanosleep, "nanosleep"); ++ pragma Import (C, nanosleep, (if OS_Constants.Glibc_Use_Time_Bits64 ++ then "__nanosleep64" else "nanosleep")); + + type clockid_t is new int; + CLOCK_REALTIME : constant clockid_t := 0; +@@ -218,12 +220,14 @@ package System.OS_Interface is + (clock_id : clockid_t; + tp : access C_Time.timespec) + return int; +- pragma Import (C, clock_gettime, "clock_gettime"); ++ pragma Import (C, clock_gettime, (if OS_Constants.Glibc_Use_Time_Bits64 ++ then "__clock_gettime64" else "clock_gettime")); + + function clock_getres + (clock_id : clockid_t; + res : access C_Time.timespec) return int; +- pragma Import (C, clock_getres, "clock_getres"); ++ pragma Import (C, clock_getres, (if OS_Constants.Glibc_Use_Time_Bits64 ++ then "__clock_getres64" else "clock_getres")); + + -- From: /usr/include/unistd.h + function sysconf (name : int) return long; +@@ -477,7 +481,9 @@ package System.OS_Interface is + (cond : access pthread_cond_t; + mutex : access pthread_mutex_t; + abstime : access C_Time.timespec) return int; +- pragma Import (C, pthread_cond_timedwait, "pthread_cond_timedwait"); ++ pragma Import (C, pthread_cond_timedwait, ++ (if OS_Constants.Glibc_Use_Time_Bits64 then "__pthread_cond_timedwait64" ++ else "pthread_cond_timedwait")); + + Relative_Timed_Wait : constant Boolean := False; + -- pthread_cond_timedwait requires an absolute delay time +--- a/src/gcc/ada/libgnarl/s-osinte__kfreebsd-gnu.ads ++++ b/src/gcc/ada/libgnarl/s-osinte__kfreebsd-gnu.ads +@@ -40,6 +40,7 @@ + + with Ada.Unchecked_Conversion; + with Interfaces.C; ++with System.OS_Constants; + with System.C_Time; + + package System.OS_Interface is +@@ -203,7 +204,8 @@ package System.OS_Interface is + -- Indicates whether time slicing is supported (i.e SCHED_RR is supported) + + function nanosleep (rqtp, rmtp : access C_Time.timespec) return int; +- pragma Import (C, nanosleep, "nanosleep"); ++ pragma Import (C, nanosleep, (if OS_Constants.Glibc_Use_Time_Bits64 ++ then "__nanosleep64" else "nanosleep")); + + type clockid_t is new int; + CLOCK_REALTIME : constant clockid_t := 0; +@@ -212,12 +214,14 @@ package System.OS_Interface is + (clock_id : clockid_t; + tp : access C_Time.timespec) + return int; +- pragma Import (C, clock_gettime, "clock_gettime"); ++ pragma Import (C, clock_gettime, (if OS_Constants.Glibc_Use_Time_Bits64 ++ then "__clock_gettime64" else "clock_gettime"); + + function clock_getres + (clock_id : clockid_t; + res : access C_Time.timespec) return int; +- pragma Import (C, clock_getres, "clock_getres"); ++ pragma Import (C, clock_getres, (if OS_Constants.Glibc_Use_Time_Bits64 ++ then "__clock_getres64" else "clock_getres"); + + function sysconf (name : int) return long; + pragma Import (C, sysconf); +@@ -420,7 +424,9 @@ package System.OS_Interface is + (cond : access pthread_cond_t; + mutex : access pthread_mutex_t; + abstime : access C_Time.timespec) return int; +- pragma Import (C, pthread_cond_timedwait, "pthread_cond_timedwait"); ++ pragma Import (C, pthread_cond_timedwait, ++ (if OS_Constants.Glibc_Use_Time_Bits64 then "__pthread_cond_timedwait64" ++ else "pthread_cond_timedwait"); + + -------------------------- + -- POSIX.1c Section 13 -- +--- a/src/gcc/ada/libgnarl/s-osinte__linux.ads ++++ b/src/gcc/ada/libgnarl/s-osinte__linux.ads +@@ -229,12 +229,14 @@ package System.OS_Interface is + + function clock_gettime + (clock_id : clockid_t; tp : access C_Time.timespec) return int; +- pragma Import (C, clock_gettime, "clock_gettime"); ++ pragma Import (C, clock_gettime, (if OS_Constants.Glibc_Use_Time_Bits64 ++ then "__clock_gettime64" else "clock_gettime")); + + function clock_getres + (clock_id : clockid_t; + res : access C_Time.timespec) return int; +- pragma Import (C, clock_getres, "clock_getres"); ++ pragma Import (C, clock_getres, (if OS_Constants.Glibc_Use_Time_Bits64 ++ then "__clock_getres64" else "clock_getres")); + + function sysconf (name : int) return long; + pragma Import (C, sysconf); +@@ -445,7 +447,9 @@ package System.OS_Interface is + (cond : access pthread_cond_t; + mutex : access pthread_mutex_t; + abstime : access C_Time.timespec) return int; +- pragma Import (C, pthread_cond_timedwait, "pthread_cond_timedwait"); ++ pragma Import (C, pthread_cond_timedwait, ++ (if OS_Constants.Glibc_Use_Time_Bits64 then "__pthread_cond_timedwait64" ++ else "pthread_cond_timedwait")); + + -------------------------- + -- POSIX.1c Section 13 -- +--- a/src/gcc/ada/libgnat/g-spogwa.adb ++++ b/src/gcc/ada/libgnat/g-spogwa.adb +@@ -42,7 +42,9 @@ is + writefds : access FD_Set_Type; + exceptfds : access FD_Set_Type; + timeout : access System.C_Time.timeval) return Integer +- with Import => True, Convention => Stdcall, External_Name => "select"; ++ with Import => True, Convention => Stdcall, ++ External_Name => (if System.OS_Constants.Glibc_Use_Time_Bits64 ++ then "__select64" else "select"); + + Timeout_V : aliased System.C_Time.timeval; + Timeout_A : access System.C_Time.timeval; +--- a/src/gcc/ada/libgnat/s-optide.adb ++++ b/src/gcc/ada/libgnat/s-optide.adb +@@ -41,7 +41,8 @@ is + return Integer + with Import, + Convention => C, +- External_Name => "nanosleep"; ++ External_Name => (if OS_Constants.Glibc_Use_Time_Bits64 ++ then "__nanosleep64" else "nanosleep"); + + Request : aliased C_Time.timespec; + Remaind : aliased C_Time.timespec; +--- a/src/gcc/ada/libgnat/s-osprim__posix.adb ++++ b/src/gcc/ada/libgnat/s-osprim__posix.adb +@@ -31,6 +31,7 @@ + + -- This version is for POSIX-like operating systems + with System.C_Time; ++with System.OS_Constants; + + package body System.OS_Primitives is + +@@ -47,7 +48,8 @@ package body System.OS_Primitives is + function gettimeofday + (Tv : access C_Time.timeval; + Tz : System.Address := System.Null_Address) return Integer; +- pragma Import (C, gettimeofday, "gettimeofday"); ++ pragma Import (C, gettimeofday, (if OS_Constants.Glibc_Use_Time_Bits64 ++ then "__gettimeofday64" else "gettimeofday")); + + begin + -- The return codes for gettimeofday are as follows (from man pages): +--- a/src/gcc/ada/libgnat/s-osprim__posix2008.adb ++++ b/src/gcc/ada/libgnat/s-osprim__posix2008.adb +@@ -54,7 +54,8 @@ package body System.OS_Primitives is + function clock_gettime + (clock_id : clockid_t; + tp : access C_Time.timespec) return int; +- pragma Import (C, clock_gettime, "clock_gettime"); ++ pragma Import (C, clock_gettime, (if OS_Constants.Glibc_Use_Time_Bits64 ++ thon "__clock_gettime64" else "clock_gettime")); + + begin + Result := clock_gettime (CLOCK_REALTIME, TS'Unchecked_Access); +--- a/src/gcc/ada/s-oscons-tmplt.c ++++ b/src/gcc/ada/s-oscons-tmplt.c +@@ -1770,6 +1770,22 @@ CNS(MAX_tv_sec, "") + CND(SIZEOF_tv_nsec, "tv_nsec, long except on x32"); + } + ++/* ++ ++ -- Functions with time_t suseconds_t timeval timespec parameters like ++ -- clock_get{res,time} gettimeofday nanosleep ++ -- pthread_cond_{,timed}wait select ++ -- must be imported from the GNU C library with ++ -- External_Name => (if Glibc_Use_Time_Bits64 then "__foo64" else "foo") ++ -- The test is safe in files that do not require GNU specifically. ++ ++*/ ++#if defined(__USE_TIME64_REDIRECTS) || (__TIMESIZE == 32 && __USE_TIME_BITS64) ++ C("Glibc_Use_Time_Bits64", Boolean, "True", "Y2038 Glibc transition") ++#else ++ C("Glibc_Use_Time_Bits64", Boolean, "False", "Y2038 Glibc transition") ++#endif ++ + /* + + -- Sizes of various data types diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/ada-749574.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/ada-749574.diff new file mode 100644 index 0000000000..cda98a8534 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/ada-749574.diff @@ -0,0 +1,114 @@ +From: Ludovic Brenta +From: Nicolas Boulenguez +Forwarded: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81087 +Bug-Debian: http://bugs.debian.org/749574 +Description: array index out of range in gnatlink + The procedure gnatlink assumes that the Linker_Options.Table contains access + values to strings whose 'First index is always 1. This assumption is wrong + for the string returned by function Base_Name. + . + The wrong indices are not detected because gnatlink is compiled with + -gnatp, but the test result is wrong. + . + The following program normally raises Constraint_Error, prints FALSE + if compiled with -gnatp, while the expected result is TRUE. + . + procedure A is + G : constant String (3 .. 5) := "abc"; + begin + Ada.Text_IO.Put_Line (Boolean'Image (G (1 .. 2) = "ab")); + end A; + +--- a/src/gcc/ada/gnatlink.adb ++++ b/src/gcc/ada/gnatlink.adb +@@ -238,6 +238,9 @@ procedure Gnatlink is + procedure Write_Usage; + -- Show user the program options + ++ function Starts_With (Source, Pattern : String) return Boolean; ++ pragma Inline (Starts_With); ++ + --------------- + -- Base_Name -- + --------------- +@@ -494,7 +497,7 @@ procedure Gnatlink is + Binder_Options.Table (Binder_Options.Last) := + Linker_Options.Table (Linker_Options.Last); + +- elsif Arg'Length >= 7 and then Arg (1 .. 7) = "--LINK=" then ++ elsif Starts_With (Arg, "--LINK=") then + if Arg'Length = 7 then + Exit_With_Error ("Missing argument for --LINK="); + end if; +@@ -528,7 +531,7 @@ procedure Gnatlink is + end loop; + end; + +- elsif Arg'Length >= 6 and then Arg (1 .. 6) = "--GCC=" then ++ elsif Starts_With (Arg, "--GCC=") then + if Arg'Length = 6 then + Exit_With_Error ("Missing argument for --GCC="); + end if; +@@ -1255,13 +1258,9 @@ procedure Gnatlink is + 1 .. Linker_Options.Last + loop + if Linker_Options.Table (J) /= null +- and then +- Linker_Options.Table (J)'Length +- > Run_Path_Opt'Length +- and then +- Linker_Options.Table (J) +- (1 .. Run_Path_Opt'Length) = +- Run_Path_Opt ++ and then Starts_With ++ (Linker_Options.Table (J).all, ++ Run_Path_Opt) + then + -- We have found an already + -- specified run_path_option: +@@ -1378,6 +1377,17 @@ procedure Gnatlink is + Status := fclose (Fd); + end Process_Binder_File; + ++ ---------------- ++ -- StartsWith -- ++ ---------------- ++ ++ function Starts_With (Source, Pattern : String) return Boolean is ++ Last : constant Natural := Source'First + Pattern'Length - 1; ++ begin ++ return Last <= Source'Last ++ and then Pattern = Source (Source'First .. Last); ++ end Starts_With; ++ + ----------- + -- Usage -- + ----------- +@@ -1891,8 +1901,8 @@ begin + while J <= Linker_Options.Last loop + if Linker_Options.Table (J).all = "-Xlinker" + and then J < Linker_Options.Last +- and then Linker_Options.Table (J + 1)'Length > 8 +- and then Linker_Options.Table (J + 1) (1 .. 8) = "--stack=" ++ and then Starts_With (Linker_Options.Table (J + 1).all, ++ "--stack=") + then + if Stack_Op then + Linker_Options.Table (J .. Linker_Options.Last - 2) := +@@ -1937,13 +1947,9 @@ begin + -- Here we just check for a canonical form that matches the + -- pragma Linker_Options set in the NT runtime. + +- if (Linker_Options.Table (J)'Length > 17 +- and then Linker_Options.Table (J) (1 .. 17) = +- "-Xlinker --stack=") +- or else +- (Linker_Options.Table (J)'Length > 12 +- and then Linker_Options.Table (J) (1 .. 12) = +- "-Wl,--stack=") ++ if Starts_With (Linker_Options.Table (J).all, "-Xlinker --stack=") ++ or else Starts_With (Linker_Options.Table (J).all, ++ "-Wl,--stack=") + then + if Stack_Op then + Linker_Options.Table (J .. Linker_Options.Last - 1) := diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/ada-armel-libatomic.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/ada-armel-libatomic.diff new file mode 100644 index 0000000000..391ef5aa6f --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/ada-armel-libatomic.diff @@ -0,0 +1,51 @@ +Description: link libgnat with libatomic on armel + TODO: check if #861734 is reproducible nowadays. + . + debian/rules.patch applies this when DEB_TARGET_ARCH is armel. + The condition in src/gcc/ada/gcc-interface/Makefile.in could be + refined to exclude armhf, but the artificial dependency on libatomic + in src/Makefile.def would remain. + . + Autogen should refresh src/Makefile.in from src/Makefile.{def,tpl} + at build time, but we do not want to Build-Depend: guile. + # export QUILT_PATCHES=debian/patches + # quilt pop $this.diff + # quilt add src/Makefile.in + # (cd src && autogen Makefile.def) + # quilt refresh --no-timestamps --no-index -pab + # quilt push -a +Bug-Debian: https://bugs.debian.org/861734 +Author: Matthias Klose +Author: Nicolas Boulenguez + +--- a/src/gcc/ada/Makefile.rtl ++++ b/src/gcc/ada/Makefile.rtl +@@ -2213,6 +2213,7 @@ endif + + # ARM linux, GNU eabi + ifeq ($(strip $(filter-out arm% linux-gnueabi%,$(target_cpu) $(target_os))),) ++ MISCLIB = ../../../$(target_alias)/libatomic/.libs/libatomic.so + LIBGNAT_TARGET_PAIRS = \ + a-intnam.ads 1", + which may happen even if a match has been found. + This part will most probably be of interest for upstream. + . + Update the gnatchop tool to use this function. + This part will most probably be of interest for upstream. + . + Check that the target and version in the gnatmake program name, if + present, match the static constants inside the gnatmake program + itself. Also, knowing the length of the only allowed prefix and suffix + slightly improves performance by avoiding loops. + This part will most probably be of interest for upstream. + . + In Debian, gcc/gcc-version/target-gcc are symbolic links to the + target-gcc-version executable. The same holds for gnatmake, but the + target and version may differ. So "target-gcc-version" is the right + answer. It helps log checkers and humans debuggers, even if gnatmake + was invoked via a shortcut intended for human typers. + This part will probably be hard to merge for upstream, as some + distributions provide no "target-gcc-version". + . + Log for bug 903694 carries regression tests for both bugs. +Forwarded: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87777 +Bug-Debian: https://bugs.debian.org/814977 +Bug-Debian: https://bugs.debian.org/814978 +Bug-Debian: https://bugs.debian.org/856274 +Bug-Debian: https://bugs.debian.org/881938 +Bug-Debian: https://bugs.debian.org/903694 +Author: Ludovic Brenta +Author: Nicolas Boulenguez +Author: Svante Signell +Author: YunQiang Su + +--- a/src/gcc/ada/osint.ads ++++ b/src/gcc/ada/osint.ads +@@ -144,14 +144,10 @@ package Osint is + -- path) in Name_Buffer, with the length in Name_Len. + + function Program_Name (Nam : String; Prog : String) return String_Access; +- -- In the native compilation case, creates a string containing Nam. In the +- -- cross compilation case, looks at the prefix of the current program being +- -- run and prepends it to Nam. For instance if the program being run is +- -- -gnatmake and Nam is "gcc", the returned value will be a pointer +- -- to "-gcc". This function clobbers Name_Buffer and Name_Len. +- -- Also looks at any suffix, e.g. gnatmake-4.1 -> "gcc-4.1". Prog is the +- -- default name of the current program being executed, e.g. "gnatmake", +- -- "gnatlink". ++ -- On Debian, always create a string containing ++ -- Sdefault.Target_Name & '-' & Nam & '-' & Gnatvsn.Library_Version. ++ -- Fail if the program base name differs from Prog, ++ -- maybe extended with the same prefix or suffix. + + procedure Write_Program_Name; + -- Writes name of program as invoked to the current output (normally +--- a/src/gcc/ada/osint.adb ++++ b/src/gcc/ada/osint.adb +@@ -2268,50 +2268,51 @@ package body Osint is + ------------------ + + function Program_Name (Nam : String; Prog : String) return String_Access is +- End_Of_Prefix : Natural := 0; +- Start_Of_Prefix : Positive := 1; +- Start_Of_Suffix : Positive; +- ++ -- Most of the work is to check that the current program name ++ -- is consistent with the two static constants below. ++ Suffix : constant String := '-' & Gnatvsn.Library_Version; ++ Prefix : Types.String_Ptr := Sdefault.Target_Name; ++ First : Integer; ++ Result : System.OS_Lib.String_Access; + begin + -- Get the name of the current program being executed +- + Find_Program_Name; + +- Start_Of_Suffix := Name_Len + 1; ++ -- If our version is present, skip it. ++ First := Name_Len - Suffix'Length + 1; ++ if 0 < First and then Name_Buffer (First .. Name_Len) = Suffix then ++ Name_Len := First - 1; ++ end if; ++ ++ -- The central part must be Prog. ++ First := Name_Len - Prog'Length + 1; ++ if First <= 0 or else Name_Buffer (First .. Name_Len) /= Prog then ++ Fail ("Osint.Program_Name: must end with " & Prog ++ & " or " & Prog & Suffix); ++ end if; ++ Name_Len := First - 1; + +- -- Find the target prefix if any, for the cross compilation case. +- -- For instance in "powerpc-elf-gcc" the target prefix is +- -- "powerpc-elf-" +- -- Ditto for suffix, e.g. in "gcc-4.1", the suffix is "-4.1" +- +- for J in reverse 1 .. Name_Len loop +- if Is_Directory_Separator (Name_Buffer (J)) +- or else Name_Buffer (J) = ':' +- then +- Start_Of_Prefix := J + 1; +- exit; +- end if; +- end loop; +- +- -- Find End_Of_Prefix +- +- for J in Start_Of_Prefix .. Name_Len - Prog'Length + 1 loop +- if Name_Buffer (J .. J + Prog'Length - 1) = Prog then +- End_Of_Prefix := J - 1; +- exit; +- end if; +- end loop; ++ -- According to Make-generated.in, this ends with a slash. ++ Prefix.all (Prefix.all'Last) := '-'; + +- if End_Of_Prefix > 1 then +- Start_Of_Suffix := End_Of_Prefix + Prog'Length + 1; ++ -- If our target is present, skip it. ++ First := Name_Len - Prefix.all'Length + 1; ++ if 0 < First and then Name_Buffer (First .. Name_Len) = Prefix.all then ++ Name_Len := First - 1; + end if; + +- -- Create the new program name ++ -- What remains must be the directory part. ++ if 0 < Name_Len ++ and then Name_Buffer (Name_Len) /= ':' ++ and then not Is_Directory_Separator (Name_Buffer (Name_Len)) ++ then ++ Fail ("Osint.Program_Name: must start with " & Prog ++ & " or " & Prefix.all & Prog); ++ end if; + +- return new String' +- (Name_Buffer (Start_Of_Prefix .. End_Of_Prefix) +- & Nam +- & Name_Buffer (Start_Of_Suffix .. Name_Len)); ++ Result := new String'(Prefix.all & Nam & Suffix); ++ Types.Free (Prefix); ++ return Result; + end Program_Name; + + ------------------------------ +--- a/src/gcc/ada/gnatchop.adb ++++ b/src/gcc/ada/gnatchop.adb +@@ -36,6 +36,7 @@ with GNAT.OS_Lib; use GNA + with GNAT.Heap_Sort_G; + with GNAT.Table; + ++with Osint; + with Switch; use Switch; + with Types; + +@@ -44,12 +45,9 @@ procedure Gnatchop is + Config_File_Name : constant String_Access := new String'("gnat.adc"); + -- The name of the file holding the GNAT configuration pragmas + +- Gcc : String_Access := new String'("gcc"); ++ Gcc : String_Access := null; + -- May be modified by switch --GCC= + +- Gcc_Set : Boolean := False; +- -- True if a switch --GCC= is used +- + Gnat_Cmd : String_Access; + -- Command to execute the GNAT compiler + +@@ -222,12 +220,6 @@ procedure Gnatchop is + Integer'Image + (Maximum_File_Name_Length); + +- function Locate_Executable +- (Program_Name : String; +- Look_For_Prefix : Boolean := True) return String_Access; +- -- Locate executable for given program name. This takes into account +- -- the target-prefix of the current command, if Look_For_Prefix is True. +- + subtype EOL_Length is Natural range 0 .. 2; + -- Possible lengths of end of line sequence + +@@ -492,76 +484,6 @@ procedure Gnatchop is + Unit.Table (Sorted_Units.Table (U + 1)).File_Name.all; + end Is_Duplicated; + +- ----------------------- +- -- Locate_Executable -- +- ----------------------- +- +- function Locate_Executable +- (Program_Name : String; +- Look_For_Prefix : Boolean := True) return String_Access +- is +- Gnatchop_Str : constant String := "gnatchop"; +- Current_Command : constant String := Normalize_Pathname (Command_Name); +- End_Of_Prefix : Natural; +- Start_Of_Prefix : Positive; +- Start_Of_Suffix : Positive; +- Result : String_Access; +- +- begin +- Start_Of_Prefix := Current_Command'First; +- Start_Of_Suffix := Current_Command'Last + 1; +- End_Of_Prefix := Start_Of_Prefix - 1; +- +- if Look_For_Prefix then +- +- -- Find Start_Of_Prefix +- +- for J in reverse Current_Command'Range loop +- if Current_Command (J) = '/' or else +- Current_Command (J) = Directory_Separator or else +- Current_Command (J) = ':' +- then +- Start_Of_Prefix := J + 1; +- exit; +- end if; +- end loop; +- +- -- Find End_Of_Prefix +- +- for J in Start_Of_Prefix .. +- Current_Command'Last - Gnatchop_Str'Length + 1 +- loop +- if Current_Command (J .. J + Gnatchop_Str'Length - 1) = +- Gnatchop_Str +- then +- End_Of_Prefix := J - 1; +- exit; +- end if; +- end loop; +- end if; +- +- if End_Of_Prefix > Current_Command'First then +- Start_Of_Suffix := End_Of_Prefix + Gnatchop_Str'Length + 1; +- end if; +- +- declare +- Command : constant String := +- Current_Command (Start_Of_Prefix .. End_Of_Prefix) +- & Program_Name +- & Current_Command (Start_Of_Suffix .. +- Current_Command'Last); +- begin +- Result := Locate_Exec_On_Path (Command); +- +- if Result = null then +- Error_Msg +- (Command & ": installation problem, executable not found"); +- end if; +- end; +- +- return Result; +- end Locate_Executable; +- + --------------- + -- Parse_EOL -- + --------------- +@@ -1089,8 +1011,8 @@ procedure Gnatchop is + exit; + + when '-' => +- Gcc := new String'(Parameter); +- Gcc_Set := True; ++ Free (Gcc); ++ Gcc := new String'(Parameter); + + when 'c' => + Compilation_Mode := True; +@@ -1768,9 +1690,13 @@ begin + + -- Check presence of required executables + +- Gnat_Cmd := Locate_Executable (Gcc.all, not Gcc_Set); ++ if Gcc = null then ++ Gcc := Osint.Program_Name ("gcc", "gnatchop"); ++ end if; ++ Gnat_Cmd := Locate_Exec_On_Path (Gcc.all); + + if Gnat_Cmd = null then ++ Error_Msg (Gcc.all & ": installation problem, executable not found"); + goto No_Files_Written; + end if; + diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/ada-gnattools-cross.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/ada-gnattools-cross.diff new file mode 100644 index 0000000000..94fae55860 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/ada-gnattools-cross.diff @@ -0,0 +1,228 @@ +TODO: Check that the part removing the dependency from stamp-gnatlib1 +to stamp-gnatlib2 is not necessary anymore with gcc-9. + +* Link tools dynamically. +* Prevent direct embedding of libada objects: + Mark ALI files as read-only, remove objects after the build. + A solution keeping the objects would be more intrusive. +* Rebuild gnatbind/make/link with themselves. + This removes unneeded objects inherited from the hardcoded bootstrap list. + The same thing would be useful for gnat1drv, but is less easy. +* TOOLS_ALREADY_COMPILED lists LIBGNAT objects that + gcc/ada/gcc-interface/Makefile should not rebuild. +* Link libgnat/gnarl with LDFLAGS. +* Link libgnarl with an explicit path to a shared object. + This prevents undefined symbols or unwanted usage of host libgnat. +* Compile with -gnatn for efficiency. + Double-check the link since Debian moves some symbols. +* set LD_LIBRARY_PATH so that rebuilt tools can be executed. + +--- a/src/gcc/ada/Makefile.rtl ++++ b/src/gcc/ada/Makefile.rtl +@@ -1836,6 +1836,11 @@ ifeq ($(strip $(filter-out s390% linux%, + LIBRARY_VERSION := $(LIB_VERSION) + endif + ++ifeq ($(strip $(filter-out hppa% unknown linux gnu,$(targ))),) ++ GNATLIB_SHARED = gnatlib-shared-dual ++ LIBRARY_VERSION := $(LIB_VERSION) ++endif ++ + # HP/PA HP-UX 10 + ifeq ($(strip $(filter-out hppa% hp hpux10%,$(target_cpu) $(target_vendor) $(target_os))),) + LIBGNAT_TARGET_PAIRS = \ +--- a/src/gcc/ada/gcc-interface/Makefile.in ++++ b/src/gcc/ada/gcc-interface/Makefile.in +@@ -498,6 +498,20 @@ gnatlink-re: ../stamp-tools gnatmake-re + --GCC="$(CC) $(ADA_INCLUDES)" --LINK="$(GCC_LINK)" $(TOOLS_LIBS) + $(MV) ../../gnatlinknew$(exeext) ../../gnatlink$(exeext) + ++gnatbind-re: ../stamp-tools gnatmake-re gnatlink-re ++ $(GNATMAKE) -j0 -c $(ADA_INCLUDES) gnatbind --GCC="$(CC) $(ALL_ADAFLAGS)" ++ $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatbind ++ $(GNATLINK) -v gnatbind -o ../../gnatbind$(exeext) \ ++ --GCC="$(CC) $(ADA_INCLUDES)" --LINK="$(GCC_LINK)" $(TOOLS_LIBS) ++ ++# When driven by gnattools/Makefile for a native build, ++# TOOLS_ALREADY_COMPILED will list objects in the target standard Ada ++# libraries, that Make should avoid rebuilding. ++# We cannot use recursive variables to avoid an infinite loop, ++# so we must put this after definition of EXTRA_GNATMAKE_OBJS. ++GNATLINK_OBJS := $(filter-out $(TOOLS_ALREADY_COMPILED),$(GNATLINK_OBJS)) ++GNATMAKE_OBJS := $(filter-out $(TOOLS_ALREADY_COMPILED),$(GNATMAKE_OBJS)) ++ + # Needs to be built with CC=gcc + # Since the RTL should be built with the latest compiler, remove the + # stamp target in the parent directory whenever gnat1 is rebuilt +@@ -625,7 +639,7 @@ $(RTSDIR)/s-oscons.ads: ../stamp-gnatlib + $(OSCONS_EXTRACT) ; \ + ../bldtools/oscons/xoscons s-oscons) + +-gnatlib: ../stamp-gnatlib1-$(RTSDIR) ../stamp-gnatlib2-$(RTSDIR) $(RTSDIR)/s-oscons.ads ++gnatlib: ../stamp-gnatlib1-$(RTSDIR) $(RTSDIR)/s-oscons.ads + test -f $(RTSDIR)/s-oscons.ads || exit 1 + # C files + $(MAKE) -C $(RTSDIR) \ +@@ -657,18 +671,30 @@ gnatlib: ../stamp-gnatlib1-$(RTSDIR) ../ + $(RANLIB_FOR_TARGET) $(RTSDIR)/libgmem$(arext) + endif + $(CHMOD) a-wx $(RTSDIR)/*.ali ++# Provide .ads .adb (read-only).ali .so .a, but prevent direct use of .o. ++ $(RM) $(RTSDIR)/*.o + touch ../stamp-gnatlib-$(RTSDIR) + + # Warning: this target assumes that LIBRARY_VERSION has been set correctly. + gnatlib-shared-default: +- $(MAKE) $(FLAGS_TO_PASS) \ +- GNATLIBFLAGS="$(GNATLIBFLAGS)" \ +- GNATLIBCFLAGS="$(GNATLIBCFLAGS) $(PICFLAG_FOR_TARGET) -fno-lto" \ +- GNATLIBCFLAGS_FOR_C="$(GNATLIBCFLAGS_FOR_C) $(PICFLAG_FOR_TARGET) -fno-lto" \ +- MULTISUBDIR="$(MULTISUBDIR)" \ +- THREAD_KIND="$(THREAD_KIND)" \ +- LN_S="$(LN_S)" \ +- gnatlib ++ $(MAKE) -C $(RTSDIR) \ ++ CC="`echo \"$(GCC_FOR_TARGET)\" \ ++ | sed -e 's,\./xgcc,../../xgcc,' -e 's,-B\./,-B../../,'`" \ ++ INCLUDES="$(INCLUDES_FOR_SUBDIR) -I./../.." \ ++ CFLAGS="$(GNATLIBCFLAGS_FOR_C) $(PICFLAG_FOR_TARGET) -fno-lto" \ ++ FORCE_DEBUG_ADAFLAGS="$(FORCE_DEBUG_ADAFLAGS)" \ ++ srcdir=$(fsrcdir) \ ++ -f ../Makefile $(LIBGNAT_OBJS) ++ $(MAKE) -C $(RTSDIR) \ ++ CC="`echo \"$(GCC_FOR_TARGET)\" \ ++ | sed -e 's,\./xgcc,../../xgcc,' -e 's,-B\./,-B../../,'`" \ ++ ADA_INCLUDES="" \ ++ CFLAGS="$(GNATLIBCFLAGS) $(PICFLAG_FOR_TARGET) -fno-lto" \ ++ ADAFLAGS="$(GNATLIBFLAGS) $(PICFLAG_FOR_TARGET) -fno-lto" \ ++ FORCE_DEBUG_ADAFLAGS="$(FORCE_DEBUG_ADAFLAGS)" \ ++ srcdir=$(fsrcdir) \ ++ -f ../Makefile \ ++ $(GNATRTL_OBJS) + $(RM) $(RTSDIR)/libgna*$(soext) + cd $(RTSDIR); $(GCC_FOR_ADA_RTS) -shared $(GNATLIBCFLAGS) \ + $(PICFLAG_FOR_TARGET) \ +@@ -679,8 +705,10 @@ gnatlib-shared-default: + cd $(RTSDIR); $(GCC_FOR_ADA_RTS) -shared $(GNATLIBCFLAGS) \ + $(PICFLAG_FOR_TARGET) \ + -o libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \ ++ $(LDFLAGS) \ + $(GNATRTL_TASKING_OBJS) \ + $(SO_OPTS)libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \ ++ libgnat$(hyphen)$(LIBRARY_VERSION).so \ + $(THREADSLIB) + cd $(RTSDIR); $(LN_S) libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \ + libgnat$(soext) +@@ -696,6 +724,10 @@ gnatlib-shared-default: + $(addprefix $(RTSDIR)/,$(GNATRTL_TASKING_OBJS)) + $(RANLIB_FOR_TARGET) $(RTSDIR)/libgnarl_pic$(arext) + ++# Provide .ads .adb (read-only).ali .so .a, but prevent direct use of .o. ++ $(CHMOD) a-wx $(RTSDIR)/*.ali ++ $(RM) $(RTSDIR)/*.o ++ + gnatlib-shared-dual: + $(MAKE) $(FLAGS_TO_PASS) \ + GNATLIBFLAGS="$(GNATLIBFLAGS)" \ +@@ -705,11 +737,8 @@ gnatlib-shared-dual: + MULTISUBDIR="$(MULTISUBDIR)" \ + THREAD_KIND="$(THREAD_KIND)" \ + LN_S="$(LN_S)" \ +- gnatlib-shared-default +- $(MV) $(RTSDIR)/libgna*$(soext) . +- $(MV) $(RTSDIR)/libgnat_pic$(arext) . +- $(MV) $(RTSDIR)/libgnarl_pic$(arext) . +- $(RM) ../stamp-gnatlib2-$(RTSDIR) ++ gnatlib ++ $(RM) $(RTSDIR)/*.o $(RTSDIR)/*.ali + $(MAKE) $(FLAGS_TO_PASS) \ + GNATLIBFLAGS="$(GNATLIBFLAGS)" \ + GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \ +@@ -717,10 +746,7 @@ gnatlib-shared-dual: + MULTISUBDIR="$(MULTISUBDIR)" \ + THREAD_KIND="$(THREAD_KIND)" \ + LN_S="$(LN_S)" \ +- gnatlib +- $(MV) libgna*$(soext) $(RTSDIR) +- $(MV) libgnat_pic$(arext) $(RTSDIR) +- $(MV) libgnarl_pic$(arext) $(RTSDIR) ++ gnatlib-shared-default + + gnatlib-shared-dual-win32: + $(MAKE) $(FLAGS_TO_PASS) \ +@@ -731,9 +757,8 @@ gnatlib-shared-dual-win32: + MULTISUBDIR="$(MULTISUBDIR)" \ + THREAD_KIND="$(THREAD_KIND)" \ + LN_S="$(LN_S)" \ +- gnatlib-shared-win32 +- $(MV) $(RTSDIR)/libgna*$(soext) . +- $(RM) ../stamp-gnatlib2-$(RTSDIR) ++ gnatlib ++ $(RM) $(RTSDIR)/*.o $(RTSDIR)/*.ali + $(MAKE) $(FLAGS_TO_PASS) \ + GNATLIBFLAGS="$(GNATLIBFLAGS)" \ + GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \ +@@ -741,8 +766,7 @@ gnatlib-shared-dual-win32: + MULTISUBDIR="$(MULTISUBDIR)" \ + THREAD_KIND="$(THREAD_KIND)" \ + LN_S="$(LN_S)" \ +- gnatlib +- $(MV) libgna*$(soext) $(RTSDIR) ++ gnatlib-shared-win32 + + # ??? we need to add the option to support auto-import of arrays/records to + # the GNATLIBFLAGS when this will be supported by GNAT. At this point we will +--- a/src/gnattools/Makefile.in ++++ b/src/gnattools/Makefile.in +@@ -75,16 +75,23 @@ CXX_LFLAGS = \ + -L../../../$(target_noncanonical)/libstdc++-v3/src/.libs \ + -L../../../$(target_noncanonical)/libstdc++-v3/libsupc++/.libs + ++rtsdir := $(abspath ../gcc/ada/rts) ++ + # Variables for gnattools, native + TOOLS_FLAGS_TO_PASS_NATIVE= \ + "CC=../../xgcc -B../../" \ + "CXX=../../xg++ -B../../ $(CXX_LFLAGS)" \ + "CFLAGS=$(CFLAGS) $(WARN_CFLAGS)" \ +- "LDFLAGS=$(LDFLAGS)" \ +- "ADAFLAGS=$(ADAFLAGS)" \ ++ "LDFLAGS=$(LDFLAGS) -Wl,--no-allow-shlib-undefined \ ++ -Wl,--no-copy-dt-needed-entries -Wl,--no-undefined" \ ++ "ADAFLAGS=$(ADAFLAGS) -gnatn" \ + "ADA_CFLAGS=$(ADA_CFLAGS)" \ + "INCLUDES=$(INCLUDES_FOR_SUBDIR)" \ +- "ADA_INCLUDES=-I- -I../rts $(ADA_INCLUDES_FOR_SUBDIR)"\ ++ "ADA_INCLUDES=-I- -nostdinc -I$(rtsdir) $(ADA_INCLUDES_FOR_SUBDIR)" \ ++ "TOOLS_ALREADY_COMPILED=$(foreach d, $(rtsdir), \ ++ $(patsubst $(d)/%.ali,%.o, $(wildcard $(d)/*.ali)))" \ ++ 'LIBGNAT=$(rtsdir)/libgnat-$$(LIB_VERSION).so' \ ++ "GNATBIND_FLAGS=-nostdlib -x" \ + "exeext=$(exeext)" \ + "fsrcdir=$(fsrcdir)" \ + "srcdir=$(fsrcdir)" \ +@@ -194,6 +201,10 @@ $(GCC_DIR)/stamp-tools: + # to be able to build gnatmake without a version of gnatmake around. Once + # everything has been compiled once, gnatmake can be recompiled with itself + # (see target regnattools) ++gnattools-native: export LD_LIBRARY_PATH := \ ++ $(if $(LD_LIBRARY_PATH),$(LD_LIBRARY_PATH):)$(rtsdir) ++# Useful even for 1st pass, as ../../gnatmake may already be ++# dynamically linked in case this target has already been invoked. + gnattools-native: $(GCC_DIR)/stamp-tools $(GCC_DIR)/stamp-gnatlib-rts + # gnattools1 + $(MAKE) -C $(GCC_DIR)/ada/tools -f ../Makefile \ +@@ -202,6 +213,13 @@ gnattools-native: $(GCC_DIR)/stamp-tools + # gnattools2 + $(MAKE) -C $(GCC_DIR)/ada/tools -f ../Makefile \ + $(TOOLS_FLAGS_TO_PASS_NATIVE) common-tools ++# The hard-coded object lists for gnatbind/make/link contain unneeded ++# objects. Use the fresh tools to recompute dependencies. ++# A separate Make run avoids race conditions between gnatmakes ++# building the same object for common-tools and gnat*-re. ++# (parallelism is already forbidden between gnat*-re targets) ++ $(MAKE) -C $(GCC_DIR)/ada/tools -f ../Makefile \ ++ $(TOOLS_FLAGS_TO_PASS_NATIVE) gnatbind-re gnatmake-re gnatlink-re + + # gnatmake/link can be built with recent gnatmake/link if they are available. + # This is especially convenient for building cross tools or for rebuilding diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/ada-kfreebsd.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/ada-kfreebsd.diff new file mode 100644 index 0000000000..9a926da866 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/ada-kfreebsd.diff @@ -0,0 +1,70 @@ +Description: add support for GNU/kFreeBSD and GNU/Hurd. + For now, it seems that BSD requires -lrt. + On other architectures, the library is ignored thanks to --as-needed. +Author: Ludovic Brenta +Author: Nicolas Boulenguez + +--- a/src/gcc/ada/libgnarl/s-osinte__kfreebsd-gnu.ads ++++ b/src/gcc/ada/libgnarl/s-osinte__kfreebsd-gnu.ads +@@ -46,6 +46,7 @@ package System.OS_Interface is + pragma Preelaborate; + + pragma Linker_Options ("-lpthread"); ++ pragma Linker_Options ("-lrt"); + + subtype int is Interfaces.C.int; + subtype char is Interfaces.C.char; +@@ -438,31 +439,25 @@ package System.OS_Interface is + PTHREAD_PRIO_PROTECT : constant := 2; + PTHREAD_PRIO_INHERIT : constant := 1; + ++ -- GNU/kFreeBSD does not support Thread Priority Protection or Thread ++ -- Priority Inheritance and lacks some pthread_mutexattr_* functions. ++ -- Replace them with dummy versions. ++ + function pthread_mutexattr_setprotocol +- (attr : access pthread_mutexattr_t; +- protocol : int) return int; +- pragma Import +- (C, pthread_mutexattr_setprotocol, "pthread_mutexattr_setprotocol"); ++ (ignored_attr : access pthread_mutexattr_t; ++ ignored_protocol : int) return int is (0); + + function pthread_mutexattr_getprotocol +- (attr : access pthread_mutexattr_t; +- protocol : access int) return int; +- pragma Import +- (C, pthread_mutexattr_getprotocol, "pthread_mutexattr_getprotocol"); ++ (ignored_attr : access pthread_mutexattr_t; ++ ignored_protocol : access int) return int is (0); + + function pthread_mutexattr_setprioceiling +- (attr : access pthread_mutexattr_t; +- prioceiling : int) return int; +- pragma Import +- (C, pthread_mutexattr_setprioceiling, +- "pthread_mutexattr_setprioceiling"); ++ (ignored_attr : access pthread_mutexattr_t; ++ ignored_prioceiling : int) return int is (0); + + function pthread_mutexattr_getprioceiling +- (attr : access pthread_mutexattr_t; +- prioceiling : access int) return int; +- pragma Import +- (C, pthread_mutexattr_getprioceiling, +- "pthread_mutexattr_getprioceiling"); ++ (ignored_attr : access pthread_mutexattr_t; ++ ignored_prioceiling : access int) return int is (0); + + type struct_sched_param is record + sched_priority : int; -- scheduling priority +--- a/src/gcc/ada/s-oscons-tmplt.c ++++ b/src/gcc/ada/s-oscons-tmplt.c +@@ -1970,6 +1970,7 @@ CND(CLOCK_THREAD_CPUTIME_ID, "Thread CPU + + #if defined(__linux__) || defined(__FreeBSD__) \ + || (defined(_AIX) && defined(_AIXVERSION_530)) \ ++ || defined(__FreeBSD_kernel__) \ + || defined(__DragonFly__) || defined(__QNX__) + /** On these platforms use system provided monotonic clock instead of + ** the default CLOCK_REALTIME. We then need to set up cond var attributes diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/ada-lib-info-source-date-epoch.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/ada-lib-info-source-date-epoch.diff new file mode 100644 index 0000000000..0965f5e42a --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/ada-lib-info-source-date-epoch.diff @@ -0,0 +1,114 @@ +Description: set ALI timestamps from SOURCE_DATE_EPOCH if available. + When the SOURCE_DATE_EPOCH environment variable is set, + replace timestamps more recent than its value with its value + when writing Ada Library Information (ALI) files. + This allow reproducible builds from generated or patched Ada sources. + https://reproducible-builds.org/specs/source-date-epoch/ + . + Also see debian/ada/test_ada_source_date_epoch.sh. +Author: Nicolas Boulenguez + +--- a/src/gcc/ada/osint.adb ++++ b/src/gcc/ada/osint.adb +@@ -64,6 +64,10 @@ package body Osint is + -- Used in Locate_File as a fake directory when Name is already an + -- absolute path. + ++ Source_Date_Epoch : OS_Time := Invalid_Time; ++ -- Set at startup by the Initialize procedure. ++ -- See the specification of the File_Time_Stamp functions. ++ + ------------------------------------- + -- Use of Name_Find and Name_Enter -- + ------------------------------------- +@@ -1126,8 +1130,14 @@ package body Osint is + is + function Internal (N : C_File_Name; A : System.Address) return OS_Time; + pragma Import (C, Internal, "__gnat_file_time_name_attr"); ++ T : OS_Time := Internal (Name, Attr.all'Address); + begin +- return Internal (Name, Attr.all'Address); ++ if Source_Date_Epoch /= Invalid_Time and then T /= Invalid_Time ++ and then Source_Date_Epoch < T ++ then ++ T := Source_Date_Epoch; ++ end if; ++ return T; + end File_Time_Stamp; + + function File_Time_Stamp +@@ -1150,6 +1160,7 @@ package body Osint is + ---------------- + + function File_Stamp (Name : File_Name_Type) return Time_Stamp_Type is ++ T : OS_Time; + begin + if Name = No_File then + return Empty_Time_Stamp; +@@ -1161,9 +1172,13 @@ package body Osint is + -- not exist, and OS_Time_To_GNAT_Time will convert this value to + -- Empty_Time_Stamp. Therefore we do not need to first test whether + -- the file actually exists, which saves a system call. +- +- return OS_Time_To_GNAT_Time +- (File_Time_Stamp (Name_Buffer (1 .. Name_Len))); ++ T := File_Time_Stamp (Name_Buffer (1 .. Name_Len)); ++ if Source_Date_Epoch /= Invalid_Time and then T /= Invalid_Time ++ and then Source_Date_Epoch < T ++ then ++ T := Source_Date_Epoch; ++ end if; ++ return OS_Time_To_GNAT_Time (T); + end File_Stamp; + + function File_Stamp (Name : Path_Name_Type) return Time_Stamp_Type is +@@ -3261,4 +3276,27 @@ begin + Osint.Initialize; + end Initialization; + ++ Set_Source_Date_Epoch : declare ++ Env_Var : String_Access := Getenv ("SOURCE_DATE_EPOCH"); ++ Epoch : Long_Long_Integer range 0 .. Long_Long_Integer'Last := 0; ++ Digit : Long_Long_Integer range 0 .. 9; ++ begin ++ if 0 < Env_Var.all'Length then ++ -- Calling System.Val_LLI breaks the bootstrap sequence. ++ for C of Env_Var.all loop ++ if C not in '0' .. '9' then ++ goto Finally; ++ end if; ++ Digit := Character'Pos (C) - Character'Pos ('0'); ++ if (Long_Long_Integer'Last - Digit) / 10 < Epoch then ++ goto Finally; ++ end if; ++ Epoch := Epoch * 10 + Digit; ++ end loop; ++ Source_Date_Epoch := To_Ada (Epoch); ++ end if; ++ <> ++ Free (Env_Var); ++ end Set_Source_Date_Epoch; ++ + end Osint; +--- a/src/gcc/ada/osint.ads ++++ b/src/gcc/ada/osint.ads +@@ -196,6 +196,7 @@ package Osint is + -- information in order to locate it. If the source file cannot be opened, + -- or Name = No_File, and all blank time stamp is returned (this is not an + -- error situation). ++ -- Handles SOURCE_DATE_EPOCH like File_Time_Stamp functions below. + + function File_Stamp (Name : Path_Name_Type) return Time_Stamp_Type; + -- Same as above for a path name +@@ -303,6 +304,11 @@ package Osint is + (Name : Path_Name_Type; + Attr : access File_Attributes) return Time_Stamp_Type; + -- Return the time stamp of the file ++ -- If the SOURCE_DATE_EPOCH environment variable exists and represents ++ -- an OS_Type value, any more recent file time stamp is truncated. ++ -- This ensures that gnat1 writes deterministic .ali files even in ++ -- the presence of patched or generated sources. See ++ -- https://reproducible-builds.org/specs/source-date-epoch. + + function Is_Readable_File + (Name : C_File_Name; diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/ada-link-lib.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/ada-link-lib.diff new file mode 100644 index 0000000000..12e774e835 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/ada-link-lib.diff @@ -0,0 +1,158 @@ +Description: adapt libgnat build for Debian + Don't include a runtime link path (-rpath), when linking binaries. + . + Build the shared libraries on hppa-linux (see #786692 below). + TODO: ask the reporter (no porterbox) to attempt a rebuild without this + chunk, now that we diverge less from upstream. + . + Instead of building libada as a target library only, build it as + both a host and, if different, target library. + . + Compile with -gnatn for efficiency. + Double-check the link since Debian moves some symbols. + . + Autogen should refresh src/Makefile.in from src/Makefile.{def,tpl} + at build time, but we do not want to Build-Depend: guile. + # export QUILT_PATCHES=debian/patches + # quilt pop $this.diff + # quilt add src/Makefile.in + # (cd src && autogen Makefile.def) + # quilt refresh --no-timestamps --no-index -pab + # quilt push -a +Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=786692 +Forwarded: not-needed +Author: Ludovic Brenta +Author: Nicolas Boulenguez +Author: Matthias Klose + +--- a/src/gcc/ada/gcc-interface/config-lang.in ++++ b/src/gcc/ada/gcc-interface/config-lang.in +@@ -44,7 +44,7 @@ if test "x$cross_compiling/$build/$host" + fi + + target_libs="target-libada" +-lang_dirs="gnattools" ++lang_dirs="libada gnattools" + + # Ada is not enabled by default for the time being. + build_by_default=no +--- a/src/gcc/ada/link.c ++++ b/src/gcc/ada/link.c +@@ -107,9 +107,9 @@ const char *__gnat_default_libgcc_subdir + || defined (__NetBSD__) || defined (__OpenBSD__) \ + || defined (__QNX__) + const char *__gnat_object_file_option = "-Wl,@"; +-const char *__gnat_run_path_option = "-Wl,-rpath,"; +-char __gnat_shared_libgnat_default = STATIC; +-char __gnat_shared_libgcc_default = STATIC; ++const char *__gnat_run_path_option = ""; ++char __gnat_shared_libgnat_default = SHARED; ++char __gnat_shared_libgcc_default = SHARED; + int __gnat_link_max = 8192; + unsigned char __gnat_objlist_file_supported = 1; + const char *__gnat_object_library_extension = ".a"; +@@ -129,9 +129,9 @@ const char *__gnat_default_libgcc_subdir + + #elif defined (__linux__) || defined (__GLIBC__) + const char *__gnat_object_file_option = "-Wl,@"; +-const char *__gnat_run_path_option = "-Wl,-rpath,"; +-char __gnat_shared_libgnat_default = STATIC; +-char __gnat_shared_libgcc_default = STATIC; ++const char *__gnat_run_path_option = ""; ++char __gnat_shared_libgnat_default = SHARED; ++char __gnat_shared_libgcc_default = SHARED; + int __gnat_link_max = 8192; + unsigned char __gnat_objlist_file_supported = 1; + const char *__gnat_object_library_extension = ".a"; +--- a/src/libada/Makefile.in ++++ b/src/libada/Makefile.in +@@ -79,10 +79,11 @@ ADA_RTS_DIR=$(GCC_DIR)/ada/rts$(subst /, + # by recursive make invocations in gcc/ada/Makefile.in + LIBADA_FLAGS_TO_PASS = \ + "MAKEOVERRIDES=" \ +- "LDFLAGS=$(LDFLAGS)" \ ++ "LDFLAGS=$(LDFLAGS) -Wl,--no-allow-shlib-undefined \ ++ -Wl,--no-copy-dt-needed-entries -Wl,--no-undefined" \ + "LN_S=$(LN_S)" \ + "SHELL=$(SHELL)" \ +- "GNATLIBFLAGS=$(GNATLIBFLAGS) $(MULTIFLAGS)" \ ++ "GNATLIBFLAGS=$(GNATLIBFLAGS) $(MULTIFLAGS) -gnatn" \ + "GNATLIBCFLAGS=$(GNATLIBCFLAGS) $(MULTIFLAGS)" \ + "GNATLIBCFLAGS_FOR_C=$(GNATLIBCFLAGS_FOR_C) $(MULTIFLAGS)" \ + "PICFLAG_FOR_TARGET=$(PICFLAG)" \ +--- a/src/Makefile.def ++++ b/src/Makefile.def +@@ -393,6 +393,7 @@ dependencies = { module=all-libcpp; on=a + + dependencies = { module=all-fixincludes; on=all-libiberty; }; + ++dependencies = { module=all-target-libada; on=all-gcc; }; + dependencies = { module=all-gnattools; on=all-target-libada; }; + dependencies = { module=all-gnattools; on=all-target-libstdc++-v3; }; + +--- a/src/configure.ac ++++ b/src/configure.ac +@@ -142,6 +142,11 @@ host_libs="intl libiberty opcodes bfd re + # If --enable-gold is used, "gold" may replace "ld". + host_tools="texinfo flex bison binutils gas ld fixincludes gcc cgen sid sim gdb gdbserver gprof etc expect dejagnu m4 utils guile fastjar gnattools libcc1 gm2tools gotools c++tools" + ++case "${target}" in ++ hppa64-*linux*) ;; ++ *) target_libiberty="target-libiberty";; ++esac ++ + # these libraries are built for the target environment, and are built after + # the host libraries and the host tools (which may be a cross compiler) + # Note that libiberty is not a target library. +@@ -161,6 +166,7 @@ target_libraries="target-libgcc \ + target-libffi \ + target-libobjc \ + target-libada \ ++ ${target_libiberty} \ + target-libgm2 \ + target-libgo \ + target-libphobos \ +--- a/src/gcc/ada/gcc-interface/Make-lang.in ++++ b/src/gcc/ada/gcc-interface/Make-lang.in +@@ -43,7 +43,7 @@ RMDIR = rm -rf + + + # Extra flags to pass to recursive makes. +-COMMON_ADAFLAGS= -gnatpg ++COMMON_ADAFLAGS= -gnatpgn + ifeq ($(TREECHECKING),) + CHECKING_ADAFLAGS= + else +@@ -266,7 +266,9 @@ GCC_LINKERFLAGS = $(filter-out -Werror - + GCC_LDFLAGS = $(filter-out -static-libgcc, $(LDFLAGS)) + else + # Strip -Werror during linking for the LTO bootstrap +-GCC_LINKERFLAGS = $(filter-out -Werror, $(ALL_LINKERFLAGS)) ++GCC_LINKERFLAGS = $(filter-out -Werror, $(ALL_LINKERFLAGS)) \ ++ -Wl,--no-allow-shlib-undefined -Wl,--no-copy-dt-needed-entries \ ++ -Wl,--no-undefined + GCC_LDFLAGS = $(LDFLAGS) + endif + +--- a/src/gcc/testsuite/lib/gnat.exp ++++ b/src/gcc/testsuite/lib/gnat.exp +@@ -115,6 +115,7 @@ proc gnat_target_compile { source dest t + global TOOL_OPTIONS + global gnat_target_current + global TEST_ALWAYS_FLAGS ++ global ld_library_path + + # dg-require-effective-target tests must be compiled as C. + if [ string match "*.c" $source ] then { +@@ -144,6 +145,11 @@ proc gnat_target_compile { source dest t + # Always log so compilations can be repeated manually. + verbose -log "ADA_INCLUDE_PATH=$rtsdir/adainclude" + verbose -log "ADA_OBJECTS_PATH=$rtsdir/adainclude" ++ ++ if { ! [ string match "*/libada/adalib*" $ld_library_path ] } { ++ append ld_library_path ":$rtsdir/adalib" ++ set_ld_library_path_env_vars ++ } + } + + lappend options "compiler=$GNAT_UNDER_TEST -q -f" diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/ada-nobiarch-check.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/ada-nobiarch-check.diff new file mode 100644 index 0000000000..35190a720f --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/ada-nobiarch-check.diff @@ -0,0 +1,21 @@ +Description: For biarch builds, disable the gnat testsuite for the non-default + architecture (no biarch support in gnat yet). +Author: Matthias Klose + +Index: b/src/gcc/Makefile.in +=================================================================== +--- a/src/gcc/Makefile.in ++++ b/src/gcc/Makefile.in +@@ -4510,7 +4510,11 @@ + if [ -f $${rootme}/../expect/expect ] ; then \ + TCL_LIBRARY=`cd .. ; cd $${srcdir}/../tcl/library ; ${PWD_COMMAND}` ; \ + export TCL_LIBRARY ; fi ; \ +- $(RUNTEST) --tool $* $(RUNTESTFLAGS)) ++ if [ "$*" = gnat ]; then \ ++ runtestflags="`echo '$(RUNTESTFLAGS)' | sed -r 's/,-m(32|64|x32)//g;s/,-mabi=(n32|64)//g'`"; \ ++ case "$$runtestflags" in *\\{\\}) runtestflags=; esac; \ ++ fi; \ ++ $(RUNTEST) --tool $* $$runtestflags) + + $(patsubst %,%-subtargets,$(filter-out $(lang_checks_parallelized),$(lang_checks))): check-%-subtargets: + @echo check-$* diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/ada-perl-shebang.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/ada-perl-shebang.diff new file mode 100644 index 0000000000..ea930b1d3b --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/ada-perl-shebang.diff @@ -0,0 +1,10 @@ +# DP: Fix perl shebang for the gnathtml binary. + +--- a/src/gcc/ada/gnathtml.pl ++++ b/src/gcc/ada/gnathtml.pl +@@ -1,4 +1,4 @@ +-#! /usr/bin/env perl ++#! /usr/bin/perl + + #----------------------------------------------------------------------------- + #- -- diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/ada-sjlj.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/ada-sjlj.diff new file mode 100644 index 0000000000..a63a6da5b6 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/ada-sjlj.diff @@ -0,0 +1,498 @@ +Autogen should refresh src/Makefile.in from src/Makefile.{def,tpl} +at build time, but we do not want to Build-Depend: guile. +# export QUILT_PATCHES=debian/patches +# quilt pop $this.diff +# quilt add src/Makefile.in +# (cd src && autogen Makefile.def) +# quilt refresh --no-timestamps --no-index -pab +# quilt push -a + +--- /dev/null ++++ b/src/libada-sjlj/Makefile.in +@@ -0,0 +1,204 @@ ++# Makefile for libada. ++# Copyright (C) 2003-2017 Free Software Foundation, Inc. ++# ++# This file is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 3 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program; see the file COPYING3. If not see ++# . ++ ++# Default target; must be first. ++all: gnatlib ++ $(MULTIDO) $(AM_MAKEFLAGS) DO=all multi-do # $(MAKE) ++ ++.PHONY: all ++ ++## Multilib support variables. ++MULTISRCTOP = ++MULTIBUILDTOP = ++MULTIDIRS = ++MULTISUBDIR = ++MULTIDO = true ++MULTICLEAN = true ++ ++# Standard autoconf-set variables. ++SHELL = @SHELL@ ++srcdir = @srcdir@ ++libdir = @libdir@ ++build = @build@ ++target = @target@ ++prefix = @prefix@ ++ ++# Nonstandard autoconf-set variables. ++enable_shared = @enable_shared@ ++ ++LN_S=@LN_S@ ++AWK=@AWK@ ++ ++ifeq (cp -p,$(LN_S)) ++LN_S_RECURSIVE = cp -pR ++else ++LN_S_RECURSIVE = $(LN_S) ++endif ++ ++# Variables for the user (or the top level) to override. ++objext=.o ++THREAD_KIND=native ++TRACE=no ++LDFLAGS= ++ ++# The tedious process of getting CFLAGS right. ++CFLAGS=-g ++PICFLAG = @PICFLAG@ ++GNATLIBFLAGS= -W -Wall -gnatpg -nostdinc ++GNATLIBCFLAGS= -g -O2 ++GNATLIBCFLAGS_FOR_C = -W -Wall $(GNATLIBCFLAGS) $(CFLAGS_FOR_TARGET) \ ++ -fexceptions -DIN_RTS @have_getipinfo@ @have_capability@ ++ ++host_subdir = @host_subdir@ ++GCC_DIR=$(MULTIBUILDTOP)../../$(host_subdir)/gcc ++ ++target_noncanonical:=@target_noncanonical@ ++version := $(shell @get_gcc_base_ver@ $(srcdir)/../gcc/BASE-VER) ++libsubdir := $(libdir)/gcc/$(target_noncanonical)/$(version)$(MULTISUBDIR) ++ADA_RTS_DIR=$(GCC_DIR)/ada/rts$(subst /,_,$(MULTISUBDIR)) ++ADA_RTS_SUBDIR=./rts$(subst /,_,$(MULTISUBDIR)) ++ ++# exeext should not be used because it's the *host* exeext. We're building ++# a *target* library, aren't we?!? Likewise for CC. Still, provide bogus ++# definitions just in case something slips through the safety net provided ++# by recursive make invocations in gcc/ada/Makefile.in ++LIBADA_FLAGS_TO_PASS = \ ++ "MAKEOVERRIDES=" \ ++ "LDFLAGS=$(LDFLAGS) -Wl,--no-allow-shlib-undefined \ ++ -Wl,--no-copy-dt-needed-entries -Wl,--no-undefined" \ ++ "LN_S=$(LN_S)" \ ++ "SHELL=$(SHELL)" \ ++ "GNATLIBFLAGS=$(GNATLIBFLAGS) $(MULTIFLAGS) -gnatn" \ ++ "GNATLIBCFLAGS=$(GNATLIBCFLAGS) $(MULTIFLAGS)" \ ++ "GNATLIBCFLAGS_FOR_C=$(GNATLIBCFLAGS_FOR_C) $(MULTIFLAGS)" \ ++ "PICFLAG_FOR_TARGET=$(PICFLAG)" \ ++ "THREAD_KIND=$(THREAD_KIND)" \ ++ "TRACE=$(TRACE)" \ ++ "MULTISUBDIR=$(MULTISUBDIR)" \ ++ "libsubdir=$(libsubdir)" \ ++ "objext=$(objext)" \ ++ "prefix=$(prefix)" \ ++ "exeext=.exeext.should.not.be.used " \ ++ 'CC=the.host.compiler.should.not.be.needed' \ ++ "GCC_FOR_TARGET=$(CC)" \ ++ "CFLAGS=$(CFLAGS)" \ ++ "RTSDIR=rts-sjlj" ++ ++# Rules to build gnatlib. ++.PHONY: gnatlib gnatlib-plain gnatlib-sjlj gnatlib-zcx gnatlib-shared osconstool ++gnatlib: gnatlib-sjlj ++ ++gnatlib-plain: osconstool $(GCC_DIR)/ada/Makefile ++ test -f stamp-libada || \ ++ $(MAKE) -C $(GCC_DIR)/ada $(LIBADA_FLAGS_TO_PASS) gnatlib \ ++ && touch stamp-libada ++ -rm -rf adainclude ++ -rm -rf adalib ++ $(LN_S_RECURSIVE) $(ADA_RTS_DIR) adainclude ++ $(LN_S_RECURSIVE) $(ADA_RTS_DIR) adalib ++ ++gnatlib-sjlj gnatlib-zcx gnatlib-shared: osconstool $(GCC_DIR)/ada/Makefile ++ test -f stamp-libada || \ ++ $(MAKE) -C $(GCC_DIR)/ada $(LIBADA_FLAGS_TO_PASS) $@ \ ++ && touch stamp-libada-sjlj ++ -rm -rf adainclude ++ -rm -rf adalib ++ $(LN_S_RECURSIVE) $(ADA_RTS_DIR) adainclude ++ $(LN_S_RECURSIVE) $(ADA_RTS_DIR) adalib ++ ++osconstool: ++ $(MAKE) -C $(GCC_DIR)/ada $(LIBADA_FLAGS_TO_PASS) ./bldtools/oscons/xoscons ++ ++install-gnatlib: $(GCC_DIR)/ada/Makefile ++ $(MAKE) -C $(GCC_DIR)/ada $(LIBADA_FLAGS_TO_PASS) install-gnatlib-sjlj ++ ++# Check uninstalled version. ++check: ++ ++# Check installed version. ++installcheck: ++ ++# Build info (none here). ++info: ++ ++# Build DVI (none here). ++dvi: ++ ++# Build PDF (none here). ++pdf: ++ ++# Build html (none here). ++html: ++ ++# Build TAGS (none here). ++TAGS: ++ ++.PHONY: check installcheck info dvi pdf html ++ ++# Installation rules. ++install: install-gnatlib ++ $(MULTIDO) $(AM_MAKEFLAGS) DO=install multi-do # $(MAKE) ++ ++install-strip: install ++ ++install-info: ++ ++install-pdf: ++ ++install-html: ++ ++.PHONY: install install-strip install-info install-pdf install-html ++ ++# Cleaning rules. ++mostlyclean: ++ $(MULTICLEAN) $(AM_MAKEFLAGS) DO=mostlyclean multi-clean # $(MAKE) ++ ++clean: ++ $(MULTICLEAN) $(AM_MAKEFLAGS) DO=clean multi-clean # $(MAKE) ++ ++distclean: ++ $(MULTICLEAN) $(AM_MAKEFLAGS) DO=distclean multi-clean # $(MAKE) ++ $(RM) Makefile config.status config.log ++ ++maintainer-clean: ++ ++.PHONY: mostlyclean clean distclean maintainer-clean ++ ++# Rules for rebuilding this Makefile. ++Makefile: $(srcdir)/Makefile.in config.status ++ CONFIG_FILES=$@ ; \ ++ CONFIG_HEADERS= ; \ ++ $(SHELL) ./config.status ++ ++config.status: $(srcdir)/configure ++ $(SHELL) ./config.status --recheck ++ ++AUTOCONF = autoconf ++configure_deps = \ ++ $(srcdir)/configure.ac \ ++ $(srcdir)/../config/acx.m4 \ ++ $(srcdir)/../config/multi.m4 \ ++ $(srcdir)/../config/override.m4 \ ++ $(srcdir)/../config/picflag.m4 \ ++ $(srcdir)/../config/unwind_ipinfo.m4 ++ ++$(srcdir)/configure: @MAINT@ $(configure_deps) ++ cd $(srcdir) && $(AUTOCONF) ++ ++# Don't export variables to the environment, in order to not confuse ++# configure. ++.NOEXPORT: +--- /dev/null ++++ b/src/libada-sjlj/configure.ac +@@ -0,0 +1,156 @@ ++# Configure script for libada. ++# Copyright (C) 2003-2017 Free Software Foundation, Inc. ++# ++# This file is free software; you can redistribute it and/or modify it ++# under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 3 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, but ++# WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++# General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program; see the file COPYING3. If not see ++# . ++ ++sinclude(../config/acx.m4) ++sinclude(../config/multi.m4) ++sinclude(../config/override.m4) ++sinclude(../config/picflag.m4) ++sinclude(../config/unwind_ipinfo.m4) ++ ++AC_INIT ++AC_PREREQ([2.64]) ++ ++AC_CONFIG_SRCDIR([Makefile.in]) ++ ++# Determine the host, build, and target systems ++AC_CANONICAL_BUILD ++AC_CANONICAL_HOST ++AC_CANONICAL_TARGET ++target_alias=${target_alias-$host_alias} ++ ++# Determine the noncanonical target name, for directory use. ++ACX_NONCANONICAL_TARGET ++ ++# Determine the target- and build-specific subdirectories ++GCC_TOPLEV_SUBDIRS ++ ++# Command-line options. ++# Very limited version of AC_MAINTAINER_MODE. ++AC_ARG_ENABLE([maintainer-mode], ++ [AC_HELP_STRING([--enable-maintainer-mode], ++ [enable make rules and dependencies not useful (and ++ sometimes confusing) to the casual installer])], ++ [case ${enable_maintainer_mode} in ++ yes) MAINT='' ;; ++ no) MAINT='#' ;; ++ *) AC_MSG_ERROR([--enable-maintainer-mode must be yes or no]) ;; ++ esac ++ maintainer_mode=${enableval}], ++ [MAINT='#']) ++AC_SUBST([MAINT])dnl ++ ++AM_ENABLE_MULTILIB(, ..) ++# Calculate toolexeclibdir ++# Also toolexecdir, though it's only used in toolexeclibdir ++case ${enable_version_specific_runtime_libs} in ++ yes) ++ # Need the gcc compiler version to know where to install libraries ++ # and header files if --enable-version-specific-runtime-libs option ++ # is selected. ++ toolexecdir='$(libdir)/gcc/$(target_alias)' ++ toolexeclibdir='$(toolexecdir)/$(gcc_version)$(MULTISUBDIR)' ++ ;; ++ no) ++ if test -n "$with_cross_host" && ++ test x"$with_cross_host" != x"no"; then ++ # Install a library built with a cross compiler in tooldir, not libdir. ++ toolexecdir='$(exec_prefix)/$(target_alias)' ++ toolexeclibdir='$(toolexecdir)/lib' ++ else ++ toolexecdir='$(libdir)/gcc-lib/$(target_alias)' ++ toolexeclibdir='$(libdir)' ++ fi ++ multi_os_directory=`$CC -print-multi-os-directory` ++ case $multi_os_directory in ++ .) ;; # Avoid trailing /. ++ *) toolexeclibdir=$toolexeclibdir/$multi_os_directory ;; ++ esac ++ ;; ++esac ++AC_SUBST(toolexecdir) ++AC_SUBST(toolexeclibdir) ++#TODO: toolexeclibdir is currently disregarded ++ ++# Check the compiler. ++# The same as in boehm-gc and libstdc++. Have to borrow it from there. ++# We must force CC to /not/ be precious variables; otherwise ++# the wrong, non-multilib-adjusted value will be used in multilibs. ++# As a side effect, we have to subst CFLAGS ourselves. ++ ++m4_rename([_AC_ARG_VAR_PRECIOUS],[real_PRECIOUS]) ++m4_define([_AC_ARG_VAR_PRECIOUS],[]) ++AC_PROG_CC ++m4_rename_force([real_PRECIOUS],[_AC_ARG_VAR_PRECIOUS]) ++ ++AC_SUBST(CFLAGS) ++ ++AC_ARG_ENABLE([shared], ++[AC_HELP_STRING([--disable-shared], ++ [don't provide a shared libgnat])], ++[ ++case $enable_shared in ++ yes | no) ;; ++ *) ++ enable_shared=no ++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," ++ for pkg in $enableval; do ++ case $pkg in ++ ada | libada) ++ enable_shared=yes ;; ++ esac ++ done ++ IFS="$ac_save_ifs" ++ ;; ++esac ++], [enable_shared=yes]) ++AC_SUBST([enable_shared]) ++ ++GCC_PICFLAG ++AC_SUBST([PICFLAG]) ++ ++# These must be passed down, or are needed by gcc/libgcc.mvars ++AC_PROG_AWK ++AC_PROG_LN_S ++ ++# Determine what to build for 'gnatlib' ++if test ${enable_shared} = yes; then ++ default_gnatlib_target="gnatlib-shared" ++else ++ default_gnatlib_target="gnatlib-plain" ++fi ++AC_SUBST([default_gnatlib_target]) ++ ++# Check for _Unwind_GetIPInfo ++GCC_CHECK_UNWIND_GETIPINFO ++if test x$have_unwind_getipinfo = xyes; then ++ have_getipinfo=-DHAVE_GETIPINFO ++else ++ have_getipinfo= ++fi ++AC_SUBST([have_getipinfo]) ++ ++# Check for ++AC_CHECK_HEADER([sys/capability.h], have_capability=-DHAVE_CAPABILITY, have_capability=) ++AC_SUBST([have_capability]) ++ ++# Determine what GCC version number to use in filesystem paths. ++GCC_BASE_VER ++ ++# Output: create a Makefile. ++AC_CONFIG_FILES([Makefile]) ++ ++AC_OUTPUT +--- a/src/Makefile.def ++++ b/src/Makefile.def +@@ -194,6 +194,7 @@ target_modules = { module= libgnatvsn; n + missing= TAGS; + missing= install-info; + missing= installcheck; }; ++target_modules = { module= libada-sjlj; }; + target_modules = { module= libgomp; bootstrap= true; lib_path=.libs; }; + target_modules = { module= libitm; lib_path=.libs; }; + target_modules = { module= libatomic; lib_path=.libs; }; +@@ -394,6 +395,7 @@ dependencies = { module=all-libcpp; on=a + dependencies = { module=all-fixincludes; on=all-libiberty; }; + + dependencies = { module=all-target-libada; on=all-gcc; }; ++dependencies = { module=all-target-libada-sjlj; on=all-target-libada; }; + dependencies = { module=all-gnattools; on=all-target-libada; }; + dependencies = { module=all-gnattools; on=all-target-libstdc++-v3; }; + dependencies = { module=all-gnattools; on=all-target-libgnat_util; }; +--- a/src/configure.ac ++++ b/src/configure.ac +@@ -167,6 +167,7 @@ target_libraries="target-libgcc \ + target-libffi \ + target-libobjc \ + target-libada \ ++ target-libada-sjlj \ + ${target_libiberty} \ + target-libgnat_util \ + target-libgo \ +@@ -454,7 +455,7 @@ AC_ARG_ENABLE(libada, + ENABLE_LIBADA=$enableval, + ENABLE_LIBADA=yes) + if test "${ENABLE_LIBADA}" != "yes" ; then +- noconfigdirs="$noconfigdirs target-libgnat_util gnattools" ++ noconfigdirs="$noconfigdirs target-libgnat_util gnattools target-libada-sjlj" + fi + + AC_ARG_ENABLE(libssp, +--- a/src/gcc/ada/gcc-interface/Makefile.in ++++ b/src/gcc/ada/gcc-interface/Makefile.in +@@ -193,7 +193,7 @@ GNAT_SRC=$(fsrcpfx)ada + + # Multilib handling + MULTISUBDIR = +-RTSDIR = rts$(subst /,_,$(MULTISUBDIR)) ++RTSDIR := rts$(subst /,_,$(MULTISUBDIR)) + + # Link flags used to build gnat tools. By default we prefer to statically + # link with libgcc to avoid a dependency on shared libgcc (which is tricky +@@ -561,6 +561,26 @@ install-gnatlib: ../stamp-gnatlib-$(RTSD + cd $(DESTDIR)$(ADA_INCLUDE_DIR); $(CHMOD) a-wx *.adb + cd $(DESTDIR)$(ADA_INCLUDE_DIR); $(CHMOD) a-wx *.ads + ++install-gnatlib-sjlj: ../stamp-gnatlib-$(RTSDIR) ++# Create the directory before deleting it, in case the directory is ++# a list of directories (as it may be on VMS). This ensures we are ++# deleting the right one. ++ -$(MKDIR) $(DESTDIR)$(ADA_RTL_OBJ_DIR_SJLJ) ++ -$(MKDIR) $(DESTDIR)$(ADA_INCLUDE_DIR_SJLJ) ++ $(RMDIR) $(DESTDIR)$(ADA_RTL_OBJ_DIR_SJLJ) ++ $(RMDIR) $(DESTDIR)$(ADA_INCLUDE_DIR_SJLJ) ++ -$(MKDIR) $(DESTDIR)$(ADA_RTL_OBJ_DIR_SJLJ) ++ -$(MKDIR) $(DESTDIR)$(ADA_INCLUDE_DIR_SJLJ) ++ for file in $(RTSDIR)/*.ali; do \ ++ $(INSTALL_DATA_DATE) $$file $(DESTDIR)$(ADA_RTL_OBJ_DIR_SJLJ); \ ++ done ++ # This copy must be done preserving the date on the original file. ++ for file in $(RTSDIR)/*.ad?; do \ ++ $(INSTALL_DATA_DATE) $$file $(DESTDIR)$(ADA_INCLUDE_DIR_SJLJ); \ ++ done ++ cd $(DESTDIR)$(ADA_INCLUDE_DIR_SJLJ); $(CHMOD) a-wx *.adb ++ cd $(DESTDIR)$(ADA_INCLUDE_DIR_SJLJ); $(CHMOD) a-wx *.ads ++ + ../stamp-gnatlib2-$(RTSDIR): + $(RM) $(RTSDIR)/s-*.ali + $(RM) $(RTSDIR)/s-*$(objext) +@@ -826,6 +846,7 @@ gnatlib-shared: + gnatlib-sjlj: + $(MAKE) $(FLAGS_TO_PASS) \ + EH_MECHANISM="" \ ++ RTSDIR="$(RTSDIR)" \ + MULTISUBDIR="$(MULTISUBDIR)" \ + THREAD_KIND="$(THREAD_KIND)" \ + ../stamp-gnatlib1-$(RTSDIR) +@@ -835,6 +856,7 @@ gnatlib-sjlj: + $(RTSDIR)/system.ads > $(RTSDIR)/s.ads + $(MV) $(RTSDIR)/s.ads $(RTSDIR)/system.ads + $(MAKE) $(FLAGS_TO_PASS) \ ++ RTSDIR="$(RTSDIR)" \ + EH_MECHANISM="" \ + GNATLIBFLAGS="$(GNATLIBFLAGS)" \ + GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \ +@@ -889,6 +911,8 @@ b_gnatm.o : b_gnatm.adb + + ADA_INCLUDE_DIR = $(libsubdir)/adainclude + ADA_RTL_OBJ_DIR = $(libsubdir)/adalib ++ADA_INCLUDE_DIR_SJLJ = $(libsubdir)/rts-sjlj/adainclude ++ADA_RTL_OBJ_DIR_SJLJ = $(libsubdir)/rts-sjlj/adalib + + # Special flags + +--- a/src/gcc/ada/gcc-interface/config-lang.in ++++ b/src/gcc/ada/gcc-interface/config-lang.in +@@ -43,8 +43,8 @@ if test "x$cross_compiling/$build/$host" + lang_requires="c c++" + fi + +-target_libs="target-libada target-libgnat_util" +-lang_dirs="libada gnattools" ++target_libs="target-libada target-libgnat_util target-libada-sjlj" ++lang_dirs="libada gnattools libada-sjlj" + + # Ada is not enabled by default for the time being. + build_by_default=no +--- a/src/gcc/ada/gcc-interface/Make-lang.in ++++ b/src/gcc/ada/gcc-interface/Make-lang.in +@@ -837,6 +837,7 @@ ada.install-common: + + install-gnatlib: + $(MAKE) -C ada $(COMMON_FLAGS_TO_PASS) $(ADA_FLAGS_TO_PASS) install-gnatlib$(LIBGNAT_TARGET) ++ $(MAKE) -C ada $(COMMON_FLAGS_TO_PASS) $(ADA_FLAGS_TO_PASS) RTSDIR="rts-sjlj" install-gnatlib-sjlj$(LIBGNAT_TARGET) + + install-gnatlib-obj: + $(MAKE) -C ada $(COMMON_FLAGS_TO_PASS) $(ADA_FLAGS_TO_PASS) install-gnatlib-obj diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/ada-verbose.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/ada-verbose.diff new file mode 100644 index 0000000000..84587ad605 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/ada-verbose.diff @@ -0,0 +1,40 @@ +Description: Display subprocess command lines when building Ada. + The log can be a page longer if it helps debugging. +Forwarded: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87778 +Author: Nicolas Boulenguez + +Index: b/src/gcc/ada/Make-generated.in +=================================================================== +--- a/src/gcc/ada/Make-generated.in ++++ b/src/gcc/ada/Make-generated.in +@@ -18,7 +18,7 @@ GEN_IL_FLAGS = -gnata -gnat2012 -gnatw.g + ada/seinfo_tables.ads ada/seinfo_tables.adb ada/sinfo.h ada/einfo.h ada/nmake.ads ada/nmake.adb ada/seinfo.ads ada/sinfo-nodes.ads ada/sinfo-nodes.adb ada/einfo-entities.ads ada/einfo-entities.adb: ada/stamp-gen_il ; @true + ada/stamp-gen_il: $(fsrcdir)/ada/gen_il* + $(MKDIR) ada/gen_il +- cd ada/gen_il; gnatmake -q -g $(GEN_IL_FLAGS) gen_il-main ++ cd ada/gen_il; gnatmake -v -g $(GEN_IL_FLAGS) gen_il-main + # Ignore errors to work around finalization issues in older compilers + - cd ada/gen_il; ./gen_il-main + $(fsrcdir)/../move-if-change ada/gen_il/seinfo_tables.ads ada/seinfo_tables.ads +@@ -46,7 +46,7 @@ ada/stamp-snames : ada/snames.ads-tmpl a + -$(MKDIR) ada/bldtools/snamest + $(RM) $(addprefix ada/bldtools/snamest/,$(notdir $^)) + $(CP) $^ ada/bldtools/snamest +- cd ada/bldtools/snamest; gnatmake -q xsnamest ; ./xsnamest ++ cd ada/bldtools/snamest; gnatmake -v xsnamest ; ./xsnamest + $(fsrcdir)/../move-if-change ada/bldtools/snamest/snames.ns ada/snames.ads + $(fsrcdir)/../move-if-change ada/bldtools/snamest/snames.nb ada/snames.adb + $(fsrcdir)/../move-if-change ada/bldtools/snamest/snames.nh ada/snames.h +Index: b/src/gcc/ada/gcc-interface/Makefile.in +=================================================================== +--- a/src/gcc/ada/gcc-interface/Makefile.in ++++ b/src/gcc/ada/gcc-interface/Makefile.in +@@ -616,7 +616,7 @@ OSCONS_EXTRACT=$(GCC_FOR_ADA_RTS) $(GNAT + -$(MKDIR) ./bldtools/oscons + $(RM) $(addprefix ./bldtools/oscons/,$(notdir $^)) + $(CP) $^ ./bldtools/oscons +- (cd ./bldtools/oscons ; gnatmake -q xoscons) ++ (cd ./bldtools/oscons ; gnatmake -v xoscons) + + $(RTSDIR)/s-oscons.ads: ../stamp-gnatlib1-$(RTSDIR) s-oscons-tmplt.c gsocket.h ./bldtools/oscons/xoscons + $(RM) $(RTSDIR)/s-oscons-tmplt.i $(RTSDIR)/s-oscons-tmplt.s diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/alpha-ieee-doc.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/alpha-ieee-doc.diff new file mode 100644 index 0000000000..526bde9154 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/alpha-ieee-doc.diff @@ -0,0 +1,26 @@ +# DP: #212912 +# DP: on alpha-linux, make -mieee default and add -mieee-disable switch +# DP: to turn default off (doc patch) + +--- + gcc/doc/invoke.texi | 7 +++++++ + 1 files changed, 7 insertions(+), 0 deletions(-) + +Index: b/src/gcc/doc/invoke.texi +=================================================================== +--- a/src/gcc/doc/invoke.texi ++++ b/src/gcc/doc/invoke.texi +@@ -24169,6 +24169,13 @@ able to correctly support denormalized n + values such as not-a-number and plus/minus infinity. Other Alpha + compilers call this option @option{-ieee_with_no_inexact}. + ++DEBIAN SPECIFIC: This option is on by default for alpha-linux-gnu, unless ++@option{-ffinite-math-only} (which is part of the @option{-ffast-math} ++set) is specified, because the software functions in the GNU libc math ++libraries generate denormalized numbers, NaNs, and infs (all of which ++will cause a programs to SIGFPE when it attempts to use the results without ++@option{-mieee}). ++ + @opindex mieee-with-inexact + @item -mieee-with-inexact + This is like @option{-mieee} except the generated code also maintains diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/alpha-ieee.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/alpha-ieee.diff new file mode 100644 index 0000000000..f80ffa3ef0 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/alpha-ieee.diff @@ -0,0 +1,17 @@ +# DP: #212912 +# DP: on alpha-linux, make -mieee default and add -mieee-disable switch +# DP: to turn default off + +--- a/src/gcc/config/alpha/alpha.cc ++++ b/src/gcc/config/alpha/alpha.cc +@@ -384,6 +384,10 @@ alpha_option_override (void) + int line_size = 0, l1_size = 0, l2_size = 0; + int i; + ++ /* If not -ffinite-math-only, enable -mieee*/ ++ if (!flag_finite_math_only) ++ target_flags |= MASK_IEEE|MASK_IEEE_CONFORMANT; ++ + #ifdef SUBTARGET_OVERRIDE_OPTIONS + SUBTARGET_OVERRIDE_OPTIONS; + #endif diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/alpha-no-ev4-directive.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/alpha-no-ev4-directive.diff new file mode 100644 index 0000000000..2b06a69bca --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/alpha-no-ev4-directive.diff @@ -0,0 +1,30 @@ +# DP: never emit .ev4 directive. + +--- + gcc/config/alpha/alpha.c | 7 +++---- + 1 files changed, 3 insertions(+), 4 deletions(-) + +--- a/src/gcc/config/alpha/alpha.cc ++++ b/src/gcc/config/alpha/alpha.cc +@@ -9482,7 +9482,7 @@ alpha_file_start (void) + fputs ("\t.set nomacro\n", asm_out_file); + if (TARGET_SUPPORT_ARCH | TARGET_BWX | TARGET_MAX | TARGET_FIX | TARGET_CIX) + { +- const char *arch; ++ const char *arch = NULL; + + if (alpha_cpu == PROCESSOR_EV6 || TARGET_FIX || TARGET_CIX) + arch = "ev6"; +@@ -9492,10 +9492,9 @@ alpha_file_start (void) + arch = "ev56"; + else if (alpha_cpu == PROCESSOR_EV5) + arch = "ev5"; +- else +- arch = "ev4"; + +- fprintf (asm_out_file, "\t.arch %s\n", arch); ++ if (arch) ++ fprintf (asm_out_file, "\t.arch %s\n", arch); + } + } + diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/arc-stddef.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/arc-stddef.diff new file mode 100644 index 0000000000..af330f4992 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/arc-stddef.diff @@ -0,0 +1,29 @@ +--- a/src/gcc/config/arc/arc-arch.h ++++ b/src/gcc/config/arc/arc-arch.h +@@ -22,6 +22,8 @@ along with GCC; see the file COPYING3. + #ifndef GCC_ARC_ARCH_H + #define GCC_ARC_ARCH_H + ++#include ++ + #ifndef IN_LIBGCC2 + /* Architecture selection types. */ + +@@ -116,7 +118,7 @@ typedef struct + + } arc_cpu_t; + +-const arc_arch_t arc_arch_types[] = ++static const arc_arch_t arc_arch_types[] = + { + {"none", BASE_ARCH_NONE, 0, 0}, + #define ARC_ARCH(NAME, ARCH, FLAGS, DFLAGS) \ +@@ -126,7 +128,7 @@ const arc_arch_t arc_arch_types[] = + {NULL, BASE_ARCH_END, 0, 0} + }; + +-const arc_cpu_t arc_cpu_types[] = ++static const arc_cpu_t arc_cpu_types[] = + { + {"none", NULL, PROCESSOR_NONE, 0, HAS_NONE, ARC_TUNE_NONE}, + #define ARC_CPU(NAME, ARCH, FLAGS, EXTRA, TUNE) \ diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/arm-multilib-defaults.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/arm-multilib-defaults.diff new file mode 100644 index 0000000000..88b027902c --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/arm-multilib-defaults.diff @@ -0,0 +1,88 @@ +# DP: Set MULTILIB_DEFAULTS for ARM multilib builds + +--- a/src/gcc/config.gcc ++++ b/src/gcc/config.gcc +@@ -4342,10 +4342,18 @@ case "${target}" in + done + + case "$with_float" in +- "" \ +- | soft | hard | softfp) ++ "") + # OK + ;; ++ soft) ++ tm_defines="${tm_defines} TARGET_CONFIGURED_FLOAT_ABI=0" ++ ;; ++ softfp) ++ tm_defines="${tm_defines} TARGET_CONFIGURED_FLOAT_ABI=1" ++ ;; ++ hard) ++ tm_defines="${tm_defines} TARGET_CONFIGURED_FLOAT_ABI=2" ++ ;; + *) + echo "Unknown floating point type used in --with-float=$with_float" 1>&2 + exit 1 +@@ -4380,6 +4388,9 @@ case "${target}" in + "" \ + | arm | thumb ) + #OK ++ if test "$with_mode" = thumb; then ++ tm_defines="${tm_defines} TARGET_CONFIGURED_THUMB_MODE=1" ++ fi + ;; + *) + echo "Unknown mode used in --with-mode=$with_mode" +--- a/src/gcc/config/arm/linux-eabi.h ++++ b/src/gcc/config/arm/linux-eabi.h +@@ -37,7 +37,21 @@ + target hardware. If you override this to use the hard-float ABI then + change the setting of GLIBC_DYNAMIC_LINKER_DEFAULT as well. */ + #undef TARGET_DEFAULT_FLOAT_ABI ++#ifdef TARGET_CONFIGURED_FLOAT_ABI ++#if TARGET_CONFIGURED_FLOAT_ABI == 2 ++#define TARGET_DEFAULT_FLOAT_ABI ARM_FLOAT_ABI_HARD ++#define MULTILIB_DEFAULT_FLOAT_ABI "mfloat-abi=hard" ++#elif TARGET_CONFIGURED_FLOAT_ABI == 1 ++#define TARGET_DEFAULT_FLOAT_ABI ARM_FLOAT_ABI_SOFTFP ++#define MULTILIB_DEFAULT_FLOAT_ABI "mfloat-abi=softfp" ++#else ++#define TARGET_DEFAULT_FLOAT_ABI ARM_FLOAT_ABI_SOFT ++#define MULTILIB_DEFAULT_FLOAT_ABI "mfloat-abi=soft" ++#endif ++#else + #define TARGET_DEFAULT_FLOAT_ABI ARM_FLOAT_ABI_SOFT ++#define MULTILIB_DEFAULT_FLOAT_ABI "mfloat-abi=soft" ++#endif + + /* We default to the "aapcs-linux" ABI so that enums are int-sized by + default. */ +@@ -91,6 +105,28 @@ + #define MUSL_DYNAMIC_LINKER \ + "/lib/ld-musl-arm" MUSL_DYNAMIC_LINKER_E "%{mfloat-abi=hard:hf}%{mfdpic:-fdpic}.so.1" + ++/* Set the multilib defaults according the configuration, needed to ++ let gcc -print-multi-dir do the right thing. */ ++ ++#if TARGET_BIG_ENDIAN_DEFAULT ++#define MULTILIB_DEFAULT_ENDIAN "mbig-endian" ++#else ++#define MULTILIB_DEFAULT_ENDIAN "mlittle-endian" ++#endif ++ ++#ifndef TARGET_CONFIGURED_THUMB_MODE ++#define MULTILIB_DEFAULT_MODE "marm" ++#elif TARGET_CONFIGURED_THUMB_MODE == 1 ++#define MULTILIB_DEFAULT_MODE "mthumb" ++#else ++#define MULTILIB_DEFAULT_MODE "marm" ++#endif ++ ++#undef MULTILIB_DEFAULTS ++#define MULTILIB_DEFAULTS \ ++ { MULTILIB_DEFAULT_MODE, MULTILIB_DEFAULT_ENDIAN, \ ++ MULTILIB_DEFAULT_FLOAT_ABI, "mno-thumb-interwork" } ++ + /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to + use the GNU/Linux version, not the generic BPABI version. */ + #undef LINK_SPEC diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/arm-multilib-soft-cross.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/arm-multilib-soft-cross.diff new file mode 100644 index 0000000000..00a83d38e7 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/arm-multilib-soft-cross.diff @@ -0,0 +1,27 @@ +# DP: ARM hard/soft float multilib support + +Index: b/src/gcc/config/arm/t-linux-eabi +=================================================================== +--- a/src/gcc/config/arm/t-linux-eabi ++++ b/src/gcc/config/arm/t-linux-eabi +@@ -27,6 +27,20 @@ MULTILIB_REUSE = + MULTILIB_MATCHES = + MULTILIB_REQUIRED = + ++ifeq ($(with_float),hard) ++MULTILIB_OPTIONS = mfloat-abi=soft/mfloat-abi=hard ++MULTILIB_DIRNAMES = sf hf ++MULTILIB_EXCEPTIONS = ++MULTILIB_MATCHES = mfloat-abi?hard=mhard-float mfloat-abi?soft=msoft-float mfloat-abi?soft=mfloat-abi?softfp ++MULTILIB_OSDIRNAMES = ../libsf:arm-linux-gnueabi ../lib:arm-linux-gnueabihf ++else ++MULTILIB_OPTIONS = mfloat-abi=soft/mfloat-abi=hard ++MULTILIB_DIRNAMES = sf hf ++MULTILIB_EXCEPTIONS = ++MULTILIB_MATCHES = mfloat-abi?hard=mhard-float mfloat-abi?soft=msoft-float mfloat-abi?soft=mfloat-abi?softfp ++MULTILIB_OSDIRNAMES = ../lib:arm-linux-gnueabi ../libhf:arm-linux-gnueabihf ++endif ++ + #MULTILIB_OPTIONS += mcpu=fa606te/mcpu=fa626te/mcpu=fmp626/mcpu=fa726te + #MULTILIB_DIRNAMES += fa606te fa626te fmp626 fa726te + #MULTILIB_EXCEPTIONS += *mthumb/*mcpu=fa606te *mthumb/*mcpu=fa626te *mthumb/*mcpu=fmp626 *mthumb/*mcpu=fa726te* diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/arm-multilib-soft-float.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/arm-multilib-soft-float.diff new file mode 100644 index 0000000000..18f51fb3c9 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/arm-multilib-soft-float.diff @@ -0,0 +1,26 @@ +--- a/src/gcc/config/arm/t-linux-eabi ++++ b/src/gcc/config/arm/t-linux-eabi +@@ -24,6 +24,23 @@ + MULTILIB_OPTIONS = + MULTILIB_DIRNAMES = + ++ifneq (,$(findstring MULTIARCH_DEFAULTS,$(tm_defines))) ++ifneq (,$(findstring __arm_linux_gnueabi__,$(tm_defines))) ++ MULTILIB_OPTIONS = mfloat-abi=softfp/mfloat-abi=hard/mfloat-abi=soft ++ MULTILIB_DIRNAMES = . hf soft-float ++ MULTILIB_EXCEPTIONS = ++ MULTILIB_MATCHES = mfloat-abi?hard=mhard-float mfloat-abi?soft=msoft-float ++ MULTILIB_OSDIRNAMES = ../../lib/arm-linux-gnueabi ../../lib/arm-linux-gnueabihf soft-float ++endif ++ifneq (,$(findstring __arm_linux_gnueabihf__,$(tm_defines))) ++ MULTILIB_OPTIONS = mfloat-abi=hard/mfloat-abi=softfp/mfloat-abi=soft ++ MULTILIB_DIRNAMES = . sf soft-float ++ MULTILIB_EXCEPTIONS = ++ MULTILIB_MATCHES = mfloat-abi?hard=mhard-float mfloat-abi?soft=msoft-float ++ MULTILIB_OSDIRNAMES = ../../lib/arm-linux-gnueabihf ../../lib/arm-linux-gnueabi soft-float ++endif ++endif ++ + #MULTILIB_OPTIONS += mcpu=fa606te/mcpu=fa626te/mcpu=fmp626/mcpu=fa726te + #MULTILIB_DIRNAMES += fa606te fa626te fmp626 fa726te + #MULTILIB_EXCEPTIONS += *mthumb/*mcpu=fa606te *mthumb/*mcpu=fa626te *mthumb/*mcpu=fmp626 *mthumb/*mcpu=fa726te* diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/arm-multilib-soft.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/arm-multilib-soft.diff new file mode 100644 index 0000000000..0d45338378 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/arm-multilib-soft.diff @@ -0,0 +1,25 @@ +# DP: ARM hard/soft float multilib support + +--- a/src/gcc/config/arm/t-linux-eabi ++++ b/src/gcc/config/arm/t-linux-eabi +@@ -27,6 +27,20 @@ MULTILIB_REUSE = + MULTILIB_MATCHES = + MULTILIB_REQUIRED = + ++ifeq ($(with_float),hard) ++MULTILIB_OPTIONS = mfloat-abi=soft/mfloat-abi=hard ++MULTILIB_DIRNAMES = sf hf ++MULTILIB_EXCEPTIONS = ++MULTILIB_MATCHES = mfloat-abi?hard=mhard-float mfloat-abi?soft=msoft-float mfloat-abi?soft=mfloat-abi?softfp ++MULTILIB_OSDIRNAMES = arm-linux-gnueabi:arm-linux-gnueabi ../lib:arm-linux-gnueabihf ++else ++MULTILIB_OPTIONS = mfloat-abi=soft/mfloat-abi=hard ++MULTILIB_DIRNAMES = sf hf ++MULTILIB_EXCEPTIONS = ++MULTILIB_MATCHES = mfloat-abi?hard=mhard-float mfloat-abi?soft=msoft-float mfloat-abi?soft=mfloat-abi?softfp ++MULTILIB_OSDIRNAMES = ../lib:arm-linux-gnueabi arm-linux-gnueabihf:arm-linux-gnueabihf ++endif ++ + #MULTILIB_OPTIONS += mcpu=fa606te/mcpu=fa626te/mcpu=fmp626/mcpu=fa726te + #MULTILIB_DIRNAMES += fa606te fa626te fmp626 fa726te + #MULTILIB_EXCEPTIONS += *mthumb/*mcpu=fa606te *mthumb/*mcpu=fa626te *mthumb/*mcpu=fmp626 *mthumb/*mcpu=fa726te* diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/arm-multilib-softfp-cross.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/arm-multilib-softfp-cross.diff new file mode 100644 index 0000000000..89ed142aa6 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/arm-multilib-softfp-cross.diff @@ -0,0 +1,27 @@ +# DP: ARM hard/softfp float multilib support + +Index: b/src/gcc/config/arm/t-linux-eabi +=================================================================== +--- a/src/gcc/config/arm/t-linux-eabi 2011-01-03 20:52:22.000000000 +0000 ++++ b/src/gcc/config/arm/t-linux-eabi 2011-08-21 21:08:47.583351817 +0000 +@@ -24,6 +24,20 @@ + MULTILIB_OPTIONS = + MULTILIB_DIRNAMES = + ++ifeq ($(with_float),hard) ++MULTILIB_OPTIONS = mfloat-abi=softfp/mfloat-abi=hard ++MULTILIB_DIRNAMES = sf hf ++MULTILIB_EXCEPTIONS = ++MULTILIB_MATCHES = mfloat-abi?hard=mhard-float mfloat-abi?softfp=msoft-float mfloat-abi?softfp=mfloat-abi?soft ++MULTILIB_OSDIRNAMES = ../libsf:arm-linux-gnueabi ../lib:arm-linux-gnueabihf ++else ++MULTILIB_OPTIONS = mfloat-abi=softfp/mfloat-abi=hard ++MULTILIB_DIRNAMES = sf hf ++MULTILIB_EXCEPTIONS = ++MULTILIB_MATCHES = mfloat-abi?hard=mhard-float mfloat-abi?softfp=msoft-float mfloat-abi?softfp=mfloat-abi?soft ++MULTILIB_OSDIRNAMES = ../lib:arm-linux-gnueabi ../libhf:arm-linux-gnueabihf ++endif ++ + #MULTILIB_OPTIONS += mcpu=fa606te/mcpu=fa626te/mcpu=fmp626/mcpu=fa726te + #MULTILIB_DIRNAMES += fa606te fa626te fmp626 fa726te + #MULTILIB_EXCEPTIONS += *mthumb/*mcpu=fa606te *mthumb/*mcpu=fa626te *mthumb/*mcpu=fmp626 *mthumb/*mcpu=fa726te* diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/arm-multilib-softfp.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/arm-multilib-softfp.diff new file mode 100644 index 0000000000..f4268da9b1 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/arm-multilib-softfp.diff @@ -0,0 +1,27 @@ +# DP: ARM hard/softfp float multilib support + +Index: b/src/gcc/config/arm/t-linux-eabi +=================================================================== +--- a/src/gcc/config/arm/t-linux-eabi 2011-01-03 20:52:22.000000000 +0000 ++++ b/src/gcc/config/arm/t-linux-eabi 2011-08-21 21:08:47.583351817 +0000 +@@ -24,6 +24,20 @@ + MULTILIB_OPTIONS = + MULTILIB_DIRNAMES = + ++ifeq ($(with_float),hard) ++MULTILIB_OPTIONS = mfloat-abi=softfp/mfloat-abi=hard ++MULTILIB_DIRNAMES = sf hf ++MULTILIB_EXCEPTIONS = ++MULTILIB_MATCHES = mfloat-abi?hard=mhard-float mfloat-abi?softfp=msoft-float mfloat-abi?softfp=mfloat-abi?soft ++MULTILIB_OSDIRNAMES = arm-linux-gnueabi:arm-linux-gnueabi ../lib:arm-linux-gnueabihf ++else ++MULTILIB_OPTIONS = mfloat-abi=softfp/mfloat-abi=hard ++MULTILIB_DIRNAMES = sf hf ++MULTILIB_EXCEPTIONS = ++MULTILIB_MATCHES = mfloat-abi?hard=mhard-float mfloat-abi?softfp=msoft-float mfloat-abi?softfp=mfloat-abi?soft ++MULTILIB_OSDIRNAMES = ../lib:arm-linux-gnueabi arm-linux-gnueabihf:arm-linux-gnueabihf ++endif ++ + #MULTILIB_OPTIONS += mcpu=fa606te/mcpu=fa626te/mcpu=fmp626/mcpu=fa726te + #MULTILIB_DIRNAMES += fa606te fa626te fmp626 fa726te + #MULTILIB_EXCEPTIONS += *mthumb/*mcpu=fa606te *mthumb/*mcpu=fa626te *mthumb/*mcpu=fmp626 *mthumb/*mcpu=fa726te* diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/asan-allocator-base.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/asan-allocator-base.diff new file mode 100644 index 0000000000..eaf28da986 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/asan-allocator-base.diff @@ -0,0 +1,23 @@ +# DP: ASan: move allocator base to avoid conflict with high-entropy ASLR for x86-64 Linux +# DP: https://github.com/llvm/llvm-project/commit/fb77ca05ffb4f8e666878f2f6718a9fb4d686839 + +--- a/src/libsanitizer/asan/asan_allocator.h ++++ b/src/libsanitizer/asan/asan_allocator.h +@@ -143,11 +143,15 @@ typedef DefaultSizeClassMap SizeClassMap; + const uptr kAllocatorSpace = ~(uptr)0; + const uptr kAllocatorSize = 0x8000000000ULL; // 500G + typedef DefaultSizeClassMap SizeClassMap; +-# else ++# elif SANITIZER_APPLE + const uptr kAllocatorSpace = 0x600000000000ULL; + const uptr kAllocatorSize = 0x40000000000ULL; // 4T. + typedef DefaultSizeClassMap SizeClassMap; +-# endif ++# else ++const uptr kAllocatorSpace = 0x500000000000ULL; ++const uptr kAllocatorSize = 0x40000000000ULL; // 4T. ++typedef DefaultSizeClassMap SizeClassMap; ++# endif + template + struct AP64 { // Allocator64 parameters. Deliberately using a short name. + static const uptr kSpaceBeg = kAllocatorSpace; diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/bootstrap-no-unneeded-libs.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/bootstrap-no-unneeded-libs.diff new file mode 100644 index 0000000000..4939110cae --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/bootstrap-no-unneeded-libs.diff @@ -0,0 +1,30 @@ +# DP: For bootstrap builds, don't build unneeded libstdc++ things +# DP: (debug library, PCH headers). + +# Please read ada-changes-in-autogen-output.diff about src/Makefile.[def|tpl]. + +--- a/src/Makefile.tpl ++++ b/src/Makefile.tpl +@@ -1060,7 +1060,9 @@ + --target=[+target_alias+] $${srcdiroption} [+ IF prev +]\ + --with-build-libsubdir=$(HOST_SUBDIR) [+ ENDIF prev +]\ + $(STAGE[+id+]_CONFIGURE_FLAGS)[+ IF extra_configure_flags +] \ +- [+extra_configure_flags+][+ ENDIF extra_configure_flags +] ++ [+extra_configure_flags+][+ ENDIF extra_configure_flags +] \ ++ [+ IF bootstrap_configure_flags +][+bootstrap_configure_flags+] \ ++ [+ ENDIF bootstrap_configure_flags +] + @endif [+prefix+][+module+]-bootstrap + [+ ENDFOR bootstrap_stage +] + [+ ENDIF bootstrap +] +--- a/src/Makefile.def ++++ b/src/Makefile.def +@@ -117,7 +117,8 @@ + target_modules = { module= libstdc++-v3; + bootstrap=true; + lib_path=src/.libs; +- raw_cxx=true; }; ++ raw_cxx=true; ++ bootstrap_configure_flags='--disable-libstdcxx-debug --disable-libstdcxx-pch'; }; + target_modules = { module= libmudflap; lib_path=.libs; }; + target_modules = { module= libsanitizer; lib_path=.libs; }; + target_modules = { module= libssp; lib_path=.libs; }; diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/canonical-cpppath.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/canonical-cpppath.diff new file mode 100644 index 0000000000..39969b7446 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/canonical-cpppath.diff @@ -0,0 +1,34 @@ +# DP: Don't use any relative path names for the standard include paths. + +--- a/src/gcc/incpath.cc ++++ b/src/gcc/incpath.cc +@@ -177,6 +177,14 @@ add_standard_paths (const char *sysroot, + str = reconcat (str, str, dir_separator_str, + imultiarch, NULL); + } ++ { ++ char *rp = lrealpath (str); ++ if (rp) ++ { ++ free (str); ++ str = rp; ++ } ++ } + add_path (str, INC_SYSTEM, p->cxx_aware, false); + } + } +@@ -252,6 +260,14 @@ add_standard_paths (const char *sysroot, + else + str = reconcat (str, str, dir_separator_str, imultiarch, NULL); + } ++ { ++ char *rp = lrealpath (str); ++ if (rp) ++ { ++ free (str); ++ str = rp; ++ } ++ } + + add_path (str, INC_SYSTEM, p->cxx_aware, false); + } diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/config-ml.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/config-ml.diff new file mode 100644 index 0000000000..6e4e8708b8 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/config-ml.diff @@ -0,0 +1,52 @@ +# DP: - Disable some biarch libraries for biarch builds. +# DP: - Fix multilib builds on kernels which don't support all multilibs. + +--- a/src/config-ml.in ++++ b/src/config-ml.in +@@ -488,6 +488,25 @@ powerpc*-*-* | rs6000*-*-*) + ;; + esac + ++if [ -z "$biarch_multidir_names" ]; then ++ biarch_multidir_names="libiberty libstdc++-v3 libgfortran libmudflap libssp libffi libobjc libgomp" ++ echo "WARNING: biarch_multidir_names is unset. Use default value:" ++ echo " $biarch_multidir_names" ++fi ++ml_srcbase=`basename $ml_realsrcdir` ++old_multidirs="${multidirs}" ++multidirs="" ++for x in ${old_multidirs}; do ++ case " $x " in ++ " 32 "|" n32 "|" x32 "|" 64 "|" hf "|" sf "|" m4-nofpu ") ++ case "$biarch_multidir_names" in ++ *"$ml_srcbase"*) multidirs="${multidirs} ${x}" ;; ++ esac ++ ;; ++ *) multidirs="${multidirs} ${x}" ;; ++ esac ++done ++ + # Remove extraneous blanks from multidirs. + # Tests like `if [ -n "$multidirs" ]' require it. + multidirs=`echo "$multidirs" | sed -e 's/^[ ][ ]*//' -e 's/[ ][ ]*$//' -e 's/[ ][ ]*/ /g'` +@@ -886,9 +905,19 @@ if [ -n "${multidirs}" ] && [ -z "${ml_n + fi + fi + ++ ml_configure_args= ++ for arg in ${ac_configure_args} ++ do ++ case $arg in ++ *CC=*) ml_configure_args=${ml_config_env} ;; ++ *CXX=*) ml_configure_args=${ml_config_env} ;; ++ *) ;; ++ esac ++ done ++ + if eval ${ml_config_env} ${ml_config_shell} ${ml_recprog} \ + --with-multisubdir=${ml_dir} --with-multisrctop=${multisrctop} \ +- "${ac_configure_args}" ${ml_config_env} ${ml_srcdiroption} ; then ++ "${ac_configure_args}" ${ml_configure_args} ${ml_config_env} ${ml_srcdiroption} ; then + true + else + exit 1 diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/cross-biarch.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/cross-biarch.diff new file mode 100644 index 0000000000..a62d4d7c94 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/cross-biarch.diff @@ -0,0 +1,89 @@ +# DP: Fix the location of target's libs in cross-build for biarch + +--- a/src/config-ml.in ++++ b/src/config-ml.in +@@ -533,7 +533,13 @@ multi-do: + else \ + if [ -d ../$${dir}/$${lib} ]; then \ + flags=`echo $$i | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`; \ +- if (cd ../$${dir}/$${lib}; $(MAKE) $(FLAGS_TO_PASS) \ ++ libsuffix_="$${dir}"; \ ++ if [ "$${dir}" = "n32" ]; then libsuffix_=32; fi; \ ++ if [ -n "$$($${compiler} -v 2>&1 |grep '^Target: mips')" ] && [ "$${dir}" = "32" ]; then libsuffix_=o32; fi; \ ++ if (cd ../$${dir}/$${lib}; $(MAKE) $(subst \ ++ -B$(build_tooldir)/lib/, \ ++ -B$(build_tooldir)/lib$${libsuffix_}/, \ ++ $(FLAGS_TO_PASS)) \ + CFLAGS="$(CFLAGS) $${flags}" \ + CCASFLAGS="$(CCASFLAGS) $${flags}" \ + FCFLAGS="$(FCFLAGS) $${flags}" \ +@@ -786,6 +792,15 @@ if [ -n "${multidirs}" ] && [ -z "${ml_n + GOC_=$GOC' ' + GDC_=$GDC' ' + else ++ if [ "${ml_dir}" = "." ]; then ++ FILTER_="s!X\\(.*\\)!\\1!p" ++ elif [ "${ml_dir}" = "n32" ]; then # mips n32 -> lib32 ++ FILTER_="s!X\\(.*\\)/!\\132/!p" ++ elif [ "${ml_dir}" = "32" ] && [ "$(echo ${host} |grep '^mips')" ]; then # mips o32 -> libo32 ++ FILTER_="s!X\\(.*\\)/!\\1o32/!p" ++ else ++ FILTER_="s!X\\(.*\\)/!\\1${ml_dir}/!p" ++ fi + # Create a regular expression that matches any string as long + # as ML_POPDIR. + popdir_rx=`echo "${ML_POPDIR}" | sed 's,.,.,g'` +@@ -794,6 +809,8 @@ if [ -n "${multidirs}" ] && [ -z "${ml_n + case $arg in + -[BIL]"${ML_POPDIR}"/*) + CC_="${CC_}"`echo "X${arg}" | sed -n "s/X\\(-[BIL]${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X-[BIL]${popdir_rx}\\(.*\\)/\1/p"`' ' ;; ++ -B*/lib/) ++ CC_="${CC_}"`echo "X${arg}" | sed -n "$FILTER_"`' ' ;; + "${ML_POPDIR}"/*) + CC_="${CC_}"`echo "X${arg}" | sed -n "s/X\\(${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X${popdir_rx}\\(.*\\)/\\1/p"`' ' ;; + *) +@@ -806,6 +823,8 @@ if [ -n "${multidirs}" ] && [ -z "${ml_n + case $arg in + -[BIL]"${ML_POPDIR}"/*) + CXX_="${CXX_}"`echo "X${arg}" | sed -n "s/X\\(-[BIL]${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X-[BIL]${popdir_rx}\\(.*\\)/\\1/p"`' ' ;; ++ -B*/lib/) ++ CXX_="${CXX_}"`echo "X${arg}" | sed -n "$FILTER_"`' ' ;; + "${ML_POPDIR}"/*) + CXX_="${CXX_}"`echo "X${arg}" | sed -n "s/X\\(${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X${popdir_rx}\\(.*\\)/\\1/p"`' ' ;; + *) +@@ -818,6 +837,8 @@ if [ -n "${multidirs}" ] && [ -z "${ml_n + case $arg in + -[BIL]"${ML_POPDIR}"/*) + F77_="${F77_}"`echo "X${arg}" | sed -n "s/X\\(-[BIL]${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X-[BIL]${popdir_rx}\\(.*\\)/\\1/p"`' ' ;; ++ -B*/lib/) ++ F77_="${F77_}"`echo "X${arg}" | sed -n "$FILTER_"`' ' ;; + "${ML_POPDIR}"/*) + F77_="${F77_}"`echo "X${arg}" | sed -n "s/X\\(${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X${popdir_rx}\\(.*\\)/\\1/p"`' ' ;; + *) +@@ -830,6 +851,8 @@ if [ -n "${multidirs}" ] && [ -z "${ml_n + case $arg in + -[BIL]"${ML_POPDIR}"/*) + GFORTRAN_="${GFORTRAN_}"`echo "X${arg}" | sed -n "s/X\\(-[BIL]${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X-[BIL]${popdir_rx}\\(.*\\)/\\1/p"`' ' ;; ++ -B*/lib/) ++ GFORTRAN_="${GFORTRAN_}"`echo "X${arg}" | sed -n "$FILTER_"`' ' ;; + "${ML_POPDIR}"/*) + GFORTRAN_="${GFORTRAN_}"`echo "X${arg}" | sed -n "s/X\\(${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X${popdir_rx}\\(.*\\)/\\1/p"`' ' ;; + *) +@@ -842,6 +865,8 @@ if [ -n "${multidirs}" ] && [ -z "${ml_n + case $arg in + -[BIL]"${ML_POPDIR}"/*) + GOC_="${GOC_}"`echo "X${arg}" | sed -n "s/X\\(-[BIL]${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X-[BIL]${popdir_rx}\\(.*\\)/\\1/p"`' ' ;; ++ -B*/lib/) ++ GOC_="${GOC_}"`echo "X${arg}" | sed -n "$FILTER_"`' ' ;; + "${ML_POPDIR}"/*) + GOC_="${GOC_}"`echo "X${arg}" | sed -n "s/X\\(${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X${popdir_rx}\\(.*\\)/\\1/p"`' ' ;; + *) +@@ -854,6 +879,8 @@ if [ -n "${multidirs}" ] && [ -z "${ml_n + case $arg in + -[BIL]"${ML_POPDIR}"/*) + GDC_="${GDC_}"`echo "X${arg}" | sed -n "s/X\\(-[BIL]${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X-[BIL]${popdir_rx}\\(.*\\)/\\1/p"`' ' ;; ++ -B*/lib/) ++ GDC_="${GDC_}"`echo "X${arg}" | sed -n "$FILTER_"`' ' ;; + "${ML_POPDIR}"/*) + GDC_="${GDC_}"`echo "X${arg}" | sed -n "s/X\\(${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X${popdir_rx}\\(.*\\)/\\1/p"`' ' ;; + *) diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/cross-fixes.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/cross-fixes.diff new file mode 100644 index 0000000000..8844eaa2e6 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/cross-fixes.diff @@ -0,0 +1,57 @@ +# DP: Fix the linker error when creating an xcc for ia64 + +--- + gcc/config/ia64/fde-glibc.c | 3 +++ + gcc/config/ia64/unwind-ia64.c | 3 ++- + gcc/unwind-compat.c | 2 ++ + gcc/unwind-generic.h | 2 ++ + 6 files changed, 14 insertions(+), 1 deletions(-) + +--- a/src/libgcc/config/ia64/unwind-ia64.c ++++ b/src/libgcc/config/ia64/unwind-ia64.c +@@ -26,6 +26,7 @@ + see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + . */ + ++#ifndef inhibit_libc + #include "tconfig.h" + #include "tsystem.h" + #include "coretypes.h" +@@ -2467,3 +2468,4 @@ alias (_Unwind_SetIP); + #endif + + #endif ++#endif +--- a/src/libgcc/unwind-compat.c ++++ b/src/libgcc/unwind-compat.c +@@ -23,6 +23,7 @@ + . */ + + #if defined (USE_GAS_SYMVER) && defined (USE_LIBUNWIND_EXCEPTIONS) ++#ifndef inhibit_libc + #include "tconfig.h" + #include "tsystem.h" + #include "unwind.h" +@@ -207,3 +208,4 @@ _Unwind_SetIP (struct _Unwind_Context *c + } + symver (_Unwind_SetIP, GCC_3.0); + #endif ++#endif +--- a/src/libgcc/unwind-generic.h ++++ b/src/libgcc/unwind-generic.h +@@ -221,6 +221,7 @@ _Unwind_SjLj_Resume_or_Rethrow (struct _ + compatible with the standard ABI for IA-64, we inline these. */ + + #ifdef __ia64__ ++#ifndef inhibit_libc + static inline _Unwind_Ptr + _Unwind_GetDataRelBase (struct _Unwind_Context *_C) + { +@@ -237,6 +238,7 @@ _Unwind_GetTextRelBase (struct _Unwind_C + + /* @@@ Retrieve the Backing Store Pointer of the given context. */ + extern _Unwind_Word _Unwind_GetBSP (struct _Unwind_Context *); ++#endif /* inhibit_libc */ + #else + extern _Unwind_Ptr _Unwind_GetDataRelBase (struct _Unwind_Context *); + extern _Unwind_Ptr _Unwind_GetTextRelBase (struct _Unwind_Context *); diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/cross-install-location.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/cross-install-location.diff new file mode 100644 index 0000000000..ef5f64b661 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/cross-install-location.diff @@ -0,0 +1,497 @@ +--- a/src/fixincludes/Makefile.in ++++ b/src/fixincludes/Makefile.in +@@ -52,9 +52,9 @@ target_noncanonical:=@target_noncanonica + gcc_version := $(shell @get_gcc_base_ver@ $(srcdir)/../gcc/BASE-VER) + + # Directory in which the compiler finds libraries etc. +-libsubdir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version) ++libsubdir = $(libdir)/gcc-cross/$(target_noncanonical)/$(gcc_version) + # Directory in which the compiler finds executables +-libexecsubdir = $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_version) ++libexecsubdir = $(libexecdir)/gcc-cross/$(target_noncanonical)/$(gcc_version) + # Where our executable files go + itoolsdir = $(libexecsubdir)/install-tools + # Where our data files go +--- a/src/libgfortran/Makefile.in ++++ b/src/libgfortran/Makefile.in +@@ -750,7 +750,7 @@ gcc_version := $(shell @get_gcc_base_ver + @LIBGFOR_USE_SYMVER_GNU_TRUE@@LIBGFOR_USE_SYMVER_TRUE@version_dep = gfortran.ver + @LIBGFOR_USE_SYMVER_SUN_TRUE@@LIBGFOR_USE_SYMVER_TRUE@version_dep = gfortran.ver-sun gfortran.ver + gfor_c_HEADERS = ISO_Fortran_binding.h +-gfor_cdir = $(libdir)/gcc/$(target_alias)/$(gcc_version)/include ++gfor_cdir = $(libdir)/gcc-cross/$(target_alias)/$(gcc_version)/include + LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/../libtool-ldflags $(LDFLAGS)) \ + $(lt_host_flags) + +@@ -765,12 +765,12 @@ libgfortran_la_LDFLAGS = -version-info ` + + libgfortran_la_DEPENDENCIES = $(version_dep) libgfortran.spec $(LIBQUADLIB_DEP) + cafexeclib_LTLIBRARIES = libcaf_single.la +-cafexeclibdir = $(libdir)/gcc/$(target_alias)/$(gcc_version)$(MULTISUBDIR) ++cafexeclibdir = $(libdir)/gcc-cross/$(target_alias)/$(gcc_version)$(MULTISUBDIR) + libcaf_single_la_SOURCES = caf/single.c + libcaf_single_la_LDFLAGS = -static + libcaf_single_la_DEPENDENCIES = caf/libcaf.h + libcaf_single_la_LINK = $(LINK) $(libcaf_single_la_LDFLAGS) +-@IEEE_SUPPORT_TRUE@fincludedir = $(libdir)/gcc/$(target_alias)/$(gcc_version)$(MULTISUBDIR)/finclude ++@IEEE_SUPPORT_TRUE@fincludedir = $(libdir)/gcc-cross/$(target_alias)/$(gcc_version)$(MULTISUBDIR)/finclude + @IEEE_SUPPORT_TRUE@nodist_finclude_HEADERS = ieee_arithmetic.mod ieee_exceptions.mod ieee_features.mod + AM_CPPFLAGS = -iquote$(srcdir)/io -I$(srcdir)/$(MULTISRCTOP)../gcc \ + -I$(srcdir)/$(MULTISRCTOP)../gcc/config $(LIBQUADINCLUDE) \ +--- a/src/libgfortran/Makefile.am ++++ b/src/libgfortran/Makefile.am +@@ -39,7 +39,7 @@ version_dep = + endif + + gfor_c_HEADERS = ISO_Fortran_binding.h +-gfor_cdir = $(libdir)/gcc/$(target_alias)/$(gcc_version)/include ++gfor_cdir = $(libdir)/gcc-cross/$(target_alias)/$(gcc_version)/include + + LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/../libtool-ldflags $(LDFLAGS)) \ + $(lt_host_flags) +@@ -55,14 +55,14 @@ libgfortran_la_LDFLAGS = -version-info ` + libgfortran_la_DEPENDENCIES = $(version_dep) libgfortran.spec $(LIBQUADLIB_DEP) + + cafexeclib_LTLIBRARIES = libcaf_single.la +-cafexeclibdir = $(libdir)/gcc/$(target_alias)/$(gcc_version)$(MULTISUBDIR) ++cafexeclibdir = $(libdir)/gcc-cross/$(target_alias)/$(gcc_version)$(MULTISUBDIR) + libcaf_single_la_SOURCES = caf/single.c + libcaf_single_la_LDFLAGS = -static + libcaf_single_la_DEPENDENCIES = caf/libcaf.h + libcaf_single_la_LINK = $(LINK) $(libcaf_single_la_LDFLAGS) + + if IEEE_SUPPORT +-fincludedir = $(libdir)/gcc/$(target_alias)/$(gcc_version)$(MULTISUBDIR)/finclude ++fincludedir = $(libdir)/gcc-cross/$(target_alias)/$(gcc_version)$(MULTISUBDIR)/finclude + nodist_finclude_HEADERS = ieee_arithmetic.mod ieee_exceptions.mod ieee_features.mod + endif + +--- a/src/lto-plugin/Makefile.in ++++ b/src/lto-plugin/Makefile.in +@@ -342,7 +342,7 @@ with_libiberty = @with_libiberty@ + ACLOCAL_AMFLAGS = -I .. -I ../config + AUTOMAKE_OPTIONS = no-dependencies + gcc_version := $(shell @get_gcc_base_ver@ $(top_srcdir)/../gcc/BASE-VER) +-libexecsubdir := $(libexecdir)/gcc/$(real_target_noncanonical)/$(gcc_version)$(accel_dir_suffix) ++libexecsubdir := $(libexecdir)/gcc-cross/$(real_target_noncanonical)/$(gcc_version)$(accel_dir_suffix) + AM_CPPFLAGS = -I$(top_srcdir)/../include $(DEFS) + AM_CFLAGS = @ac_lto_plugin_warn_cflags@ $(CET_HOST_FLAGS) -DBASE_VERSION='"$(gcc_version)"' + AM_LDFLAGS = @ac_lto_plugin_ldflags@ @ac_lto_plugin_extra_ldflags@ +--- a/src/lto-plugin/Makefile.am ++++ b/src/lto-plugin/Makefile.am +@@ -5,7 +5,7 @@ AUTOMAKE_OPTIONS = no-dependencies + + gcc_version := $(shell @get_gcc_base_ver@ $(top_srcdir)/../gcc/BASE-VER) + target_noncanonical := @target_noncanonical@ +-libexecsubdir := $(libexecdir)/gcc/$(real_target_noncanonical)/$(gcc_version)$(accel_dir_suffix) ++libexecsubdir := $(libexecdir)/gcc-cross/$(real_target_noncanonical)/$(gcc_version)$(accel_dir_suffix) + + AM_CPPFLAGS = -I$(top_srcdir)/../include $(DEFS) + AM_CFLAGS = @ac_lto_plugin_warn_cflags@ $(CET_HOST_FLAGS) -DBASE_VERSION='"$(gcc_version)"' +--- a/src/libitm/Makefile.in ++++ b/src/libitm/Makefile.in +@@ -459,7 +459,7 @@ SUBDIRS = testsuite + gcc_version := $(shell @get_gcc_base_ver@ $(top_srcdir)/../gcc/BASE-VER) + abi_version = -fabi-version=4 + search_path = $(addprefix $(top_srcdir)/config/, $(config_path)) $(top_srcdir) +-libsubincludedir = $(libdir)/gcc/$(target_alias)/$(gcc_version)/include ++libsubincludedir = $(libdir)/gcc-cross/$(target_alias)/$(gcc_version)/include + AM_CPPFLAGS = $(addprefix -I, $(search_path)) + AM_CFLAGS = $(XCFLAGS) + AM_CXXFLAGS = $(XCFLAGS) -std=gnu++0x -funwind-tables -fno-exceptions \ +--- a/src/libitm/Makefile.am ++++ b/src/libitm/Makefile.am +@@ -12,7 +12,7 @@ abi_version = -fabi-version=4 + config_path = @config_path@ + search_path = $(addprefix $(top_srcdir)/config/, $(config_path)) $(top_srcdir) + +-libsubincludedir = $(libdir)/gcc/$(target_alias)/$(gcc_version)/include ++libsubincludedir = $(libdir)/gcc-cross/$(target_alias)/$(gcc_version)/include + + vpath % $(strip $(search_path)) + +--- a/src/gcc/gcc.cc ++++ b/src/gcc/gcc.cc +@@ -4828,7 +4828,7 @@ process_command (unsigned int decoded_op + GCC_EXEC_PREFIX is typically a directory name with a trailing + / (which is ignored by make_relative_prefix), so append a + program name. */ +- char *tmp_prefix = concat (gcc_exec_prefix, "gcc", NULL); ++ char *tmp_prefix = concat (gcc_exec_prefix, "gcc-cross", NULL); + gcc_libexec_prefix = get_relative_prefix (tmp_prefix, + standard_exec_prefix, + standard_libexec_prefix); +@@ -4854,15 +4854,15 @@ process_command (unsigned int decoded_op + { + int len = strlen (gcc_exec_prefix); + +- if (len > (int) sizeof ("/lib/gcc/") - 1 ++ if (len > (int) sizeof ("/lib/gcc-cross/") - 1 + && (IS_DIR_SEPARATOR (gcc_exec_prefix[len-1]))) + { +- temp = gcc_exec_prefix + len - sizeof ("/lib/gcc/") + 1; ++ temp = gcc_exec_prefix + len - sizeof ("/lib/gcc-cross/") + 1; + if (IS_DIR_SEPARATOR (*temp) + && filename_ncmp (temp + 1, "lib", 3) == 0 + && IS_DIR_SEPARATOR (temp[4]) +- && filename_ncmp (temp + 5, "gcc", 3) == 0) +- len -= sizeof ("/lib/gcc/") - 1; ++ && filename_ncmp (temp + 5, "gcc-cross", 3) == 0) ++ len -= sizeof ("/lib/gcc-cross/") - 1; + } + + set_std_prefix (gcc_exec_prefix, len); +--- a/src/gcc/Makefile.in ++++ b/src/gcc/Makefile.in +@@ -635,9 +635,9 @@ libexecdir = @libexecdir@ + # -------- + + # Directory in which the compiler finds libraries etc. +-libsubdir = $(libdir)/gcc/$(real_target_noncanonical)/$(version)$(accel_dir_suffix) ++libsubdir = $(libdir)/gcc-cross/$(real_target_noncanonical)/$(version)$(accel_dir_suffix) + # Directory in which the compiler finds executables +-libexecsubdir = $(libexecdir)/gcc/$(real_target_noncanonical)/$(version)$(accel_dir_suffix) ++libexecsubdir = $(libexecdir)/gcc-cross/$(real_target_noncanonical)/$(version)$(accel_dir_suffix) + # Directory in which all plugin resources are installed + plugin_resourcesdir = $(libsubdir)/plugin + # Directory in which plugin headers are installed +@@ -2318,8 +2318,8 @@ default-d.o: config/default-d.cc + + DRIVER_DEFINES = \ + -DSTANDARD_STARTFILE_PREFIX=\"$(unlibsubdir)/\" \ +- -DSTANDARD_EXEC_PREFIX=\"$(libdir)/gcc/\" \ +- -DSTANDARD_LIBEXEC_PREFIX=\"$(libexecdir)/gcc/\" \ ++ -DSTANDARD_EXEC_PREFIX=\"$(libdir)/gcc-cross/\" \ ++ -DSTANDARD_LIBEXEC_PREFIX=\"$(libexecdir)/gcc-cross/\" \ + -DDEFAULT_TARGET_VERSION=\"$(version)\" \ + -DDEFAULT_REAL_TARGET_MACHINE=\"$(real_target_noncanonical)\" \ + -DDEFAULT_TARGET_MACHINE=\"$(target_noncanonical)\" \ +@@ -3039,7 +3039,7 @@ PREPROCESSOR_DEFINES = \ + -DTOOL_INCLUDE_DIR=\"$(gcc_tooldir)/include\" \ + -DNATIVE_SYSTEM_HEADER_DIR=\"$(NATIVE_SYSTEM_HEADER_DIR)\" \ + -DPREFIX=\"$(prefix)/\" \ +- -DSTANDARD_EXEC_PREFIX=\"$(libdir)/gcc/\" \ ++ -DSTANDARD_EXEC_PREFIX=\"$(libdir)/gcc-cross/\" \ + @TARGET_SYSTEM_ROOT_DEFINE@ + + CFLAGS-cppbuiltin.o += $(PREPROCESSOR_DEFINES) -DBASEVER=$(BASEVER_s) +--- a/src/libssp/Makefile.in ++++ b/src/libssp/Makefile.in +@@ -366,7 +366,7 @@ gcc_version := $(shell @get_gcc_base_ver + @LIBSSP_USE_SYMVER_SUN_TRUE@@LIBSSP_USE_SYMVER_TRUE@version_dep = ssp.map-sun + AM_CFLAGS = -Wall $(XCFLAGS) + toolexeclib_LTLIBRARIES = libssp.la libssp_nonshared.la +-libsubincludedir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version)/include ++libsubincludedir = $(libdir)/gcc-cross/$(target_noncanonical)/$(gcc_version)/include + nobase_libsubinclude_HEADERS = ssp/ssp.h ssp/string.h ssp/stdio.h ssp/unistd.h + libssp_la_SOURCES = \ + ssp.c gets-chk.c memcpy-chk.c memmove-chk.c mempcpy-chk.c \ +--- a/src/libssp/Makefile.am ++++ b/src/libssp/Makefile.am +@@ -39,7 +39,7 @@ AM_CFLAGS += $(XCFLAGS) + toolexeclib_LTLIBRARIES = libssp.la libssp_nonshared.la + + target_noncanonical = @target_noncanonical@ +-libsubincludedir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version)/include ++libsubincludedir = $(libdir)/gcc-cross/$(target_noncanonical)/$(gcc_version)/include + nobase_libsubinclude_HEADERS = ssp/ssp.h ssp/string.h ssp/stdio.h ssp/unistd.h + + libssp_la_SOURCES = \ +--- a/src/libquadmath/Makefile.in ++++ b/src/libquadmath/Makefile.in +@@ -468,7 +468,7 @@ AUTOMAKE_OPTIONS = foreign info-in-build + + @BUILD_LIBQUADMATH_TRUE@libquadmath_la_DEPENDENCIES = $(version_dep) $(libquadmath_la_LIBADD) + @BUILD_LIBQUADMATH_TRUE@nodist_libsubinclude_HEADERS = quadmath.h quadmath_weak.h +-@BUILD_LIBQUADMATH_TRUE@libsubincludedir = $(libdir)/gcc/$(target_alias)/$(gcc_version)/include ++@BUILD_LIBQUADMATH_TRUE@libsubincludedir = $(libdir)/gcc-cross/$(target_alias)/$(gcc_version)/include + @BUILD_LIBQUADMATH_TRUE@libquadmath_la_SOURCES = \ + @BUILD_LIBQUADMATH_TRUE@ math/x2y2m1q.c math/acoshq.c math/fmodq.c \ + @BUILD_LIBQUADMATH_TRUE@ math/acosq.c math/frexpq.c \ +--- a/src/libquadmath/Makefile.am ++++ b/src/libquadmath/Makefile.am +@@ -41,7 +41,7 @@ libquadmath_la_LDFLAGS = -version-info ` + libquadmath_la_DEPENDENCIES = $(version_dep) $(libquadmath_la_LIBADD) + + nodist_libsubinclude_HEADERS = quadmath.h quadmath_weak.h +-libsubincludedir = $(libdir)/gcc/$(target_alias)/$(gcc_version)/include ++libsubincludedir = $(libdir)/gcc-cross/$(target_alias)/$(gcc_version)/include + + libquadmath_la_SOURCES = \ + math/x2y2m1q.c math/acoshq.c math/fmodq.c \ +--- a/src/libobjc/Makefile.in ++++ b/src/libobjc/Makefile.in +@@ -48,7 +48,7 @@ extra_ldflags_libobjc = @extra_ldflags_l + top_builddir = . + + libdir = $(exec_prefix)/lib +-libsubdir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version) ++libsubdir = $(libdir)/gcc-cross/$(target_noncanonical)/$(gcc_version) + + # Multilib support variables. + MULTISRCTOP = +--- a/src/libada/Makefile.in ++++ b/src/libada/Makefile.in +@@ -70,7 +70,7 @@ GCC_DIR=$(MULTIBUILDTOP)../../$(host_sub + + target_noncanonical:=@target_noncanonical@ + version := $(shell @get_gcc_base_ver@ $(srcdir)/../gcc/BASE-VER) +-libsubdir := $(libdir)/gcc/$(target_noncanonical)/$(version)$(MULTISUBDIR) ++libsubdir := $(libdir)/gcc-cross/$(target_noncanonical)/$(version)$(MULTISUBDIR) + ADA_RTS_DIR=$(GCC_DIR)/ada/rts$(subst /,_,$(MULTISUBDIR)) + + # exeext should not be used because it's the *host* exeext. We're building +--- a/src/libgomp/Makefile.in ++++ b/src/libgomp/Makefile.in +@@ -516,8 +516,8 @@ gcc_version := $(shell @get_gcc_base_ver + search_path = $(addprefix $(top_srcdir)/config/, $(config_path)) $(top_srcdir) \ + $(top_srcdir)/../include + +-fincludedir = $(libdir)/gcc/$(target_alias)/$(gcc_version)$(MULTISUBDIR)/finclude +-libsubincludedir = $(libdir)/gcc/$(target_alias)/$(gcc_version)/include ++fincludedir = $(libdir)/gcc-cross/$(target_alias)/$(gcc_version)$(MULTISUBDIR)/finclude ++libsubincludedir = $(libdir)/gcc-cross/$(target_alias)/$(gcc_version)/include + AM_CPPFLAGS = $(addprefix -I, $(search_path)) + AM_CFLAGS = $(XCFLAGS) + AM_LDFLAGS = $(XLDFLAGS) $(SECTION_LDFLAGS) $(OPT_LDFLAGS) +--- a/src/libgomp/Makefile.am ++++ b/src/libgomp/Makefile.am +@@ -11,8 +11,8 @@ config_path = @config_path@ + search_path = $(addprefix $(top_srcdir)/config/, $(config_path)) $(top_srcdir) \ + $(top_srcdir)/../include + +-fincludedir = $(libdir)/gcc/$(target_alias)/$(gcc_version)$(MULTISUBDIR)/finclude +-libsubincludedir = $(libdir)/gcc/$(target_alias)/$(gcc_version)/include ++fincludedir = $(libdir)/gcc-cross/$(target_alias)/$(gcc_version)$(MULTISUBDIR)/finclude ++libsubincludedir = $(libdir)/gcc-cross/$(target_alias)/$(gcc_version)/include + + vpath % $(strip $(search_path)) + +--- a/src/libgcc/Makefile.in ++++ b/src/libgcc/Makefile.in +@@ -200,7 +200,7 @@ STRIP = @STRIP@ + STRIP_FOR_TARGET = $(STRIP) + + # Directory in which the compiler finds libraries etc. +-libsubdir = $(libdir)/gcc/$(real_host_noncanonical)/$(version)@accel_dir_suffix@ ++libsubdir = $(libdir)/gcc-cross/$(real_host_noncanonical)/$(version)@accel_dir_suffix@ + # Used to install the shared libgcc. + slibdir = @slibdir@ + # Maybe used for DLLs on Windows targets. +--- a/src/libffi/include/Makefile.am ++++ b/src/libffi/include/Makefile.am +@@ -8,6 +8,6 @@ EXTRA_DIST=ffi.h.in + + # Where generated headers like ffitarget.h get installed. + gcc_version := $(shell @get_gcc_base_ver@ $(top_srcdir)/../gcc/BASE-VER) +-toollibffidir := $(libdir)/gcc/$(target_alias)/$(gcc_version)/include ++toollibffidir := $(libdir)/gcc-cross/$(target_alias)/$(gcc_version)/include + + toollibffi_HEADERS = ffi.h ffitarget.h +--- a/src/libffi/include/Makefile.in ++++ b/src/libffi/include/Makefile.in +@@ -326,7 +326,7 @@ EXTRA_DIST = ffi.h.in + + # Where generated headers like ffitarget.h get installed. + gcc_version := $(shell @get_gcc_base_ver@ $(top_srcdir)/../gcc/BASE-VER) +-toollibffidir := $(libdir)/gcc/$(target_alias)/$(gcc_version)/include ++toollibffidir := $(libdir)/gcc-cross/$(target_alias)/$(gcc_version)/include + toollibffi_HEADERS = ffi.h ffitarget.h + all: all-am + +--- a/src/libcc1/Makefile.am ++++ b/src/libcc1/Makefile.am +@@ -40,7 +40,7 @@ libiberty = $(if $(wildcard $(libiberty_ + $(Wc)$(libiberty_normal))) + libiberty_dep = $(patsubst $(Wc)%,%,$(libiberty)) + +-plugindir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version)/plugin ++plugindir = $(libdir)/gcc-cross/$(target_noncanonical)/$(gcc_version)/plugin + cc1libdir = $(libdir)/$(libsuffix) + + if ENABLE_PLUGIN +--- a/src/libcc1/Makefile.in ++++ b/src/libcc1/Makefile.in +@@ -396,7 +396,7 @@ libiberty = $(if $(wildcard $(libiberty_ + $(Wc)$(libiberty_normal))) + + libiberty_dep = $(patsubst $(Wc)%,%,$(libiberty)) +-plugindir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version)/plugin ++plugindir = $(libdir)/gcc-cross/$(target_noncanonical)/$(gcc_version)/plugin + cc1libdir = $(libdir)/$(libsuffix) + @ENABLE_PLUGIN_TRUE@plugin_LTLIBRARIES = libcc1plugin.la libcp1plugin.la + @ENABLE_PLUGIN_TRUE@cc1lib_LTLIBRARIES = libcc1.la +--- a/src/libsanitizer/Makefile.am ++++ b/src/libsanitizer/Makefile.am +@@ -1,6 +1,6 @@ + ACLOCAL_AMFLAGS = -I .. -I ../config + +-sanincludedir = $(libdir)/gcc/$(target_alias)/$(gcc_version)/include/sanitizer ++sanincludedir = $(libdir)/gcc-cross/$(target_alias)/$(gcc_version)/include/sanitizer + + nodist_saninclude_HEADERS = + +--- a/src/libsanitizer/Makefile.in ++++ b/src/libsanitizer/Makefile.in +@@ -361,7 +361,7 @@ top_build_prefix = @top_build_prefix@ + top_builddir = @top_builddir@ + top_srcdir = @top_srcdir@ + ACLOCAL_AMFLAGS = -I .. -I ../config +-sanincludedir = $(libdir)/gcc/$(target_alias)/$(gcc_version)/include/sanitizer ++sanincludedir = $(libdir)/gcc-cross/$(target_alias)/$(gcc_version)/include/sanitizer + nodist_saninclude_HEADERS = $(am__append_1) + @SANITIZER_SUPPORTED_TRUE@SUBDIRS = sanitizer_common $(am__append_2) \ + @SANITIZER_SUPPORTED_TRUE@ $(am__append_3) lsan asan ubsan \ +--- a/src/libphobos/configure.ac ++++ b/src/libphobos/configure.ac +@@ -256,6 +256,8 @@ AC_SUBST(SPEC_PHOBOS_DEPS) + libtool_VERSION=4:0:0 + AC_SUBST(libtool_VERSION) + ++# trigger rebuild of the configure file ++ + # Set default flags (after DRUNTIME_WERROR!) + if test -z "$GDCFLAGS"; then + GDCFLAGS="-g -O2" +--- a/src/libphobos/m4/druntime.m4 ++++ b/src/libphobos/m4/druntime.m4 +@@ -114,6 +114,7 @@ AC_DEFUN([DRUNTIME_INSTALL_DIRECTORIES], + + # Default case for install directory for D sources files. + gdc_include_dir='$(libdir)/gcc/${target_alias}/${gcc_version}/include/d' ++ gdc_include_dir='${libdir}/gcc-cross/${target_alias}'/${gcc_version}/include/d + AC_SUBST(gdc_include_dir) + ]) + +--- a/src/gcc/ada/gcc-interface/Makefile.in ++++ b/src/gcc/ada/gcc-interface/Makefile.in +@@ -921,7 +921,7 @@ toolexeclibdir = $(ADA_RTL_OBJ_DIR) + + ADA_INCLUDE_DIR = $(libsubdir)/adainclude + ADA_RTL_OBJ_DIR = $(libsubdir)/adalib +-ADA_RTL_DSO_DIR = $(toolexeclibdir) ++ADA_RTL_DSO_DIR = $(subst /gcc/,/gcc-cross/,$(toolexeclibdir)) + + # Special flags + +--- a/src/c++tools/Makefile.in ++++ b/src/c++tools/Makefile.in +@@ -21,7 +21,7 @@ bindir := @bindir@ + libexecdir := @libexecdir@ + target_noncanonical := @target_noncanonical@ + gcc_version := $(shell @get_gcc_base_ver@ $(srcdir)/../gcc/BASE-VER) +-libexecsubdir := $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_version) ++libexecsubdir := $(libexecdir)/gcc-cross/$(target_noncanonical)/$(gcc_version) + INSTALL := @INSTALL@ + INSTALL_PROGRAM := @INSTALL_PROGRAM@ + INSTALL_STRIP_PROGRAM := $(srcdir)/../install-sh -c -s +--- a/src/libgm2/libm2cor/Makefile.am ++++ b/src/libgm2/libm2cor/Makefile.am +@@ -27,7 +27,7 @@ MAKEOVERRIDES= + gcc_version := $(shell @get_gcc_base_ver@ $(top_srcdir)/../gcc/BASE-VER) + + # Directory in which the compiler finds libraries etc. +-libsubdir = $(libdir)/gcc/$(target_alias)/$(gcc_version) ++libsubdir = $(libdir)/gcc-cross/$(target_alias)/$(gcc_version) + # Used to install the shared libgcc. + slibdir = @slibdir@ + +--- a/src/libgm2/libm2cor/Makefile.in ++++ b/src/libgm2/libm2cor/Makefile.in +@@ -391,7 +391,7 @@ MAKEOVERRIDES = + gcc_version := $(shell @get_gcc_base_ver@ $(top_srcdir)/../gcc/BASE-VER) + + # Directory in which the compiler finds libraries etc. +-libsubdir = $(libdir)/gcc/$(target_alias)/$(gcc_version) ++libsubdir = $(libdir)/gcc-cross/$(target_alias)/$(gcc_version) + MULTIDIR := $(shell $(CC) $(CFLAGS) -print-multi-directory) + MULTIOSDIR := $(shell $(CC) $(CFLAGS) -print-multi-os-directory) + MULTIOSSUBDIR := $(shell if test x$(MULTIOSDIR) != x.; then echo /$(MULTIOSDIR); fi) +--- a/src/libgm2/libm2iso/Makefile.am ++++ b/src/libgm2/libm2iso/Makefile.am +@@ -27,7 +27,7 @@ MAKEOVERRIDES= + gcc_version := $(shell @get_gcc_base_ver@ $(top_srcdir)/../gcc/BASE-VER) + + # Directory in which the compiler finds libraries etc. +-libsubdir = $(libdir)/gcc/$(target_alias)/$(gcc_version) ++libsubdir = $(libdir)/gcc-cross/$(target_alias)/$(gcc_version) + # Used to install the shared libgcc. + # was slibdir = @slibdir@ + slibdir = $(libdir)/gcc/$(target_alias)/$(gcc_version)$(MULTISUBDIR) +--- a/src/libgm2/libm2iso/Makefile.in ++++ b/src/libgm2/libm2iso/Makefile.in +@@ -416,7 +416,7 @@ MAKEOVERRIDES = + gcc_version := $(shell @get_gcc_base_ver@ $(top_srcdir)/../gcc/BASE-VER) + + # Directory in which the compiler finds libraries etc. +-libsubdir = $(libdir)/gcc/$(target_alias)/$(gcc_version) ++libsubdir = $(libdir)/gcc-cross/$(target_alias)/$(gcc_version) + MULTIDIR := $(shell $(CC) $(CFLAGS) -print-multi-directory) + MULTIOSDIR := $(shell $(CC) $(CFLAGS) -print-multi-os-directory) + MULTIOSSUBDIR := $(shell if test x$(MULTIOSDIR) != x.; then echo /$(MULTIOSDIR); fi) +--- a/src/libgm2/libm2log/Makefile.am ++++ b/src/libgm2/libm2log/Makefile.am +@@ -27,7 +27,7 @@ MAKEOVERRIDES= + gcc_version := $(shell @get_gcc_base_ver@ $(top_srcdir)/../gcc/BASE-VER) + + # Directory in which the compiler finds libraries etc. +-libsubdir = $(libdir)/gcc/$(target_alias)/$(gcc_version) ++libsubdir = $(libdir)/gcc-cross/$(target_alias)/$(gcc_version) + # Used to install the shared libgcc. + slibdir = @slibdir@ + +--- a/src/libgm2/libm2log/Makefile.in ++++ b/src/libgm2/libm2log/Makefile.in +@@ -380,7 +380,7 @@ MAKEOVERRIDES = + gcc_version := $(shell @get_gcc_base_ver@ $(top_srcdir)/../gcc/BASE-VER) + + # Directory in which the compiler finds libraries etc. +-libsubdir = $(libdir)/gcc/$(target_alias)/$(gcc_version) ++libsubdir = $(libdir)/gcc-cross/$(target_alias)/$(gcc_version) + MULTIDIR := $(shell $(CC) $(CFLAGS) -print-multi-directory) + MULTIOSDIR := $(shell $(CC) $(CFLAGS) -print-multi-os-directory) + MULTIOSSUBDIR := $(shell if test x$(MULTIOSDIR) != x.; then echo /$(MULTIOSDIR); fi) +--- a/src/libgm2/libm2min/Makefile.am ++++ b/src/libgm2/libm2min/Makefile.am +@@ -27,7 +27,7 @@ MAKEOVERRIDES= + gcc_version := $(shell @get_gcc_base_ver@ $(top_srcdir)/../gcc/BASE-VER) + + # Directory in which the compiler finds libraries etc. +-libsubdir = $(libdir)/gcc/$(target_alias)/$(gcc_version) ++libsubdir = $(libdir)/gcc-cross/$(target_alias)/$(gcc_version) + # Used to install the shared libgcc. + slibdir = @slibdir@ + +--- a/src/libgm2/libm2min/Makefile.in ++++ b/src/libgm2/libm2min/Makefile.in +@@ -370,7 +370,7 @@ MAKEOVERRIDES = + gcc_version := $(shell @get_gcc_base_ver@ $(top_srcdir)/../gcc/BASE-VER) + + # Directory in which the compiler finds libraries etc. +-libsubdir = $(libdir)/gcc/$(target_alias)/$(gcc_version) ++libsubdir = $(libdir)/gcc-cross/$(target_alias)/$(gcc_version) + MULTIDIR := $(shell $(CC) $(CFLAGS) -print-multi-directory) + MULTIOSDIR := $(shell $(CC) $(CFLAGS) -print-multi-os-directory) + MULTIOSSUBDIR := $(shell if test x$(MULTIOSDIR) != x.; then echo /$(MULTIOSDIR); fi) +--- a/src/libgm2/libm2pim/Makefile.am ++++ b/src/libgm2/libm2pim/Makefile.am +@@ -27,7 +27,7 @@ MAKEOVERRIDES= + gcc_version := $(shell @get_gcc_base_ver@ $(top_srcdir)/../gcc/BASE-VER) + + # Directory in which the compiler finds libraries etc. +-libsubdir = $(libdir)/gcc/$(target_alias)/$(gcc_version) ++libsubdir = $(libdir)/gcc-cross/$(target_alias)/$(gcc_version) + # Used to install the shared libgcc. + slibdir = @slibdir@ + +--- a/src/libgm2/libm2pim/Makefile.in ++++ b/src/libgm2/libm2pim/Makefile.in +@@ -405,7 +405,7 @@ MAKEOVERRIDES = + gcc_version := $(shell @get_gcc_base_ver@ $(top_srcdir)/../gcc/BASE-VER) + + # Directory in which the compiler finds libraries etc. +-libsubdir = $(libdir)/gcc/$(target_alias)/$(gcc_version) ++libsubdir = $(libdir)/gcc-cross/$(target_alias)/$(gcc_version) + MULTIDIR := $(shell $(CC) $(CFLAGS) -print-multi-directory) + MULTIOSDIR := $(shell $(CC) $(CFLAGS) -print-multi-os-directory) + MULTIOSSUBDIR := $(shell if test x$(MULTIOSDIR) != x.; then echo /$(MULTIOSDIR); fi) diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/cross-no-locale-include.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/cross-no-locale-include.diff new file mode 100644 index 0000000000..c728316047 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/cross-no-locale-include.diff @@ -0,0 +1,17 @@ +# DP: Don't add /usr/local/include for cross compilers. Assume that +# DP: /usr/include is ready for multiarch, but not /usr/local/include. + +--- a/src/gcc/cppdefault.cc ++++ b/src/gcc/cppdefault.cc +@@ -66,8 +66,11 @@ + #ifdef LOCAL_INCLUDE_DIR + /* /usr/local/include comes before the fixincluded header files. */ + { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 }, ++#if 0 ++ /* Unsafe to assume that /usr/local/include is ready for multiarch. */ + { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 0 }, + #endif ++#endif + #ifdef PREFIX_INCLUDE_DIR + { PREFIX_INCLUDE_DIR, 0, 0, 1, 0, 0 }, + #endif diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/cuda-float128.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/cuda-float128.diff new file mode 100644 index 0000000000..6e7c22f1c0 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/cuda-float128.diff @@ -0,0 +1,54 @@ +# Mask __float128 types from CUDA compilers (LP: #1717257) + +Index: b/src/libstdc++-v3/include/std/type_traits +=================================================================== +--- a/src/libstdc++-v3/include/std/type_traits ++++ b/src/libstdc++-v3/include/std/type_traits +@@ -489,7 +489,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION + : public true_type { }; + #endif + +-#if !defined(__STRICT_ANSI__) && defined(_GLIBCXX_USE_FLOAT128) ++#if !defined(__STRICT_ANSI__) && defined(_GLIBCXX_USE_FLOAT128) && !defined(__CUDACC__) + template<> + struct __is_floating_point_helper<__float128> + : public true_type { }; +Index: b/src/libstdc++-v3/include/bits/std_abs.h +=================================================================== +--- a/src/libstdc++-v3/include/bits/std_abs.h ++++ b/src/libstdc++-v3/include/bits/std_abs.h +@@ -131,7 +131,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION + { return __gnu_cxx::__bfloat16_t(__builtin_fabsf(__x)); } + #endif + +-#if !defined(__STRICT_ANSI__) && defined(_GLIBCXX_USE_FLOAT128) ++#if !defined(__STRICT_ANSI__) && defined(_GLIBCXX_USE_FLOAT128) && !defined(__CUDACC__) + __extension__ inline _GLIBCXX_CONSTEXPR + __float128 + abs(__float128 __x) +Index: b/src/libstdc++-v3/include/bits/stl_algobase.h +=================================================================== +--- a/src/libstdc++-v3/include/bits/stl_algobase.h ++++ b/src/libstdc++-v3/include/bits/stl_algobase.h +@@ -1052,7 +1052,7 @@ _GLIBCXX_END_NAMESPACE_CONTAINER + __size_to_integer(double __n) { return (long long)__n; } + inline _GLIBCXX_CONSTEXPR long long + __size_to_integer(long double __n) { return (long long)__n; } +-#if !defined(__STRICT_ANSI__) && defined(_GLIBCXX_USE_FLOAT128) ++#if !defined(__STRICT_ANSI__) && defined(_GLIBCXX_USE_FLOAT128) && !defined(__CUDACC__) + __extension__ inline _GLIBCXX_CONSTEXPR long long + __size_to_integer(__float128 __n) { return (long long)__n; } + #endif +Index: b/src/libstdc++-v3/include/std/numbers +=================================================================== +--- a/src/libstdc++-v3/include/std/numbers ++++ b/src/libstdc++-v3/include/std/numbers +@@ -219,7 +219,7 @@ __glibcxx_numbers (_Float128, F128); + __glibcxx_numbers (__gnu_cxx::__bfloat16_t, BF16); + #endif + +-#if !defined(__STRICT_ANSI__) && defined(_GLIBCXX_USE_FLOAT128) ++#if !defined(__STRICT_ANSI__) && defined(_GLIBCXX_USE_FLOAT128) && !defined(__CUDACC__) + __glibcxx_numbers (__float128, Q); + #endif // USE_FLOAT128 + diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/disable-gdc-tests.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/disable-gdc-tests.diff new file mode 100644 index 0000000000..626f6bda87 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/disable-gdc-tests.diff @@ -0,0 +1,17 @@ +# DP: Disable D tests, hang on many buildds + +--- a/src/gcc/d/Make-lang.in ++++ b/src/gcc/d/Make-lang.in +@@ -206,9 +206,9 @@ d.srcman: doc/gdc.1 + # check targets. However, our DejaGNU framework requires 'check-gdc' as its + # entry point. We feed the former to the latter here. + check-d: check-gdc +-lang_checks += check-gdc +-lang_checks_parallelized += check-gdc +-check_gdc_parallelize = 10 ++#lang_checks += check-gdc ++#lang_checks_parallelized += check-gdc ++#check_gdc_parallelize = 10 + + # No D-specific selftests. + selftest-d: diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/dwarf5-revert-default-doc.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/dwarf5-revert-default-doc.diff new file mode 100644 index 0000000000..c8a6e4bb16 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/dwarf5-revert-default-doc.diff @@ -0,0 +1,14 @@ +# DP: Don't turn on DWARF 5 by default, where GCC 11 is not the default. + +--- a/src/gcc/doc/invoke.texi ++++ b/src/gcc/doc/invoke.texi +@@ -9630,6 +9630,9 @@ version for most targets is 5 (with the + Darwin/Mac OS X, which default to version 2, and AIX, which defaults + to version 4). + ++NOTE: On Ubuntu release, where GCC 11 is not used as the default (21.04 ++and earlier releases), it defaults to version 4. ++ + Note that with DWARF Version 2, some ports require and always + use some non-conflicting DWARF 3 extensions in the unwind tables. + diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/dwarf5-revert-default.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/dwarf5-revert-default.diff new file mode 100644 index 0000000000..5d596c25dc --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/dwarf5-revert-default.diff @@ -0,0 +1,24 @@ +# DP: Don't turn on DWARF 5 by default, where GCC 11 is not the default. + +--- a/src/gcc/common.opt ++++ b/src/gcc/common.opt +@@ -3353,7 +3353,7 @@ Common Driver JoinedOrMissing RejectNega + Generate debug information in default version of DWARF format. + + gdwarf- +-Common Driver Joined UInteger Var(dwarf_version) Init(DWARF_VERSION_DEFAULT) RejectNegative ++Common Driver Joined UInteger Var(dwarf_version) Init(4) RejectNegative + Generate debug information in DWARF v2 (or later) format. + + gdwarf32 +--- a/src/gcc/defaults.h ++++ b/src/gcc/defaults.h +@@ -1444,7 +1444,7 @@ see the files COPYING3 and COPYING.RUNTI + /* When generating dwarf info, the default standard version we'll honor + and advertise in absence of -gdwarf- on the command line. */ + #ifndef DWARF_VERSION_DEFAULT +-#define DWARF_VERSION_DEFAULT 5 ++#define DWARF_VERSION_DEFAULT 4 + #endif + + #ifndef USED_FOR_TARGET diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/g++-multiarch-incdir.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/g++-multiarch-incdir.diff new file mode 100644 index 0000000000..4b6b7ad7d5 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/g++-multiarch-incdir.diff @@ -0,0 +1,119 @@ +# DP: Use /usr/include//c++/4.x as the include directory +# DP: for host dependent c++ header files. + +Index: b/src/libstdc++-v3/include/Makefile.am +=================================================================== +--- a/src/libstdc++-v3/include/Makefile.am ++++ b/src/libstdc++-v3/include/Makefile.am +@@ -1030,7 +1030,7 @@ endif + + host_srcdir = ${glibcxx_srcdir}/$(OS_INC_SRCDIR) + host_builddir = ./${host_alias}/bits +-host_installdir = ${gxx_include_dir}/${host_alias}$(MULTISUBDIR)/bits ++host_installdir = $(if $(shell $(CC) -print-multiarch),/usr/include/$(shell $(filter-out -m%,$(CC)) -print-multiarch)/c++/$(notdir ${gxx_include_dir})$(MULTISUBDIR)/bits,${gxx_include_dir}/${default_host_alias}$(MULTISUBDIR)/bits) + host_headers = \ + ${host_srcdir}/ctype_base.h \ + ${host_srcdir}/ctype_inline.h \ +Index: b/src/libstdc++-v3/include/Makefile.in +=================================================================== +--- a/src/libstdc++-v3/include/Makefile.in ++++ b/src/libstdc++-v3/include/Makefile.in +@@ -1361,7 +1361,7 @@ parallel_headers = \ + @GLIBCXX_C_HEADERS_COMPATIBILITY_TRUE@c_compatibility_headers_extra = ${c_compatibility_headers} + host_srcdir = ${glibcxx_srcdir}/$(OS_INC_SRCDIR) + host_builddir = ./${host_alias}/bits +-host_installdir = ${gxx_include_dir}/${host_alias}$(MULTISUBDIR)/bits ++host_installdir = $(if $(shell $(CC) -print-multiarch),/usr/include/$(shell $(filter-out -m%,$(CC)) -print-multiarch)/c++/$(notdir ${gxx_include_dir})$(MULTISUBDIR)/bits,${gxx_include_dir}/${default_host_alias}$(MULTISUBDIR)/bits) + host_headers = \ + ${host_srcdir}/ctype_base.h \ + ${host_srcdir}/ctype_inline.h \ +Index: b/src/gcc/Makefile.in +=================================================================== +--- a/src/gcc/Makefile.in ++++ b/src/gcc/Makefile.in +@@ -1215,6 +1215,7 @@ FLAGS_TO_PASS = \ + "prefix=$(prefix)" \ + "local_prefix=$(local_prefix)" \ + "gxx_include_dir=$(gcc_gxx_include_dir)" \ ++ "gxx_tool_include_dir=$(gcc_gxx_tool_include_dir)" \ + "gxx_libcxx_include_dir=$(gcc_gxx_libcxx_include_dir)" \ + "build_tooldir=$(build_tooldir)" \ + "gcc_tooldir=$(gcc_tooldir)" \ +@@ -1882,6 +1883,14 @@ gnat_install_lib = @gnat_install_lib@ + # host overrides + -include $(xmake_file) + ++# Directory in which the compiler finds target-dependent g++ includes. ++ifneq ($(call if_multiarch,non-empty),) ++ gcc_gxx_tool_include_dir = $(libsubdir)/$(libsubdir_to_prefix)include/$(MULTIARCH_DIRNAME)/c++/$(version) ++else ++ gcc_gxx_tool_include_dir = $(gcc_gxx_include_dir)/$(target_noncanonical) ++endif ++ ++ + # all-tree.def includes all the tree.def files. + all-tree.def: s-alltree; @true + s-alltree: Makefile +@@ -3039,7 +3048,7 @@ PREPROCESSOR_DEFINES = \ + -DFIXED_INCLUDE_DIR=\"$(libsubdir)/include-fixed\" \ + -DGPLUSPLUS_INCLUDE_DIR=\"$(gcc_gxx_include_dir)\" \ + -DGPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT=$(gcc_gxx_include_dir_add_sysroot) \ +- -DGPLUSPLUS_TOOL_INCLUDE_DIR=\"$(gcc_gxx_include_dir)/$(target_noncanonical)\" \ ++ -DGPLUSPLUS_TOOL_INCLUDE_DIR=\"$(gcc_gxx_tool_include_dir)\" \ + -DGPLUSPLUS_BACKWARD_INCLUDE_DIR=\"$(gcc_gxx_include_dir)/backward\" \ + -DGPLUSPLUS_LIBCXX_INCLUDE_DIR=\"$(gcc_gxx_libcxx_include_dir)\" \ + -DGPLUSPLUS_LIBCXX_INCLUDE_DIR_ADD_SYSROOT=$(gcc_gxx_libcxx_include_dir_add_sysroot) \ +Index: b/src/gcc/cppdefault.cc +=================================================================== +--- a/src/gcc/cppdefault.cc ++++ b/src/gcc/cppdefault.cc +@@ -49,6 +49,8 @@ const struct default_include cpp_include + /* Pick up GNU C++ target-dependent include files. */ + { GPLUSPLUS_TOOL_INCLUDE_DIR, "G++", 1, 1, + GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 1 }, ++ { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1, ++ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 2 }, + #endif + #ifdef GPLUSPLUS_BACKWARD_INCLUDE_DIR + /* Pick up GNU C++ backward and deprecated include files. */ +Index: b/src/gcc/incpath.cc +=================================================================== +--- a/src/gcc/incpath.cc ++++ b/src/gcc/incpath.cc +@@ -164,6 +164,18 @@ add_standard_paths (const char *sysroot, + } + str = reconcat (str, str, dir_separator_str, + imultiarch, NULL); ++ if (p->cplusplus && strstr (str, "/c++/")) ++ { ++ char *suffix = strstr (str, "/c++/"); ++ *suffix++ = '\0'; ++ suffix = xstrdup (suffix); ++ str = reconcat (str, str, dir_separator_str, ++ imultiarch, ++ dir_separator_str, suffix, NULL); ++ } ++ else ++ str = reconcat (str, str, dir_separator_str, ++ imultiarch, NULL); + } + add_path (str, INC_SYSTEM, p->cxx_aware, false); + } +@@ -229,7 +241,16 @@ add_standard_paths (const char *sysroot, + free (str); + continue; + } +- str = reconcat (str, str, dir_separator_str, imultiarch, NULL); ++ if (p->cplusplus && strstr (str, "/c++/")) ++ { ++ char *suffix = strstr (str, "/c++/"); ++ *suffix++ = '\0'; ++ suffix = xstrdup (suffix); ++ str = reconcat (str, str, dir_separator_str, imultiarch, ++ dir_separator_str, suffix, NULL); ++ } ++ else ++ str = reconcat (str, str, dir_separator_str, imultiarch, NULL); + } + + add_path (str, INC_SYSTEM, p->cxx_aware, false); diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-arm-disable-guality-tests.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-arm-disable-guality-tests.diff new file mode 100644 index 0000000000..bc43363c2a --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-arm-disable-guality-tests.diff @@ -0,0 +1,44 @@ +# DP: Don't run some tests from the guality test suite on armhf. These fail +# DP: on every target, but seem to hang on the buildds occasionally on armhf. + +--- a/src/gcc/testsuite/gcc.dg/guality/guality.exp ++++ b/src/gcc/testsuite/gcc.dg/guality/guality.exp +@@ -93,7 +93,37 @@ if {[check_guality " + } + } + +- gcc-dg-runtest [lsort [glob $srcdir/$subdir/*.c]] "" "" ++ # FIXME: these seem to hang on the buildds, and gdb always times out ++ # trying to run them. ++ if { [istarget arm-*-linux-gnueabi*] } { ++ set guality [list] ++ foreach file [lsort [glob $srcdir/$subdir/*.c]] { ++ switch -glob -- [file tail $file] { ++ pr36728-*.c - ++ pr41616-1.c - ++ pr43051-1.c - ++ pr54200.c - ++ pr54519-*.c - ++ pr54551.c - ++ pr54693-2.c - ++ pr54796.c - ++ pr56154-1.c - ++ pr58791-3.c - ++ pr58791-5.c - ++ pr68860-1.c - ++ pr68860-2.c - ++ pr78726.c - ++ pr89528.c - ++ pr90074.c - ++ pr90716.c { } ++ * { lappend guality $file } ++ } ++ } ++ } { ++ set guality [lsort [glob $srcdir/$subdir/*.c]] ++ } ++ ++ gcc-dg-runtest $guality "" "" + gcc-dg-runtest $general "" "-Wc++-compat" + set-torture-options \ + [list "-O0" "-Og"] \ diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-as-needed-gold.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-as-needed-gold.diff new file mode 100644 index 0000000000..29e43db2f3 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-as-needed-gold.diff @@ -0,0 +1,85 @@ +# DP: Use --push-state/--pop-state for gold as well when linking libtsan. + +--- a/src/gcc/gcc.cc ++++ b/src/gcc/gcc.cc +@@ -760,10 +760,10 @@ proper position among the other output f + #define LIBASAN_SPEC STATIC_LIBASAN_LIBS + #elif defined(HAVE_LD_STATIC_DYNAMIC) + #define LIBASAN_SPEC "%{static-libasan:" LD_STATIC_OPTION "}" \ +- " %{!static-libasan:%{!fuse-ld=gold:--push-state} --no-as-needed}" \ ++ " %{!static-libasan:--push-state --no-as-needed}" \ + " -lasan " \ + " %{static-libasan:" LD_DYNAMIC_OPTION "}" \ +- " %{!static-libasan:%{fuse-ld=gold:--as-needed;:--pop-state}}" \ ++ " %{!static-libasan:--pop-state}" \ + STATIC_LIBASAN_LIBS + #else + #define LIBASAN_SPEC "-lasan" STATIC_LIBASAN_LIBS +@@ -799,10 +799,10 @@ proper position among the other output f + #define LIBTSAN_SPEC STATIC_LIBTSAN_LIBS + #elif defined(HAVE_LD_STATIC_DYNAMIC) + #define LIBTSAN_SPEC "%{static-libtsan:" LD_STATIC_OPTION "}" \ +- " %{!static-libtsan:%{!fuse-ld=gold:--push-state} --no-as-needed}" \ ++ " %{!static-libtsan:--push-state --no-as-needed}" \ + " -ltsan " \ + " %{static-libtsan:" LD_DYNAMIC_OPTION "}" \ +- " %{!static-libtsan:%{fuse-ld=gold:--as-needed;:--pop-state}}" \ ++ " %{!static-libtsan:--pop-state}" \ + STATIC_LIBTSAN_LIBS + #else + #define LIBTSAN_SPEC "-ltsan" STATIC_LIBTSAN_LIBS +@@ -820,10 +820,10 @@ proper position among the other output f + #define LIBLSAN_SPEC STATIC_LIBLSAN_LIBS + #elif defined(HAVE_LD_STATIC_DYNAMIC) + #define LIBLSAN_SPEC "%{static-liblsan:" LD_STATIC_OPTION "}" \ +- " %{!static-liblsan:%{!fuse-ld=gold:--push-state} --no-as-needed}" \ ++ " %{!static-liblsan:--push-state --no-as-needed}" \ + " -llsan " \ + " %{static-liblsan:" LD_DYNAMIC_OPTION "}" \ +- " %{!static-liblsan:%{fuse-ld=gold:--as-needed;:--pop-state}}" \ ++ " %{!static-liblsan:--pop-state}" \ + STATIC_LIBLSAN_LIBS + #else + #define LIBLSAN_SPEC "-llsan" STATIC_LIBLSAN_LIBS +@@ -839,10 +839,10 @@ proper position among the other output f + " %{static-libubsan|static:%:include(libsanitizer.spec)%(link_libubsan)}" + #ifdef HAVE_LD_STATIC_DYNAMIC + #define LIBUBSAN_SPEC "%{static-libubsan:" LD_STATIC_OPTION "}" \ +- " %{!static-libubsan:%{!fuse-ld=gold:--push-state} --no-as-needed}" \ ++ " %{!static-libubsan:--push-state --no-as-needed}" \ + " -lubsan " \ + " %{static-libubsan:" LD_DYNAMIC_OPTION "}" \ +- " %{!static-libubsan:%{fuse-ld=gold:--as-needed;:--pop-state}}" \ ++ " %{!static-libubsan:--pop-state}" \ + STATIC_LIBUBSAN_LIBS + #else + #define LIBUBSAN_SPEC "-lubsan" STATIC_LIBUBSAN_LIBS +--- a/src/gcc/config/gnu-user.h ++++ b/src/gcc/config/gnu-user.h +@@ -136,22 +136,22 @@ see the files COPYING3 and COPYING.RUNTI + #define LIBASAN_EARLY_SPEC "%{!shared:libasan_preinit%O%s} " \ + "%{static-libasan:%{!shared:" \ + LD_STATIC_OPTION " --whole-archive -lasan --no-whole-archive " \ +- LD_DYNAMIC_OPTION "}}%{!static-libasan:%{!fuse-ld=gold:--push-state} --no-as-needed -lasan %{fuse-ld=gold:--as-needed;:--pop-state}}" ++ LD_DYNAMIC_OPTION "}}%{!static-libasan:--push-state --no-as-needed -lasan --pop-state}" + #undef LIBHWASAN_EARLY_SPEC + #define LIBHWASAN_EARLY_SPEC "%{!shared:libhwasan_preinit%O%s} " \ + "%{static-libhwasan:%{!shared:" \ + LD_STATIC_OPTION " --whole-archive -lhwasan --no-whole-archive " \ +- LD_DYNAMIC_OPTION "}}%{!static-libhwasan:%{!fuse-ld=gold:--push-state} --no-as-needed -lhwasan %{fuse-ld=gold:--as-needed;:--pop-state}}" ++ LD_DYNAMIC_OPTION "}}%{!static-libhwasan:--push-state --no-as-needed -lhwasan --pop-state}" + #undef LIBTSAN_EARLY_SPEC + #define LIBTSAN_EARLY_SPEC "%{!shared:libtsan_preinit%O%s} " \ + "%{static-libtsan:%{!shared:" \ + LD_STATIC_OPTION " --whole-archive -ltsan --no-whole-archive " \ +- LD_DYNAMIC_OPTION "}}%{!static-libtsan:%{!fuse-ld=gold:--push-state} --no-as-needed -ltsan %{fuse-ld=gold:--as-needed;:--pop-state}}" ++ LD_DYNAMIC_OPTION "}}%{!static-libtsan:--push-state --no-as-needed -ltsan --pop-state}" + #undef LIBLSAN_EARLY_SPEC + #define LIBLSAN_EARLY_SPEC "%{!shared:liblsan_preinit%O%s} " \ + "%{static-liblsan:%{!shared:" \ + LD_STATIC_OPTION " --whole-archive -llsan --no-whole-archive " \ +- LD_DYNAMIC_OPTION "}}%{!static-liblsan:%{!fuse-ld=gold:--push-state} --no-as-needed -llsan %{fuse-ld=gold:--as-needed;:--pop-state}}" ++ LD_DYNAMIC_OPTION "}}%{!static-liblsan:--push-state --no-as-needed -llsan --pop-state}" + #endif + + #undef TARGET_F951_OPTIONS diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-as-needed.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-as-needed.diff new file mode 100644 index 0000000000..c874e9ca74 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-as-needed.diff @@ -0,0 +1,285 @@ +# DP: On linux targets pass --as-needed by default to the linker, but always +# DP: link the sanitizer libraries with --no-as-needed. + +--- a/src/gcc/gcc.cc ++++ b/src/gcc/gcc.cc +@@ -759,8 +759,11 @@ proper position among the other output f + #ifdef LIBASAN_EARLY_SPEC + #define LIBASAN_SPEC STATIC_LIBASAN_LIBS + #elif defined(HAVE_LD_STATIC_DYNAMIC) +-#define LIBASAN_SPEC "%{static-libasan:" LD_STATIC_OPTION \ +- "} -lasan %{static-libasan:" LD_DYNAMIC_OPTION "}" \ ++#define LIBASAN_SPEC "%{static-libasan:" LD_STATIC_OPTION "}" \ ++ " %{!static-libasan:%{!fuse-ld=gold:--push-state} --no-as-needed}" \ ++ " -lasan " \ ++ " %{static-libasan:" LD_DYNAMIC_OPTION "}" \ ++ " %{!static-libasan:%{fuse-ld=gold:--as-needed;:--pop-state}}" \ + STATIC_LIBASAN_LIBS + #else + #define LIBASAN_SPEC "-lasan" STATIC_LIBASAN_LIBS +@@ -795,8 +798,11 @@ proper position among the other output f + #ifdef LIBTSAN_EARLY_SPEC + #define LIBTSAN_SPEC STATIC_LIBTSAN_LIBS + #elif defined(HAVE_LD_STATIC_DYNAMIC) +-#define LIBTSAN_SPEC "%{static-libtsan:" LD_STATIC_OPTION \ +- "} -ltsan %{static-libtsan:" LD_DYNAMIC_OPTION "}" \ ++#define LIBTSAN_SPEC "%{static-libtsan:" LD_STATIC_OPTION "}" \ ++ " %{!static-libtsan:%{!fuse-ld=gold:--push-state} --no-as-needed}" \ ++ " -ltsan " \ ++ " %{static-libtsan:" LD_DYNAMIC_OPTION "}" \ ++ " %{!static-libtsan:%{fuse-ld=gold:--as-needed;:--pop-state}}" \ + STATIC_LIBTSAN_LIBS + #else + #define LIBTSAN_SPEC "-ltsan" STATIC_LIBTSAN_LIBS +@@ -813,8 +819,11 @@ proper position among the other output f + #ifdef LIBLSAN_EARLY_SPEC + #define LIBLSAN_SPEC STATIC_LIBLSAN_LIBS + #elif defined(HAVE_LD_STATIC_DYNAMIC) +-#define LIBLSAN_SPEC "%{static-liblsan:" LD_STATIC_OPTION \ +- "} -llsan %{static-liblsan:" LD_DYNAMIC_OPTION "}" \ ++#define LIBLSAN_SPEC "%{static-liblsan:" LD_STATIC_OPTION "}" \ ++ " %{!static-liblsan:%{!fuse-ld=gold:--push-state} --no-as-needed}" \ ++ " -llsan " \ ++ " %{static-liblsan:" LD_DYNAMIC_OPTION "}" \ ++ " %{!static-liblsan:%{fuse-ld=gold:--as-needed;:--pop-state}}" \ + STATIC_LIBLSAN_LIBS + #else + #define LIBLSAN_SPEC "-llsan" STATIC_LIBLSAN_LIBS +@@ -829,8 +838,11 @@ proper position among the other output f + #define STATIC_LIBUBSAN_LIBS \ + " %{static-libubsan|static:%:include(libsanitizer.spec)%(link_libubsan)}" + #ifdef HAVE_LD_STATIC_DYNAMIC +-#define LIBUBSAN_SPEC "%{static-libubsan:" LD_STATIC_OPTION \ +- "} -lubsan %{static-libubsan:" LD_DYNAMIC_OPTION "}" \ ++#define LIBUBSAN_SPEC "%{static-libubsan:" LD_STATIC_OPTION "}" \ ++ " %{!static-libubsan:%{!fuse-ld=gold:--push-state} --no-as-needed}" \ ++ " -lubsan " \ ++ " %{static-libubsan:" LD_DYNAMIC_OPTION "}" \ ++ " %{!static-libubsan:%{fuse-ld=gold:--as-needed;:--pop-state}}" \ + STATIC_LIBUBSAN_LIBS + #else + #define LIBUBSAN_SPEC "-lubsan" STATIC_LIBUBSAN_LIBS +--- a/src/gcc/config/gnu-user.h ++++ b/src/gcc/config/gnu-user.h +@@ -136,22 +136,22 @@ see the files COPYING3 and COPYING.RUNTI + #define LIBASAN_EARLY_SPEC "%{!shared:libasan_preinit%O%s} " \ + "%{static-libasan:%{!shared:" \ + LD_STATIC_OPTION " --whole-archive -lasan --no-whole-archive " \ +- LD_DYNAMIC_OPTION "}}%{!static-libasan:-lasan}" ++ LD_DYNAMIC_OPTION "}}%{!static-libasan:%{!fuse-ld=gold:--push-state} --no-as-needed -lasan %{fuse-ld=gold:--as-needed;:--pop-state}}" + #undef LIBHWASAN_EARLY_SPEC + #define LIBHWASAN_EARLY_SPEC "%{!shared:libhwasan_preinit%O%s} " \ + "%{static-libhwasan:%{!shared:" \ + LD_STATIC_OPTION " --whole-archive -lhwasan --no-whole-archive " \ +- LD_DYNAMIC_OPTION "}}%{!static-libhwasan:-lhwasan}" ++ LD_DYNAMIC_OPTION "}}%{!static-libhwasan:%{!fuse-ld=gold:--push-state} --no-as-needed -lhwasan %{fuse-ld=gold:--as-needed;:--pop-state}}" + #undef LIBTSAN_EARLY_SPEC + #define LIBTSAN_EARLY_SPEC "%{!shared:libtsan_preinit%O%s} " \ + "%{static-libtsan:%{!shared:" \ + LD_STATIC_OPTION " --whole-archive -ltsan --no-whole-archive " \ +- LD_DYNAMIC_OPTION "}}%{!static-libtsan:-ltsan}" ++ LD_DYNAMIC_OPTION "}}%{!static-libtsan:%{!fuse-ld=gold:--push-state} --no-as-needed -ltsan %{fuse-ld=gold:--as-needed;:--pop-state}}" + #undef LIBLSAN_EARLY_SPEC + #define LIBLSAN_EARLY_SPEC "%{!shared:liblsan_preinit%O%s} " \ + "%{static-liblsan:%{!shared:" \ + LD_STATIC_OPTION " --whole-archive -llsan --no-whole-archive " \ +- LD_DYNAMIC_OPTION "}}%{!static-liblsan:-llsan}" ++ LD_DYNAMIC_OPTION "}}%{!static-liblsan:%{!fuse-ld=gold:--push-state} --no-as-needed -llsan %{fuse-ld=gold:--as-needed;:--pop-state}}" + #endif + + #undef TARGET_F951_OPTIONS +--- a/src/gcc/config/aarch64/aarch64-linux.h ++++ b/src/gcc/config/aarch64/aarch64-linux.h +@@ -36,6 +36,7 @@ + + #define LINUX_TARGET_LINK_SPEC "%{h*} \ + --hash-style=gnu \ ++ %{!fsanitize=*:--as-needed} \ + %{static:-Bstatic} \ + %{shared:-shared} \ + %{symbolic:-Bsymbolic} \ +--- a/src/gcc/config/ia64/linux.h ++++ b/src/gcc/config/ia64/linux.h +@@ -58,7 +58,7 @@ do { \ + #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-ia64.so.2" + + #undef LINK_SPEC +-#define LINK_SPEC " --hash-style=gnu \ ++#define LINK_SPEC " --hash-style=gnu %{!fsanitize=*:--as-needed} \ + %{shared:-shared} \ + %{!shared: \ + %{!static: \ +--- a/src/gcc/config/sparc/linux.h ++++ b/src/gcc/config/sparc/linux.h +@@ -81,7 +81,7 @@ extern const char *host_detect_local_cpu + #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" + + #undef LINK_SPEC +-#define LINK_SPEC "-m elf32_sparc --hash-style=gnu %{shared:-shared} \ ++#define LINK_SPEC "-m elf32_sparc --hash-style=gnu %{!fsanitize=*:--as-needed} %{shared:-shared} \ + %{!mno-relax:%{!r:-relax}} \ + %{!shared: \ + %{!static: \ +--- a/src/gcc/config/s390/linux.h ++++ b/src/gcc/config/s390/linux.h +@@ -82,7 +82,7 @@ along with GCC; see the file COPYING3. + + #undef LINK_SPEC + #define LINK_SPEC \ +- "%{m31:-m elf_s390}%{m64:-m elf64_s390} --hash-style=gnu \ ++ "%{m31:-m elf_s390}%{m64:-m elf64_s390} --hash-style=gnu %{!fsanitize=*:--as-needed} \ + %{shared:-shared} \ + %{!shared: \ + %{static:-static} \ +--- a/src/gcc/config/rs6000/linux64.h ++++ b/src/gcc/config/rs6000/linux64.h +@@ -377,13 +377,13 @@ extern int dot_symbols; + " -m elf64ppc") + #endif + +-#define LINK_OS_LINUX_SPEC32 LINK_OS_LINUX_EMUL32 " --hash-style=gnu %{!shared: %{!static: \ ++#define LINK_OS_LINUX_SPEC32 LINK_OS_LINUX_EMUL32 " --hash-style=gnu %{!fsanitize=*:--as-needed} %{!shared: %{!static: \ + %{!static-pie: \ + %{rdynamic:-export-dynamic} \ + -dynamic-linker " GNU_USER_DYNAMIC_LINKER32 "}}} \ + %(link_os_extra_spec32)" + +-#define LINK_OS_LINUX_SPEC64 LINK_OS_LINUX_EMUL64 " --hash-style=gnu %{!shared: %{!static: \ ++#define LINK_OS_LINUX_SPEC64 LINK_OS_LINUX_EMUL64 " --hash-style=gnu %{!fsanitize=*:--as-needed} %{!shared: %{!static: \ + %{!static-pie: \ + %{rdynamic:-export-dynamic} \ + -dynamic-linker " GNU_USER_DYNAMIC_LINKER64 "}}} \ +--- a/src/gcc/config/rs6000/sysv4.h ++++ b/src/gcc/config/rs6000/sysv4.h +@@ -780,7 +780,7 @@ GNU_USER_TARGET_CC1_SPEC + #define GNU_USER_DYNAMIC_LINKER GLIBC_DYNAMIC_LINKER + #endif + +-#define LINK_OS_LINUX_SPEC "-m elf32ppclinux --hash-style=gnu %{!shared: %{!static: \ ++#define LINK_OS_LINUX_SPEC "-m elf32ppclinux --hash-style=gnu %{!fsanitize=*:--as-needed} %{!shared: %{!static: \ + %{rdynamic:-export-dynamic} \ + -dynamic-linker " GNU_USER_DYNAMIC_LINKER "}}" + +--- a/src/gcc/config/i386/gnu-user64.h ++++ b/src/gcc/config/i386/gnu-user64.h +@@ -57,6 +57,7 @@ see the files COPYING3 and COPYING.RUNTI + %{" SPEC_32 ":-m " GNU_USER_LINK_EMULATION32 "} \ + %{" SPEC_X32 ":-m " GNU_USER_LINK_EMULATIONX32 "} \ + --hash-style=gnu \ ++ %{!fsanitize=*:--as-needed} \ + %{shared:-shared} \ + %{!shared: \ + %{!static: \ +--- a/src/gcc/config/i386/gnu-user.h ++++ b/src/gcc/config/i386/gnu-user.h +@@ -68,7 +68,7 @@ along with GCC; see the file COPYING3. + { "link_emulation", GNU_USER_LINK_EMULATION },\ + { "dynamic_linker", GNU_USER_DYNAMIC_LINKER } + +-#define GNU_USER_TARGET_LINK_SPEC "-m %(link_emulation) --hash-style=gnu %{shared:-shared} \ ++#define GNU_USER_TARGET_LINK_SPEC "-m %(link_emulation) --hash-style=gnu %{!fsanitize=*:--as-needed} %{shared:-shared} \ + %{!shared: \ + %{!static: \ + %{!static-pie: \ +--- a/src/gcc/config/alpha/linux-elf.h ++++ b/src/gcc/config/alpha/linux-elf.h +@@ -37,7 +37,7 @@ along with GCC; see the file COPYING3. + + #define ELF_DYNAMIC_LINKER GNU_USER_DYNAMIC_LINKER + +-#define LINK_SPEC "-m elf64alpha --hash-style=gnu %{G*} %{relax:-relax} \ ++#define LINK_SPEC "-m elf64alpha --hash-style=gnu %{!fsanitize=*:--as-needed} %{G*} %{relax:-relax} \ + %{O*:-O3} %{!O*:-O1} \ + %{shared:-shared} \ + %{!shared: \ +--- a/src/gcc/config/arm/linux-elf.h ++++ b/src/gcc/config/arm/linux-elf.h +@@ -71,6 +71,7 @@ + %{!shared:-dynamic-linker " GNU_USER_DYNAMIC_LINKER "}} \ + -X \ + --hash-style=gnu \ ++ %{!fsanitize=*:--as-needed} \ + %{mbig-endian:-EB} %{mlittle-endian:-EL}" \ + SUBTARGET_EXTRA_LINK_SPEC + +--- a/src/gcc/config/mips/gnu-user.h ++++ b/src/gcc/config/mips/gnu-user.h +@@ -55,6 +55,7 @@ along with GCC; see the file COPYING3. + #undef GNU_USER_TARGET_LINK_SPEC + #define GNU_USER_TARGET_LINK_SPEC "\ + %{G*} %{EB} %{EL} %{mips*} %{shared} \ ++ %{!fsanitize=*:--as-needed} \ + %{!shared: \ + %{!static: \ + %{rdynamic:-export-dynamic} \ +--- a/src/gcc/config/riscv/linux.h ++++ b/src/gcc/config/riscv/linux.h +@@ -49,6 +49,7 @@ along with GCC; see the file COPYING3. + + #define LINK_SPEC "\ + -hash-style=gnu \ ++%{!fsanitize=*:--as-needed} \ + -melf" XLEN_SPEC DEFAULT_ENDIAN_SPEC "riscv" LD_EMUL_SUFFIX " \ + %{mno-relax:--no-relax} \ + %{mbig-endian:-EB} \ +--- a/src/gcc/config/m68k/linux.h ++++ b/src/gcc/config/m68k/linux.h +@@ -78,6 +78,7 @@ along with GCC; see the file COPYING3. + + #undef LINK_SPEC + #define LINK_SPEC "-m m68kelf %{shared} \ ++ %{!fsanitize=*:--as-needed} \ + %{!shared: \ + %{!static: \ + %{rdynamic:-export-dynamic} \ +--- a/src/gcc/config/sh/linux.h ++++ b/src/gcc/config/sh/linux.h +@@ -72,6 +72,7 @@ along with GCC; see the file COPYING3. + #undef SUBTARGET_LINK_SPEC + #define SUBTARGET_LINK_SPEC \ + "%{shared:-shared} \ ++ %{!fsanitize=*:--as-needed} \ + %{!static: \ + %{rdynamic:-export-dynamic} \ + -dynamic-linker " GNU_USER_DYNAMIC_LINKER "} \ +--- a/src/gcc/config/pa/pa-linux.h ++++ b/src/gcc/config/pa/pa-linux.h +@@ -41,6 +41,7 @@ along with GCC; see the file COPYING3. + + #undef LINK_SPEC + #define LINK_SPEC "\ ++ %{!fsanitize=*:--as-needed} \ + %{shared:-shared} \ + %{!shared: \ + %{!static: \ +--- a/src/gcc/config/loongarch/gnu-user.h ++++ b/src/gcc/config/loongarch/gnu-user.h +@@ -45,6 +45,7 @@ along with GCC; see the file COPYING3. + #undef GNU_USER_TARGET_LINK_SPEC + #define GNU_USER_TARGET_LINK_SPEC \ + "%{G*} %{shared} -m " GNU_USER_LINK_EMULATION \ ++ " %{!fsanitize=*:--as-needed} " \ + "%{!shared: %{static} " \ + "%{!static: %{!static-pie: %{rdynamic:-export-dynamic} " \ + "-dynamic-linker " GNU_USER_DYNAMIC_LINKER "}} " \ +--- a/src/gcc/config/sparc/linux64.h ++++ b/src/gcc/config/sparc/linux64.h +@@ -90,7 +90,7 @@ along with GCC; see the file COPYING3. If not see + { "link_arch_default", LINK_ARCH_DEFAULT_SPEC }, \ + { "link_arch", LINK_ARCH_SPEC }, + +-#define LINK_ARCH32_SPEC "-m elf32_sparc %{shared:-shared} \ ++#define LINK_ARCH32_SPEC "-m elf32_sparc %{shared:-shared} %{!fsanitize=*:--as-needed} \ + %{!shared: \ + %{!static: \ + %{rdynamic:-export-dynamic} \ +@@ -98,7 +98,7 @@ along with GCC; see the file COPYING3. If not see + %{static:-static}} \ + " + +-#define LINK_ARCH64_SPEC "-m elf64_sparc %{shared:-shared} \ ++#define LINK_ARCH64_SPEC "-m elf64_sparc %{shared:-shared} %{!fsanitize=*:--as-needed} \ + %{!shared: \ + %{!static: \ + %{rdynamic:-export-dynamic} \ + diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-auto-build.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-auto-build.diff new file mode 100644 index 0000000000..b6b9ae6955 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-auto-build.diff @@ -0,0 +1,13 @@ +# DP: Fix cross building a native compiler. + +--- a/src/gcc/configure.ac ++++ b/src/gcc/configure.ac +@@ -2132,7 +2132,7 @@ else + # Clearing GMPINC is necessary to prevent host headers being + # used by the build compiler. Defining GENERATOR_FILE stops + # system.h from including gmp.h. +- CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \ ++ CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD} -DGENERATOR_FILE" \ + CXX="${CXX_FOR_BUILD}" CXXFLAGS="${CXXFLAGS_FOR_BUILD}" \ + LD="${LD_FOR_BUILD}" LDFLAGS="${LDFLAGS_FOR_BUILD}" \ + GMPINC="" CPPFLAGS="${CPPFLAGS_FOR_BUILD} -DGENERATOR_FILE" \ diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-distro-specs-ubuntu-doc.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-distro-specs-ubuntu-doc.diff new file mode 100644 index 0000000000..3ae89201dd --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-distro-specs-ubuntu-doc.diff @@ -0,0 +1,78 @@ +# DP: Document distro specific compiler flags turned on by default + +--- a/src/gcc/doc/invoke.texi ++++ b/src/gcc/doc/invoke.texi +@@ -11859,6 +11859,19 @@ also turns on the following optimization + Please note the warning under @option{-fgcse} about + invoking @option{-O2} on programs that use computed gotos. + ++NOTE: In Ubuntu 8.10 and later versions, @option{-D_FORTIFY_SOURCE=2}, ++in Ubuntu 24.04 and later versions, @option{-D_FORTIFY_SOURCE=3}, is ++set by default, and is activated when @option{-O} is set to 2 or higher. ++This enables additional compile-time and run-time checks for several libc ++functions. To disable, specify either @option{-U_FORTIFY_SOURCE} or ++@option{-D_FORTIFY_SOURCE=0}. ++ ++NOTE: In Debian 13 and Ubuntu 24.04 and later versions, ++@option{-D_TIME_BITS=64} together with @option{-D_FILE_OFFSET_BITS=64} is ++set by default on the 32bit architectures @samp{armel}, @samp{armhf}, ++@samp{hppa}, @samp{m68k}, @samp{mips}, @samp{mipsel}, @samp{powerpc} and ++@samp{sh4}. ++ + @opindex O3 + @item -O3 + Optimize yet more. @option{-O3} turns on all optimizations specified +@@ -15421,6 +15434,9 @@ value of a shared integer constant. + The minimum size of buffers (i.e.@: arrays) that receive stack smashing + protection when @option{-fstack-protector} is used. + ++This default before Ubuntu 10.10 was "8". Currently it is "4", to increase ++the number of functions protected by the stack protector. ++ + @item min-size-for-stack-sharing + The minimum size of variables taking part in stack slot sharing when not + optimizing. +@@ -17127,6 +17143,10 @@ Currently the x86 GNU/Linux target provi + on Intel Control-flow Enforcement Technology (CET) which works for + i686 processor or newer. + ++NOTE: In Ubuntu 19.10 and later versions, @option{-fcf-protection} ++is enabled by default for C, C++, ObjC, ObjC++, if none of ++@option{-fno-cf-protection} nor @option{-fcf-protection=*} are found. ++ + @opindex fharden-compares + @item -fharden-compares + For every logical test that survives gimple optimizations and is +@@ -17169,6 +17189,11 @@ references to local frame addresses. On + allocated on the stack are considered, optimized away variables or variables + allocated in registers don't count. + ++NOTE: In Ubuntu 14.10 and later versions, ++@option{-fstack-protector-strong} is enabled by default for C, ++C++, ObjC, ObjC++, if none of @option{-fno-stack-protector}, ++@option{-nostdlib}, nor @option{-ffreestanding} are found. ++ + @opindex fstack-protector-explicit + @item -fstack-protector-explicit + Like @option{-fstack-protector} but only protects those functions which +@@ -17232,6 +17257,10 @@ allocations. @option{-fstack-clash-prot + protection for static stack allocations if the target supports + @option{-fstack-check=specific}. + ++NOTE: In Ubuntu 19.10 and later versions, ++@option{-fstack-clash-protection} is enabled by default for C, ++C++, ObjC, ObjC++, unless @option{-fno-stack-clash-protection} is found. ++ + @opindex fstack-limit-register + @opindex fstack-limit-symbol + @opindex fno-stack-limit +@@ -17959,6 +17988,9 @@ For example, @option{-Wl,-Map,output.map + linker. When using the GNU linker, you can also get the same effect with + @option{-Wl,-Map=output.map}. + ++NOTE: In Ubuntu 8.10 and later versions, for LDFLAGS, the option ++@option{-Wl,-z,relro} is used. To disable, use @option{-Wl,-z,norelro}. ++ + @opindex u + @item -u @var{symbol} + Pretend the symbol @var{symbol} is undefined, to force linking of diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-distro-specs.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-distro-specs.diff new file mode 100644 index 0000000000..4ce5376157 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-distro-specs.diff @@ -0,0 +1,379 @@ +# DP: Add empty distro and hardening specs + +--- a/src/gcc/gcc.cc ++++ b/src/gcc/gcc.cc +@@ -27,6 +27,11 @@ CC recognizes how to compile each input + Once it knows which kind of compilation to perform, the procedure for + compilation is specified by a string called a "spec". */ + ++/* Inject some default compilation flags which are used as the default. ++ Done by the packaging build system. Should that be done in the headers ++ gcc/config//*.h instead? */ ++#include "distro-defaults.h" ++ + #define INCLUDE_STRING + #include "config.h" + #include "system.h" +@@ -443,6 +448,7 @@ static const char *greater_than_spec_fun + static const char *debug_level_greater_than_spec_func (int, const char **); + static const char *dwarf_version_greater_than_spec_func (int, const char **); + static const char *find_fortran_preinclude_file (int, const char **); ++static const char *get_pkg_metadata_spec_func (int, const char **); + static char *convert_white_space (char *); + static char *quote_spec (char *); + static char *quote_spec_arg (char *); +@@ -971,6 +977,121 @@ proper position among the other output f + #define LINK_GCC_C_SEQUENCE_SPEC "%G %{!nolibc:%L %G}" + #endif + ++/* Generate full unwind information covering all program points. ++ Only needed for some architectures. */ ++#ifndef ASYNC_UNWIND_SPEC ++# ifdef DIST_DEFAULT_ASYNC_UNWIND ++# define ASYNC_UNWIND_SPEC "%{!fno-asynchronous-unwind-tables:-fasynchronous-unwind-tables}" ++# else ++# define ASYNC_UNWIND_SPEC "" ++# endif ++#endif ++ ++/* Turn on stack protector. ++ */ ++#ifndef SSP_DEFAULT_SPEC ++# ifdef DIST_DEFAULT_SSP ++# ifdef DIST_DEFAULT_SSP_STRONG ++# define SSP_DEFAULT_SPEC " %{!fno-stack-protector:%{!fstack-protector-explicit:%{!fstack-protector-all:%{!ffreestanding:%{!nostdlib:%{!fstack-protector:-fstack-protector-strong}}}}}}" ++# else ++# define SSP_DEFAULT_SPEC " %{!fno-stack-protector:%{!fstack-protector-explicit:%{!fstack-protector-all:%{!ffreestanding:%{!nostdlib:-fstack-protector}}}}}" ++# endif ++# else ++# define SSP_DEFAULT_SPEC "" ++# endif ++#endif ++ ++/* Turn on -Wformat -Wformat-security by default for C, C++, ++ ObjC, ObjC++. */ ++#ifndef FORMAT_SECURITY_SPEC ++# ifdef DIST_DEFAULT_FORMAT_SECURITY ++# define FORMAT_SECURITY_SPEC " %{!Wformat:%{!Wformat=2:%{!Wformat=0:%{!Wall:-Wformat} %{!Wno-format-security:-Wformat-security}}}}" ++# else ++# define FORMAT_SECURITY_SPEC "" ++# endif ++#endif ++ ++/* Enable -fstack-clash-protection by default. Only available ++ on some targets. */ ++#ifndef STACK_CLASH_SPEC ++# ifdef DIST_DEFAULT_STACK_CLASH ++# define STACK_CLASH_SPEC " %{!fno-stack-clash-protection:-fstack-clash-protection}" ++# else ++# define STACK_CLASH_SPEC "" ++# endif ++#endif ++ ++/* Enable code instrumentation of control-flow transfers. ++ Available on x86 and x86_64. */ ++#ifndef CF_PROTECTION_SPEC ++# ifdef DIST_DEFAULT_CF_PROTECTION ++# define CF_PROTECTION_SPEC " %{!m16:%{!m32:%{!fcf-protection*:%{!fno-cf-protection:-fcf-protection}}}}" ++# else ++# define CF_PROTECTION_SPEC "" ++# endif ++#endif ++ ++/* Enable -D_TIME_BITS=64, only available on some 32bit targets. */ ++#ifndef TIMET64_SPEC ++# ifdef DIST_DEFAULT_TIMET64 ++# define TIMET64_SPEC " %{!m16:%{!m64:%{!D_DISTRO_EVADE_TIME_BITS:%{!D_TIME_BITS=*:%{!U_TIME_BITS:-D_TIME_BITS=64%{!D_FILE_OFFSET_BITS=*:%{!U_FILE_OFFSET_BITS: -D_FILE_OFFSET_BITS=64}}}}}}}" ++# else ++# define TIMET64_SPEC "" ++# endif ++#endif ++ ++/* Enable -D_FORTIFY_SOURCE= */ ++#ifndef FORTIFY_SOURCE_SPEC ++# ifdef DIST_DEFAULT_FORTIFY_SOURCE ++# define FORTIFY_SOURCE_SPEC " %{!O0:%{O*:%{!D_FORTIFY_SOURCE=*:%{!U_FORTIFY_SOURCE:-D_FORTIFY_SOURCE=" DIST_DEFAULT_FORTIFY_SOURCE_S "}}}}" ++# else ++# define FORTIFY_SOURCE_SPEC "" ++# endif ++#endif ++ ++#ifndef BIND_NOW_SPEC ++# if defined(DIST_DEFAULT_BIND_NOW) && !defined(ACCEL_COMPILER) ++# define BIND_NOW_SPEC " -z now" ++# else ++# define BIND_NOW_SPEC "" ++# endif ++#endif ++ ++#ifndef RELRO_SPEC ++# ifdef DIST_DEFAULT_RELRO ++# define RELRO_SPEC " -z relro " ++# else ++# define RELRO_SPEC "" ++# endif ++#endif ++ ++#ifndef PKG_METADATA_SPEC ++# ifdef DIST_DEFAULT_PKG_METADATA_SPEC ++# define PKG_METADATA_SPEC " %:get-pkg-metadata() " ++# else ++# define PKG_METADATA_SPEC "" ++# endif ++#endif ++ ++/* Don't enable any of those for the offload compilers, ++ unsupported. */ ++#if !defined(DISTRO_DEFAULT_CPP_SPEC) && !defined(ACCEL_COMPILER) ++# define DISTRO_DEFAULT_CPP_SPEC TIMET64_SPEC FORTIFY_SOURCE_SPEC ++#else ++# define DISTRO_DEFAULT_CPP_SPEC "" ++#endif ++#if !defined(DISTRO_DEFAULT_SPEC) && !defined(ACCEL_COMPILER) ++# define DISTRO_DEFAULT_SPEC ASYNC_UNWIND_SPEC SSP_DEFAULT_SPEC \ ++ FORMAT_SECURITY_SPEC STACK_CLASH_SPEC CF_PROTECTION_SPEC ++#else ++# define DISTRO_DEFAULT_SPEC "" ++#endif ++#if !defined(DISTRO_DEFAULT_LINK_SPEC) && !defined(ACCEL_COMPILER) ++# define DISTRO_DEFAULT_LINK_SPEC RELRO_SPEC PKG_METADATA_SPEC ++#else ++# define DISTRO_DEFAULT_LINK_SPEC "" ++#endif ++ + #ifndef LINK_SSP_SPEC + #ifdef TARGET_LIBC_PROVIDES_SSP + #define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \ +@@ -1027,7 +1148,7 @@ proper position among the other output f + #ifndef LINK_PIE_SPEC + #ifdef HAVE_LD_PIE + #ifndef LD_PIE_SPEC +-#define LD_PIE_SPEC "-pie" ++#define LD_PIE_SPEC "-pie" BIND_NOW_SPEC + #endif + #else + #define LD_PIE_SPEC "" +@@ -1144,6 +1265,7 @@ proper position among the other output f + "%{flto|flto=*:% + + * gcc.c (offload_targets_default): New variable. + (process_command): Set it if -foffload is defaulted. + (driver::maybe_putenv_OFFLOAD_TARGETS): Add OFFLOAD_TARGET_DEFAULT=1 + into environment if -foffload has been defaulted. + * lto-wrapper.c (OFFLOAD_TARGET_DEFAULT_ENV): Define. + (compile_offload_image): If OFFLOAD_TARGET_DEFAULT + is in the environment, don't fail if corresponding mkoffload + can't be found. + (compile_images_for_offload_targets): Likewise. Free and clear + offload_names if no valid offload is found. +libgomp/ + * target.c (gomp_load_plugin_for_device): If a plugin can't be + dlopened, assume it has no devices silently. + +--- a/src/gcc/gcc.c ++++ b/src/gcc/gcc.c +@@ -324,6 +324,10 @@ static const char *spec_host_machine = D + + static char *offload_targets = NULL; + ++/* Set to true if -foffload has not been used and offload_targets ++ is set to the configured in default. */ ++static bool offload_targets_default; ++ + /* Nonzero if cross-compiling. + When -b is used, the value comes from the `specs' file. */ + +@@ -5058,7 +5062,10 @@ process_command (unsigned int decoded_op + /* If the user didn't specify any, default to all configured offload + targets. */ + if (ENABLE_OFFLOADING && offload_targets == NULL) +- handle_foffload_option (OFFLOAD_TARGETS); ++ { ++ handle_foffload_option (OFFLOAD_TARGETS); ++ offload_targets_default = true; ++ } + + /* Handle -gtoggle as it would later in toplev.c:process_options to + make the debug-level-gt spec function work as expected. */ +@@ -8758,6 +8765,8 @@ driver::maybe_putenv_OFFLOAD_TARGETS () + obstack_grow (&collect_obstack, offload_targets, + strlen (offload_targets) + 1); + xputenv (XOBFINISH (&collect_obstack, char *)); ++ if (offload_targets_default) ++ xputenv ("OFFLOAD_TARGET_DEFAULT=1"); + } + + free (offload_targets); +--- a/src/gcc/lto-wrapper.c ++++ b/src/gcc/lto-wrapper.c +@@ -52,6 +52,7 @@ along with GCC; see the file COPYING3. + /* Environment variable, used for passing the names of offload targets from GCC + driver to lto-wrapper. */ + #define OFFLOAD_TARGET_NAMES_ENV "OFFLOAD_TARGET_NAMES" ++#define OFFLOAD_TARGET_DEFAULT_ENV "OFFLOAD_TARGET_DEFAULT" + + /* By default there is no special suffix for target executables. */ + #ifdef TARGET_EXECUTABLE_SUFFIX +@@ -907,6 +908,12 @@ compile_offload_image (const char *targe + break; + } + ++ if (!compiler && getenv (OFFLOAD_TARGET_DEFAULT_ENV)) ++ { ++ free_array_of_ptrs ((void **) paths, n_paths); ++ return NULL; ++ } ++ + if (!compiler) + fatal_error (input_location, + "could not find %s in %s (consider using %<-B%>)", +@@ -976,6 +983,7 @@ compile_images_for_offload_targets (unsi + if (!target_names) + return; + unsigned num_targets = parse_env_var (target_names, &names, NULL); ++ int next_name_entry = 0; + + const char *compiler_path = getenv ("COMPILER_PATH"); + if (!compiler_path) +@@ -986,13 +994,19 @@ compile_images_for_offload_targets (unsi + offload_names = XCNEWVEC (char *, num_targets + 1); + for (unsigned i = 0; i < num_targets; i++) + { +- offload_names[i] ++ offload_names[next_name_entry] + = compile_offload_image (names[i], compiler_path, in_argc, in_argv, + compiler_opts, compiler_opt_count, + linker_opts, linker_opt_count); +- if (!offload_names[i]) +- fatal_error (input_location, +- "problem with building target image for %s", names[i]); ++ if (!offload_names[next_name_entry]) ++ continue; ++ next_name_entry++; ++ } ++ ++ if (next_name_entry == 0) ++ { ++ free (offload_names); ++ offload_names = NULL; + } + + out: +--- a/src/libgomp/target.c ++++ b/src/libgomp/target.c +@@ -3173,7 +3173,7 @@ gomp_load_plugin_for_device (struct gomp + + void *plugin_handle = dlopen (plugin_name, RTLD_LAZY); + if (!plugin_handle) +- goto dl_fail; ++ return 0; + + /* Check if all required functions are available in the plugin and store + their handlers. None of the symbols can legitimately be NULL, diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-force-cross-layout.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-force-cross-layout.diff new file mode 100644 index 0000000000..e8f0a1d85e --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-force-cross-layout.diff @@ -0,0 +1,49 @@ +# DP: Add FORCE_CROSS_LAYOUT env var to force a cross directory layout. + +--- a/src/configure.ac ++++ b/src/configure.ac +@@ -3302,7 +3302,7 @@ target_configargs="$target_configargs ${ + # native. However, it would be better to use other mechanisms to make the + # sorts of decisions they want to make on this basis. Please consider + # this option to be deprecated. FIXME. +-if test x${is_cross_compiler} = xyes ; then ++if test x${is_cross_compiler} = xyes || test x${FORCE_CROSS_LAYOUT} = xyes; then + target_configargs="--with-cross-host=${host_noncanonical} ${target_configargs}" + fi + +--- a/src/gcc/configure.ac ++++ b/src/gcc/configure.ac +@@ -2474,14 +2474,14 @@ SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADE + BUILD_SYSTEM_HEADER_DIR=$SYSTEM_HEADER_DIR AC_SUBST(BUILD_SYSTEM_HEADER_DIR) + + if test x$host != x$target || test "x$TARGET_SYSTEM_ROOT" != x || +- test x$build != x$host || test "x$with_build_sysroot" != x; then ++ test x$build != x$host || test "x$with_build_sysroot" != x || test x$FORCE_CROSS_LAYOUT = xyes; then + if test "x$with_build_sysroot" != x; then + BUILD_SYSTEM_HEADER_DIR=$with_build_sysroot'$${sysroot_headers_suffix}$(NATIVE_SYSTEM_HEADER_DIR)' + else + BUILD_SYSTEM_HEADER_DIR='$(CROSS_SYSTEM_HEADER_DIR)' + fi + +- if test x$host != x$target ++ if test x$host != x$target || test x$FORCE_CROSS_LAYOUT = xyes + then + CROSS="-DCROSS_DIRECTORY_STRUCTURE" + ALL=all.cross +@@ -7412,14 +7412,14 @@ AC_SUBST_FILE(language_hooks) + + # Echo link setup. + if test x${build} = x${host} ; then +- if test x${host} = x${target} ; then ++ if test x${host} = x${target} && test x$FORCE_CROSS_LAYOUT != xyes ; then + echo "Links are now set up to build a native compiler for ${target}." 1>&2 + else + echo "Links are now set up to build a cross-compiler" 1>&2 + echo " from ${host} to ${target}." 1>&2 + fi + else +- if test x${host} = x${target} ; then ++ if test x${host} = x${target} && test x$FORCE_CROSS_LAYOUT != xyes ; then + echo "Links are now set up to build (on ${build}) a native compiler" 1>&2 + echo " for ${target}." 1>&2 + else diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-gfdl-build.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-gfdl-build.diff new file mode 100644 index 0000000000..1fc41b7c2b --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-gfdl-build.diff @@ -0,0 +1,40 @@ +# DP: Build a dummy s-tm-texi without access to the texinfo sources + +Index: b/src/gcc/Makefile.in +=================================================================== +--- a/src/gcc/Makefile.in ++++ b/src/gcc/Makefile.in +@@ -2637,31 +2637,8 @@ s-tm-texi: $(srcdir)/doc/../doc/tm.texi + # \r is not portable to Solaris tr, therefore we have a special + # case for ASCII. We use \r for other encodings like EBCDIC. + s-tm-texi: build/genhooks$(build_exeext) $(srcdir)/doc/tm.texi.in +- $(RUN_GEN) build/genhooks$(build_exeext) -d \ +- $(srcdir)/doc/tm.texi.in > tmp-tm.texi +- case `echo X|tr X '\101'` in \ +- A) tr -d '\015' < tmp-tm.texi > tmp2-tm.texi ;; \ +- *) tr -d '\r' < tmp-tm.texi > tmp2-tm.texi ;; \ +- esac +- mv tmp2-tm.texi tmp-tm.texi +- $(SHELL) $(srcdir)/../move-if-change tmp-tm.texi tm.texi +- @if cmp -s $(srcdir)/doc/tm.texi tm.texi; then \ +- $(STAMP) $@; \ +- elif test $(srcdir)/doc/tm.texi -nt $(srcdir)/doc/tm.texi.in \ +- && ( test $(srcdir)/doc/tm.texi -nt $(srcdir)/target.def \ +- || test $(srcdir)/doc/tm.texi -nt $(srcdir)/c-family/c-target.def \ +- || test $(srcdir)/doc/tm.texi -nt $(srcdir)/common/common-target.def \ +- || test $(srcdir)/doc/tm.texi -nt $(srcdir)/d/d-target.def \ +- ); then \ +- echo >&2 ; \ +- echo You should edit $(srcdir)/doc/tm.texi.in rather than $(srcdir)/doc/tm.texi . >&2 ; \ +- false; \ +- else \ +- echo >&2 ; \ +- echo Verify that you have permission to grant a GFDL license for all >&2 ; \ +- echo new text in $(objdir)/tm.texi, then copy it to $(srcdir)/doc/tm.texi. >&2 ; \ +- false; \ +- fi ++ cat $(srcdir)/doc/tm.texi.in > tmp-tm.texi ++ $(STAMP) $@ + + gimple-match.cc: s-match gimple-match-head.cc ; @true + generic-match.cc: s-match generic-match-head.cc ; @true diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-hash-style-gnu.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-hash-style-gnu.diff new file mode 100644 index 0000000000..2644ba4847 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-hash-style-gnu.diff @@ -0,0 +1,164 @@ +# DP: Link using --hash-style=gnu (aarch64, alpha, amd64, armel, armhf, ia64, +# DP: i386, powerpc, ppc64, riscv64, s390, sparc) + +2006-07-11 Jakub Jelinek + + * config/i386/linux.h (LINK_SPEC): Add --hash-style=gnu. + * config/i386/linux64.h (LINK_SPEC): Likewise. + * config/rs6000/sysv4.h (LINK_OS_LINUX_SPEC): Likewise. + * config/rs6000/linux64.h (LINK_OS_LINUX_SPEC32, + LINK_OS_LINUX_SPEC64): Likewise. + * config/s390/linux.h (LINK_SPEC): Likewise. + * config/ia64/linux.h (LINK_SPEC): Likewise. + * config/sparc/linux.h (LINK_SPEC): Likewise. + * config/sparc/linux64.h (LINK_SPEC, LINK_ARCH32_SPEC, + LINK_ARCH64_SPEC): Likewise. + * config/alpha/linux-elf.h (LINK_SPEC): Likewise. + +2009-12-21 Matthias Klose + + * config/arm/linux-elf.h (LINK_SPEC): Add --hash-style=gnu. + +2012-11-17 Matthias Klose + + * config/aarch64/aarch64-linux.h (LINK_SPEC): Add --hash-style=gnu. + +2018-03-02 Aurelien Jarno + + * config/riscv/linux.h (LINK_SPEC): Add --hash-style=gnu. + +--- + gcc/config/alpha/linux-elf.h | 2 +- + gcc/config/i386/linux.h | 2 +- + gcc/config/i386/linux64.h | 2 +- + gcc/config/ia64/linux.h | 2 +- + gcc/config/rs6000/linux64.h | 4 ++-- + gcc/config/rs6000/sysv4.h | 2 +- + gcc/config/s390/linux.h | 2 +- + gcc/config/sparc/linux.h | 2 +- + 8 files changed, 9 insertions(+), 9 deletions(-) + +--- a/src/gcc/config/alpha/linux-elf.h ++++ b/src/gcc/config/alpha/linux-elf.h +@@ -37,7 +37,7 @@ along with GCC; see the file COPYING3. + + #define ELF_DYNAMIC_LINKER GNU_USER_DYNAMIC_LINKER + +-#define LINK_SPEC "-m elf64alpha %{G*} %{relax:-relax} \ ++#define LINK_SPEC "-m elf64alpha --hash-style=gnu %{G*} %{relax:-relax} \ + %{O*:-O3} %{!O*:-O1} \ + %{shared:-shared} \ + %{!shared: \ +--- a/src/gcc/config/ia64/linux.h ++++ b/src/gcc/config/ia64/linux.h +@@ -58,7 +58,7 @@ do { \ + #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-ia64.so.2" + + #undef LINK_SPEC +-#define LINK_SPEC "\ ++#define LINK_SPEC " --hash-style=gnu \ + %{shared:-shared} \ + %{!shared: \ + %{!static: \ +--- a/src/gcc/config/rs6000/linux64.h ++++ b/src/gcc/config/rs6000/linux64.h +@@ -377,13 +377,13 @@ extern int dot_symbols; + " -m elf64ppc") + #endif + +-#define LINK_OS_LINUX_SPEC32 LINK_OS_LINUX_EMUL32 " %{!shared: %{!static: \ ++#define LINK_OS_LINUX_SPEC32 LINK_OS_LINUX_EMUL32 " --hash-style=gnu %{!shared: %{!static: \ + %{!static-pie: \ + %{rdynamic:-export-dynamic} \ + -dynamic-linker " GNU_USER_DYNAMIC_LINKER32 "}}} \ + %(link_os_extra_spec32)" + +-#define LINK_OS_LINUX_SPEC64 LINK_OS_LINUX_EMUL64 " %{!shared: %{!static: \ ++#define LINK_OS_LINUX_SPEC64 LINK_OS_LINUX_EMUL64 " --hash-style=gnu %{!shared: %{!static: \ + %{!static-pie: \ + %{rdynamic:-export-dynamic} \ + -dynamic-linker " GNU_USER_DYNAMIC_LINKER64 "}}} \ +--- a/src/gcc/config/rs6000/sysv4.h ++++ b/src/gcc/config/rs6000/sysv4.h +@@ -780,7 +780,7 @@ GNU_USER_TARGET_CC1_SPEC + #define GNU_USER_DYNAMIC_LINKER GLIBC_DYNAMIC_LINKER + #endif + +-#define LINK_OS_LINUX_SPEC "-m elf32ppclinux %{!shared: %{!static: \ ++#define LINK_OS_LINUX_SPEC "-m elf32ppclinux --hash-style=gnu %{!shared: %{!static: \ + %{rdynamic:-export-dynamic} \ + -dynamic-linker " GNU_USER_DYNAMIC_LINKER "}}" + +--- a/src/gcc/config/s390/linux.h ++++ b/src/gcc/config/s390/linux.h +@@ -82,7 +82,7 @@ along with GCC; see the file COPYING3. + + #undef LINK_SPEC + #define LINK_SPEC \ +- "%{m31:-m elf_s390}%{m64:-m elf64_s390} \ ++ "%{m31:-m elf_s390}%{m64:-m elf64_s390} --hash-style=gnu \ + %{shared:-shared} \ + %{!shared: \ + %{static:-static} \ +--- a/src/gcc/config/sparc/linux.h ++++ b/src/gcc/config/sparc/linux.h +@@ -81,7 +81,7 @@ extern const char *host_detect_local_cpu + #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" + + #undef LINK_SPEC +-#define LINK_SPEC "-m elf32_sparc %{shared:-shared} \ ++#define LINK_SPEC "-m elf32_sparc --hash-style=gnu %{shared:-shared} \ + %{!mno-relax:%{!r:-relax}} \ + %{!shared: \ + %{!static: \ +--- a/src/gcc/config/arm/linux-elf.h ++++ b/src/gcc/config/arm/linux-elf.h +@@ -70,6 +70,7 @@ + %{rdynamic:-export-dynamic} \ + %{!shared:-dynamic-linker " GNU_USER_DYNAMIC_LINKER "}} \ + -X \ ++ --hash-style=gnu \ + %{mbig-endian:-EB} %{mlittle-endian:-EL}" \ + SUBTARGET_EXTRA_LINK_SPEC + +--- a/src/gcc/config/i386/gnu-user.h ++++ b/src/gcc/config/i386/gnu-user.h +@@ -68,7 +68,7 @@ along with GCC; see the file COPYING3. + { "link_emulation", GNU_USER_LINK_EMULATION },\ + { "dynamic_linker", GNU_USER_DYNAMIC_LINKER } + +-#define GNU_USER_TARGET_LINK_SPEC "-m %(link_emulation) %{shared:-shared} \ ++#define GNU_USER_TARGET_LINK_SPEC "-m %(link_emulation) --hash-style=gnu %{shared:-shared} \ + %{!shared: \ + %{!static: \ + %{!static-pie: \ +--- a/src/gcc/config/i386/gnu-user64.h ++++ b/src/gcc/config/i386/gnu-user64.h +@@ -56,6 +56,7 @@ see the files COPYING3 and COPYING.RUNTI + "%{" SPEC_64 ":-m " GNU_USER_LINK_EMULATION64 "} \ + %{" SPEC_32 ":-m " GNU_USER_LINK_EMULATION32 "} \ + %{" SPEC_X32 ":-m " GNU_USER_LINK_EMULATIONX32 "} \ ++ --hash-style=gnu \ + %{shared:-shared} \ + %{!shared: \ + %{!static: \ +--- a/src/gcc/config/aarch64/aarch64-linux.h ++++ b/src/gcc/config/aarch64/aarch64-linux.h +@@ -35,6 +35,7 @@ + #define CPP_SPEC "%{pthread:-D_REENTRANT}" + + #define LINUX_TARGET_LINK_SPEC "%{h*} \ ++ --hash-style=gnu \ + %{static:-Bstatic} \ + %{shared:-shared} \ + %{symbolic:-Bsymbolic} \ +--- a/src/gcc/config/riscv/linux.h ++++ b/src/gcc/config/riscv/linux.h +@@ -48,6 +48,7 @@ along with GCC; see the file COPYING3. + "%{mabi=ilp32:_ilp32}" + + #define LINK_SPEC "\ ++-hash-style=gnu \ + -melf" XLEN_SPEC DEFAULT_ENDIAN_SPEC "riscv" LD_EMUL_SUFFIX " \ + %{mno-relax:--no-relax} \ + %{mbig-endian:-EB} \ diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-ice-apport.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-ice-apport.diff new file mode 100644 index 0000000000..9117c1d829 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-ice-apport.diff @@ -0,0 +1,39 @@ +# DP: Report an ICE to apport (if apport is available +# DP: and the environment variable GCC_NOAPPORT is not set) + +--- a/src/gcc/gcc.cc ++++ b/src/gcc/gcc.cc +@@ -7965,13 +7965,16 @@ do_report_bug (const char **new_argv, co + if (status == ATTEMPT_STATUS_SUCCESS) + { + const bool gcc_dump = has_deb_build_options ("gcc-ice", "nodump"); ++ const bool gcc_apport ++ = !env.get ("GCC_NOAPPORT") ++ && !access ("/usr/share/apport/gcc_ice_hook", R_OK | X_OK); + + if (gcc_dump) + fnotice (stderr, + "Preprocessed source stored into %s file," + " please attach this to your bugreport.\n", + *out_file); +- if (gcc_dump) ++ if (gcc_dump || gcc_apport) + { + char *cmd = XNEWVEC (char, 50 + strlen (*out_file)); + +@@ -7985,6 +7988,15 @@ do_report_bug (const char **new_argv, co + fflush (stderr); + free (cmd); + } ++ if (gcc_apport) ++ { ++ char *cmd ++ = XNEWVEC (char, 50 + strlen (*out_file) + strlen (new_argv[0])); ++ sprintf (cmd, "/usr/share/apport/gcc_ice_hook %s %s", new_argv[0], ++ *out_file); ++ system (cmd); ++ free (cmd); ++ } + /* Make sure it is not deleted. */ + free (*out_file); + *out_file = NULL; diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-ice-dump.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-ice-dump.diff new file mode 100644 index 0000000000..4a9093156e --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-ice-dump.diff @@ -0,0 +1,111 @@ +# DP: For ICEs, dump the preprocessed source file to stderr +# DP: when in a distro build environment. + +--- a/src/gcc/gcc.cc ++++ b/src/gcc/gcc.cc +@@ -3122,6 +3122,61 @@ access_check (const char *name, int mode + return access (name, mode); + } + ++/* Check whether options line contains the specified variable, and ++ optionally set to the supplied value */ ++ ++static bool ++check_options (const char *options, const char *var = nullptr, ++ const char *val = nullptr) ++{ ++ if (!var) ++ return false; ++ ++ const char *const var_found = strstr (options, var); ++ if (!var_found) ++ return false; ++ ++ if (val) ++ { ++ if (var_found[strlen (var)] != '=') ++ return false; ++ ++ const char *var_end = strchr (var_found, ' '); ++ if (!var_end) ++ var_end = strchr (var_found, '\0'); ++ ++ const char *const val_found = strstr (var_found, val); ++ if (!val_found || val_found > var_end) ++ return false; ++ ++ const char c0 = val_found[-1]; ++ const char c1 = val_found[strlen (val)]; ++ if ((c0 == '=' || c0 == ',') && (c1 == ',' || c1 == ' ' || c1 == '\0')) ++ return true; ++ } ++ else ++ { ++ const char c1 = var_found[strlen (var)]; ++ if (c1 == ' ' || c1 == '\0') ++ return true; ++ } ++ return false; ++} ++ ++/* Check whether DEB_BUILD_OPTIONS environment variable is set, and ++ that it does not contain the specified exclusion keyword. */ ++ ++static bool ++has_deb_build_options (const char *exclude_var = nullptr, ++ const char *exclude_val = nullptr) ++{ ++ const char *const deb_build_options = env.get ("DEB_BUILD_OPTIONS"); ++ if (!deb_build_options) ++ return false; ++ ++ return !check_options (deb_build_options, exclude_var, exclude_val); ++} ++ + /* Callback for find_a_file. Appends the file name to the directory + path. If the resulting file exists in the right mode, return the + full pathname to the file. */ +@@ -3648,9 +3703,10 @@ execute (void) + /* For ICEs in cc1, cc1obj, cc1plus see if it is + reproducible or not. */ + const char *p; +- if (flag_report_bug +- && WEXITSTATUS (status) == ICE_EXIT_CODE +- && i == 0 ++ const bool deb_build_options ++ = has_deb_build_options ("gcc-ice", "norepro"); ++ if ((flag_report_bug || deb_build_options) ++ && WEXITSTATUS (status) == ICE_EXIT_CODE && i == 0 + && (p = strrchr (commands[0].argv[0], DIR_SEPARATOR)) + && startswith (p + 1, "cc1")) + try_generate_repro (commands[0].argv); +@@ -7908,8 +7964,27 @@ do_report_bug (const char **new_argv, co + + if (status == ATTEMPT_STATUS_SUCCESS) + { +- fnotice (stderr, "Preprocessed source stored into %s file," +- " please attach this to your bugreport.\n", *out_file); ++ const bool gcc_dump = has_deb_build_options ("gcc-ice", "nodump"); ++ ++ if (gcc_dump) ++ fnotice (stderr, ++ "Preprocessed source stored into %s file," ++ " please attach this to your bugreport.\n", ++ *out_file); ++ if (gcc_dump) ++ { ++ char *cmd = XNEWVEC (char, 50 + strlen (*out_file)); ++ ++ sprintf (cmd, "/usr/bin/awk '{print \"%d:\", $0}' %s >&2", getpid (), ++ *out_file); ++ fprintf (stderr, "=== BEGIN GCC DUMP ===\n"); ++ fflush (stderr); ++ system (cmd); ++ fflush (stderr); ++ fprintf (stderr, "=== END GCC DUMP ===\n"); ++ fflush (stderr); ++ free (cmd); ++ } + /* Make sure it is not deleted. */ + free (*out_file); + *out_file = NULL; diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-multiarch.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-multiarch.diff new file mode 100644 index 0000000000..fe2022059e --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-multiarch.diff @@ -0,0 +1,235 @@ +# DP: - Remaining multiarch patches, not yet submitted upstream. +# DP: - Add MULTIARCH_DIRNAME definitions for multilib configurations, +# DP: which are used for the non-multilib builds. + +2013-06-12 Matthias Klose + + * config/i386/t-linux64: Set MULTIARCH_DIRNAME. + * config/i386/t-kfreebsd: Set MULTIARCH_DIRNAME. + * config.gcc (i[34567]86-*-linux* | x86_64-*-linux*): Prepend + i386/t-linux to $tmake_file; + set default ABI to N64 for mips64el. + * config/mips/t-linux64: Set MULTIARCH_DIRNAME. + * config/rs6000/t-linux64: Set MULTIARCH_DIRNAME. + * config/s390/t-linux64: Set MULTIARCH_DIRNAME. + * config/sparc/t-linux64: Set MULTIARCH_DIRNAME. + * src/gcc/config/mips/mips.h: (/usr)/lib as default path. + +Index: b/src/gcc/config/sh/t-linux +=================================================================== +--- a/src/gcc/config/sh/t-linux ++++ b/src/gcc/config/sh/t-linux +@@ -1,3 +1,11 @@ + MULTILIB_DIRNAMES= + MULTILIB_MATCHES= ++ ++ifneq (,$(findstring sh4,$(target))) ++MULTILIB_OSDIRNAMES = .:sh4-linux-gnu sh4_nofpu-linux-gnu:sh4-linux-gnu ++MULTIARCH_DIRNAME = $(call if_multiarch,sh4-linux-gnu) ++else ++MULTILIB_OSDIRNAMES = .:sh3-linux-gnu sh3_nofpu-linux-gnu:sh3-linux-gnu ++MULTIARCH_DIRNAME = $(call if_multiarch,sh3-linux-gnu) ++endif + MULTILIB_EXCEPTIONS=m1 mb/m1 m2a +Index: b/src/gcc/config/sparc/t-linux64 +=================================================================== +--- a/src/gcc/config/sparc/t-linux64 ++++ b/src/gcc/config/sparc/t-linux64 +@@ -27,3 +27,5 @@ MULTILIB_OPTIONS = m64/m32 + MULTILIB_DIRNAMES = 64 32 + MULTILIB_OSDIRNAMES = ../lib64$(call if_multiarch,:sparc64-linux-gnu) + MULTILIB_OSDIRNAMES += $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:sparc-linux-gnu) ++ ++MULTIARCH_DIRNAME = $(call if_multiarch,sparc$(if $(findstring 64,$(target)),64)-linux-gnu) +Index: b/src/gcc/config/s390/t-linux64 +=================================================================== +--- a/src/gcc/config/s390/t-linux64 ++++ b/src/gcc/config/s390/t-linux64 +@@ -9,3 +9,5 @@ MULTILIB_OPTIONS = m64/m31 + MULTILIB_DIRNAMES = 64 32 + MULTILIB_OSDIRNAMES = ../lib64$(call if_multiarch,:s390x-linux-gnu) + MULTILIB_OSDIRNAMES += $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:s390-linux-gnu) ++ ++MULTIARCH_DIRNAME = $(call if_multiarch,s390$(if $(findstring s390x,$(target)),x)-linux-gnu) +Index: b/src/gcc/config/rs6000/t-linux64 +=================================================================== +--- a/src/gcc/config/rs6000/t-linux64 ++++ b/src/gcc/config/rs6000/t-linux64 +@@ -31,6 +31,8 @@ MULTILIB_EXTRA_OPTS := + MULTILIB_OSDIRNAMES := m64=../lib64$(call if_multiarch,:powerpc64-linux-gnu) + MULTILIB_OSDIRNAMES += m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:powerpc-linux-gnu) + ++MULTIARCH_DIRNAME = $(call if_multiarch,powerpc$(if $(findstring 64,$(target)),64)-linux-gnu) ++ + rs6000-linux.o: $(srcdir)/config/rs6000/rs6000-linux.cc + $(COMPILE) $< + $(POSTCOMPILE) +Index: b/src/gcc/config/i386/t-linux64 +=================================================================== +--- a/src/gcc/config/i386/t-linux64 ++++ b/src/gcc/config/i386/t-linux64 +@@ -36,3 +36,13 @@ MULTILIB_DIRNAMES = $(patsubst m%, %, + MULTILIB_OSDIRNAMES = m64=../lib64$(call if_multiarch,:x86_64-linux-gnu) + MULTILIB_OSDIRNAMES+= m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:i386-linux-gnu) + MULTILIB_OSDIRNAMES+= mx32=../libx32$(call if_multiarch,:x86_64-linux-gnux32) ++ ++ifneq (,$(findstring x86_64,$(target))) ++ ifneq (,$(findstring biarchx32.h,$(tm_include_list))) ++ MULTIARCH_DIRNAME = $(call if_multiarch,x86_64-linux-gnux32) ++ else ++ MULTIARCH_DIRNAME = $(call if_multiarch,x86_64-linux-gnu) ++ endif ++else ++ MULTIARCH_DIRNAME = $(call if_multiarch,i386-linux-gnu) ++endif +Index: b/src/gcc/config/i386/t-kfreebsd +=================================================================== +--- a/src/gcc/config/i386/t-kfreebsd ++++ b/src/gcc/config/i386/t-kfreebsd +@@ -1,5 +1,9 @@ +-MULTIARCH_DIRNAME = $(call if_multiarch,i386-kfreebsd-gnu) ++ifeq (,$(MULTIARCH_DIRNAME)) ++ MULTIARCH_DIRNAME = $(call if_multiarch,i386-kfreebsd-gnu) ++endif + + # MULTILIB_OSDIRNAMES are set in t-linux64. + KFREEBSD_OS = $(filter kfreebsd%, $(word 3, $(subst -, ,$(target)))) + MULTILIB_OSDIRNAMES := $(filter-out mx32=%,$(subst linux,$(KFREEBSD_OS),$(MULTILIB_OSDIRNAMES))) ++ ++MULTIARCH_DIRNAME := $(subst linux,$(KFREEBSD_OS),$(MULTIARCH_DIRNAME)) +Index: b/src/gcc/config/mips/t-linux64 +=================================================================== +--- a/src/gcc/config/mips/t-linux64 ++++ b/src/gcc/config/mips/t-linux64 +@@ -18,24 +18,28 @@ + + MULTILIB_OPTIONS = mabi=n32/mabi=32/mabi=64 + MULTILIB_DIRNAMES = n32 32 64 ++MIPS_R6 = $(if $(findstring r6, $(firstword $(subst -, ,$(target)))),r6) ++MIPS_32 = $(if $(findstring r6, $(firstword $(subst -, ,$(target)))),32) ++MIPS_ISA = $(if $(findstring r6, $(firstword $(subst -, ,$(target)))),isa) + MIPS_EL = $(if $(filter %el, $(firstword $(subst -, ,$(target)))),el) + MIPS_SOFT = $(if $(strip $(filter MASK_SOFT_FLOAT_ABI, $(target_cpu_default)) $(filter soft, $(with_float))),soft) ++ + ifeq (yes,$(enable_multiarch)) + ifneq (,$(findstring gnuabi64,$(target))) + MULTILIB_OSDIRNAMES = \ +- ../lib32$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabin32$(MIPS_SOFT)) \ +- ../libo32$(call if_multiarch,:mips$(MIPS_EL)-linux-gnu$(MIPS_SOFT)) \ +- ../lib$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabi64$(MIPS_SOFT)) ++ ../lib32$(call if_multiarch,:mips$(MIPS_ISA)64$(MIPS_R6)$(MIPS_EL)-linux-gnuabin32$(MIPS_SOFT)) \ ++ ../libo32$(call if_multiarch,:mips$(MIPS_ISA)$(MIPS_32)$(MIPS_R6)$(MIPS_EL)-linux-gnu$(MIPS_SOFT)) \ ++ ../lib$(call if_multiarch,:mips$(MIPS_ISA)64$(MIPS_R6)$(MIPS_EL)-linux-gnuabi64$(MIPS_SOFT)) + else ifneq (,$(findstring gnuabin32,$(target))) + MULTILIB_OSDIRNAMES = \ +- ../lib$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabin32$(MIPS_SOFT)) \ +- ../libo32$(call if_multiarch,:mips$(MIPS_EL)-linux-gnu$(MIPS_SOFT)) \ +- ../lib64$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabi64$(MIPS_SOFT)) ++ ../lib$(call if_multiarch,:mips$(MIPS_ISA)64$(MIPS_R6)$(MIPS_EL)-linux-gnuabin32$(MIPS_SOFT)) \ ++ ../libo32$(call if_multiarch,:mips$(MIPS_ISA)$(MIPS_32)$(MIPS_R6)$(MIPS_EL)-linux-gnu$(MIPS_SOFT)) \ ++ ../lib64$(call if_multiarch,:mips$(MIPS_ISA)64$(MIPS_R6)$(MIPS_EL)-linux-gnuabi64$(MIPS_SOFT)) + else + MULTILIB_OSDIRNAMES = \ +- ../lib32$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabin32$(MIPS_SOFT)) \ +- ../lib$(call if_multiarch,:mips$(MIPS_EL)-linux-gnu$(MIPS_SOFT)) \ +- ../lib64$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabi64$(MIPS_SOFT)) ++ ../lib32$(call if_multiarch,:mips$(MIPS_ISA)64$(MIPS_R6)$(MIPS_EL)-linux-gnuabin32$(MIPS_SOFT)) \ ++ ../lib$(call if_multiarch,:mips$(MIPS_ISA)$(MIPS_32)$(MIPS_R6)$(MIPS_EL)-linux-gnu$(MIPS_SOFT)) \ ++ ../lib64$(call if_multiarch,:mips$(MIPS_ISA)64$(MIPS_R6)$(MIPS_EL)-linux-gnuabi64$(MIPS_SOFT)) + endif + else + MULTILIB_OSDIRNAMES = \ +@@ -43,3 +47,13 @@ else + ../lib$(call if_multiarch,:mips$(MIPS_EL)-linux-gnu$(MIPS_SOFT)) \ + ../lib64$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabi64$(MIPS_SOFT)) + endif ++ ++ifneq (,$(findstring abin32,$(target))) ++MULTIARCH_DIRNAME = $(call if_multiarch,mips$(MIPS_ISA)64$(MIPS_R6)$(MIPS_EL)-linux-gnuabin32$(MIPS_SOFT)) ++else ++ifneq (,$(findstring abi64,$(target))) ++MULTIARCH_DIRNAME = $(call if_multiarch,mips$(MIPS_ISA)64$(MIPS_R6)$(MIPS_EL)-linux-gnuabi64$(MIPS_SOFT)) ++else ++MULTIARCH_DIRNAME = $(call if_multiarch,mips$(MIPS_ISA)$(MIPS_32)$(MIPS_R6)$(MIPS_EL)-linux-gnu$(MIPS_SOFT)) ++endif ++endif +Index: b/src/gcc/config.gcc +=================================================================== +--- a/src/gcc/config.gcc ++++ b/src/gcc/config.gcc +@@ -2519,7 +2519,8 @@ mips*-*-linux*) # Linux MIPS, either + extra_options="${extra_options} linux-android.opt" + case ${target} in + mipsisa32r6*) +- default_mips_arch=mips32r6 ++ with_arch_32="mips32r6" ++ with_arch_64="mips64r6" + ;; + mipsisa32r2*) + default_mips_arch=mips32r2 +@@ -2541,7 +2542,8 @@ mips*-*-linux*) # Linux MIPS, either + ;; + mipsisa64r6*-*-linux-gnuabi64) + default_mips_abi=64 +- default_mips_arch=mips64r6 ++ with_arch_32="mips32r6" ++ with_arch_64="mips64r6" + enable_mips_multilibs="yes" + ;; + mipsisa64r6*-*-linux*) +@@ -5656,7 +5658,7 @@ case ${target} in + ;; + i[34567]86-*-linux* | x86_64-*-linux*) + extra_objs="${extra_objs} gnu-property.o" +- tmake_file="$tmake_file i386/t-linux i386/t-gnu-property" ++ tmake_file="i386/t-linux $tmake_file i386/t-gnu-property" + ;; + i[34567]86-*-kfreebsd*-gnu | x86_64-*-kfreebsd*-gnu) + tmake_file="$tmake_file i386/t-kfreebsd" +Index: b/src/gcc/config/riscv/t-linux +=================================================================== +--- a/src/gcc/config/riscv/t-linux ++++ b/src/gcc/config/riscv/t-linux +@@ -1,3 +1,5 @@ + # Only XLEN and ABI affect Linux multilib dir names, e.g. /lib32/ilp32d/ + MULTILIB_DIRNAMES := $(patsubst rv32%,lib32,$(patsubst rv64%,lib64,$(MULTILIB_DIRNAMES))) + MULTILIB_OSDIRNAMES := $(patsubst lib%,../lib%,$(MULTILIB_DIRNAMES)) ++ ++MULTIARCH_DIRNAME := $(call if_multiarch,$(firstword $(subst -, ,$(target)))-linux-gnu) +Index: b/src/gcc/Makefile.in +=================================================================== +--- a/src/gcc/Makefile.in ++++ b/src/gcc/Makefile.in +@@ -553,7 +553,7 @@ BUILD_SYSTEM_HEADER_DIR = `echo @BUILD_S + STMP_FIXINC = @STMP_FIXINC@ + + # Test to see whether exists in the system header files. +-LIMITS_H_TEST = [ -f $(BUILD_SYSTEM_HEADER_DIR)/limits.h ] ++LIMITS_H_TEST = [ -f $(BUILD_SYSTEM_HEADER_DIR)/limits.h -o -f $(BUILD_SYSTEM_HEADER_DIR)/$(MULTIARCH_DIRNAME)/limits.h ] + + # Directory for prefix to system directories, for + # each of $(system_prefix)/usr/include, $(system_prefix)/usr/lib, etc. +Index: b/src/gcc/config/aarch64/t-aarch64-linux +=================================================================== +--- a/src/gcc/config/aarch64/t-aarch64-linux ++++ b/src/gcc/config/aarch64/t-aarch64-linux +@@ -22,7 +22,7 @@ LIB1ASMSRC = aarch64/lib1funcs.asm + LIB1ASMFUNCS = _aarch64_sync_cache_range + + AARCH_BE = $(if $(findstring TARGET_BIG_ENDIAN_DEFAULT=1, $(tm_defines)),_be) +-MULTILIB_OSDIRNAMES = mabi.lp64=../lib64$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu) ++MULTILIB_OSDIRNAMES = mabi.lp64=../lib$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu) + MULTIARCH_DIRNAME = $(call if_multiarch,aarch64$(AARCH_BE)-linux-gnu) + + MULTILIB_OSDIRNAMES += mabi.ilp32=../libilp32$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu_ilp32) +Index: b/src/gcc/config/arc/t-multilib-linux +=================================================================== +--- a/src/gcc/config/arc/t-multilib-linux ++++ b/src/gcc/config/arc/t-multilib-linux +@@ -23,3 +23,6 @@ MULTILIB_DIRNAMES = hs archs hs38 hs38_l + # Aliases: + MULTILIB_MATCHES += mcpu?arc700=mA7 + MULTILIB_MATCHES += mcpu?arc700=mARC700 ++ ++MULTILIB_OSDIRNAMES = ++MULTIARCH_DIRNAME = $(call if_multiarch,arc-linux-gnu) diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-multilib-multiarch.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-multilib-multiarch.diff new file mode 100644 index 0000000000..83527c7fc5 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-multilib-multiarch.diff @@ -0,0 +1,126 @@ +# DP: Don't auto-detect multilib osdirnames. + +Index: b/src/gcc/config/sparc/t-linux64 +=================================================================== +--- a/src/gcc/config/sparc/t-linux64 ++++ b/src/gcc/config/sparc/t-linux64 +@@ -25,7 +25,12 @@ + + MULTILIB_OPTIONS = m64/m32 + MULTILIB_DIRNAMES = 64 32 ++ifneq (,$(findstring sparc64,$(target))) ++MULTILIB_OSDIRNAMES = ../lib$(call if_multiarch,:sparc64-linux-gnu) ++MULTILIB_OSDIRNAMES += ../lib32$(call if_multiarch,:sparc-linux-gnu) ++else + MULTILIB_OSDIRNAMES = ../lib64$(call if_multiarch,:sparc64-linux-gnu) +-MULTILIB_OSDIRNAMES += $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:sparc-linux-gnu) ++MULTILIB_OSDIRNAMES += ../lib$(call if_multiarch,:sparc-linux-gnu) ++endif + + MULTIARCH_DIRNAME = $(call if_multiarch,sparc$(if $(findstring 64,$(target)),64)-linux-gnu) +Index: b/src/gcc/config/s390/t-linux64 +=================================================================== +--- a/src/gcc/config/s390/t-linux64 ++++ b/src/gcc/config/s390/t-linux64 +@@ -7,7 +7,12 @@ + + MULTILIB_OPTIONS = m64/m31 + MULTILIB_DIRNAMES = 64 32 ++ifneq (,$(findstring s390x,$(target))) ++MULTILIB_OSDIRNAMES = ../lib$(call if_multiarch,:s390x-linux-gnu) ++MULTILIB_OSDIRNAMES += ../lib32$(call if_multiarch,:s390-linux-gnu) ++else + MULTILIB_OSDIRNAMES = ../lib64$(call if_multiarch,:s390x-linux-gnu) +-MULTILIB_OSDIRNAMES += $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:s390-linux-gnu) ++MULTILIB_OSDIRNAMES += ../lib$(call if_multiarch,:s390-linux-gnu) ++endif + + MULTIARCH_DIRNAME = $(call if_multiarch,s390$(if $(findstring s390x,$(target)),x)-linux-gnu) +Index: b/src/gcc/config/rs6000/t-linux64 +=================================================================== +--- a/src/gcc/config/rs6000/t-linux64 ++++ b/src/gcc/config/rs6000/t-linux64 +@@ -28,8 +28,13 @@ + MULTILIB_OPTIONS := m64/m32 + MULTILIB_DIRNAMES := 64 32 + MULTILIB_EXTRA_OPTS := ++ifneq (,$(findstring powerpc64,$(target))) ++MULTILIB_OSDIRNAMES := m64=../lib$(call if_multiarch,:powerpc64-linux-gnu) ++MULTILIB_OSDIRNAMES += m32=../lib32$(call if_multiarch,:powerpc-linux-gnu) ++else + MULTILIB_OSDIRNAMES := m64=../lib64$(call if_multiarch,:powerpc64-linux-gnu) +-MULTILIB_OSDIRNAMES += m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:powerpc-linux-gnu) ++MULTILIB_OSDIRNAMES += m32=../lib$(call if_multiarch,:powerpc-linux-gnu) ++endif + + MULTIARCH_DIRNAME = $(call if_multiarch,powerpc$(if $(findstring 64,$(target)),64)-linux-gnu) + +Index: b/src/gcc/config/i386/t-linux64 +=================================================================== +--- a/src/gcc/config/i386/t-linux64 ++++ b/src/gcc/config/i386/t-linux64 +@@ -33,9 +33,19 @@ + comma=, + MULTILIB_OPTIONS = $(subst $(comma),/,$(TM_MULTILIB_CONFIG)) + MULTILIB_DIRNAMES = $(patsubst m%, %, $(subst /, ,$(MULTILIB_OPTIONS))) ++ifneq (,$(findstring gnux32,$(target))) + MULTILIB_OSDIRNAMES = m64=../lib64$(call if_multiarch,:x86_64-linux-gnu) +-MULTILIB_OSDIRNAMES+= m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:i386-linux-gnu) ++MULTILIB_OSDIRNAMES+= m32=../lib32$(call if_multiarch,:i386-linux-gnu) ++MULTILIB_OSDIRNAMES+= mx32=../lib$(call if_multiarch,:x86_64-linux-gnux32) ++else ifneq (,$(findstring x86_64,$(target))) ++MULTILIB_OSDIRNAMES = m64=../lib$(call if_multiarch,:x86_64-linux-gnu) ++MULTILIB_OSDIRNAMES+= m32=../lib32$(call if_multiarch,:i386-linux-gnu) + MULTILIB_OSDIRNAMES+= mx32=../libx32$(call if_multiarch,:x86_64-linux-gnux32) ++else ++MULTILIB_OSDIRNAMES = m64=../lib64$(call if_multiarch,:x86_64-linux-gnu) ++MULTILIB_OSDIRNAMES+= m32=../lib$(call if_multiarch,:i386-linux-gnu) ++MULTILIB_OSDIRNAMES+= mx32=../libx32$(call if_multiarch,:x86_64-linux-gnux32) ++endif + + ifneq (,$(findstring x86_64,$(target))) + ifneq (,$(findstring biarchx32.h,$(tm_include_list))) +Index: b/src/gcc/config/rs6000/t-linux +=================================================================== +--- a/src/gcc/config/rs6000/t-linux ++++ b/src/gcc/config/rs6000/t-linux +@@ -2,7 +2,7 @@ + # or soft-float. + ifeq (,$(filter $(with_cpu),$(SOFT_FLOAT_CPUS))$(findstring soft,$(with_float))) + ifneq (,$(findstring powerpc64,$(target))) +-MULTILIB_OSDIRNAMES := .=../lib64$(call if_multiarch,:powerpc64-linux-gnu) ++MULTILIB_OSDIRNAMES := .=../lib$(call if_multiarch,:powerpc64-linux-gnu) + else + MULTIARCH_DIRNAME := $(call if_multiarch,powerpc-linux-gnu) + endif +Index: b/src/gcc/config/loongarch/t-linux +=================================================================== +--- a/src/gcc/config/loongarch/t-linux ++++ b/src/gcc/config/loongarch/t-linux +@@ -32,22 +32,19 @@ ifneq ($(call if_multiarch,yes),yes) + else + # Only define MULTIARCH_DIRNAME when multiarch is enabled, + # or it would always introduce ${target} into the search path. +- MULTIARCH_DIRNAME = $(LA_MULTIARCH_TRIPLET) ++ MULTIARCH_DIRNAME = $(call if_multiarch,loongarch64-linux-gnu) + endif + + # Don't define MULTILIB_OSDIRNAMES if multilib is disabled. + ifeq ($(filter LA_DISABLE_MULTILIB,$(tm_defines)),) + + MULTILIB_OSDIRNAMES = \ +- mabi.lp64d=../lib64$\ +- $(call if_multiarch,:loongarch64-linux-gnu) ++ mabi.lp64d=../lib$(call if_multiarch,:loongarch64-linux-gnu) + + MULTILIB_OSDIRNAMES += \ +- mabi.lp64f=../lib64/f32$\ +- $(call if_multiarch,:loongarch64-linux-gnuf32) ++ mabi.lp64f=../lib/f32$(call if_multiarch,:loongarch64-linux-gnuf32) + + MULTILIB_OSDIRNAMES += \ +- mabi.lp64s=../lib64/sf$\ +- $(call if_multiarch,:loongarch64-linux-gnusf) ++ mabi.lp64s=../lib/sf$(call if_multiarch,:loongarch64-linux-gnusf) + + endif diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-search-prefixed-as-ld.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-search-prefixed-as-ld.diff new file mode 100644 index 0000000000..2fb9d8d582 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-search-prefixed-as-ld.diff @@ -0,0 +1,37 @@ +# DP: Search for the -as / -ld before serching for as / ld. + +--- a/src/gcc/gcc.cc ++++ b/src/gcc/gcc.cc +@@ -2919,6 +2919,7 @@ for_each_path (const struct path_prefix + { + len = paths->max_len + extra_space + 1; + len += MAX (MAX (suffix_len, multi_os_dir_len), multiarch_len); ++ len += MAX (strlen(DEFAULT_REAL_TARGET_MACHINE), multiarch_len) + 2; /* triplet prefix for as, ld. */ + path = XNEWVEC (char, len); + } + +@@ -3132,6 +3133,24 @@ file_at_path (char *path, void *data) + struct file_at_path_info *info = (struct file_at_path_info *) data; + size_t len = strlen (path); + ++ /* search for the -as / -ld first. */ ++ if (! strcmp (info->name, "as") || ! strcmp (info->name, "ld")) ++ { ++ struct file_at_path_info prefix_info = *info; ++ char *prefixed_name = XNEWVEC (char, info->name_len + 2 ++ + strlen (DEFAULT_REAL_TARGET_MACHINE)); ++ strcpy (prefixed_name, DEFAULT_REAL_TARGET_MACHINE); ++ strcat (prefixed_name, "-"); ++ strcat (prefixed_name, info->name); ++ prefix_info.name = (const char *) prefixed_name; ++ prefix_info.name_len = strlen (prefixed_name); ++ if (file_at_path (path, &prefix_info)) ++ { ++ XDELETEVEC (prefixed_name); ++ return path; ++ } ++ XDELETEVEC (prefixed_name); ++ } + memcpy (path + len, info->name, info->name_len); + len += info->name_len; + diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-target-include-asm.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-target-include-asm.diff new file mode 100644 index 0000000000..e6eb82e421 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-target-include-asm.diff @@ -0,0 +1,15 @@ +# DP: Search $(builddir)/sys-include for the asm header files + +Index: b/src/configure.ac +=================================================================== +--- a/src/configure.ac ++++ b/src/configure.ac +@@ -3443,7 +3443,7 @@ fi + # being built; programs in there won't even run. + if test "${build}" = "${host}" && test -d ${srcdir}/gcc; then + # Search for pre-installed headers if nothing else fits. +- FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -B$(build_tooldir)/bin/ -B$(build_tooldir)/lib/ -isystem $(build_tooldir)/include -isystem $(build_tooldir)/sys-include' ++ FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -B$(build_tooldir)/bin/ -B$(build_tooldir)/lib/ -isystem $(build_tooldir)/include -isystem $(build_tooldir)/sys-include -isystem $(CURDIR)/sys-include' + fi + + if test "x${use_gnu_ld}" = x && diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-textdomain.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-textdomain.diff new file mode 100644 index 0000000000..1228159ed6 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-textdomain.diff @@ -0,0 +1,86 @@ +# DP: Set gettext's domain and textdomain to the versioned package name. + +--- a/src/gcc/intl.cc ++++ b/src/gcc/intl.cc +@@ -55,8 +55,8 @@ gcc_init_libintl (void) + setlocale (LC_ALL, ""); + #endif + +- (void) bindtextdomain ("gcc", LOCALEDIR); +- (void) textdomain ("gcc"); ++ (void) bindtextdomain ("gcc-13", LOCALEDIR); ++ (void) textdomain ("gcc-13"); + + /* Opening quotation mark. */ + open_quote = _("`"); +--- a/src/gcc/Makefile.in ++++ b/src/gcc/Makefile.in +@@ -4401,8 +4401,8 @@ install-po: + dir=$(localedir)/$$lang/LC_MESSAGES; \ + echo $(mkinstalldirs) $(DESTDIR)$$dir; \ + $(mkinstalldirs) $(DESTDIR)$$dir || exit 1; \ +- echo $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/gcc.mo; \ +- $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/gcc.mo; \ ++ echo $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/gcc-13.mo; \ ++ $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/gcc-13.mo; \ + done + + # Rule for regenerating the message template (gcc.pot). +--- a/src/libcpp/init.cc ++++ b/src/libcpp/init.cc +@@ -181,7 +181,7 @@ init_library (void) + init_trigraph_map (); + + #ifdef ENABLE_NLS +- (void) bindtextdomain (PACKAGE, LOCALEDIR); ++ (void) bindtextdomain (PACKAGE PACKAGE_SUFFIX, LOCALEDIR); + #endif + } + } +--- a/src/libcpp/system.h ++++ b/src/libcpp/system.h +@@ -284,7 +284,7 @@ extern int errno; + #endif + + #ifndef _ +-# define _(msgid) dgettext (PACKAGE, msgid) ++# define _(msgid) dgettext (PACKAGE PACKAGE_SUFFIX, msgid) + #endif + + #ifndef N_ +--- a/src/libcpp/Makefile.in ++++ b/src/libcpp/Makefile.in +@@ -49,6 +49,7 @@ LDFLAGS = @LDFLAGS@ + LIBICONV = @LIBICONV@ + LIBINTL = @LIBINTL@ + PACKAGE = @PACKAGE@ ++PACKAGE_SUFFIX = -13 + RANLIB = @RANLIB@ + SHELL = @SHELL@ + USED_CATALOGS = @USED_CATALOGS@ +@@ -73,11 +74,12 @@ depcomp = $(SHELL) $(srcdir)/../depcomp + + INCLUDES = -I$(srcdir) -I. -I$(srcdir)/../include @INCINTL@ \ + -I$(srcdir)/include ++DEBCPPFLAGS += -DPACKAGE_SUFFIX=\"$(strip $(PACKAGE_SUFFIX))\" + + ALL_CFLAGS = $(CFLAGS) $(WARN_CFLAGS) $(INCLUDES) $(CPPFLAGS) $(PICFLAG) \ +- $(CET_HOST_FLAGS) ++ $(CET_HOST_FLAGS) $(DEBCPPFLAGS) + ALL_CXXFLAGS = $(CXXFLAGS) $(WARN_CXXFLAGS) $(NOEXCEPTION_FLAGS) $(INCLUDES) \ +- $(CPPFLAGS) $(PICFLAG) $(CET_HOST_FLAGS) ++ $(CPPFLAGS) $(PICFLAG) $(CET_HOST_FLAGS) $(DEBCPPFLAGS) + + # The name of the compiler to use. + COMPILER = $(CXX) +@@ -166,8 +168,8 @@ install-strip install: all installdirs + else continue; \ + fi; \ + dir=$(localedir)/$$lang/LC_MESSAGES; \ +- echo $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(PACKAGE).mo; \ +- $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(PACKAGE).mo; \ ++ echo $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(PACKAGE)$(PACKAGE_SUFFIX).mo; \ ++ $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(PACKAGE)$(PACKAGE_SUFFIX).mo; \ + done + + mostlyclean: diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-verbose-lto-link.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-verbose-lto-link.diff new file mode 100644 index 0000000000..41b1a7e1d5 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-verbose-lto-link.diff @@ -0,0 +1,13 @@ +# DP: Prefix LLINKER with /usr/bin/time -v + +--- a/src/gcc/Makefile.in ++++ b/src/gcc/Makefile.in +@@ -284,7 +284,7 @@ LINKER += $(NO_PIE_FLAG) + ifeq (@DO_LINK_MUTEX@,true) + LLINKER = $(SHELL) $(srcdir)/lock-and-run.sh linkfe.lck $(LINKER) + else +-LLINKER = $(LINKER) ++LLINKER = /usr/bin/time -v $(LINKER) + endif + + THIN_ARCHIVE_SUPPORT = @thin_archive_support@ diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-vhdl.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-vhdl.diff new file mode 100644 index 0000000000..9825652831 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/gcc-vhdl.diff @@ -0,0 +1,15 @@ +# DP: Make vhdl known to the PPC backend. See +# DP: https://github.com/ghdl/ghdl/blob/master/doc/development/building/GCC.rst + +--- a/src/gcc/config/rs6000/rs6000-logue.cc ++++ b/src/gcc/config/rs6000/rs6000-logue.cc +@@ -5351,7 +5351,8 @@ + || ! strcmp (language_string, "GNU Go") + || ! strcmp (language_string, "GNU D") + || ! strcmp (language_string, "GNU Rust") +- || ! strcmp (language_string, "libgccjit")) ++ || ! strcmp (language_string, "libgccjit") ++ || ! strcmp (language_string, "vhdl")) + i = 0; + else if (! strcmp (language_string, "GNU F77") + || lang_GNU_Fortran ()) diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/gccrs-bootstrap-mipsel.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/gccrs-bootstrap-mipsel.diff new file mode 100644 index 0000000000..cd60f77be7 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/gccrs-bootstrap-mipsel.diff @@ -0,0 +1,12 @@ +# DP: Ignore gccrs bootstrap comparison failures on mipsel. + +--- a/src/configure.ac ++++ b/src/configure.ac +@@ -3805,6 +3805,7 @@ compare_exclusions="$compare_exclusions + compare_exclusions="$compare_exclusions | gcc/m2/gm2version*" + case "$target" in + hppa*64*-*-hpux*) ;; ++ mipsel-*linux-gnu) compare_exclusions="$compare_exclusions | gcc/rust/rust-macro-builtins.o | gcc/rust/rust-session-manager.o | gcc/rust/rust-cfg-parser.o | gcc/rust/rust-lex.o" ;; + powerpc*-ibm-aix*) compare_exclusions="$compare_exclusions | *libgomp*\$(objext)" ;; + esac + AC_SUBST(compare_exclusions) diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/gdc-dynamic-link-phobos.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/gdc-dynamic-link-phobos.diff new file mode 100644 index 0000000000..f8ccec93d8 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/gdc-dynamic-link-phobos.diff @@ -0,0 +1,17 @@ +# DP: Dynamically link the phobos library. + +--- a/src/gcc/d/d-spec.cc ++++ b/src/gcc/d/d-spec.cc +@@ -426,9 +426,9 @@ lang_specific_driver (cl_decoded_option + /* Add `-lgphobos' if we haven't already done so. */ + if (phobos_library != PHOBOS_NOLINK) + { +- /* Default to static linking. */ +- if (phobos_library != PHOBOS_DYNAMIC) +- phobos_library = PHOBOS_STATIC; ++ /* Default to dynamic linking. */ ++ if (phobos_library != PHOBOS_STATIC) ++ phobos_library = PHOBOS_DYNAMIC; + + #ifdef HAVE_LD_STATIC_DYNAMIC + if (phobos_library == PHOBOS_STATIC && !static_link) diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/gdc-multiarch.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/gdc-multiarch.diff new file mode 100644 index 0000000000..1925e1a0de --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/gdc-multiarch.diff @@ -0,0 +1,17 @@ +# DP: Set the D target include directory to a multiarch location. + +--- a/src/gcc/d/Make-lang.in ++++ b/src/gcc/d/Make-lang.in +@@ -61,7 +61,11 @@ + $(D_DMD_H) + + +-gcc_d_target_include_dir=$(gcc_d_include_dir)/$(target_noncanonical) ++ifneq (,$(MULTIARCH_DIRNAME)) ++ gcc_d_target_include_dir = /usr/include/$(MULTIARCH_DIRNAME)/d/$(version) ++else ++ gcc_d_target_include_dir=$(gcc_d_include_dir)/$(target_noncanonical) ++endif + + # Name of phobos library + D_LIBPHOBOS = -DLIBPHOBOS=\"gphobos2\" diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/gdc-texinfo.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/gdc-texinfo.diff new file mode 100644 index 0000000000..a024dafa81 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/gdc-texinfo.diff @@ -0,0 +1,53 @@ +# DP: Add macros for the gdc texinfo documentation. + +--- a/src/gcc/d/gdc.texi ++++ b/src/gcc/d/gdc.texi +@@ -45,6 +45,22 @@ man page gfdl(7). + @insertcopying + @end ifinfo + ++@macro versionsubtitle ++@ifclear DEVELOPMENT ++@subtitle For @sc{gcc} version @value{version-GCC} ++@end ifclear ++@ifset DEVELOPMENT ++@subtitle For @sc{gcc} version @value{version-GCC} (pre-release) ++@end ifset ++@ifset VERSION_PACKAGE ++@sp 1 ++@subtitle @value{VERSION_PACKAGE} ++@end ifset ++@c Even if there are no authors, the second titlepage line should be ++@c forced to the bottom of the page. ++@vskip 0pt plus 1filll ++@end macro ++ + @titlepage + @title The GNU D Compiler + @versionsubtitle +@@ -123,6 +139,25 @@ This manual only documents the options s + * Developer Options:: Options useful for developers of gdc + @end menu + ++@macro gcctabopt{body} ++@code{\body\} ++@end macro ++@macro gccoptlist{body} ++@smallexample ++\body\ ++@end smallexample ++@end macro ++@c Makeinfo handles the above macro OK, TeX needs manual line breaks; ++@c they get lost at some point in handling the macro. But if @macro is ++@c used here rather than @alias, it produces double line breaks. ++@iftex ++@alias gol = * ++@end iftex ++@ifnottex ++@macro gol ++@end macro ++@end ifnottex ++ + @c man begin OPTIONS + + @node Input and Output files diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/git-doc-updates.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/git-doc-updates.diff new file mode 100644 index 0000000000..df1ca69928 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/git-doc-updates.diff @@ -0,0 +1,33 @@ +# DP: updates from the 13 branch upto 20240904 (documentation). + +LANG=C git diff --no-renames --src-prefix=a/src/ --dst-prefix=b/src/ \ + b71f1de6e9cf7181a288c0f39f9b1ef6580cf5c8 cc2c50b19491b6adbbe7927d9aa35f9b5683c233 \ + | awk '/^diff .*\.texi/ {skip=0; print; next} /^diff / {skip=1; next} skip==0' \ + | grep -v -E '^(diff|index)' + +--- a/src/gcc/doc/invoke.texi ++++ b/src/gcc/doc/invoke.texi +@@ -20315,8 +20315,8 @@ performance of the code. Permissible values for this option are: + @samp{cortex-a78}, @samp{cortex-a78ae}, @samp{cortex-a78c}, + @samp{ares}, @samp{exynos-m1}, @samp{emag}, @samp{falkor}, + @samp{neoverse-512tvb}, @samp{neoverse-e1}, @samp{neoverse-n1}, +-@samp{neoverse-n2}, @samp{neoverse-v1}, @samp{neoverse-v2}, @samp{qdf24xx}, +-@samp{saphira}, @samp{phecda}, @samp{xgene1}, @samp{vulcan}, ++@samp{neoverse-n2}, @samp{neoverse-v1}, @samp{neoverse-v2}, @samp{grace}, ++@samp{qdf24xx}, @samp{saphira}, @samp{phecda}, @samp{xgene1}, @samp{vulcan}, + @samp{octeontx}, @samp{octeontx81}, @samp{octeontx83}, + @samp{octeontx2}, @samp{octeontx2t98}, @samp{octeontx2t96} + @samp{octeontx2t93}, @samp{octeontx2f95}, @samp{octeontx2f95n}, +@@ -32743,8 +32743,10 @@ instruction set support. + + @item lujiazui + ZHAOXIN lujiazui CPU with x86-64, MOVBE, MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, +-SSE4.2, AVX, POPCNT, AES, PCLMUL, RDRND, XSAVE, XSAVEOPT, FSGSBASE, CX16, +-ABM, BMI, BMI2, F16C, FXSR, RDSEED instruction set support. ++SSE4.2, POPCNT, AES, PCLMUL, RDRND, XSAVE, XSAVEOPT, FSGSBASE, CX16, ++ABM, BMI, BMI2, FXSR, RDSEED instruction set support. While the CPUs ++do support AVX and F16C, these aren't enabled by @code{-march=lujiazui} ++for performance reasons. + + @item geode + AMD Geode embedded processor with MMX and 3DNow!@: instruction set support. diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/git-updates.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/git-updates.diff new file mode 100644 index 0000000000..a6e6b9400f --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/git-updates.diff @@ -0,0 +1,13366 @@ +# DP: updates from the 13 branch upto 20240904 (cc2c50b1949). + +LANG=C git diff --no-renames --src-prefix=a/src/ --dst-prefix=b/src/ \ + b71f1de6e9cf7181a288c0f39f9b1ef6580cf5c8 cc2c50b19491b6adbbe7927d9aa35f9b5683c233 \ + | awk '/^diff .*\.texi/ {skip=1; next} /^diff / { skip=0 } skip==0' \ + | grep -v -E '^(diff|index)' + +--- a/src/gcc/ChangeLog ++++ b/src/gcc/ChangeLog +@@ -1,3 +1,720 @@ ++2024-09-03 Haochen Jiang ++ ++ * config/i386/avx512fp16intrin.h ++ (_mm512_mask_fpclass_ph_mask): Correct mask type to __mmask32. ++ (_mm512_fpclass_ph_mask): Ditto. ++ ++2024-09-03 Vineet Gupta ++ ++ * config/riscv/riscv.cc (riscv_promote_function_mode): Fix mode ++ returned for libcall case. ++ ++2024-09-02 liuhongt ++ ++ Backported from master: ++ 2024-08-30 liuhongt ++ ++ PR target/116512 ++ * config/i386/i386.cc (ix86_check_avx_upper_register): Iterate ++ subrtx to scan for avx upper register. ++ (ix86_check_avx_upper_stores): Inline old ++ ix86_check_avx_upper_register. ++ (ix86_avx_u128_mode_needed): Ditto, and replace ++ FOR_EACH_SUBRTX with call to new ++ ix86_check_avx_upper_register. ++ ++2024-08-22 liuhongt ++ ++ Backported from master: ++ 2024-08-22 liuhongt ++ ++ * config/i386/i386-options.cc (ix86_option_override_internal): ++ set ix86_{move_max,store_max} to PVW_AVX256 when TARGET_AVX ++ instead of PVW_AVX128. ++ ++2024-08-19 Jan Hubicka ++ ++ Backported from master: ++ 2024-07-22 Jan Hubicka ++ ++ PR ipa/115277 ++ * ipa-icf-gimple.cc (func_checker::compare_loops): compare loop ++ bounds. ++ ++2024-08-18 Georg-Johann Lay ++ ++ Backported from master: ++ 2024-08-18 Georg-Johann Lay ++ ++ PR target/116407 ++ * config/avr/avr-protos.h (avr_jump_mode): Add an int argument. ++ * config/avr/avr.cc (avr_jump_mode): Add an int argument to increase ++ the computed jump offset of backwards branches. ++ * config/avr/avr.md (*dec-and-branchhi!=-1, *dec-and-branchsi!=-1): ++ Increase the jump offset used by avr_jump_mode() as needed. ++ ++2024-08-16 Richard Sandiford ++ ++ Backported from master: ++ 2024-04-05 Richard Sandiford ++ ++ PR target/114603 ++ * config/aarch64/aarch64-sve.md (@aarch64_pred_cnot): Replace ++ with... ++ (@aarch64_ptrue_cnot): ...this, requiring operand 1 to be ++ a ptrue. ++ (*cnot): Require operand 1 to be a ptrue. ++ * config/aarch64/aarch64-sve-builtins-base.cc (svcnot_impl::expand): ++ Use aarch64_ptrue_cnot for _x operations that are predicated ++ with a ptrue. Represent other _x operations as fully-defined _m ++ operations. ++ ++2024-08-16 Richard Sandiford ++ ++ Backported from master: ++ 2024-04-08 Richard Sandiford ++ ++ PR target/114607 ++ * config/aarch64/aarch64-sve-builtins-base.cc ++ (svusdot_impl::expand): Fix botched attempt to swap the operands ++ for svsudot. ++ ++2024-08-12 liuhongt ++ ++ Backported from master: ++ 2024-07-30 liuhongt ++ ++ PR target/116043 ++ * config/i386/constraints.md (Bk): Refine to ++ define_special_memory_constraint. ++ ++2024-08-06 John David Anglin ++ ++ PR target/113384 ++ * config/pa/pa.cc (hppa_legitimize_address): Add check to ++ ensure constant is an integral multiple of shift the value. ++ ++2024-08-06 Andrew Pinski ++ ++ Backported from master: ++ 2024-08-06 Andrew Pinski ++ ++ PR target/116189 ++ * config/sh/sh.cc (sh_recog_treg_set_expr): Don't call make_insn_raw, ++ make the insn with a fake uid. ++ ++2024-07-30 Haochen Jiang ++ ++ * config/i386/prfchiintrin.h ++ (_m_prefetchit0): Add macro for non-optimized option. ++ (_m_prefetchit1): Ditto. ++ ++2024-07-29 Haochen Jiang ++ ++ * config/i386/avx512dqintrin.h (_mm_reduce_round_sd): Use ++ _mm_setzero_pd instead of _mm_avx512_setzero_pd. ++ (_mm_reduce_round_ss): Use _mm_setzero_ps instead of ++ _mm_avx512_setzero_ps. ++ ++2024-07-29 Haochen Jiang ++ ++ * config/i386/avx512dqintrin.h ++ (_mm_mask_fpclass_ss_mask): Correct operand order. ++ (_mm_mask_fpclass_sd_mask): Ditto. ++ (_mm256_maskz_reduce_round_ss): Use __builtin_ia32_reducess_mask_round ++ instead of __builtin_ia32_reducesd_mask_round. ++ (_mm_reduce_round_sd): Use -1 as mask since it is non-mask. ++ (_mm_reduce_round_ss): Ditto. ++ * config/i386/avx512vlbwintrin.h ++ (_mm256_mask_alignr_epi8): Correct operand usage. ++ (_mm_mask_alignr_epi8): Ditto. ++ * config/i386/avx512vlintrin.h (_mm_mask_alignr_epi64): Ditto. ++ ++2024-07-24 Peter Bergner ++ ++ Backported from master: ++ 2024-07-17 Peter Bergner ++ ++ PR target/114759 ++ * config/rs6000/rs6000.cc (rs6000_option_override_internal): Disallow ++ CPUs and ABIs that do no support the ROP protection insns. ++ * config/rs6000/rs6000-logue.cc (rs6000_stack_info): Remove now ++ unneeded tests. ++ (rs6000_emit_prologue): Likewise. ++ Remove unneeded gcc_assert. ++ (rs6000_emit_epilogue): Likewise. ++ * config/rs6000/rs6000.md: Likewise. ++ ++2024-07-24 Peter Bergner ++ ++ Backported from master: ++ 2024-07-17 Peter Bergner ++ ++ PR target/114759 ++ * config/rs6000/rs6000-logue.cc (rs6000_stack_info): Use TARGET_POWER8. ++ (rs6000_emit_prologue): Likewise. ++ * config/rs6000/rs6000.md (hashchk): Likewise. ++ (hashst): Likewise. ++ Fix whitespace. ++ ++2024-07-24 Peter Bergner ++ ++ Backported from master: ++ 2024-06-17 Peter Bergner ++ ++ PR target/115389 ++ * config/rs6000/rs6000-logue.cc (rs6000_stack_info): Compute ++ rop_hash_save_offset for non-Altivec compiles. ++ ++2024-07-24 Peter Bergner ++ ++ Backported from master: ++ 2024-06-08 Peter Bergner ++ ++ * config/rs6000/rs6000-logue.cc (rs6000_stack_info): Update comment. ++ ++2024-07-23 Richard Biener ++ ++ Backported from master: ++ 2024-07-16 Richard Biener ++ ++ PR tree-optimization/115843 ++ * config/i386/x86-tune-costs.h (znver4_cost): Update unaligned ++ load and store cost from the aligned costs. ++ ++2024-07-23 Haochen Jiang ++ ++ * config/i386/i386.md (prefetchi): Change to %a. ++ ++2024-07-22 Maciej W. Rozycki ++ ++ Backported from master: ++ 2024-06-29 Maciej W. Rozycki ++ ++ PR rtl-optimization/115565 ++ * cse.cc (record_jump_cond): Use INT_MIN rather than -1 for ++ `comparison_qty' if !REG_P. ++ ++2024-07-20 Siddhesh Poyarekar ++ ++ Backported from master: ++ 2024-07-20 Siddhesh Poyarekar ++ ++ * opt-suggestions.cc ++ (option_proposer::build_option_suggestions): Pull OPTB ++ definition out of the innermost loop. ++ ++2024-07-20 Stefan Schulze Frielinghaus ++ ++ * config/s390/3931.md (vlbr, vstbr, vrepi): Remove. ++ * config/s390/s390.md (xdee): Add FPRX2 mapping. ++ * config/s390/vector.md (bhfgq): Add TF mapping. ++ ++2024-07-20 René Rebe ++ ++ Backported from master: ++ 2024-07-18 René Rebe ++ Peter Bergner ++ ++ PR target/97367 ++ * config/rs6000/rs6000.cc (rs6000_machine_from_flags): Do not consider ++ OPTION_MASK_ALTIVEC. ++ (emit_asm_machine): For Altivec compiles, emit a ".machine altivec". ++ ++2024-07-19 LIU Hao ++ ++ Backported from master: ++ 2024-07-18 LIU Hao ++ ++ PR rtl-optimization/115049 ++ * varasm.cc (decl_binds_to_current_def_p): Add a check for COMDAT ++ declarations too, like weak ones. ++ ++2024-07-17 Uros Bizjak ++ ++ Backported from master: ++ 2024-07-17 Uros Bizjak ++ ++ PR target/115526 ++ * config/alpha/alpha.md (movdi_er_high_g): Add cannot_copy attribute. ++ (movdi_er_tlsgd): Ditto. ++ (movdi_er_tlsldm): Ditto. ++ (call_value_osf_): Ditto. ++ ++2024-07-16 Stefan Schulze Frielinghaus ++ ++ Backported from master: ++ 2024-07-12 Stefan Schulze Frielinghaus ++ ++ * config/s390/vector.md (mov): Fix output template for ++ movv1qi. ++ ++2024-07-16 Stefan Schulze Frielinghaus ++ ++ Backported from master: ++ 2024-07-12 Stefan Schulze Frielinghaus ++ ++ * config/s390/s390.md (*icjump_64): Allow raw CC comparisons, ++ i.e., any constant integer between 0 and 15 for CC comparisons. ++ ++2024-07-16 Alexandre Oliva ++ ++ Backported from master: ++ 2024-07-15 Alexandre Oliva ++ ++ PR target/113719 ++ * config/i386/i386-options.cc (ix86_option_override_internal): ++ Move flag_omit_frame_pointer final overrider... ++ (ix86_recompute_optlev_based_flags): ... here. ++ ++2024-07-16 Alexandre Oliva ++ ++ Backported from master: ++ 2024-07-03 Alexandre Oliva ++ ++ PR target/113719 ++ * config/i386/i386-options.cc ++ (ix86_override_options_after_change_1): Add opts and opts_set ++ parms, operate on them, after factoring out of... ++ (ix86_override_options_after_change): ... this. Restore calls ++ of ix86_default_align and ix86_recompute_optlev_based_flags. ++ (ix86_option_override_internal): Call the factored-out bits. ++ ++2024-07-15 liuhongt ++ ++ Backported from master: ++ 2024-07-15 liuhongt ++ ++ PR target/115872 ++ * tree-ssa-ccp.cc (convert_atomic_bit_not): Remove use_stmt after use_nop_stmt is removed. ++ (optimize_atomic_bit_test_and): Ditto. ++ ++2024-07-13 Lulu Cheng ++ ++ Backported from master: ++ 2024-07-12 Lulu Cheng ++ ++ PR target/115752 ++ * config/loongarch/loongarch.cc ++ (loongarch_hard_regno_mode_ok_uncached): Replace ++ UNITS_PER_FPVALUE with UNITS_PER_HWFPVALUE. ++ * config/loongarch/loongarch.h (UNITS_PER_FPVALUE): Delete. ++ ++2024-07-11 Andre Vieira ++ ++ Backported from master: ++ 2024-07-11 Andre Vieira ++ ++ PR target/115611 ++ * config/arm/mve.md (mve_vec_setv2di_internal): Fix printing of input ++ scalar register pair when lane = 1. ++ ++2024-07-10 Uros Bizjak ++ ++ Backported from master: ++ 2024-07-10 Uros Bizjak ++ ++ PR middle-end/115836 ++ * expmed.cc (emit_store_flag_1): Move calculation of ++ scode just before its only usage site. ++ ++2024-07-05 Georg-Johann Lay ++ ++ Backported from master: ++ 2024-07-05 Georg-Johann Lay ++ ++ PR target/87376 ++ * config/avr/avr-dimode.md: Use "nop_general_operand" instead ++ of "general_operand" as predicate for all input operands. ++ ++2024-07-04 Kyrylo Tkachov ++ ++ Backported from master: ++ 2024-07-03 Kyrylo Tkachov ++ ++ PR target/115475 ++ * config/aarch64/aarch64-c.cc (aarch64_update_cpp_builtins): ++ Define __ARM_FEATURE_SVE_BF16 for TARGET_SVE_BF16. ++ ++2024-07-04 Kyrylo Tkachov ++ ++ Backported from master: ++ 2024-07-03 Kyrylo Tkachov ++ ++ PR target/115457 ++ * config/aarch64/aarch64-c.cc (aarch64_update_cpp_builtins): ++ Define __ARM_FEATURE_BF16 for TARGET_BF16_FP. ++ ++2024-07-03 John David Anglin ++ ++ PR target/115691 ++ * config/pa/pa.md: Remove incorrect xmpyu patterns. ++ ++2024-07-03 Georg-Johann Lay ++ ++ Backported from master: ++ 2024-07-03 Georg-Johann Lay ++ ++ PR target/98762 ++ * config/avr/avr.cc (avr_out_movqi_r_mr_reg_disp_tiny): Properly ++ restore the base register when it is partially clobbered. ++ ++2024-07-03 Kewen Lin ++ ++ Backported from master: ++ 2024-06-26 Kewen Lin ++ Xionghu Luo ++ ++ PR target/106069 ++ PR target/115355 ++ * config/rs6000/altivec.md (altivec_vmrghh_direct): Rename to ... ++ (altivec_vmrghh_direct_be): ... this. Add condition BYTES_BIG_ENDIAN. ++ (altivec_vmrghh_direct_le): New define_insn. ++ (altivec_vmrglh_direct): Rename to ... ++ (altivec_vmrglh_direct_be): ... this. Add condition BYTES_BIG_ENDIAN. ++ (altivec_vmrglh_direct_le): New define_insn. ++ (altivec_vmrghh): Adjust by calling gen_altivec_vmrghh_direct_be ++ for BE and gen_altivec_vmrglh_direct_le for LE. ++ (altivec_vmrglh): Adjust by calling gen_altivec_vmrglh_direct_be ++ for BE and gen_altivec_vmrghh_direct_le for LE. ++ (vec_widen_umult_hi_v16qi): Adjust the call to ++ gen_altivec_vmrghh_direct by gen_altivec_vmrghh for BE ++ and by gen_altivec_vmrglh for LE. ++ (vec_widen_smult_hi_v16qi): Likewise. ++ (vec_widen_umult_lo_v16qi): Adjust the call to ++ gen_altivec_vmrglh_direct by gen_altivec_vmrglh for BE ++ and by gen_altivec_vmrghh for LE. ++ (vec_widen_smult_lo_v16qi): Likewise. ++ * config/rs6000/rs6000.cc (altivec_expand_vec_perm_const): Replace ++ CODE_FOR_altivec_vmrghh_direct by ++ CODE_FOR_altivec_vmrghh_direct_be for BE and ++ CODE_FOR_altivec_vmrghh_direct_le for LE. And replace ++ CODE_FOR_altivec_vmrglh_direct by ++ CODE_FOR_altivec_vmrglh_direct_be for BE and ++ CODE_FOR_altivec_vmrglh_direct_le for LE. ++ ++2024-07-03 Kewen Lin ++ ++ Backported from master: ++ 2024-06-26 Kewen Lin ++ Xionghu Luo ++ ++ PR target/106069 ++ PR target/115355 ++ * config/rs6000/altivec.md (altivec_vmrghb_direct): Rename to ... ++ (altivec_vmrghb_direct_be): ... this. Add condition BYTES_BIG_ENDIAN. ++ (altivec_vmrghb_direct_le): New define_insn. ++ (altivec_vmrglb_direct): Rename to ... ++ (altivec_vmrglb_direct_be): ... this. Add condition BYTES_BIG_ENDIAN. ++ (altivec_vmrglb_direct_le): New define_insn. ++ (altivec_vmrghb): Adjust by calling gen_altivec_vmrghb_direct_be ++ for BE and gen_altivec_vmrglb_direct_le for LE. ++ (altivec_vmrglb): Adjust by calling gen_altivec_vmrglb_direct_be ++ for BE and gen_altivec_vmrghb_direct_le for LE. ++ * config/rs6000/rs6000.cc (altivec_expand_vec_perm_const): Replace ++ CODE_FOR_altivec_vmrghb_direct by ++ CODE_FOR_altivec_vmrghb_direct_be for BE and ++ CODE_FOR_altivec_vmrghb_direct_le for LE. And replace ++ CODE_FOR_altivec_vmrglb_direct by ++ CODE_FOR_altivec_vmrglb_direct_be for BE and ++ CODE_FOR_altivec_vmrglb_direct_le for LE. ++ ++2024-07-01 Georg-Johann Lay ++ ++ Backported from master: ++ 2024-07-01 Georg-Johann Lay ++ ++ PR target/88236 ++ PR target/115726 ++ * config/avr/avr.md (mov) [avr_mem_memx_p]: Expand in such a ++ way that the destination does not overlap with any hard register ++ clobbered / used by xload8qi_A resp. xload_A. ++ * config/avr/avr.cc (avr_out_xload): Avoid early-clobber ++ situation for Z by executing just one load when the output register ++ overlaps with Z. ++ ++2024-06-28 Kewen Lin ++ ++ Backported from master: ++ 2024-06-21 Kewen Lin ++ Xionghu Luo ++ ++ PR target/106069 ++ PR target/115355 ++ * config/rs6000/altivec.md (altivec_vmrghw_direct_): Rename ++ to ... ++ (altivec_vmrghw_direct__be): ... this. Add the condition ++ BYTES_BIG_ENDIAN. ++ (altivec_vmrghw_direct__le): New define_insn. ++ (altivec_vmrglw_direct_): Rename to ... ++ (altivec_vmrglw_direct__be): ... this. Add the condition ++ BYTES_BIG_ENDIAN. ++ (altivec_vmrglw_direct__le): New define_insn. ++ (altivec_vmrghw): Adjust by calling gen_altivec_vmrghw_direct_v4si_be ++ for BE and gen_altivec_vmrglw_direct_v4si_le for LE. ++ (altivec_vmrglw): Adjust by calling gen_altivec_vmrglw_direct_v4si_be ++ for BE and gen_altivec_vmrghw_direct_v4si_le for LE. ++ (vec_widen_umult_hi_v8hi): Adjust the call to ++ gen_altivec_vmrghw_direct_v4si by gen_altivec_vmrghw for BE ++ and by gen_altivec_vmrglw for LE. ++ (vec_widen_smult_hi_v8hi): Likewise. ++ (vec_widen_umult_lo_v8hi): Adjust the call to ++ gen_altivec_vmrglw_direct_v4si by gen_altivec_vmrglw for BE ++ and by gen_altivec_vmrghw for LE ++ (vec_widen_smult_lo_v8hi): Likewise. ++ * config/rs6000/rs6000.cc (altivec_expand_vec_perm_const): Replace ++ CODE_FOR_altivec_vmrghw_direct_v4si by ++ CODE_FOR_altivec_vmrghw_direct_v4si_be for BE and ++ CODE_FOR_altivec_vmrghw_direct_v4si_le for LE. And replace ++ CODE_FOR_altivec_vmrglw_direct_v4si by ++ CODE_FOR_altivec_vmrglw_direct_v4si_be for BE and ++ CODE_FOR_altivec_vmrglw_direct_v4si_le for LE. ++ * config/rs6000/vsx.md (vsx_xxmrghw_): Adjust by calling ++ gen_altivec_vmrghw_direct_v4si_be for BE and ++ gen_altivec_vmrglw_direct_v4si_le for LE. ++ (vsx_xxmrglw_): Adjust by calling ++ gen_altivec_vmrglw_direct_v4si_be for BE and ++ gen_altivec_vmrghw_direct_v4si_le for LE. ++ ++2024-06-27 Wilco Dijkstra ++ ++ Backported from master: ++ 2023-11-30 Wilco Dijkstra ++ ++ PR target/103100 ++ * config/aarch64/aarch64.md (cpymemdi): Remove pattern condition. ++ (setmemdi): Likewise. ++ * config/aarch64/aarch64.cc (aarch64_expand_cpymem): Support ++ strict-align. Cleanup condition for using MOPS. ++ (aarch64_expand_setmem): Likewise. ++ ++2024-06-27 Andrew Carlotti ++ ++ Backported from master: ++ 2023-12-16 Andrew Carlotti ++ ++ PR target/115618 ++ * common/config/aarch64/aarch64-common.cc ++ (aarch64_get_extension_string_for_isa_flags): Fix generation of ++ the "+nocrypto" extension. ++ * config/aarch64/aarch64.h (AARCH64_ISA_CRYPTO): Remove. ++ (TARGET_CRYPTO): Remove. ++ * config/aarch64/aarch64-c.cc (aarch64_update_cpp_builtins): ++ Don't use TARGET_CRYPTO. ++ ++2024-06-27 Kyrylo Tkachov ++ ++ * config/aarch64/aarch64-cores.def (grace): New entry. ++ * config/aarch64/aarch64-tune.md: Regenerate. ++ * doc/invoke.texi (AArch64 Options): Document the above. ++ ++2024-06-24 Kewen Lin ++ ++ Backported from master: ++ 2024-05-29 Kewen Lin ++ ++ PR target/114846 ++ * config/rs6000/rs6000-logue.cc (rs6000_emit_epilogue): As ++ EPILOGUE_TYPE_EH_RETURN would be passed as epilogue_type directly ++ now, adjust the relevant handlings on it. ++ * config/rs6000/rs6000.md (eh_return expander): Append by calling ++ gen_eh_return_internal and emit_barrier. ++ (eh_return_internal): New define_insn_and_split, call function ++ rs6000_emit_epilogue with epilogue type EPILOGUE_TYPE_EH_RETURN. ++ ++2024-06-20 Jakub Jelinek ++ ++ Backported from master: ++ 2024-06-17 Jakub Jelinek ++ ++ PR driver/115440 ++ * opts-common.cc (add_misspelling_candidates): If opt1 is non-NULL, ++ add a space and opt1 to the alternative suggestion text. ++ ++2024-06-12 Torbjörn SVENSSON ++ ++ Backported from master: ++ 2024-06-12 Torbjörn SVENSSON ++ Yvan ROUX ++ ++ PR target/115253 ++ * config/arm/arm.cc (cmse_nonsecure_call_inline_register_clear): ++ Sign extend for Thumb1. ++ (thumb1_expand_prologue): Add zero/sign extend. ++ ++2024-06-11 Jakub Jelinek ++ ++ Backported from master: ++ 2024-06-04 Jakub Jelinek ++ ++ PR tree-optimization/115337 ++ * fold-const.cc (tree_call_nonnegative_warnv_p) : ++ If fn is CFN_CLZ, use CLZ_DEFINED_VALUE_AT. ++ ++2024-06-11 Jakub Jelinek ++ ++ Backported from master: ++ 2024-06-04 Jakub Jelinek ++ ++ PR middle-end/108789 ++ * builtins.cc (fold_builtin_arith_overflow): For ovf_only, ++ don't call save_expr and don't build REALPART_EXPR, otherwise ++ set TREE_SIDE_EFFECTS on call before calling save_expr. ++ ++2024-06-11 Jakub Jelinek ++ ++ Backported from master: ++ 2024-06-04 Jakub Jelinek ++ ++ * doc/invoke.texi (lujiazui): Clarify that while the CPUs do support ++ AVX and F16C, -march=lujiazui actually doesn't enable those. ++ ++2024-06-11 Jakub Jelinek ++ ++ Backported from master: ++ 2024-06-03 Jakub Jelinek ++ ++ PR target/115324 ++ * config/rs6000/rs6000-gen-builtins.cc (write_decls): Remove ++ GTY markup from struct bifdata and struct ovlddata and remove their ++ fntype members. Change next member in struct ovlddata and ++ first_instance member of struct ovldrecord to have int type rather ++ than struct ovlddata *. Remove GTY markup from rs6000_builtin_info ++ and rs6000_instance_info arrays, declare new ++ rs6000_builtin_info_fntype and rs6000_instance_info_fntype arrays, ++ which have GTY markup. ++ (write_bif_static_init): Adjust for the above changes. ++ (write_ovld_static_init): Likewise. ++ (write_init_bif_table): Likewise. ++ (write_init_ovld_table): Likewise. ++ * config/rs6000/rs6000-builtin.cc (rs6000_init_builtins): Likewise. ++ * config/rs6000/rs6000-c.cc (find_instance): Likewise. Make static. ++ (altivec_resolve_overloaded_builtin): Adjust for the above changes. ++ ++2024-06-11 Jakub Jelinek ++ ++ Backported from master: ++ 2024-05-15 Jakub Jelinek ++ ++ PR rtl-optimization/114902 ++ PR rtl-optimization/115092 ++ * combine.cc (simplify_compare_const): Don't optimize ++ GE op0 SIGNED_MIN or LT op0 SIGNED_MIN into NE op0 const0_rtx or ++ EQ op0 const0_rtx. ++ ++2024-06-07 Jan Hubicka ++ ++ Backported from master: ++ 2023-12-29 Jan Hubicka ++ ++ * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS, ++ X86_TUNE_AVOID_256FMA_CHAINS): Enable for znver4 and Core. ++ ++2024-06-03 Uros Bizjak ++ ++ Backported from master: ++ 2024-05-31 Uros Bizjak ++ ++ PR target/115297 ++ * config/alpha/alpha.md (si3): Wrap DImode ++ operands 3 and 4 with truncate:SI RTX. ++ (*divmodsi_internal_er): Ditto for operands 1 and 2. ++ (*divmodsi_internal_er_1): Ditto. ++ (*divmodsi_internal): Ditto. ++ * config/alpha/constraints.md ("b"): Correct register ++ number in the description. ++ ++2024-06-01 Georg-Johann Lay ++ ++ Backported from master: ++ 2024-06-01 Georg-Johann Lay ++ ++ PR tree-optimization/115307 ++ * config/avr/avr.md (SFDF): New mode iterator. ++ (isinf2) [sf, df]: New expanders. ++ ++2024-05-31 Richard Sandiford ++ ++ Backported from master: ++ 2024-01-29 Richard Sandiford ++ ++ PR target/113281 ++ * tree-vect-patterns.cc (vect_recog_over_widening_pattern): Remove ++ workaround for right shifts. ++ (vect_truncatable_operation_p): Handle NEGATE_EXPR and BIT_NOT_EXPR. ++ (vect_determine_precisions_from_range): Be more selective about ++ which codes can be narrowed based on their input and output ranges. ++ For shifts, require at least one more bit of precision than the ++ maximum shift amount. ++ ++2024-05-31 Richard Sandiford ++ ++ Backported from master: ++ 2024-05-24 Richard Sandiford ++ ++ PR tree-optimization/115192 ++ * tree-data-ref.cc (create_intersect_range_checks): Take the ++ alignment of the access sizes into account. ++ ++2024-05-31 Hongyu Wang ++ ++ Backported from master: ++ 2024-05-29 Hongyu Wang ++ ++ PR target/113719 ++ * config/i386/i386-options.cc (ix86_override_options_after_change): ++ Remove call to ix86_default_align and ++ ix86_recompute_optlev_based_flags. ++ (ix86_option_override_internal): Call ix86_default_align and ++ ix86_recompute_optlev_based_flags. ++ ++2024-05-30 YunQiang Su ++ ++ Backported from master: ++ 2024-05-29 YunQiang Su ++ ++ * config/mips/mips.cc(mips16_gp_pseudo_reg): Mark ++ MIPS16_PIC_TEMP and MIPS_PROLOGUE_TEMP clobbered. ++ (mips_emit_call_insn): Mark MIPS16_PIC_TEMP and ++ MIPS_PROLOGUE_TEMP clobbered if MIPS16 and CALL_CLOBBERED_GP. ++ ++2024-05-22 Jakub Jelinek ++ ++ Backported from master: ++ 2024-05-22 Jakub Jelinek ++ ++ PR tree-optimization/115152 ++ * tree-ssa-strlen.cc (strlen_pass::count_nonzero_bytes_addr): If ++ !si->full_string_p, clear *nulterm and set maxlen to nbytes. ++ ++2024-05-22 Jakub Jelinek ++ ++ Backported from master: ++ 2024-05-22 Jakub Jelinek ++ ++ PR sanitizer/115172 ++ * ubsan.cc (instrument_bool_enum_load): If rhs is not in generic ++ address space, use qualified version of utype with the right ++ address space. Formatting fix. ++ ++2024-05-21 Andrew Pinski ++ ++ Backported from master: ++ 2024-05-20 Andrew Pinski ++ ++ PR tree-optimization/115143 ++ * tree-ssa-phiopt.cc (minmax_replacement): Check for empty ++ phi nodes for middle bbs for the case where middle bb is not empty. ++ ++2024-05-21 Andrew Pinski ++ ++ Backported from master: ++ 2024-05-21 Andrew Pinski ++ ++ PR tree-optimization/115154 ++ * match.pd (convert (mult zero_one_valued_p@1 INTEGER_CST@2)): Disable ++ for 1bit signed types. ++ + 2024-05-21 Release Manager + + * GCC 13.3.0 released. +--- a/src/gcc/DATESTAMP ++++ b/src/gcc/DATESTAMP +@@ -1 +1 @@ +-20240521 ++20240904 +--- a/src/gcc/ada/ChangeLog ++++ b/src/gcc/ada/ChangeLog +@@ -1,3 +1,16 @@ ++2024-06-10 Eric Botcazou ++ ++ PR ada/114708 ++ * exp_util.adb (Finalize_Address): Add guard for incomplete types. ++ ++2024-06-10 Javier Miranda ++ ++ * sem_ch6.adb (Might_Need_BIP_Task_Actuals): Add support ++ for access-to-subprogram parameter types. ++ * exp_ch6.adb (Add_Task_Actuals_To_Build_In_Place_Call): ++ Add dummy BIP parameters to access-to-subprogram types ++ that may reference a function that has BIP parameters. ++ + 2024-05-21 Release Manager + + * GCC 13.3.0 released. +--- a/src/gcc/ada/exp_ch6.adb ++++ b/src/gcc/ada/exp_ch6.adb +@@ -640,15 +640,20 @@ package body Exp_Ch6 is + Master_Formal : Node_Id; + + begin ++ pragma Assert (Ekind (Function_Id) in E_Function ++ | E_Subprogram_Type); ++ + -- No such extra parameters are needed if there are no tasks + + if not Needs_BIP_Task_Actuals (Function_Id) then + + -- However we must add dummy extra actuals if the function is +- -- a dispatching operation that inherited these extra formals. ++ -- a dispatching operation that inherited these extra formals ++ -- or an access-to-subprogram type that requires these extra ++ -- actuals. + +- if Is_Dispatching_Operation (Function_Id) +- and then Has_BIP_Extra_Formal (Function_Id, BIP_Task_Master) ++ if Has_BIP_Extra_Formal (Function_Id, BIP_Task_Master, ++ Must_Be_Frozen => False) + then + Master_Formal := + Build_In_Place_Formal (Function_Id, BIP_Task_Master); +--- a/src/gcc/ada/exp_util.adb ++++ b/src/gcc/ada/exp_util.adb +@@ -6013,6 +6013,12 @@ package body Exp_Util is + + Utyp := Underlying_Type (Base_Type (Utyp)); + ++ -- Handle incomplete types ++ ++ if No (Utyp) then ++ return Empty; ++ end if; ++ + -- Deal with untagged derivation of private views. If the parent is + -- now known to be protected, the finalization routine is the one + -- defined on the corresponding record of the ancestor (corresponding +--- a/src/gcc/ada/sem_ch6.adb ++++ b/src/gcc/ada/sem_ch6.adb +@@ -8588,9 +8588,12 @@ package body Sem_Ch6 is + -- Determines if E has its extra formals + + function Might_Need_BIP_Task_Actuals (E : Entity_Id) return Boolean; +- -- Determines if E is a dispatching primitive returning a limited tagged +- -- type object since some descendant might return an object with tasks +- -- (and therefore need the BIP task extra actuals). ++ -- Determines if E is a function or an access to a function returning a ++ -- limited tagged type object. On dispatching primitives this predicate ++ -- is used to determine if some descendant of the function might return ++ -- an object with tasks (and therefore need the BIP task extra actuals). ++ -- On access-to-subprogram types it is used to determine if the target ++ -- function might return an object with tasks. + + function Needs_Accessibility_Check_Extra + (E : Entity_Id; +@@ -8711,9 +8714,8 @@ package body Sem_Ch6 is + + Func_Typ := Root_Type (Underlying_Type (Etype (Subp_Id))); + +- return Ekind (Subp_Id) = E_Function ++ return Ekind (Subp_Id) in E_Function | E_Subprogram_Type + and then not Has_Foreign_Convention (Func_Typ) +- and then Is_Dispatching_Operation (Subp_Id) + and then Is_Tagged_Type (Func_Typ) + and then Is_Limited_Type (Func_Typ) + and then not Has_Aspect (Func_Typ, Aspect_No_Task_Parts); +--- a/src/gcc/builtins.cc ++++ b/src/gcc/builtins.cc +@@ -9539,7 +9539,21 @@ fold_builtin_arith_overflow (location_t loc, enum built_in_function fcode, + tree ctype = build_complex_type (type); + tree call = build_call_expr_internal_loc (loc, ifn, ctype, 2, + arg0, arg1); +- tree tgt = save_expr (call); ++ tree tgt; ++ if (ovf_only) ++ { ++ tgt = call; ++ intres = NULL_TREE; ++ } ++ else ++ { ++ /* Force SAVE_EXPR even for calls which satisfy tree_invariant_p_1, ++ as while the call itself is const, the REALPART_EXPR store is ++ certainly not. And in any case, we want just one call, ++ not multiple and trying to CSE them later. */ ++ TREE_SIDE_EFFECTS (call) = 1; ++ tgt = save_expr (call); ++ } + intres = build1_loc (loc, REALPART_EXPR, type, tgt); + ovfres = build1_loc (loc, IMAGPART_EXPR, type, tgt); + ovfres = fold_convert_loc (loc, boolean_type_node, ovfres); +--- a/src/gcc/c-family/ChangeLog ++++ b/src/gcc/c-family/ChangeLog +@@ -1,3 +1,13 @@ ++2024-06-17 Jakub Jelinek ++ ++ Backported from master: ++ 2024-06-17 Jakub Jelinek ++ ++ PR c/115290 ++ * c-warn.cc (do_warn_array_compare): Use %E rather than %D for ++ printing op0 and op1; if those operands aren't decls, also print ++ parens around them. ++ + 2024-05-21 Release Manager + + * GCC 13.3.0 released. +--- a/src/gcc/c-family/c-warn.cc ++++ b/src/gcc/c-family/c-warn.cc +@@ -3827,11 +3827,16 @@ do_warn_array_compare (location_t location, tree_code code, tree op0, tree op1) + /* C doesn't allow +arr. */ + if (c_dialect_cxx ()) + inform (location, "use unary %<+%> which decays operands to pointers " +- "or %<&%D[0] %s &%D[0]%> to compare the addresses", +- op0, op_symbol_code (code), op1); ++ "or %<&%s%E%s[0] %s &%s%E%s[0]%> to compare the addresses", ++ DECL_P (op0) ? "" : "(", op0, DECL_P (op0) ? "" : ")", ++ op_symbol_code (code), ++ DECL_P (op1) ? "" : "(", op1, DECL_P (op1) ? "" : ")"); + else +- inform (location, "use %<&%D[0] %s &%D[0]%> to compare the addresses", +- op0, op_symbol_code (code), op1); ++ inform (location, ++ "use %<&%s%E%s[0] %s &%s%E%s[0]%> to compare the addresses", ++ DECL_P (op0) ? "" : "(", op0, DECL_P (op0) ? "" : ")", ++ op_symbol_code (code), ++ DECL_P (op1) ? "" : "(", op1, DECL_P (op1) ? "" : ")"); + } + } + +--- a/src/gcc/c/ChangeLog ++++ b/src/gcc/c/ChangeLog +@@ -1,3 +1,13 @@ ++2024-06-11 Jakub Jelinek ++ ++ Backported from master: ++ 2024-06-06 Jakub Jelinek ++ ++ PR c/114493 ++ * c-decl.cc (c_fixup_may_alias): New function. ++ (finish_struct): Call it if "may_alias" attribute is ++ specified. ++ + 2024-05-21 Release Manager + + * GCC 13.3.0 released. +--- a/src/gcc/c/c-decl.cc ++++ b/src/gcc/c/c-decl.cc +@@ -9115,6 +9115,17 @@ is_flexible_array_member_p (bool is_last_field, + } + + ++/* TYPE is a struct or union that we're applying may_alias to after the body is ++ parsed. Fixup any POINTER_TO types. */ ++ ++static void ++c_fixup_may_alias (tree type) ++{ ++ for (tree t = TYPE_POINTER_TO (type); t; t = TYPE_NEXT_PTR_TO (t)) ++ for (tree v = TYPE_MAIN_VARIANT (t); v; v = TYPE_NEXT_VARIANT (v)) ++ TYPE_REF_CAN_ALIAS_ALL (v) = true; ++} ++ + /* Fill in the fields of a RECORD_TYPE or UNION_TYPE node, T. + LOC is the location of the RECORD_TYPE or UNION_TYPE's definition. + FIELDLIST is a chain of FIELD_DECL nodes for the fields. +@@ -9409,6 +9420,10 @@ finish_struct (location_t loc, tree t, tree fieldlist, tree attributes, + warning_at (loc, 0, "union cannot be made transparent"); + } + ++ if (lookup_attribute ("may_alias", TYPE_ATTRIBUTES (t))) ++ for (x = TYPE_MAIN_VARIANT (t); x; x = TYPE_NEXT_VARIANT (x)) ++ c_fixup_may_alias (x); ++ + tree incomplete_vars = C_TYPE_INCOMPLETE_VARS (TYPE_MAIN_VARIANT (t)); + for (x = TYPE_MAIN_VARIANT (t); x; x = TYPE_NEXT_VARIANT (x)) + { +--- a/src/gcc/combine.cc ++++ b/src/gcc/combine.cc +@@ -11801,8 +11801,10 @@ simplify_compare_const (enum rtx_code code, machine_mode mode, + `and'ed with that bit), we can replace this with a comparison + with zero. */ + if (const_op +- && (code == EQ || code == NE || code == GE || code == GEU +- || code == LT || code == LTU) ++ && (code == EQ || code == NE || code == GEU || code == LTU ++ /* This optimization is incorrect for signed >= INT_MIN or ++ < INT_MIN, those are always true or always false. */ ++ || ((code == GE || code == LT) && const_op > 0)) + && is_a (mode, &int_mode) + && GET_MODE_PRECISION (int_mode) - 1 < HOST_BITS_PER_WIDE_INT + && pow2p_hwi (const_op & GET_MODE_MASK (int_mode)) +--- a/src/gcc/common/config/aarch64/aarch64-common.cc ++++ b/src/gcc/common/config/aarch64/aarch64-common.cc +@@ -310,6 +310,7 @@ aarch64_get_extension_string_for_isa_flags + But in order to make the output more readable, it seems better + to add the strings in definition order. */ + aarch64_feature_flags added = 0; ++ auto flags_crypto = AARCH64_FL_AES | AARCH64_FL_SHA2; + for (unsigned int i = ARRAY_SIZE (all_extensions); i-- > 0; ) + { + auto &opt = all_extensions[i]; +@@ -319,7 +320,7 @@ aarch64_get_extension_string_for_isa_flags + per-feature crypto flags. */ + auto flags = opt.flag_canonical; + if (flags == AARCH64_FL_CRYPTO) +- flags = AARCH64_FL_AES | AARCH64_FL_SHA2; ++ flags = flags_crypto; + + if ((flags & isa_flags & (explicit_flags | ~current_flags)) == flags) + { +@@ -338,14 +339,32 @@ aarch64_get_extension_string_for_isa_flags + not have an HWCAPs then it shouldn't be taken into account for feature + detection because one way or another we can't tell if it's available + or not. */ ++ + for (auto &opt : all_extensions) +- if (opt.native_detect_p +- && (opt.flag_canonical & current_flags & ~isa_flags)) +- { +- current_flags &= ~opt.flags_off; +- outstr += "+no"; +- outstr += opt.name; +- } ++ { ++ auto flags = opt.flag_canonical; ++ /* As a special case, don't emit "+noaes" or "+nosha2" when we could emit ++ "+nocrypto" instead, in order to support assemblers that predate the ++ separate per-feature crypto flags. Only allow "+nocrypto" when "sm4" ++ is not already enabled (to avoid dependending on whether "+nocrypto" ++ also disables "sm4"). */ ++ if (flags & flags_crypto ++ && (flags_crypto & current_flags & ~isa_flags) == flags_crypto ++ && !(current_flags & AARCH64_FL_SM4)) ++ continue; ++ ++ if (flags == AARCH64_FL_CRYPTO) ++ /* If either crypto flag needs removing here, then both do. */ ++ flags = flags_crypto; ++ ++ if (opt.native_detect_p ++ && (flags & current_flags & ~isa_flags)) ++ { ++ current_flags &= ~opt.flags_off; ++ outstr += "+no"; ++ outstr += opt.name; ++ } ++ } + + return outstr; + } +--- a/src/gcc/config/aarch64/aarch64-c.cc ++++ b/src/gcc/config/aarch64/aarch64-c.cc +@@ -139,7 +139,7 @@ aarch64_update_cpp_builtins (cpp_reader *pfile) + aarch64_def_or_undef (TARGET_ILP32, "_ILP32", pfile); + aarch64_def_or_undef (TARGET_ILP32, "__ILP32__", pfile); + +- aarch64_def_or_undef (TARGET_CRYPTO, "__ARM_FEATURE_CRYPTO", pfile); ++ aarch64_def_or_undef (TARGET_AES && TARGET_SHA2, "__ARM_FEATURE_CRYPTO", pfile); + aarch64_def_or_undef (TARGET_SIMD_RDMA, "__ARM_FEATURE_QRDMX", pfile); + aarch64_def_or_undef (TARGET_SVE, "__ARM_FEATURE_SVE", pfile); + cpp_undef (pfile, "__ARM_FEATURE_SVE_BITS"); +@@ -202,6 +202,11 @@ aarch64_update_cpp_builtins (cpp_reader *pfile) + "__ARM_FEATURE_BF16_VECTOR_ARITHMETIC", pfile); + aarch64_def_or_undef (TARGET_BF16_FP, + "__ARM_FEATURE_BF16_SCALAR_ARITHMETIC", pfile); ++ aarch64_def_or_undef (TARGET_BF16_FP, ++ "__ARM_FEATURE_BF16", pfile); ++ aarch64_def_or_undef (TARGET_SVE_BF16, ++ "__ARM_FEATURE_SVE_BF16", pfile); ++ + aarch64_def_or_undef (TARGET_LS64, + "__ARM_FEATURE_LS64", pfile); + aarch64_def_or_undef (AARCH64_ISA_RCPC, "__ARM_FEATURE_RCPC", pfile); +--- a/src/gcc/config/aarch64/aarch64-cores.def ++++ b/src/gcc/config/aarch64/aarch64-cores.def +@@ -182,6 +182,8 @@ AARCH64_CORE("neoverse-n2", neoversen2, cortexa57, V9A, (I8MM, BF16, SVE2_BITPER + AARCH64_CORE("cobalt-100", cobalt100, cortexa57, V9A, (I8MM, BF16, SVE2_BITPERM, RNG, MEMTAG, PROFILE), neoversen2, 0x6d, 0xd49, -1) + + AARCH64_CORE("neoverse-v2", neoversev2, cortexa57, V9A, (I8MM, BF16, SVE2_BITPERM, RNG, MEMTAG, PROFILE), neoversev2, 0x41, 0xd4f, -1) ++AARCH64_CORE("grace", grace, cortexa57, V9A, (I8MM, BF16, CRYPTO, SVE2_BITPERM, SVE2_AES, SVE2_SHA3, SVE2_SM4, PROFILE), neoversev2, 0x41, 0xd4f, -1) ++ + AARCH64_CORE("demeter", demeter, cortexa57, V9A, (I8MM, BF16, SVE2_BITPERM, RNG, MEMTAG, PROFILE), neoversev2, 0x41, 0xd4f, -1) + + #undef AARCH64_CORE +--- a/src/gcc/config/aarch64/aarch64-sve-builtins-base.cc ++++ b/src/gcc/config/aarch64/aarch64-sve-builtins-base.cc +@@ -496,15 +496,22 @@ public: + expand (function_expander &e) const override + { + machine_mode mode = e.vector_mode (0); +- if (e.pred == PRED_x) +- { +- /* The pattern for CNOT includes an UNSPEC_PRED_Z, so needs +- a ptrue hint. */ +- e.add_ptrue_hint (0, e.gp_mode (0)); +- return e.use_pred_x_insn (code_for_aarch64_pred_cnot (mode)); +- } ++ machine_mode pred_mode = e.gp_mode (0); ++ /* The underlying _x pattern is effectively: ++ ++ dst = src == 0 ? 1 : 0 ++ ++ rather than an UNSPEC_PRED_X. Using this form allows autovec ++ constructs to be matched by combine, but it means that the ++ predicate on the src == 0 comparison must be all-true. + +- return e.use_cond_insn (code_for_cond_cnot (mode), 0); ++ For simplicity, represent other _x operations as fully-defined _m ++ operations rather than using a separate bespoke pattern. */ ++ if (e.pred == PRED_x ++ && gen_lowpart (pred_mode, e.args[0]) == CONSTM1_RTX (pred_mode)) ++ return e.use_pred_x_insn (code_for_aarch64_ptrue_cnot (mode)); ++ return e.use_cond_insn (code_for_cond_cnot (mode), ++ e.pred == PRED_x ? 1 : 0); + } + }; + +@@ -2403,7 +2410,7 @@ public: + version) is through the USDOT instruction but with the second and third + inputs swapped. */ + if (m_su) +- e.rotate_inputs_left (1, 2); ++ e.rotate_inputs_left (1, 3); + /* The ACLE function has the same order requirements as for svdot. + While there's no requirement for the RTL pattern to have the same sort + of order as that for dot_prod, it's easier to read. +--- a/src/gcc/config/aarch64/aarch64-sve.md ++++ b/src/gcc/config/aarch64/aarch64-sve.md +@@ -3225,24 +3225,24 @@ (define_insn_and_split "trunc2" + ;; - CNOT + ;; ------------------------------------------------------------------------- + +-;; Predicated logical inverse. +-(define_expand "@aarch64_pred_cnot" ++;; Logical inverse, predicated with a ptrue. ++(define_expand "@aarch64_ptrue_cnot" + [(set (match_operand:SVE_FULL_I 0 "register_operand") + (unspec:SVE_FULL_I + [(unspec: + [(match_operand: 1 "register_operand") +- (match_operand:SI 2 "aarch64_sve_ptrue_flag") ++ (const_int SVE_KNOWN_PTRUE) + (eq: +- (match_operand:SVE_FULL_I 3 "register_operand") +- (match_dup 4))] ++ (match_operand:SVE_FULL_I 2 "register_operand") ++ (match_dup 3))] + UNSPEC_PRED_Z) +- (match_dup 5) +- (match_dup 4)] ++ (match_dup 4) ++ (match_dup 3)] + UNSPEC_SEL))] + "TARGET_SVE" + { +- operands[4] = CONST0_RTX (mode); +- operands[5] = CONST1_RTX (mode); ++ operands[3] = CONST0_RTX (mode); ++ operands[4] = CONST1_RTX (mode); + } + ) + +@@ -3251,7 +3251,7 @@ (define_insn "*cnot" + (unspec:SVE_I + [(unspec: + [(match_operand: 1 "register_operand" "Upl, Upl") +- (match_operand:SI 5 "aarch64_sve_ptrue_flag") ++ (const_int SVE_KNOWN_PTRUE) + (eq: + (match_operand:SVE_I 2 "register_operand" "0, w") + (match_operand:SVE_I 3 "aarch64_simd_imm_zero"))] +--- a/src/gcc/config/aarch64/aarch64-tune.md ++++ b/src/gcc/config/aarch64/aarch64-tune.md +@@ -1,5 +1,5 @@ + ;; -*- buffer-read-only: t -*- + ;; Generated automatically by gentune.sh from aarch64-cores.def + (define_attr "tune" +- "cortexa34,cortexa35,cortexa53,cortexa57,cortexa72,cortexa73,thunderx,thunderxt88p1,thunderxt88,octeontx,octeontxt81,octeontxt83,thunderxt81,thunderxt83,ampere1,ampere1a,emag,xgene1,falkor,qdf24xx,exynosm1,phecda,thunderx2t99p1,vulcan,thunderx2t99,cortexa55,cortexa75,cortexa76,cortexa76ae,cortexa77,cortexa78,cortexa78ae,cortexa78c,cortexa65,cortexa65ae,cortexx1,cortexx1c,neoversen1,ares,neoversee1,octeontx2,octeontx2t98,octeontx2t96,octeontx2t93,octeontx2f95,octeontx2f95n,octeontx2f95mm,a64fx,tsv110,thunderx3t110,neoversev1,zeus,neoverse512tvb,saphira,cortexa57cortexa53,cortexa72cortexa53,cortexa73cortexa35,cortexa73cortexa53,cortexa75cortexa55,cortexa76cortexa55,cortexr82,cortexa510,cortexa710,cortexa715,cortexx2,cortexx3,neoversen2,cobalt100,neoversev2,demeter" ++ "cortexa34,cortexa35,cortexa53,cortexa57,cortexa72,cortexa73,thunderx,thunderxt88p1,thunderxt88,octeontx,octeontxt81,octeontxt83,thunderxt81,thunderxt83,ampere1,ampere1a,emag,xgene1,falkor,qdf24xx,exynosm1,phecda,thunderx2t99p1,vulcan,thunderx2t99,cortexa55,cortexa75,cortexa76,cortexa76ae,cortexa77,cortexa78,cortexa78ae,cortexa78c,cortexa65,cortexa65ae,cortexx1,cortexx1c,neoversen1,ares,neoversee1,octeontx2,octeontx2t98,octeontx2t96,octeontx2t93,octeontx2f95,octeontx2f95n,octeontx2f95mm,a64fx,tsv110,thunderx3t110,neoversev1,zeus,neoverse512tvb,saphira,cortexa57cortexa53,cortexa72cortexa53,cortexa73cortexa35,cortexa73cortexa53,cortexa75cortexa55,cortexa76cortexa55,cortexr82,cortexa510,cortexa710,cortexa715,cortexx2,cortexx3,neoversen2,cobalt100,neoversev2,grace,demeter" + (const (symbol_ref "((enum attr_tune) aarch64_tune)"))) +--- a/src/gcc/config/aarch64/aarch64.cc ++++ b/src/gcc/config/aarch64/aarch64.cc +@@ -24897,27 +24897,23 @@ aarch64_expand_cpymem (rtx *operands) + int mode_bits; + rtx dst = operands[0]; + rtx src = operands[1]; ++ unsigned align = UINTVAL (operands[3]); + rtx base; + machine_mode cur_mode = BLKmode; ++ bool size_p = optimize_function_for_size_p (cfun); + +- /* Variable-sized memcpy can go through the MOPS expansion if available. */ +- if (!CONST_INT_P (operands[2])) ++ /* Variable-sized or strict-align copies may use the MOPS expansion. */ ++ if (!CONST_INT_P (operands[2]) || (STRICT_ALIGNMENT && align < 16)) + return aarch64_expand_cpymem_mops (operands); + +- unsigned HOST_WIDE_INT size = INTVAL (operands[2]); +- +- /* Try to inline up to 256 bytes or use the MOPS threshold if available. */ +- unsigned HOST_WIDE_INT max_copy_size +- = TARGET_MOPS ? aarch64_mops_memcpy_size_threshold : 256; ++ unsigned HOST_WIDE_INT size = UINTVAL (operands[2]); + +- bool size_p = optimize_function_for_size_p (cfun); ++ /* Try to inline up to 256 bytes. */ ++ unsigned max_copy_size = 256; ++ unsigned mops_threshold = aarch64_mops_memcpy_size_threshold; + +- /* Large constant-sized cpymem should go through MOPS when possible. +- It should be a win even for size optimization in the general case. +- For speed optimization the choice between MOPS and the SIMD sequence +- depends on the size of the copy, rather than number of instructions, +- alignment etc. */ +- if (size > max_copy_size) ++ /* Large copies use MOPS when available or a library call. */ ++ if (size > max_copy_size || (TARGET_MOPS && size > mops_threshold)) + return aarch64_expand_cpymem_mops (operands); + + int copy_bits = 256; +@@ -25081,12 +25077,13 @@ aarch64_expand_setmem (rtx *operands) + unsigned HOST_WIDE_INT len; + rtx dst = operands[0]; + rtx val = operands[2], src; ++ unsigned align = UINTVAL (operands[3]); + rtx base; + machine_mode cur_mode = BLKmode, next_mode; + +- /* If we don't have SIMD registers or the size is variable use the MOPS +- inlined sequence if possible. */ +- if (!CONST_INT_P (operands[1]) || !TARGET_SIMD) ++ /* Variable-sized or strict-align memset may use the MOPS expansion. */ ++ if (!CONST_INT_P (operands[1]) || !TARGET_SIMD ++ || (STRICT_ALIGNMENT && align < 16)) + return aarch64_expand_setmem_mops (operands); + + bool size_p = optimize_function_for_size_p (cfun); +@@ -25094,10 +25091,13 @@ aarch64_expand_setmem (rtx *operands) + /* Default the maximum to 256-bytes when considering only libcall vs + SIMD broadcast sequence. */ + unsigned max_set_size = 256; ++ unsigned mops_threshold = aarch64_mops_memset_size_threshold; + +- len = INTVAL (operands[1]); +- if (len > max_set_size && !TARGET_MOPS) +- return false; ++ len = UINTVAL (operands[1]); ++ ++ /* Large memset uses MOPS when available or a library call. */ ++ if (len > max_set_size || (TARGET_MOPS && len > mops_threshold)) ++ return aarch64_expand_setmem_mops (operands); + + int cst_val = !!(CONST_INT_P (val) && (INTVAL (val) != 0)); + /* The MOPS sequence takes: +@@ -25110,12 +25110,6 @@ aarch64_expand_setmem (rtx *operands) + the arguments + 1 for the call. */ + unsigned libcall_cost = 4; + +- /* Upper bound check. For large constant-sized setmem use the MOPS sequence +- when available. */ +- if (TARGET_MOPS +- && len >= (unsigned HOST_WIDE_INT) aarch64_mops_memset_size_threshold) +- return aarch64_expand_setmem_mops (operands); +- + /* Attempt a sequence with a vector broadcast followed by stores. + Count the number of operations involved to see if it's worth it + against the alternatives. A simple counter simd_ops on the +@@ -25157,10 +25151,8 @@ aarch64_expand_setmem (rtx *operands) + simd_ops++; + n -= mode_bits; + +- /* Do certain trailing copies as overlapping if it's going to be +- cheaper. i.e. less instructions to do so. For instance doing a 15 +- byte copy it's more efficient to do two overlapping 8 byte copies than +- 8 + 4 + 2 + 1. Only do this when -mstrict-align is not supplied. */ ++ /* Emit trailing writes using overlapping unaligned accesses ++ (when !STRICT_ALIGNMENT) - this is smaller and faster. */ + if (n > 0 && n < copy_limit / 2 && !STRICT_ALIGNMENT) + { + next_mode = smallest_mode_for_size (n, MODE_INT); +--- a/src/gcc/config/aarch64/aarch64.h ++++ b/src/gcc/config/aarch64/aarch64.h +@@ -177,10 +177,13 @@ enum class aarch64_feature : unsigned char { + + #endif + +-/* Macros to test ISA flags. */ ++/* Macros to test ISA flags. ++ ++ There is intentionally no macro for AARCH64_FL_CRYPTO, since this flag bit ++ is not always set when its constituent features are present. ++ Check (TARGET_AES && TARGET_SHA2) instead. */ + + #define AARCH64_ISA_CRC (aarch64_isa_flags & AARCH64_FL_CRC) +-#define AARCH64_ISA_CRYPTO (aarch64_isa_flags & AARCH64_FL_CRYPTO) + #define AARCH64_ISA_FP (aarch64_isa_flags & AARCH64_FL_FP) + #define AARCH64_ISA_SIMD (aarch64_isa_flags & AARCH64_FL_SIMD) + #define AARCH64_ISA_LSE (aarch64_isa_flags & AARCH64_FL_LSE) +@@ -224,9 +227,6 @@ enum class aarch64_feature : unsigned char { + #define AARCH64_ISA_CSSC (aarch64_isa_flags & AARCH64_FL_CSSC) + #define AARCH64_ISA_RCPC (aarch64_isa_flags & AARCH64_FL_RCPC) + +-/* Crypto is an optional extension to AdvSIMD. */ +-#define TARGET_CRYPTO (AARCH64_ISA_CRYPTO) +- + /* SHA2 is an optional extension to AdvSIMD. */ + #define TARGET_SHA2 (AARCH64_ISA_SHA2) + +--- a/src/gcc/config/aarch64/aarch64.md ++++ b/src/gcc/config/aarch64/aarch64.md +@@ -1659,7 +1659,7 @@ (define_expand "cpymemdi" + (match_operand:BLK 1 "memory_operand") + (match_operand:DI 2 "general_operand") + (match_operand:DI 3 "immediate_operand")] +- "!STRICT_ALIGNMENT || TARGET_MOPS" ++ "" + { + if (aarch64_expand_cpymem (operands)) + DONE; +@@ -1756,7 +1756,7 @@ (define_expand "setmemdi" + (match_operand:QI 2 "nonmemory_operand")) ;; Value + (use (match_operand:DI 1 "general_operand")) ;; Length + (match_operand 3 "immediate_operand")] ;; Align +- "TARGET_SIMD || TARGET_MOPS" ++ "" + { + if (aarch64_expand_setmem (operands)) + DONE; +--- a/src/gcc/config/alpha/alpha.md ++++ b/src/gcc/config/alpha/alpha.md +@@ -756,7 +756,8 @@ (define_expand "si3" + (sign_extend:DI (match_operand:SI 2 "nonimmediate_operand"))) + (parallel [(set (match_dup 5) + (sign_extend:DI +- (any_divmod:SI (match_dup 3) (match_dup 4)))) ++ (any_divmod:SI (truncate:SI (match_dup 3)) ++ (truncate:SI (match_dup 4))))) + (clobber (reg:DI 23)) + (clobber (reg:DI 28))]) + (set (match_operand:SI 0 "nonimmediate_operand") +@@ -782,9 +783,10 @@ (define_expand "di3" + + (define_insn_and_split "*divmodsi_internal_er" + [(set (match_operand:DI 0 "register_operand" "=c") +- (sign_extend:DI (match_operator:SI 3 "divmod_operator" +- [(match_operand:DI 1 "register_operand" "a") +- (match_operand:DI 2 "register_operand" "b")]))) ++ (sign_extend:DI ++ (match_operator:SI 3 "divmod_operator" ++ [(truncate:SI (match_operand:DI 1 "register_operand" "a")) ++ (truncate:SI (match_operand:DI 2 "register_operand" "b"))]))) + (clobber (reg:DI 23)) + (clobber (reg:DI 28))] + "TARGET_EXPLICIT_RELOCS && TARGET_ABI_OSF" +@@ -826,8 +828,8 @@ (define_insn_and_split "*divmodsi_internal_er" + (define_insn "*divmodsi_internal_er_1" + [(set (match_operand:DI 0 "register_operand" "=c") + (sign_extend:DI (match_operator:SI 3 "divmod_operator" +- [(match_operand:DI 1 "register_operand" "a") +- (match_operand:DI 2 "register_operand" "b")]))) ++ [(truncate:SI (match_operand:DI 1 "register_operand" "a")) ++ (truncate:SI (match_operand:DI 2 "register_operand" "b"))]))) + (use (match_operand:DI 4 "register_operand" "c")) + (use (match_operand 5 "const_int_operand")) + (clobber (reg:DI 23)) +@@ -839,9 +841,10 @@ (define_insn "*divmodsi_internal_er_1" + + (define_insn "*divmodsi_internal" + [(set (match_operand:DI 0 "register_operand" "=c") +- (sign_extend:DI (match_operator:SI 3 "divmod_operator" +- [(match_operand:DI 1 "register_operand" "a") +- (match_operand:DI 2 "register_operand" "b")]))) ++ (sign_extend:DI ++ (match_operator:SI 3 "divmod_operator" ++ [(truncate:SI (match_operand:DI 1 "register_operand" "a")) ++ (truncate:SI (match_operand:DI 2 "register_operand" "b"))]))) + (clobber (reg:DI 23)) + (clobber (reg:DI 28))] + "TARGET_ABI_OSF" +@@ -3930,7 +3933,8 @@ (define_insn "movdi_er_high_g" + else + return "ldq %0,%2(%1)\t\t!literal!%3"; + } +- [(set_attr "type" "ldsym")]) ++ [(set_attr "type" "ldsym") ++ (set_attr "cannot_copy" "true")]) + + (define_split + [(set (match_operand:DI 0 "register_operand") +@@ -3954,7 +3958,8 @@ (define_insn "movdi_er_tlsgd" + return "lda %0,%2(%1)\t\t!tlsgd"; + else + return "lda %0,%2(%1)\t\t!tlsgd!%3"; +-}) ++} ++ [(set_attr "cannot_copy" "true")]) + + (define_insn "movdi_er_tlsldm" + [(set (match_operand:DI 0 "register_operand" "=r") +@@ -3967,7 +3972,8 @@ (define_insn "movdi_er_tlsldm" + return "lda %0,%&(%1)\t\t!tlsldm"; + else + return "lda %0,%&(%1)\t\t!tlsldm!%2"; +-}) ++} ++ [(set_attr "cannot_copy" "true")]) + + (define_insn "*movdi_er_gotdtp" + [(set (match_operand:DI 0 "register_operand" "=r") +@@ -5936,6 +5942,7 @@ (define_insn "call_value_osf_" + "HAVE_AS_TLS" + "ldq $27,%1($29)\t\t!literal!%2\;jsr $26,($27),%1\t\t!lituse_!%2\;ldah $29,0($26)\t\t!gpdisp!%*\;lda $29,0($29)\t\t!gpdisp!%*" + [(set_attr "type" "jsr") ++ (set_attr "cannot_copy" "true") + (set_attr "length" "16")]) + + ;; We must use peep2 instead of a split because we need accurate life +--- a/src/gcc/config/alpha/constraints.md ++++ b/src/gcc/config/alpha/constraints.md +@@ -27,7 +27,7 @@ (define_register_constraint "a" "R24_REG" + "General register 24, input to division routine") + + (define_register_constraint "b" "R25_REG" +- "General register 24, input to division routine") ++ "General register 25, input to division routine") + + (define_register_constraint "c" "R27_REG" + "General register 27, function call address") +--- a/src/gcc/config/arm/arm.cc ++++ b/src/gcc/config/arm/arm.cc +@@ -19143,17 +19143,25 @@ cmse_nonsecure_call_inline_register_clear (void) + || TREE_CODE (ret_type) == BOOLEAN_TYPE) + && known_lt (GET_MODE_SIZE (TYPE_MODE (ret_type)), 4)) + { +- machine_mode ret_mode = TYPE_MODE (ret_type); ++ rtx ret_reg = gen_rtx_REG (TYPE_MODE (ret_type), R0_REGNUM); ++ rtx si_reg = gen_rtx_REG (SImode, R0_REGNUM); + rtx extend; + if (TYPE_UNSIGNED (ret_type)) +- extend = gen_rtx_ZERO_EXTEND (SImode, +- gen_rtx_REG (ret_mode, R0_REGNUM)); ++ extend = gen_rtx_SET (si_reg, gen_rtx_ZERO_EXTEND (SImode, ++ ret_reg)); + else +- extend = gen_rtx_SIGN_EXTEND (SImode, +- gen_rtx_REG (ret_mode, R0_REGNUM)); +- emit_insn_after (gen_rtx_SET (gen_rtx_REG (SImode, R0_REGNUM), +- extend), insn); +- ++ { ++ /* Signed-extension is a special case because of ++ thumb1_extendhisi2. */ ++ if (TARGET_THUMB1 ++ && known_eq (GET_MODE_SIZE (TYPE_MODE (ret_type)), 2)) ++ extend = gen_thumb1_extendhisi2 (si_reg, ret_reg); ++ else ++ extend = gen_rtx_SET (si_reg, ++ gen_rtx_SIGN_EXTEND (SImode, ++ ret_reg)); ++ } ++ emit_insn_after (extend, insn); + } + + +@@ -27172,6 +27180,58 @@ thumb1_expand_prologue (void) + live_regs_mask = offsets->saved_regs_mask; + lr_needs_saving = live_regs_mask & (1 << LR_REGNUM); + ++ /* The AAPCS requires the callee to widen integral types narrower ++ than 32 bits to the full width of the register; but when handling ++ calls to non-secure space, we cannot trust the callee to have ++ correctly done so. So forcibly re-widen the result here. */ ++ if (IS_CMSE_ENTRY (func_type)) ++ { ++ function_args_iterator args_iter; ++ CUMULATIVE_ARGS args_so_far_v; ++ cumulative_args_t args_so_far; ++ bool first_param = true; ++ tree arg_type; ++ tree fndecl = current_function_decl; ++ tree fntype = TREE_TYPE (fndecl); ++ arm_init_cumulative_args (&args_so_far_v, fntype, NULL_RTX, fndecl); ++ args_so_far = pack_cumulative_args (&args_so_far_v); ++ FOREACH_FUNCTION_ARGS (fntype, arg_type, args_iter) ++ { ++ rtx arg_rtx; ++ ++ if (VOID_TYPE_P (arg_type)) ++ break; ++ ++ function_arg_info arg (arg_type, /*named=*/true); ++ if (!first_param) ++ /* We should advance after processing the argument and pass ++ the argument we're advancing past. */ ++ arm_function_arg_advance (args_so_far, arg); ++ first_param = false; ++ arg_rtx = arm_function_arg (args_so_far, arg); ++ gcc_assert (REG_P (arg_rtx)); ++ if ((TREE_CODE (arg_type) == INTEGER_TYPE ++ || TREE_CODE (arg_type) == ENUMERAL_TYPE ++ || TREE_CODE (arg_type) == BOOLEAN_TYPE) ++ && known_lt (GET_MODE_SIZE (GET_MODE (arg_rtx)), 4)) ++ { ++ rtx res_reg = gen_rtx_REG (SImode, REGNO (arg_rtx)); ++ if (TYPE_UNSIGNED (arg_type)) ++ emit_set_insn (res_reg, gen_rtx_ZERO_EXTEND (SImode, arg_rtx)); ++ else ++ { ++ /* Signed-extension is a special case because of ++ thumb1_extendhisi2. */ ++ if (known_eq (GET_MODE_SIZE (GET_MODE (arg_rtx)), 2)) ++ emit_insn (gen_thumb1_extendhisi2 (res_reg, arg_rtx)); ++ else ++ emit_set_insn (res_reg, ++ gen_rtx_SIGN_EXTEND (SImode, arg_rtx)); ++ } ++ } ++ } ++ } ++ + /* Extract a mask of the ones we can give to the Thumb's push instruction. */ + l_mask = live_regs_mask & 0x40ff; + /* Then count how many other high registers will need to be pushed. */ +--- a/src/gcc/config/arm/mve.md ++++ b/src/gcc/config/arm/mve.md +@@ -10166,7 +10166,7 @@ (define_insn "mve_vec_setv2di_internal" + if (elt == 0) + return "vmov\t%e0, %Q1, %R1"; + else +- return "vmov\t%f0, %J1, %K1"; ++ return "vmov\t%f0, %Q1, %R1"; + } + [(set_attr "type" "mve_move")]) + +--- a/src/gcc/config/avr/avr-dimode.md ++++ b/src/gcc/config/avr/avr-dimode.md +@@ -62,8 +62,8 @@ (define_mode_iterator ALL8S [ DQ DA TA]) + ;; "addta3" "adduta3" + (define_expand "add3" + [(parallel [(match_operand:ALL8 0 "general_operand" "") +- (match_operand:ALL8 1 "general_operand" "") +- (match_operand:ALL8 2 "general_operand" "")])] ++ (match_operand:ALL8 1 "nop_general_operand") ++ (match_operand:ALL8 2 "nop_general_operand")])] + "avr_have_dimode" + { + rtx acc_a = gen_rtx_REG (mode, ACC_A); +@@ -178,8 +178,8 @@ (define_insn "*add3_const_insn" + ;; "subta3" "subuta3" + (define_expand "sub3" + [(parallel [(match_operand:ALL8 0 "general_operand" "") +- (match_operand:ALL8 1 "general_operand" "") +- (match_operand:ALL8 2 "general_operand" "")])] ++ (match_operand:ALL8 1 "nop_general_operand") ++ (match_operand:ALL8 2 "nop_general_operand")])] + "avr_have_dimode" + { + rtx acc_a = gen_rtx_REG (mode, ACC_A); +@@ -259,8 +259,8 @@ (define_insn "*sub3_const_insn" + + (define_expand "3" + [(set (match_operand:ALL8S 0 "general_operand" "") +- (ss_addsub:ALL8S (match_operand:ALL8S 1 "general_operand" "") +- (match_operand:ALL8S 2 "general_operand" "")))] ++ (ss_addsub:ALL8S (match_operand:ALL8S 1 "nop_general_operand") ++ (match_operand:ALL8S 2 "nop_general_operand")))] + "avr_have_dimode" + { + rtx acc_a = gen_rtx_REG (mode, ACC_A); +@@ -332,8 +332,8 @@ (define_insn "*3_const_insn" + + (define_expand "3" + [(set (match_operand:ALL8U 0 "general_operand" "") +- (us_addsub:ALL8U (match_operand:ALL8U 1 "general_operand" "") +- (match_operand:ALL8U 2 "general_operand" "")))] ++ (us_addsub:ALL8U (match_operand:ALL8U 1 "nop_general_operand") ++ (match_operand:ALL8U 2 "nop_general_operand")))] + "avr_have_dimode" + { + rtx acc_a = gen_rtx_REG (mode, ACC_A); +@@ -405,7 +405,7 @@ (define_insn "*3_const_insn" + + (define_expand "negdi2" + [(parallel [(match_operand:DI 0 "general_operand" "") +- (match_operand:DI 1 "general_operand" "")])] ++ (match_operand:DI 1 "nop_general_operand")])] + "avr_have_dimode" + { + rtx acc_a = gen_rtx_REG (DImode, ACC_A); +@@ -602,8 +602,8 @@ (define_code_iterator di_shifts + ;; "ashluta3" "ashruta3" "lshruta3" "rotluta3" + (define_expand "3" + [(parallel [(match_operand:ALL8 0 "general_operand" "") +- (di_shifts:ALL8 (match_operand:ALL8 1 "general_operand" "") +- (match_operand:QI 2 "general_operand" ""))])] ++ (di_shifts:ALL8 (match_operand:ALL8 1 "nop_general_operand") ++ (match_operand:QI 2 "nop_general_operand"))])] + "avr_have_dimode" + { + rtx acc_a = gen_rtx_REG (mode, ACC_A); +@@ -648,8 +648,8 @@ (define_insn "*3_insn" + ;; "mulsidi3" + (define_expand "mulsidi3" + [(parallel [(match_operand:DI 0 "register_operand" "") +- (match_operand:SI 1 "general_operand" "") +- (match_operand:SI 2 "general_operand" "") ++ (match_operand:SI 1 "nop_general_operand") ++ (match_operand:SI 2 "nop_general_operand") + ;; Just to mention the iterator + (clobber (any_extend:SI (match_dup 1)))])] + "avr_have_dimode +--- a/src/gcc/config/avr/avr-protos.h ++++ b/src/gcc/config/avr/avr-protos.h +@@ -108,7 +108,7 @@ extern const char* avr_out_lpm (rtx_insn *, rtx*, int*); + extern void avr_notice_update_cc (rtx body, rtx_insn *insn); + extern int reg_unused_after (rtx_insn *insn, rtx reg); + extern int _reg_unused_after (rtx_insn *insn, rtx reg); +-extern int avr_jump_mode (rtx x, rtx_insn *insn); ++extern int avr_jump_mode (rtx x, rtx_insn *insn, int = 0); + extern int test_hard_reg_class (enum reg_class rclass, rtx x); + extern int jump_over_one_insn_p (rtx_insn *insn, rtx dest); + +--- a/src/gcc/config/avr/avr.cc ++++ b/src/gcc/config/avr/avr.cc +@@ -3388,19 +3388,22 @@ avr_use_by_pieces_infrastructure_p (unsigned HOST_WIDE_INT size, + /* Choose mode for jump insn: + 1 - relative jump in range -63 <= x <= 62 ; + 2 - relative jump in range -2046 <= x <= 2045 ; +- 3 - absolute jump (only for ATmega[16]03). */ ++ 3 - absolute jump (only when we have JMP / CALL). ++ ++ When jumping backwards, assume the jump offset is EXTRA words ++ bigger than inferred from insn addresses. */ + + int +-avr_jump_mode (rtx x, rtx_insn *insn) ++avr_jump_mode (rtx x, rtx_insn *insn, int extra) + { + int dest_addr = INSN_ADDRESSES (INSN_UID (GET_CODE (x) == LABEL_REF + ? XEXP (x, 0) : x)); + int cur_addr = INSN_ADDRESSES (INSN_UID (insn)); + int jump_distance = cur_addr - dest_addr; + +- if (IN_RANGE (jump_distance, -63, 62)) ++ if (IN_RANGE (jump_distance, -63, 62 - extra)) + return 1; +- else if (IN_RANGE (jump_distance, -2046, 2045)) ++ else if (IN_RANGE (jump_distance, -2046, 2045 - extra)) + return 2; + else if (AVR_HAVE_JMP_CALL) + return 3; +@@ -4093,7 +4096,13 @@ avr_out_xload (rtx_insn *insn ATTRIBUTE_UNUSED, rtx *op, int *plen) + xop[2] = lpm_addr_reg_rtx; + xop[3] = AVR_HAVE_LPMX ? op[0] : lpm_reg_rtx; + +- avr_asm_len (AVR_HAVE_LPMX ? "lpm %3,%a2" : "lpm", xop, plen, -1); ++ if (plen) ++ *plen = 0; ++ ++ if (reg_overlap_mentioned_p (xop[3], lpm_addr_reg_rtx)) ++ avr_asm_len ("sbrs %1,7", xop, plen, 1); ++ ++ avr_asm_len (AVR_HAVE_LPMX ? "lpm %3,%a2" : "lpm", xop, plen, 1); + + avr_asm_len ("sbrc %1,7" CR_TAB + "ld %3,%a2", xop, plen, 2); +@@ -4239,13 +4248,30 @@ avr_out_movqi_r_mr_reg_disp_tiny (rtx_insn *insn, rtx op[], int *plen) + rtx dest = op[0]; + rtx src = op[1]; + rtx x = XEXP (src, 0); ++ rtx base = XEXP (x, 0); ++ ++ if (plen) ++ *plen = 0; + +- avr_asm_len (TINY_ADIW (%I1, %J1, %o1) CR_TAB +- "ld %0,%b1" , op, plen, -3); ++ if (!reg_overlap_mentioned_p (dest, base)) ++ { ++ avr_asm_len (TINY_ADIW (%I1, %J1, %o1) CR_TAB ++ "ld %0,%b1", op, plen, 3); ++ if (!reg_unused_after (insn, base)) ++ avr_asm_len (TINY_SBIW (%I1, %J1, %o1), op, plen, 2); ++ } ++ else ++ { ++ // PR98762: The base register overlaps dest and is only partly clobbered. ++ rtx base2 = all_regs_rtx[1 ^ REGNO (dest)]; + +- if (!reg_overlap_mentioned_p (dest, XEXP (x, 0)) +- && !reg_unused_after (insn, XEXP (x, 0))) +- avr_asm_len (TINY_SBIW (%I1, %J1, %o1), op, plen, 2); ++ if (!reg_unused_after (insn, base2)) ++ avr_asm_len ("mov __tmp_reg__,%0" , &base2, plen, 1); ++ avr_asm_len (TINY_ADIW (%I1, %J1, %o1) CR_TAB ++ "ld %0,%b1", op, plen, 3); ++ if (!reg_unused_after (insn, base2)) ++ avr_asm_len ("mov %0,__tmp_reg__" , &base2, plen, 1); ++ } + + return ""; + } +--- a/src/gcc/config/avr/avr.md ++++ b/src/gcc/config/avr/avr.md +@@ -285,6 +285,8 @@ (define_mode_iterator ORDERED234 [HI SI PSI + (define_mode_iterator SPLIT34 [SI SF PSI + SQ USQ SA USA]) + ++(define_mode_iterator SFDF [SF DF]) ++ + ;; Define code iterators + ;; Define two incarnations so that we can build the cartesian product. + (define_code_iterator any_extend [sign_extend zero_extend]) +@@ -716,12 +718,26 @@ (define_expand "mov" + if (!REG_P (addr)) + src = replace_equiv_address (src, copy_to_mode_reg (PSImode, addr)); + ++ rtx dest2 = reg_overlap_mentioned_p (dest, lpm_addr_reg_rtx) ++ ? gen_reg_rtx (mode) ++ : dest; ++ + if (!avr_xload_libgcc_p (mode)) + /* ; No here because gen_xload8_A only iterates over ALL1. + ; insn-emit does not depend on the mode, it's all about operands. */ +- emit_insn (gen_xload8qi_A (dest, src)); ++ emit_insn (gen_xload8qi_A (dest2, src)); + else +- emit_insn (gen_xload_A (dest, src)); ++ { ++ rtx reg_22 = gen_rtx_REG (mode, 22); ++ if (reg_overlap_mentioned_p (dest2, reg_22) ++ || reg_overlap_mentioned_p (dest2, all_regs_rtx[21])) ++ dest2 = gen_reg_rtx (mode); ++ ++ emit_insn (gen_xload_A (dest2, src)); ++ } ++ ++ if (dest2 != dest) ++ emit_move_insn (dest, dest2); + + DONE; + } +@@ -7609,8 +7625,6 @@ (define_peephole ; "*dec-and-branchsi!=-1.d.clobber" + (pc)))] + "dead_or_set_regno_p (insn, REG_CC)" + { +- const char *op; +- int jump_mode; + if (avr_adiw_reg_p (operands[0])) + output_asm_insn ("sbiw %0,1" CR_TAB + "sbc %C0,__zero_reg__" CR_TAB +@@ -7621,8 +7635,8 @@ (define_peephole ; "*dec-and-branchsi!=-1.d.clobber" + "sbc %C0,__zero_reg__" CR_TAB + "sbc %D0,__zero_reg__", operands); + +- jump_mode = avr_jump_mode (operands[2], insn); +- op = ((EQ == ) ^ (jump_mode == 1)) ? "brcc" : "brcs"; ++ int jump_mode = avr_jump_mode (operands[2], insn, 3 - avr_adiw_reg_p (operands[0])); ++ const char *op = ((EQ == ) ^ (jump_mode == 1)) ? "brcc" : "brcs"; + operands[1] = gen_rtx_CONST_STRING (VOIDmode, op); + + switch (jump_mode) +@@ -7652,16 +7666,14 @@ (define_peephole ; "*dec-and-branchhi!=-1" + (pc)))] + "dead_or_set_regno_p (insn, REG_CC)" + { +- const char *op; +- int jump_mode; + if (avr_adiw_reg_p (operands[0])) + output_asm_insn ("sbiw %0,1", operands); + else + output_asm_insn ("subi %A0,1" CR_TAB + "sbc %B0,__zero_reg__", operands); + +- jump_mode = avr_jump_mode (operands[2], insn); +- op = ((EQ == ) ^ (jump_mode == 1)) ? "brcc" : "brcs"; ++ int jump_mode = avr_jump_mode (operands[2], insn, 1 - avr_adiw_reg_p (operands[0])); ++ const char *op = ((EQ == ) ^ (jump_mode == 1)) ? "brcc" : "brcs"; + operands[1] = gen_rtx_CONST_STRING (VOIDmode, op); + + switch (jump_mode) +@@ -7693,16 +7705,14 @@ (define_peephole ; "*dec-and-branchhi!=-1.d.clobber" + (pc)))] + "dead_or_set_regno_p (insn, REG_CC)" + { +- const char *op; +- int jump_mode; + if (avr_adiw_reg_p (operands[0])) + output_asm_insn ("sbiw %0,1", operands); + else + output_asm_insn ("subi %A0,1" CR_TAB + "sbc %B0,__zero_reg__", operands); + +- jump_mode = avr_jump_mode (operands[2], insn); +- op = ((EQ == ) ^ (jump_mode == 1)) ? "brcc" : "brcs"; ++ int jump_mode = avr_jump_mode (operands[2], insn, 1 - avr_adiw_reg_p (operands[0])); ++ const char *op = ((EQ == ) ^ (jump_mode == 1)) ? "brcc" : "brcs"; + operands[1] = gen_rtx_CONST_STRING (VOIDmode, op); + + switch (jump_mode) +@@ -7734,14 +7744,12 @@ (define_peephole ; "*dec-and-branchhi!=-1.l.clobber" + (pc)))] + "dead_or_set_regno_p (insn, REG_CC)" + { +- const char *op; +- int jump_mode; + output_asm_insn ("ldi %3,1" CR_TAB + "sub %A0,%3" CR_TAB + "sbc %B0,__zero_reg__", operands); + +- jump_mode = avr_jump_mode (operands[2], insn); +- op = ((EQ == ) ^ (jump_mode == 1)) ? "brcc" : "brcs"; ++ int jump_mode = avr_jump_mode (operands[2], insn, 2); ++ const char *op = ((EQ == ) ^ (jump_mode == 1)) ? "brcc" : "brcs"; + operands[1] = gen_rtx_CONST_STRING (VOIDmode, op); + + switch (jump_mode) +@@ -9780,6 +9788,20 @@ (define_insn_and_split "*extract.subreg.bit" + operands[4] = GEN_INT (bitno % 8); + }) + ++ ++;; Work around PR115307: Early passes expand isinf/f/l to a bloat. ++;; These passes do not consider costs, and there is no way to ++;; hook in or otherwise disable the generated bloat. ++ ++;; isinfsf2 isinfdf2 ++(define_expand "isinf2" ++ [(parallel [(match_operand:HI 0) ++ (match_operand:SFDF 1)])] ++ "" ++ { ++ FAIL; ++ }) ++ + + ;; Fixed-point instructions + (include "avr-fixed.md") +--- a/src/gcc/config/i386/avx512dqintrin.h ++++ b/src/gcc/config/i386/avx512dqintrin.h +@@ -2800,11 +2800,11 @@ _mm512_fpclass_ps_mask (__m512 __A, const int __imm) + ((__mmask8) __builtin_ia32_fpclasssd_mask ((__v2df) (__m128d) (X), \ + (int) (C), (__mmask8) (-1))) \ + +-#define _mm_mask_fpclass_ss_mask(X, C, U) \ ++#define _mm_mask_fpclass_ss_mask(U, X, C) \ + ((__mmask8) __builtin_ia32_fpclassss_mask ((__v4sf) (__m128) (X), \ + (int) (C), (__mmask8) (U))) + +-#define _mm_mask_fpclass_sd_mask(X, C, U) \ ++#define _mm_mask_fpclass_sd_mask(U, X, C) \ + ((__mmask8) __builtin_ia32_fpclasssd_mask ((__v2df) (__m128d) (X), \ + (int) (C), (__mmask8) (U))) + +@@ -2839,8 +2839,9 @@ _mm512_fpclass_ps_mask (__m512 __A, const int __imm) + (__mmask8)(U))) + + #define _mm_reduce_round_sd(A, B, C, R) \ +- ((__m128d) __builtin_ia32_reducesd_round ((__v2df)(__m128d)(A), \ +- (__v2df)(__m128d)(B), (int)(C), (__mmask8)(U), (int)(R))) ++ ((__m128d) __builtin_ia32_reducesd_mask_round ((__v2df)(__m128d)(A), \ ++ (__v2df)(__m128d)(B), (int)(C), (__v2df) _mm_setzero_pd (), \ ++ (__mmask8)(-1), (int)(R))) + + #define _mm_mask_reduce_round_sd(W, U, A, B, C, R) \ + ((__m128d) __builtin_ia32_reducesd_mask_round ((__v2df)(__m128d)(A), \ +@@ -2867,8 +2868,9 @@ _mm512_fpclass_ps_mask (__m512 __A, const int __imm) + (__mmask8)(U))) + + #define _mm_reduce_round_ss(A, B, C, R) \ +- ((__m128) __builtin_ia32_reducess_round ((__v4sf)(__m128)(A), \ +- (__v4sf)(__m128)(B), (int)(C), (__mmask8)(U), (int)(R))) ++ ((__m128) __builtin_ia32_reducess_mask_round ((__v4sf)(__m128)(A), \ ++ (__v4sf)(__m128)(B), (int)(C), (__v4sf) _mm_setzero_ps (), \ ++ (__mmask8)(-1), (int)(R))) + + #define _mm_mask_reduce_round_ss(W, U, A, B, C, R) \ + ((__m128) __builtin_ia32_reducess_mask_round ((__v4sf)(__m128)(A), \ +@@ -2876,7 +2878,7 @@ _mm512_fpclass_ps_mask (__m512 __A, const int __imm) + (__mmask8)(U), (int)(R))) + + #define _mm_maskz_reduce_round_ss(U, A, B, C, R) \ +- ((__m128) __builtin_ia32_reducesd_mask_round ((__v4sf)(__m128)(A), \ ++ ((__m128) __builtin_ia32_reducess_mask_round ((__v4sf)(__m128)(A), \ + (__v4sf)(__m128)(B), (int)(C), (__v4sf) _mm_setzero_ps (), \ + (__mmask8)(U), (int)(R))) + +--- a/src/gcc/config/i386/avx512fp16intrin.h ++++ b/src/gcc/config/i386/avx512fp16intrin.h +@@ -2322,11 +2322,11 @@ _mm512_fpclass_ph_mask (__m512h __A, const int __imm) + #else + #define _mm512_mask_fpclass_ph_mask(u, x, c) \ + ((__mmask32) __builtin_ia32_fpclassph512_mask ((__v32hf) (__m512h) (x), \ +- (int) (c),(__mmask8)(u))) ++ (int) (c),(__mmask32)(u))) + + #define _mm512_fpclass_ph_mask(x, c) \ + ((__mmask32) __builtin_ia32_fpclassph512_mask ((__v32hf) (__m512h) (x), \ +- (int) (c),(__mmask8)-1)) ++ (int) (c),(__mmask32)-1)) + #endif /* __OPIMTIZE__ */ + + /* Intrinsics vgetexpph, vgetexpsh. */ +--- a/src/gcc/config/i386/avx512vlbwintrin.h ++++ b/src/gcc/config/i386/avx512vlbwintrin.h +@@ -1839,7 +1839,7 @@ _mm_maskz_slli_epi16 (__mmask8 __U, __m128i __A, int __B) + #define _mm256_mask_alignr_epi8(W, U, X, Y, N) \ + ((__m256i) __builtin_ia32_palignr256_mask ((__v4di)(__m256i)(X), \ + (__v4di)(__m256i)(Y), (int)((N) * 8), \ +- (__v4di)(__m256i)(X), (__mmask32)(U))) ++ (__v4di)(__m256i)(W), (__mmask32)(U))) + + #define _mm256_mask_srli_epi16(W, U, A, B) \ + ((__m256i) __builtin_ia32_psrlwi256_mask ((__v16hi)(__m256i)(A), \ +@@ -1922,7 +1922,7 @@ _mm_maskz_slli_epi16 (__mmask8 __U, __m128i __A, int __B) + #define _mm_mask_alignr_epi8(W, U, X, Y, N) \ + ((__m128i) __builtin_ia32_palignr128_mask ((__v2di)(__m128i)(X), \ + (__v2di)(__m128i)(Y), (int)((N) * 8), \ +- (__v2di)(__m128i)(X), (__mmask16)(U))) ++ (__v2di)(__m128i)(W), (__mmask16)(U))) + + #define _mm_maskz_alignr_epi8(U, X, Y, N) \ + ((__m128i) __builtin_ia32_palignr128_mask ((__v2di)(__m128i)(X), \ +--- a/src/gcc/config/i386/avx512vlintrin.h ++++ b/src/gcc/config/i386/avx512vlintrin.h +@@ -13609,7 +13609,7 @@ _mm256_permutex_pd (__m256d __X, const int __M) + + #define _mm_mask_alignr_epi64(W, U, X, Y, C) \ + ((__m128i)__builtin_ia32_alignq128_mask ((__v2di)(__m128i)(X), \ +- (__v2di)(__m128i)(Y), (int)(C), (__v2di)(__m128i)(X), (__mmask8)-1)) ++ (__v2di)(__m128i)(Y), (int)(C), (__v2di)(__m128i)(W), (__mmask8)(U))) + + #define _mm_maskz_alignr_epi64(U, X, Y, C) \ + ((__m128i)__builtin_ia32_alignq128_mask ((__v2di)(__m128i)(X), \ +--- a/src/gcc/config/i386/constraints.md ++++ b/src/gcc/config/i386/constraints.md +@@ -190,7 +190,7 @@ (define_special_memory_constraint "Bc" + (and (match_operand 0 "memory_operand") + (match_test "constant_address_p (XEXP (op, 0))"))) + +-(define_memory_constraint "Bk" ++(define_special_memory_constraint "Bk" + "@internal TLS address that allows insn using non-integer registers." + (and (match_operand 0 "memory_operand") + (not (match_test "ix86_gpr_tls_address_pattern_p (op)")))) +--- a/src/gcc/config/i386/i386-options.cc ++++ b/src/gcc/config/i386/i386-options.cc +@@ -1868,44 +1868,66 @@ ix86_recompute_optlev_based_flags (struct gcc_options *opts, + opts->x_flag_pcc_struct_return = DEFAULT_PCC_STRUCT_RETURN; + } + } ++ ++ /* Keep nonleaf frame pointers. */ ++ if (opts->x_flag_omit_frame_pointer) ++ opts->x_target_flags &= ~MASK_OMIT_LEAF_FRAME_POINTER; ++ else if (TARGET_OMIT_LEAF_FRAME_POINTER_P (opts->x_target_flags)) ++ opts->x_flag_omit_frame_pointer = 1; + } + +-/* Implement TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE hook. */ ++/* Implement part of TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE hook. */ + +-void +-ix86_override_options_after_change (void) ++static void ++ix86_override_options_after_change_1 (struct gcc_options *opts, ++ struct gcc_options *opts_set) + { +- /* Default align_* from the processor table. */ +- ix86_default_align (&global_options); +- +- ix86_recompute_optlev_based_flags (&global_options, &global_options_set); ++#define OPTS_SET_P(OPTION) opts_set->x_ ## OPTION ++#define OPTS(OPTION) opts->x_ ## OPTION + + /* Disable unrolling small loops when there's explicit + -f{,no}unroll-loop. */ +- if ((OPTION_SET_P (flag_unroll_loops)) +- || (OPTION_SET_P (flag_unroll_all_loops) +- && flag_unroll_all_loops)) ++ if ((OPTS_SET_P (flag_unroll_loops)) ++ || (OPTS_SET_P (flag_unroll_all_loops) ++ && OPTS (flag_unroll_all_loops))) + { +- if (!OPTION_SET_P (ix86_unroll_only_small_loops)) +- ix86_unroll_only_small_loops = 0; ++ if (!OPTS_SET_P (ix86_unroll_only_small_loops)) ++ OPTS (ix86_unroll_only_small_loops) = 0; + /* Re-enable -frename-registers and -fweb if funroll-loops + enabled. */ +- if (!OPTION_SET_P (flag_web)) +- flag_web = flag_unroll_loops; +- if (!OPTION_SET_P (flag_rename_registers)) +- flag_rename_registers = flag_unroll_loops; ++ if (!OPTS_SET_P (flag_web)) ++ OPTS (flag_web) = OPTS (flag_unroll_loops); ++ if (!OPTS_SET_P (flag_rename_registers)) ++ OPTS (flag_rename_registers) = OPTS (flag_unroll_loops); + /* -fcunroll-grow-size default follws -f[no]-unroll-loops. */ +- if (!OPTION_SET_P (flag_cunroll_grow_size)) +- flag_cunroll_grow_size = flag_unroll_loops +- || flag_peel_loops +- || optimize >= 3; ++ if (!OPTS_SET_P (flag_cunroll_grow_size)) ++ OPTS (flag_cunroll_grow_size) ++ = (OPTS (flag_unroll_loops) ++ || OPTS (flag_peel_loops) ++ || OPTS (optimize) >= 3); + } + else + { +- if (!OPTION_SET_P (flag_cunroll_grow_size)) +- flag_cunroll_grow_size = flag_peel_loops || optimize >= 3; ++ if (!OPTS_SET_P (flag_cunroll_grow_size)) ++ OPTS (flag_cunroll_grow_size) ++ = (OPTS (flag_peel_loops) ++ || OPTS (optimize) >= 3); + } + ++#undef OPTS ++#undef OPTS_SET_P ++} ++ ++/* Implement TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE hook. */ ++ ++void ++ix86_override_options_after_change (void) ++{ ++ ix86_default_align (&global_options); ++ ++ ix86_recompute_optlev_based_flags (&global_options, &global_options_set); ++ ++ ix86_override_options_after_change_1 (&global_options, &global_options_set); + } + + /* Clear stack slot assignments remembered from previous functions. +@@ -2420,7 +2442,9 @@ ix86_option_override_internal (bool main_args_p, + + set_ix86_tune_features (opts, ix86_tune, opts->x_ix86_dump_tunes); + +- ix86_override_options_after_change (); ++ ix86_recompute_optlev_based_flags (opts, opts_set); ++ ++ ix86_override_options_after_change_1 (opts, opts_set); + + ix86_tune_cost = processor_cost_table[ix86_tune]; + /* TODO: ix86_cost should be chosen at instruction or function granuality +@@ -2451,6 +2475,9 @@ ix86_option_override_internal (bool main_args_p, + || TARGET_64BIT_P (opts->x_ix86_isa_flags)) + opts->x_ix86_regparm = REGPARM_MAX; + ++ /* Default align_* from the processor table. */ ++ ix86_default_align (&global_options); ++ + /* Provide default for -mbranch-cost= value. */ + SET_OPTION_IF_UNSET (opts, opts_set, ix86_branch_cost, + ix86_tune_cost->branch_cost); +@@ -2488,12 +2515,6 @@ ix86_option_override_internal (bool main_args_p, + opts->x_target_flags |= MASK_NO_RED_ZONE; + } + +- /* Keep nonleaf frame pointers. */ +- if (opts->x_flag_omit_frame_pointer) +- opts->x_target_flags &= ~MASK_OMIT_LEAF_FRAME_POINTER; +- else if (TARGET_OMIT_LEAF_FRAME_POINTER_P (opts->x_target_flags)) +- opts->x_flag_omit_frame_pointer = 1; +- + /* If we're doing fast math, we don't care about comparison order + wrt NaNs. This lets us use a shorter comparison sequence. */ + if (opts->x_flag_finite_math_only) +@@ -2819,6 +2840,9 @@ ix86_option_override_internal (bool main_args_p, + { + if (TARGET_AVX512F_P (opts->x_ix86_isa_flags)) + opts->x_ix86_move_max = PVW_AVX512; ++ /* Align with vectorizer to avoid potential STLF issue. */ ++ else if (TARGET_AVX_P (opts->x_ix86_isa_flags)) ++ opts->x_ix86_move_max = PVW_AVX256; + else + opts->x_ix86_move_max = PVW_AVX128; + } +@@ -2840,6 +2864,9 @@ ix86_option_override_internal (bool main_args_p, + { + if (TARGET_AVX512F_P (opts->x_ix86_isa_flags)) + opts->x_ix86_store_max = PVW_AVX512; ++ /* Align with vectorizer to avoid potential STLF issue. */ ++ else if (TARGET_AVX_P (opts->x_ix86_isa_flags)) ++ opts->x_ix86_store_max = PVW_AVX256; + else + opts->x_ix86_store_max = PVW_AVX128; + } +--- a/src/gcc/config/i386/i386.cc ++++ b/src/gcc/config/i386/i386.cc +@@ -14432,9 +14432,19 @@ ix86_dirflag_mode_needed (rtx_insn *insn) + static bool + ix86_check_avx_upper_register (const_rtx exp) + { +- return (SSE_REG_P (exp) +- && !EXT_REX_SSE_REG_P (exp) +- && GET_MODE_BITSIZE (GET_MODE (exp)) > 128); ++ /* construct_container may return a parallel with expr_list ++ which contains the real reg and mode */ ++ subrtx_iterator::array_type array; ++ FOR_EACH_SUBRTX (iter, array, exp, NONCONST) ++ { ++ const_rtx x = *iter; ++ if (SSE_REG_P (x) ++ && !EXT_REX_SSE_REG_P (x) ++ && GET_MODE_BITSIZE (GET_MODE (x)) > 128) ++ return true; ++ } ++ ++ return false; + } + + /* Check if a 256bit or 512bit AVX register is referenced in stores. */ +@@ -14442,7 +14452,9 @@ ix86_check_avx_upper_register (const_rtx exp) + static void + ix86_check_avx_upper_stores (rtx dest, const_rtx, void *data) + { +- if (ix86_check_avx_upper_register (dest)) ++ if (SSE_REG_P (dest) ++ && !EXT_REX_SSE_REG_P (dest) ++ && GET_MODE_BITSIZE (GET_MODE (dest)) > 128) + { + bool *used = (bool *) data; + *used = true; +@@ -14500,14 +14512,14 @@ ix86_avx_u128_mode_needed (rtx_insn *insn) + return AVX_U128_CLEAN; + } + +- subrtx_iterator::array_type array; +- + rtx set = single_set (insn); + if (set) + { + rtx dest = SET_DEST (set); + rtx src = SET_SRC (set); +- if (ix86_check_avx_upper_register (dest)) ++ if (SSE_REG_P (dest) ++ && !EXT_REX_SSE_REG_P (dest) ++ && GET_MODE_BITSIZE (GET_MODE (dest)) > 128) + { + /* This is an YMM/ZMM load. Return AVX_U128_DIRTY if the + source isn't zero. */ +@@ -14518,9 +14530,8 @@ ix86_avx_u128_mode_needed (rtx_insn *insn) + } + else + { +- FOR_EACH_SUBRTX (iter, array, src, NONCONST) +- if (ix86_check_avx_upper_register (*iter)) +- return AVX_U128_DIRTY; ++ if (ix86_check_avx_upper_register (src)) ++ return AVX_U128_DIRTY; + } + + /* This isn't YMM/ZMM load/store. */ +@@ -14531,9 +14542,8 @@ ix86_avx_u128_mode_needed (rtx_insn *insn) + Hardware changes state only when a 256bit register is written to, + but we need to prevent the compiler from moving optimal insertion + point above eventual read from 256bit or 512 bit register. */ +- FOR_EACH_SUBRTX (iter, array, PATTERN (insn), NONCONST) +- if (ix86_check_avx_upper_register (*iter)) +- return AVX_U128_DIRTY; ++ if (ix86_check_avx_upper_register (PATTERN (insn))) ++ return AVX_U128_DIRTY; + + return AVX_U128_ANY; + } +--- a/src/gcc/config/i386/i386.md ++++ b/src/gcc/config/i386/i386.md +@@ -24291,7 +24291,7 @@ (define_insn "prefetchi" + "TARGET_PREFETCHI && TARGET_64BIT" + { + static const char * const patterns[2] = { +- "prefetchit1\t%0", "prefetchit0\t%0" ++ "prefetchit1\t%a0", "prefetchit0\t%a0" + }; + + int locality = INTVAL (operands[1]); +--- a/src/gcc/config/i386/prfchiintrin.h ++++ b/src/gcc/config/i386/prfchiintrin.h +@@ -37,6 +37,7 @@ + #define __DISABLE_PREFETCHI__ + #endif /* __PREFETCHI__ */ + ++#ifdef __OPTIMIZE__ + extern __inline void + __attribute__((__gnu_inline__, __always_inline__, __artificial__)) + _m_prefetchit0 (void* __P) +@@ -50,6 +51,14 @@ _m_prefetchit1 (void* __P) + { + __builtin_ia32_prefetchi (__P, 2); + } ++#else ++#define _m_prefetchit0(P) \ ++ __builtin_ia32_prefetchi(P, 3); ++ ++#define _m_prefetchit1(P) \ ++ __builtin_ia32_prefetchi(P, 2); ++ ++#endif + + #ifdef __DISABLE_PREFETCHI__ + #undef __DISABLE_PREFETCHI__ +--- a/src/gcc/config/i386/x86-tune-costs.h ++++ b/src/gcc/config/i386/x86-tune-costs.h +@@ -1924,8 +1924,8 @@ struct processor_costs znver4_cost = { + in 32bit, 64bit, 128bit, 256bit and 512bit */ + {8, 8, 8, 12, 12}, /* cost of storing SSE register + in 32bit, 64bit, 128bit, 256bit and 512bit */ +- {6, 6, 6, 6, 6}, /* cost of unaligned loads. */ +- {8, 8, 8, 8, 8}, /* cost of unaligned stores. */ ++ {6, 6, 10, 10, 12}, /* cost of unaligned loads. */ ++ {8, 8, 8, 12, 12}, /* cost of unaligned stores. */ + 2, 2, 2, /* cost of moving XMM,YMM,ZMM + register. */ + 6, /* cost of moving SSE register to integer. */ +--- a/src/gcc/config/i386/x86-tune.def ++++ b/src/gcc/config/i386/x86-tune.def +@@ -518,7 +518,7 @@ DEF_TUNE (X86_TUNE_AVOID_128FMA_CHAINS, "avoid_fma_chains", m_ZNVER1 | m_ZNVER2 + /* X86_TUNE_AVOID_256FMA_CHAINS: Avoid creating loops with tight 256bit or + smaller FMA chain. */ + DEF_TUNE (X86_TUNE_AVOID_256FMA_CHAINS, "avoid_fma256_chains", m_ZNVER2 | m_ZNVER3 +- | m_ALDERLAKE | m_SAPPHIRERAPIDS | m_CORE_ATOM) ++ | m_ALDERLAKE | m_SAPPHIRERAPIDS | m_CORE_ATOM | m_GENERIC | m_ZNVER4) + + /* X86_TUNE_AVOID_512FMA_CHAINS: Avoid creating loops with tight 512bit or + smaller FMA chain. */ +--- a/src/gcc/config/loongarch/loongarch.cc ++++ b/src/gcc/config/loongarch/loongarch.cc +@@ -5491,7 +5491,7 @@ loongarch_hard_regno_mode_ok_uncached (unsigned int regno, machine_mode mode) + if (mclass == MODE_FLOAT + || mclass == MODE_COMPLEX_FLOAT + || mclass == MODE_VECTOR_FLOAT) +- return size <= UNITS_PER_FPVALUE; ++ return size <= UNITS_PER_HWFPVALUE; + + /* Allow integer modes that fit into a single register. We need + to put integers into FPRs when using instructions like CVT +--- a/src/gcc/config/loongarch/loongarch.h ++++ b/src/gcc/config/loongarch/loongarch.h +@@ -202,13 +202,6 @@ along with GCC; see the file COPYING3. If not see + #define UNITS_PER_HWFPVALUE \ + (TARGET_SOFT_FLOAT ? 0 : UNITS_PER_FPREG) + +-/* The largest size of value that can be held in floating-point +- registers. */ +-#define UNITS_PER_FPVALUE \ +- (TARGET_SOFT_FLOAT ? 0 \ +- : TARGET_SINGLE_FLOAT ? UNITS_PER_FPREG \ +- : LONG_DOUBLE_TYPE_SIZE / BITS_PER_UNIT) +- + /* The number of bytes in a double. */ + #define UNITS_PER_DOUBLE (TYPE_PRECISION (double_type_node) / BITS_PER_UNIT) + +--- a/src/gcc/config/mips/mips.cc ++++ b/src/gcc/config/mips/mips.cc +@@ -3140,6 +3140,9 @@ mips_emit_call_insn (rtx pattern, rtx orig_addr, rtx addr, bool lazy_p) + { + rtx post_call_tmp_reg = gen_rtx_REG (word_mode, POST_CALL_TMP_REG); + clobber_reg (&CALL_INSN_FUNCTION_USAGE (insn), post_call_tmp_reg); ++ clobber_reg (&CALL_INSN_FUNCTION_USAGE (insn), MIPS16_PIC_TEMP); ++ clobber_reg (&CALL_INSN_FUNCTION_USAGE (insn), ++ MIPS_PROLOGUE_TEMP (word_mode)); + } + + return insn; +@@ -3236,7 +3239,13 @@ mips16_gp_pseudo_reg (void) + rtx set = gen_load_const_gp (cfun->machine->mips16_gp_pseudo_rtx); + rtx_insn *insn = emit_insn_after (set, scan); + INSN_LOCATION (insn) = 0; +- ++ /* NewABI support hasn't been implement. NewABI should generate RTL ++ sequence instead of ASM sequence directly. */ ++ if (mips_current_loadgp_style () == LOADGP_OLDABI) ++ { ++ emit_clobber (MIPS16_PIC_TEMP); ++ emit_clobber (MIPS_PROLOGUE_TEMP (Pmode)); ++ } + pop_topmost_sequence (); + } + +--- a/src/gcc/config/pa/pa.cc ++++ b/src/gcc/config/pa/pa.cc +@@ -1263,6 +1263,7 @@ hppa_legitimize_address (rtx x, rtx oldx ATTRIBUTE_UNUSED, + /* If the index adds a large constant, try to scale the + constant so that it can be loaded with only one insn. */ + if (GET_CODE (XEXP (idx, 1)) == CONST_INT ++ && INTVAL (XEXP (idx, 1)) % (1 << shift_val) == 0 + && VAL_14_BITS_P (INTVAL (XEXP (idx, 1)) + / INTVAL (XEXP (XEXP (idx, 0), 1))) + && INTVAL (XEXP (idx, 1)) % INTVAL (XEXP (XEXP (idx, 0), 1)) == 0) +--- a/src/gcc/config/pa/pa.md ++++ b/src/gcc/config/pa/pa.md +@@ -5493,24 +5493,6 @@ (define_insn "umulsidi3" + [(set_attr "type" "fpmuldbl") + (set_attr "length" "4")]) + +-(define_insn "" +- [(set (match_operand:DI 0 "register_operand" "=f") +- (mult:DI (zero_extend:DI (match_operand:SI 1 "register_operand" "f")) +- (match_operand:DI 2 "uint32_operand" "f")))] +- "TARGET_PA_11 && ! TARGET_SOFT_FLOAT && ! TARGET_SOFT_MULT && !TARGET_64BIT" +- "xmpyu %1,%R2,%0" +- [(set_attr "type" "fpmuldbl") +- (set_attr "length" "4")]) +- +-(define_insn "" +- [(set (match_operand:DI 0 "register_operand" "=f") +- (mult:DI (zero_extend:DI (match_operand:SI 1 "register_operand" "f")) +- (match_operand:DI 2 "uint32_operand" "f")))] +- "TARGET_PA_11 && ! TARGET_SOFT_FLOAT && ! TARGET_SOFT_MULT && TARGET_64BIT" +- "xmpyu %1,%2R,%0" +- [(set_attr "type" "fpmuldbl") +- (set_attr "length" "4")]) +- + (define_insn "" + [(set (reg:SI 29) (mult:SI (reg:SI 26) (reg:SI 25))) + (clobber (match_operand:SI 0 "register_operand" "=a")) +--- a/src/gcc/config/riscv/riscv.cc ++++ b/src/gcc/config/riscv/riscv.cc +@@ -6794,9 +6794,10 @@ riscv_promote_function_mode (const_tree type ATTRIBUTE_UNUSED, + return promote_mode (type, mode, punsignedp); + + unsignedp = *punsignedp; +- PROMOTE_MODE (as_a (mode), unsignedp, type); ++ scalar_mode smode = as_a (mode); ++ PROMOTE_MODE (smode, unsignedp, type); + *punsignedp = unsignedp; +- return mode; ++ return smode; + } + + /* Implement TARGET_MACHINE_DEPENDENT_REORG. */ +--- a/src/gcc/config/rs6000/altivec.md ++++ b/src/gcc/config/rs6000/altivec.md +@@ -1152,15 +1152,16 @@ (define_expand "altivec_vmrghb" + (use (match_operand:V16QI 2 "register_operand"))] + "TARGET_ALTIVEC" + { +- rtx (*fun) (rtx, rtx, rtx) = BYTES_BIG_ENDIAN ? gen_altivec_vmrghb_direct +- : gen_altivec_vmrglb_direct; +- if (!BYTES_BIG_ENDIAN) +- std::swap (operands[1], operands[2]); +- emit_insn (fun (operands[0], operands[1], operands[2])); ++ if (BYTES_BIG_ENDIAN) ++ emit_insn ( ++ gen_altivec_vmrghb_direct_be (operands[0], operands[1], operands[2])); ++ else ++ emit_insn ( ++ gen_altivec_vmrglb_direct_le (operands[0], operands[2], operands[1])); + DONE; + }) + +-(define_insn "altivec_vmrghb_direct" ++(define_insn "altivec_vmrghb_direct_be" + [(set (match_operand:V16QI 0 "register_operand" "=v") + (vec_select:V16QI + (vec_concat:V32QI +@@ -1174,7 +1175,25 @@ (define_insn "altivec_vmrghb_direct" + (const_int 5) (const_int 21) + (const_int 6) (const_int 22) + (const_int 7) (const_int 23)])))] +- "TARGET_ALTIVEC" ++ "TARGET_ALTIVEC && BYTES_BIG_ENDIAN" ++ "vmrghb %0,%1,%2" ++ [(set_attr "type" "vecperm")]) ++ ++(define_insn "altivec_vmrghb_direct_le" ++ [(set (match_operand:V16QI 0 "register_operand" "=v") ++ (vec_select:V16QI ++ (vec_concat:V32QI ++ (match_operand:V16QI 2 "register_operand" "v") ++ (match_operand:V16QI 1 "register_operand" "v")) ++ (parallel [(const_int 8) (const_int 24) ++ (const_int 9) (const_int 25) ++ (const_int 10) (const_int 26) ++ (const_int 11) (const_int 27) ++ (const_int 12) (const_int 28) ++ (const_int 13) (const_int 29) ++ (const_int 14) (const_int 30) ++ (const_int 15) (const_int 31)])))] ++ "TARGET_ALTIVEC && !BYTES_BIG_ENDIAN" + "vmrghb %0,%1,%2" + [(set_attr "type" "vecperm")]) + +@@ -1184,17 +1203,18 @@ (define_expand "altivec_vmrghh" + (use (match_operand:V8HI 2 "register_operand"))] + "TARGET_ALTIVEC" + { +- rtx (*fun) (rtx, rtx, rtx) = BYTES_BIG_ENDIAN ? gen_altivec_vmrghh_direct +- : gen_altivec_vmrglh_direct; +- if (!BYTES_BIG_ENDIAN) +- std::swap (operands[1], operands[2]); +- emit_insn (fun (operands[0], operands[1], operands[2])); ++ if (BYTES_BIG_ENDIAN) ++ emit_insn ( ++ gen_altivec_vmrghh_direct_be (operands[0], operands[1], operands[2])); ++ else ++ emit_insn ( ++ gen_altivec_vmrglh_direct_le (operands[0], operands[2], operands[1])); + DONE; + }) + +-(define_insn "altivec_vmrghh_direct" ++(define_insn "altivec_vmrghh_direct_be" + [(set (match_operand:V8HI 0 "register_operand" "=v") +- (vec_select:V8HI ++ (vec_select:V8HI + (vec_concat:V16HI + (match_operand:V8HI 1 "register_operand" "v") + (match_operand:V8HI 2 "register_operand" "v")) +@@ -1202,7 +1222,21 @@ (define_insn "altivec_vmrghh_direct" + (const_int 1) (const_int 9) + (const_int 2) (const_int 10) + (const_int 3) (const_int 11)])))] +- "TARGET_ALTIVEC" ++ "TARGET_ALTIVEC && BYTES_BIG_ENDIAN" ++ "vmrghh %0,%1,%2" ++ [(set_attr "type" "vecperm")]) ++ ++(define_insn "altivec_vmrghh_direct_le" ++ [(set (match_operand:V8HI 0 "register_operand" "=v") ++ (vec_select:V8HI ++ (vec_concat:V16HI ++ (match_operand:V8HI 2 "register_operand" "v") ++ (match_operand:V8HI 1 "register_operand" "v")) ++ (parallel [(const_int 4) (const_int 12) ++ (const_int 5) (const_int 13) ++ (const_int 6) (const_int 14) ++ (const_int 7) (const_int 15)])))] ++ "TARGET_ALTIVEC && !BYTES_BIG_ENDIAN" + "vmrghh %0,%1,%2" + [(set_attr "type" "vecperm")]) + +@@ -1212,16 +1246,18 @@ (define_expand "altivec_vmrghw" + (use (match_operand:V4SI 2 "register_operand"))] + "VECTOR_MEM_ALTIVEC_P (V4SImode)" + { +- rtx (*fun) (rtx, rtx, rtx); +- fun = BYTES_BIG_ENDIAN ? gen_altivec_vmrghw_direct_v4si +- : gen_altivec_vmrglw_direct_v4si; +- if (!BYTES_BIG_ENDIAN) +- std::swap (operands[1], operands[2]); +- emit_insn (fun (operands[0], operands[1], operands[2])); ++ if (BYTES_BIG_ENDIAN) ++ emit_insn (gen_altivec_vmrghw_direct_v4si_be (operands[0], ++ operands[1], ++ operands[2])); ++ else ++ emit_insn (gen_altivec_vmrglw_direct_v4si_le (operands[0], ++ operands[2], ++ operands[1])); + DONE; + }) + +-(define_insn "altivec_vmrghw_direct_" ++(define_insn "altivec_vmrghw_direct__be" + [(set (match_operand:VSX_W 0 "register_operand" "=wa,v") + (vec_select:VSX_W + (vec_concat: +@@ -1229,7 +1265,21 @@ (define_insn "altivec_vmrghw_direct_" + (match_operand:VSX_W 2 "register_operand" "wa,v")) + (parallel [(const_int 0) (const_int 4) + (const_int 1) (const_int 5)])))] +- "TARGET_ALTIVEC" ++ "TARGET_ALTIVEC && BYTES_BIG_ENDIAN" ++ "@ ++ xxmrghw %x0,%x1,%x2 ++ vmrghw %0,%1,%2" ++ [(set_attr "type" "vecperm")]) ++ ++(define_insn "altivec_vmrghw_direct__le" ++ [(set (match_operand:VSX_W 0 "register_operand" "=wa,v") ++ (vec_select:VSX_W ++ (vec_concat: ++ (match_operand:VSX_W 2 "register_operand" "wa,v") ++ (match_operand:VSX_W 1 "register_operand" "wa,v")) ++ (parallel [(const_int 2) (const_int 6) ++ (const_int 3) (const_int 7)])))] ++ "TARGET_ALTIVEC && !BYTES_BIG_ENDIAN" + "@ + xxmrghw %x0,%x1,%x2 + vmrghw %0,%1,%2" +@@ -1258,15 +1308,16 @@ (define_expand "altivec_vmrglb" + (use (match_operand:V16QI 2 "register_operand"))] + "TARGET_ALTIVEC" + { +- rtx (*fun) (rtx, rtx, rtx) = BYTES_BIG_ENDIAN ? gen_altivec_vmrglb_direct +- : gen_altivec_vmrghb_direct; +- if (!BYTES_BIG_ENDIAN) +- std::swap (operands[1], operands[2]); +- emit_insn (fun (operands[0], operands[1], operands[2])); ++ if (BYTES_BIG_ENDIAN) ++ emit_insn ( ++ gen_altivec_vmrglb_direct_be (operands[0], operands[1], operands[2])); ++ else ++ emit_insn ( ++ gen_altivec_vmrghb_direct_le (operands[0], operands[2], operands[1])); + DONE; + }) + +-(define_insn "altivec_vmrglb_direct" ++(define_insn "altivec_vmrglb_direct_be" + [(set (match_operand:V16QI 0 "register_operand" "=v") + (vec_select:V16QI + (vec_concat:V32QI +@@ -1280,7 +1331,25 @@ (define_insn "altivec_vmrglb_direct" + (const_int 13) (const_int 29) + (const_int 14) (const_int 30) + (const_int 15) (const_int 31)])))] +- "TARGET_ALTIVEC" ++ "TARGET_ALTIVEC && BYTES_BIG_ENDIAN" ++ "vmrglb %0,%1,%2" ++ [(set_attr "type" "vecperm")]) ++ ++(define_insn "altivec_vmrglb_direct_le" ++ [(set (match_operand:V16QI 0 "register_operand" "=v") ++ (vec_select:V16QI ++ (vec_concat:V32QI ++ (match_operand:V16QI 2 "register_operand" "v") ++ (match_operand:V16QI 1 "register_operand" "v")) ++ (parallel [(const_int 0) (const_int 16) ++ (const_int 1) (const_int 17) ++ (const_int 2) (const_int 18) ++ (const_int 3) (const_int 19) ++ (const_int 4) (const_int 20) ++ (const_int 5) (const_int 21) ++ (const_int 6) (const_int 22) ++ (const_int 7) (const_int 23)])))] ++ "TARGET_ALTIVEC && !BYTES_BIG_ENDIAN" + "vmrglb %0,%1,%2" + [(set_attr "type" "vecperm")]) + +@@ -1290,15 +1359,16 @@ (define_expand "altivec_vmrglh" + (use (match_operand:V8HI 2 "register_operand"))] + "TARGET_ALTIVEC" + { +- rtx (*fun) (rtx, rtx, rtx) = BYTES_BIG_ENDIAN ? gen_altivec_vmrglh_direct +- : gen_altivec_vmrghh_direct; +- if (!BYTES_BIG_ENDIAN) +- std::swap (operands[1], operands[2]); +- emit_insn (fun (operands[0], operands[1], operands[2])); ++ if (BYTES_BIG_ENDIAN) ++ emit_insn ( ++ gen_altivec_vmrglh_direct_be (operands[0], operands[1], operands[2])); ++ else ++ emit_insn ( ++ gen_altivec_vmrghh_direct_le (operands[0], operands[2], operands[1])); + DONE; + }) + +-(define_insn "altivec_vmrglh_direct" ++(define_insn "altivec_vmrglh_direct_be" + [(set (match_operand:V8HI 0 "register_operand" "=v") + (vec_select:V8HI + (vec_concat:V16HI +@@ -1308,7 +1378,21 @@ (define_insn "altivec_vmrglh_direct" + (const_int 5) (const_int 13) + (const_int 6) (const_int 14) + (const_int 7) (const_int 15)])))] +- "TARGET_ALTIVEC" ++ "TARGET_ALTIVEC && BYTES_BIG_ENDIAN" ++ "vmrglh %0,%1,%2" ++ [(set_attr "type" "vecperm")]) ++ ++(define_insn "altivec_vmrglh_direct_le" ++ [(set (match_operand:V8HI 0 "register_operand" "=v") ++ (vec_select:V8HI ++ (vec_concat:V16HI ++ (match_operand:V8HI 2 "register_operand" "v") ++ (match_operand:V8HI 1 "register_operand" "v")) ++ (parallel [(const_int 0) (const_int 8) ++ (const_int 1) (const_int 9) ++ (const_int 2) (const_int 10) ++ (const_int 3) (const_int 11)])))] ++ "TARGET_ALTIVEC && !BYTES_BIG_ENDIAN" + "vmrglh %0,%1,%2" + [(set_attr "type" "vecperm")]) + +@@ -1318,16 +1402,18 @@ (define_expand "altivec_vmrglw" + (use (match_operand:V4SI 2 "register_operand"))] + "VECTOR_MEM_ALTIVEC_P (V4SImode)" + { +- rtx (*fun) (rtx, rtx, rtx); +- fun = BYTES_BIG_ENDIAN ? gen_altivec_vmrglw_direct_v4si +- : gen_altivec_vmrghw_direct_v4si; +- if (!BYTES_BIG_ENDIAN) +- std::swap (operands[1], operands[2]); +- emit_insn (fun (operands[0], operands[1], operands[2])); ++ if (BYTES_BIG_ENDIAN) ++ emit_insn (gen_altivec_vmrglw_direct_v4si_be (operands[0], ++ operands[1], ++ operands[2])); ++ else ++ emit_insn (gen_altivec_vmrghw_direct_v4si_le (operands[0], ++ operands[2], ++ operands[1])); + DONE; + }) + +-(define_insn "altivec_vmrglw_direct_" ++(define_insn "altivec_vmrglw_direct__be" + [(set (match_operand:VSX_W 0 "register_operand" "=wa,v") + (vec_select:VSX_W + (vec_concat: +@@ -1335,7 +1421,21 @@ (define_insn "altivec_vmrglw_direct_" + (match_operand:VSX_W 2 "register_operand" "wa,v")) + (parallel [(const_int 2) (const_int 6) + (const_int 3) (const_int 7)])))] +- "TARGET_ALTIVEC" ++ "TARGET_ALTIVEC && BYTES_BIG_ENDIAN" ++ "@ ++ xxmrglw %x0,%x1,%x2 ++ vmrglw %0,%1,%2" ++ [(set_attr "type" "vecperm")]) ++ ++(define_insn "altivec_vmrglw_direct__le" ++ [(set (match_operand:VSX_W 0 "register_operand" "=wa,v") ++ (vec_select:VSX_W ++ (vec_concat: ++ (match_operand:VSX_W 2 "register_operand" "wa,v") ++ (match_operand:VSX_W 1 "register_operand" "wa,v")) ++ (parallel [(const_int 0) (const_int 4) ++ (const_int 1) (const_int 5)])))] ++ "TARGET_ALTIVEC && !BYTES_BIG_ENDIAN" + "@ + xxmrglw %x0,%x1,%x2 + vmrglw %0,%1,%2" +@@ -3707,13 +3807,13 @@ (define_expand "vec_widen_umult_hi_v16qi" + { + emit_insn (gen_altivec_vmuleub (ve, operands[1], operands[2])); + emit_insn (gen_altivec_vmuloub (vo, operands[1], operands[2])); +- emit_insn (gen_altivec_vmrghh_direct (operands[0], ve, vo)); ++ emit_insn (gen_altivec_vmrghh (operands[0], ve, vo)); + } + else + { + emit_insn (gen_altivec_vmuloub (ve, operands[1], operands[2])); + emit_insn (gen_altivec_vmuleub (vo, operands[1], operands[2])); +- emit_insn (gen_altivec_vmrghh_direct (operands[0], vo, ve)); ++ emit_insn (gen_altivec_vmrglh (operands[0], ve, vo)); + } + DONE; + }) +@@ -3732,13 +3832,13 @@ (define_expand "vec_widen_umult_lo_v16qi" + { + emit_insn (gen_altivec_vmuleub (ve, operands[1], operands[2])); + emit_insn (gen_altivec_vmuloub (vo, operands[1], operands[2])); +- emit_insn (gen_altivec_vmrglh_direct (operands[0], ve, vo)); ++ emit_insn (gen_altivec_vmrglh (operands[0], ve, vo)); + } + else + { + emit_insn (gen_altivec_vmuloub (ve, operands[1], operands[2])); + emit_insn (gen_altivec_vmuleub (vo, operands[1], operands[2])); +- emit_insn (gen_altivec_vmrglh_direct (operands[0], vo, ve)); ++ emit_insn (gen_altivec_vmrghh (operands[0], ve, vo)); + } + DONE; + }) +@@ -3757,13 +3857,13 @@ (define_expand "vec_widen_smult_hi_v16qi" + { + emit_insn (gen_altivec_vmulesb (ve, operands[1], operands[2])); + emit_insn (gen_altivec_vmulosb (vo, operands[1], operands[2])); +- emit_insn (gen_altivec_vmrghh_direct (operands[0], ve, vo)); ++ emit_insn (gen_altivec_vmrghh (operands[0], ve, vo)); + } + else + { + emit_insn (gen_altivec_vmulosb (ve, operands[1], operands[2])); + emit_insn (gen_altivec_vmulesb (vo, operands[1], operands[2])); +- emit_insn (gen_altivec_vmrghh_direct (operands[0], vo, ve)); ++ emit_insn (gen_altivec_vmrglh (operands[0], ve, vo)); + } + DONE; + }) +@@ -3782,13 +3882,13 @@ (define_expand "vec_widen_smult_lo_v16qi" + { + emit_insn (gen_altivec_vmulesb (ve, operands[1], operands[2])); + emit_insn (gen_altivec_vmulosb (vo, operands[1], operands[2])); +- emit_insn (gen_altivec_vmrglh_direct (operands[0], ve, vo)); ++ emit_insn (gen_altivec_vmrglh (operands[0], ve, vo)); + } + else + { + emit_insn (gen_altivec_vmulosb (ve, operands[1], operands[2])); + emit_insn (gen_altivec_vmulesb (vo, operands[1], operands[2])); +- emit_insn (gen_altivec_vmrglh_direct (operands[0], vo, ve)); ++ emit_insn (gen_altivec_vmrghh (operands[0], ve, vo)); + } + DONE; + }) +@@ -3807,13 +3907,13 @@ (define_expand "vec_widen_umult_hi_v8hi" + { + emit_insn (gen_altivec_vmuleuh (ve, operands[1], operands[2])); + emit_insn (gen_altivec_vmulouh (vo, operands[1], operands[2])); +- emit_insn (gen_altivec_vmrghw_direct_v4si (operands[0], ve, vo)); ++ emit_insn (gen_altivec_vmrghw (operands[0], ve, vo)); + } + else + { + emit_insn (gen_altivec_vmulouh (ve, operands[1], operands[2])); + emit_insn (gen_altivec_vmuleuh (vo, operands[1], operands[2])); +- emit_insn (gen_altivec_vmrghw_direct_v4si (operands[0], vo, ve)); ++ emit_insn (gen_altivec_vmrglw (operands[0], ve, vo)); + } + DONE; + }) +@@ -3832,13 +3932,13 @@ (define_expand "vec_widen_umult_lo_v8hi" + { + emit_insn (gen_altivec_vmuleuh (ve, operands[1], operands[2])); + emit_insn (gen_altivec_vmulouh (vo, operands[1], operands[2])); +- emit_insn (gen_altivec_vmrglw_direct_v4si (operands[0], ve, vo)); ++ emit_insn (gen_altivec_vmrglw (operands[0], ve, vo)); + } + else + { + emit_insn (gen_altivec_vmulouh (ve, operands[1], operands[2])); + emit_insn (gen_altivec_vmuleuh (vo, operands[1], operands[2])); +- emit_insn (gen_altivec_vmrglw_direct_v4si (operands[0], vo, ve)); ++ emit_insn (gen_altivec_vmrghw (operands[0], ve, vo)); + } + DONE; + }) +@@ -3857,13 +3957,13 @@ (define_expand "vec_widen_smult_hi_v8hi" + { + emit_insn (gen_altivec_vmulesh (ve, operands[1], operands[2])); + emit_insn (gen_altivec_vmulosh (vo, operands[1], operands[2])); +- emit_insn (gen_altivec_vmrghw_direct_v4si (operands[0], ve, vo)); ++ emit_insn (gen_altivec_vmrghw (operands[0], ve, vo)); + } + else + { + emit_insn (gen_altivec_vmulosh (ve, operands[1], operands[2])); + emit_insn (gen_altivec_vmulesh (vo, operands[1], operands[2])); +- emit_insn (gen_altivec_vmrghw_direct_v4si (operands[0], vo, ve)); ++ emit_insn (gen_altivec_vmrglw (operands[0], ve, vo)); + } + DONE; + }) +@@ -3882,13 +3982,13 @@ (define_expand "vec_widen_smult_lo_v8hi" + { + emit_insn (gen_altivec_vmulesh (ve, operands[1], operands[2])); + emit_insn (gen_altivec_vmulosh (vo, operands[1], operands[2])); +- emit_insn (gen_altivec_vmrglw_direct_v4si (operands[0], ve, vo)); ++ emit_insn (gen_altivec_vmrglw (operands[0], ve, vo)); + } + else + { + emit_insn (gen_altivec_vmulosh (ve, operands[1], operands[2])); + emit_insn (gen_altivec_vmulesh (vo, operands[1], operands[2])); +- emit_insn (gen_altivec_vmrglw_direct_v4si (operands[0], vo, ve)); ++ emit_insn (gen_altivec_vmrghw (operands[0], ve, vo)); + } + DONE; + }) +--- a/src/gcc/config/rs6000/rs6000-builtin.cc ++++ b/src/gcc/config/rs6000/rs6000-builtin.cc +@@ -845,7 +845,7 @@ rs6000_init_builtins (void) + enum rs6000_gen_builtins fn_code = (enum rs6000_gen_builtins) i; + if (!rs6000_builtin_is_supported (fn_code)) + continue; +- tree fntype = rs6000_builtin_info[i].fntype; ++ tree fntype = rs6000_builtin_info_fntype[i]; + tree t = TREE_TYPE (fntype); + fprintf (stderr, "%s %s (", rs6000_type_string (t), + rs6000_builtin_info[i].bifname); +--- a/src/gcc/config/rs6000/rs6000-c.cc ++++ b/src/gcc/config/rs6000/rs6000-c.cc +@@ -1658,34 +1658,37 @@ resolve_vec_step (resolution *res, vec *arglist, unsigned nargs) + UNSUPPORTED_BUILTIN to true. If we don't match, return error_mark_node + and leave UNSUPPORTED_BUILTIN alone. */ + +-tree +-find_instance (bool *unsupported_builtin, ovlddata **instance, ++static tree ++find_instance (bool *unsupported_builtin, int *instance, + rs6000_gen_builtins instance_code, + rs6000_gen_builtins fcode, + tree *types, tree *args) + { +- while (*instance && (*instance)->bifid != instance_code) +- *instance = (*instance)->next; ++ while (*instance != -1 ++ && rs6000_instance_info[*instance].bifid != instance_code) ++ *instance = rs6000_instance_info[*instance].next; + +- ovlddata *inst = *instance; +- gcc_assert (inst != NULL); ++ int inst = *instance; ++ gcc_assert (inst != -1); + /* It is possible for an instance to require a data type that isn't +- defined on this target, in which case inst->fntype will be NULL. */ +- if (!inst->fntype) ++ defined on this target, in which case rs6000_instance_info_fntype[inst] ++ will be NULL. */ ++ if (!rs6000_instance_info_fntype[inst]) + return error_mark_node; +- tree fntype = rs6000_builtin_info[inst->bifid].fntype; ++ rs6000_gen_builtins bifid = rs6000_instance_info[inst].bifid; ++ tree fntype = rs6000_builtin_info_fntype[bifid]; + tree parmtype0 = TREE_VALUE (TYPE_ARG_TYPES (fntype)); + tree parmtype1 = TREE_VALUE (TREE_CHAIN (TYPE_ARG_TYPES (fntype))); + + if (rs6000_builtin_type_compatible (types[0], parmtype0) + && rs6000_builtin_type_compatible (types[1], parmtype1)) + { +- if (rs6000_builtin_decl (inst->bifid, false) != error_mark_node +- && rs6000_builtin_is_supported (inst->bifid)) ++ if (rs6000_builtin_decl (bifid, false) != error_mark_node ++ && rs6000_builtin_is_supported (bifid)) + { +- tree ret_type = TREE_TYPE (inst->fntype); ++ tree ret_type = TREE_TYPE (rs6000_instance_info_fntype[inst]); + return altivec_build_resolved_builtin (args, 2, fntype, ret_type, +- inst->bifid, fcode); ++ bifid, fcode); + } + else + *unsupported_builtin = true; +@@ -1868,11 +1871,11 @@ altivec_resolve_overloaded_builtin (location_t loc, tree fndecl, + bool unsupported_builtin = false; + rs6000_gen_builtins instance_code; + bool supported = false; +- ovlddata *instance = rs6000_overload_info[adj_fcode].first_instance; +- gcc_assert (instance != NULL); ++ int instance = rs6000_overload_info[adj_fcode].first_instance; ++ gcc_assert (instance != -1); + + /* Functions with no arguments can have only one overloaded instance. */ +- gcc_assert (nargs > 0 || !instance->next); ++ gcc_assert (nargs > 0 || rs6000_instance_info[instance].next == -1); + + /* Standard overload processing involves determining whether an instance + exists that is type-compatible with the overloaded function call. In +@@ -1946,16 +1949,18 @@ altivec_resolve_overloaded_builtin (location_t loc, tree fndecl, + /* Standard overload processing. Look for an instance with compatible + parameter types. If it is supported in the current context, resolve + the overloaded call to that instance. */ +- for (; instance != NULL; instance = instance->next) ++ for (; instance != -1; instance = rs6000_instance_info[instance].next) + { ++ tree fntype = rs6000_instance_info_fntype[instance]; ++ rs6000_gen_builtins bifid = rs6000_instance_info[instance].bifid; + /* It is possible for an instance to require a data type that isn't +- defined on this target, in which case instance->fntype will be ++ defined on this target, in which case fntype will be + NULL. */ +- if (!instance->fntype) ++ if (!fntype) + continue; + + bool mismatch = false; +- tree nextparm = TYPE_ARG_TYPES (instance->fntype); ++ tree nextparm = TYPE_ARG_TYPES (fntype); + + for (unsigned int arg_i = 0; + arg_i < nargs && nextparm != NULL; +@@ -1973,15 +1978,14 @@ altivec_resolve_overloaded_builtin (location_t loc, tree fndecl, + if (mismatch) + continue; + +- supported = rs6000_builtin_is_supported (instance->bifid); +- if (rs6000_builtin_decl (instance->bifid, false) != error_mark_node ++ supported = rs6000_builtin_is_supported (bifid); ++ if (rs6000_builtin_decl (bifid, false) != error_mark_node + && supported) + { +- tree fntype = rs6000_builtin_info[instance->bifid].fntype; +- tree ret_type = TREE_TYPE (instance->fntype); ++ tree ret_type = TREE_TYPE (fntype); ++ fntype = rs6000_builtin_info_fntype[bifid]; + return altivec_build_resolved_builtin (args, nargs, fntype, +- ret_type, instance->bifid, +- fcode); ++ ret_type, bifid, fcode); + } + else + { +@@ -1998,12 +2002,12 @@ altivec_resolve_overloaded_builtin (location_t loc, tree fndecl, + { + /* Indicate that the instantiation of the overloaded builtin + name is not available with the target flags in effect. */ +- rs6000_gen_builtins fcode = (rs6000_gen_builtins) instance->bifid; ++ rs6000_gen_builtins bifid = rs6000_instance_info[instance].bifid; ++ rs6000_gen_builtins fcode = (rs6000_gen_builtins) bifid; + rs6000_invalid_builtin (fcode); + /* Provide clarity of the relationship between the overload + and the instantiation. */ +- const char *internal_name +- = rs6000_builtin_info[instance->bifid].bifname; ++ const char *internal_name = rs6000_builtin_info[bifid].bifname; + rich_location richloc (line_table, input_location); + inform (&richloc, + "overloaded builtin %qs is implemented by builtin %qs", +--- a/src/gcc/config/rs6000/rs6000-gen-builtins.cc ++++ b/src/gcc/config/rs6000/rs6000-gen-builtins.cc +@@ -2261,20 +2261,19 @@ write_decls (void) + fprintf (header_file, "};\n\n"); + + fprintf (header_file, "#define PPC_MAXRESTROPNDS 3\n"); +- fprintf (header_file, "struct GTY(()) bifdata\n"); ++ fprintf (header_file, "struct bifdata\n"); + fprintf (header_file, "{\n"); +- fprintf (header_file, " const char *GTY((skip(\"\"))) bifname;\n"); +- fprintf (header_file, " bif_enable GTY((skip(\"\"))) enable;\n"); +- fprintf (header_file, " tree fntype;\n"); +- fprintf (header_file, " insn_code GTY((skip(\"\"))) icode;\n"); +- fprintf (header_file, " int nargs;\n"); +- fprintf (header_file, " int bifattrs;\n"); +- fprintf (header_file, " int restr_opnd[PPC_MAXRESTROPNDS];\n"); +- fprintf (header_file, " restriction GTY((skip(\"\"))) restr[PPC_MAXRESTROPNDS];\n"); +- fprintf (header_file, " int restr_val1[PPC_MAXRESTROPNDS];\n"); +- fprintf (header_file, " int restr_val2[PPC_MAXRESTROPNDS];\n"); +- fprintf (header_file, " const char *GTY((skip(\"\"))) attr_string;\n"); +- fprintf (header_file, " rs6000_gen_builtins GTY((skip(\"\"))) assoc_bif;\n"); ++ fprintf (header_file, " const char *bifname;\n"); ++ fprintf (header_file, " bif_enable enable;\n"); ++ fprintf (header_file, " insn_code icode;\n"); ++ fprintf (header_file, " int nargs;\n"); ++ fprintf (header_file, " int bifattrs;\n"); ++ fprintf (header_file, " int restr_opnd[PPC_MAXRESTROPNDS];\n"); ++ fprintf (header_file, " restriction restr[PPC_MAXRESTROPNDS];\n"); ++ fprintf (header_file, " int restr_val1[PPC_MAXRESTROPNDS];\n"); ++ fprintf (header_file, " int restr_val2[PPC_MAXRESTROPNDS];\n"); ++ fprintf (header_file, " const char *attr_string;\n"); ++ fprintf (header_file, " rs6000_gen_builtins assoc_bif;\n"); + fprintf (header_file, "};\n\n"); + + fprintf (header_file, "#define bif_init_bit\t\t(0x00000001)\n"); +@@ -2353,24 +2352,28 @@ write_decls (void) + fprintf (header_file, "\n"); + + fprintf (header_file, +- "extern GTY(()) bifdata rs6000_builtin_info[RS6000_BIF_MAX];\n\n"); ++ "extern bifdata rs6000_builtin_info[RS6000_BIF_MAX];\n\n"); + +- fprintf (header_file, "struct GTY(()) ovlddata\n"); ++ fprintf (header_file, ++ "extern GTY(()) tree rs6000_builtin_info_fntype[RS6000_BIF_MAX];\n\n"); ++ ++ fprintf (header_file, "struct ovlddata\n"); + fprintf (header_file, "{\n"); +- fprintf (header_file, " const char *GTY((skip(\"\"))) bifname;\n"); +- fprintf (header_file, " rs6000_gen_builtins GTY((skip(\"\"))) bifid;\n"); +- fprintf (header_file, " tree fntype;\n"); +- fprintf (header_file, " ovlddata *GTY((skip(\"\"))) next;\n"); ++ fprintf (header_file, " const char *bifname;\n"); ++ fprintf (header_file, " rs6000_gen_builtins bifid;\n"); ++ fprintf (header_file, " int next;\n"); + fprintf (header_file, "};\n\n"); + + fprintf (header_file, "struct ovldrecord\n"); + fprintf (header_file, "{\n"); + fprintf (header_file, " const char *ovld_name;\n"); +- fprintf (header_file, " ovlddata *first_instance;\n"); ++ fprintf (header_file, " int first_instance;\n"); + fprintf (header_file, "};\n\n"); + + fprintf (header_file, +- "extern GTY(()) ovlddata rs6000_instance_info[RS6000_INST_MAX];\n"); ++ "extern ovlddata rs6000_instance_info[RS6000_INST_MAX];\n"); ++ fprintf (header_file, "extern GTY(()) tree " ++ "rs6000_instance_info_fntype[RS6000_INST_MAX];\n"); + fprintf (header_file, "extern ovldrecord rs6000_overload_info[];\n\n"); + + fprintf (header_file, "extern void rs6000_init_generated_builtins ();\n\n"); +@@ -2481,7 +2484,7 @@ write_bif_static_init (void) + fprintf (init_file, "bifdata rs6000_builtin_info[RS6000_BIF_MAX] =\n"); + fprintf (init_file, " {\n"); + fprintf (init_file, " { /* RS6000_BIF_NONE: */\n"); +- fprintf (init_file, " \"\", ENB_ALWAYS, 0, CODE_FOR_nothing, 0,\n"); ++ fprintf (init_file, " \"\", ENB_ALWAYS, CODE_FOR_nothing, 0,\n"); + fprintf (init_file, " 0, {0, 0, 0}, {RES_NONE, RES_NONE, RES_NONE},\n"); + fprintf (init_file, " {0, 0, 0}, {0, 0, 0}, \"\", RS6000_BIF_NONE\n"); + fprintf (init_file, " },\n"); +@@ -2493,8 +2496,6 @@ write_bif_static_init (void) + bifp->proto.bifname); + fprintf (init_file, " /* enable*/\t%s,\n", + enable_string[bifp->stanza]); +- /* Type must be instantiated at run time. */ +- fprintf (init_file, " /* fntype */\t0,\n"); + fprintf (init_file, " /* icode */\tCODE_FOR_%s,\n", + bifp->patname); + fprintf (init_file, " /* nargs */\t%d,\n", +@@ -2586,6 +2587,8 @@ write_bif_static_init (void) + fprintf (init_file, " },\n"); + } + fprintf (init_file, " };\n\n"); ++ ++ fprintf (init_file, "tree rs6000_builtin_info_fntype[RS6000_BIF_MAX];\n\n"); + } + + /* Write the decls and initializers for rs6000_overload_info[] and +@@ -2598,7 +2601,7 @@ write_ovld_static_init (void) + "- RS6000_OVLD_NONE] =\n"); + fprintf (init_file, " {\n"); + fprintf (init_file, " { /* RS6000_OVLD_NONE: */\n"); +- fprintf (init_file, " \"\", NULL\n"); ++ fprintf (init_file, " \"\", -1\n"); + fprintf (init_file, " },\n"); + for (int i = 0; i <= curr_ovld_stanza; i++) + { +@@ -2607,7 +2610,7 @@ write_ovld_static_init (void) + fprintf (init_file, " /* ovld_name */\t\"%s\",\n", + ovld_stanzas[i].intern_name); + /* First-instance must currently be instantiated at run time. */ +- fprintf (init_file, " /* first_instance */\tNULL\n"); ++ fprintf (init_file, " /* first_instance */\t-1\n"); + fprintf (init_file, " },\n"); + } + fprintf (init_file, " };\n\n"); +@@ -2615,7 +2618,7 @@ write_ovld_static_init (void) + fprintf (init_file, "ovlddata rs6000_instance_info[RS6000_INST_MAX] =\n"); + fprintf (init_file, " {\n"); + fprintf (init_file, " { /* RS6000_INST_NONE: */\n"); +- fprintf (init_file, " \"\", RS6000_BIF_NONE, NULL_TREE, NULL\n"); ++ fprintf (init_file, " \"\", RS6000_BIF_NONE, -1\n"); + fprintf (init_file, " },\n"); + for (int i = 0; i <= curr_ovld; i++) + { +@@ -2625,19 +2628,20 @@ write_ovld_static_init (void) + ovlds[i].proto.bifname); + fprintf (init_file, " /* bifid */\tRS6000_BIF_%s,\n", + ovlds[i].bif_id_name); +- /* Type must be instantiated at run time. */ +- fprintf (init_file, " /* fntype */\t0,\n"); + fprintf (init_file, " /* next */\t"); + if (i < curr_ovld + && !strcmp (ovlds[i+1].proto.bifname, ovlds[i].proto.bifname)) + fprintf (init_file, +- "&rs6000_instance_info[RS6000_INST_%s]\n", ++ "RS6000_INST_%s\n", + ovlds[i+1].ovld_id_name); + else +- fprintf (init_file, "NULL\n"); ++ fprintf (init_file, "-1\n"); + fprintf (init_file, " },\n"); + } + fprintf (init_file, " };\n\n"); ++ ++ fprintf (init_file, ++ "tree rs6000_instance_info_fntype[RS6000_INST_MAX];\n\n"); + } + + /* Write code to initialize the built-in function table. */ +@@ -2647,7 +2651,7 @@ write_init_bif_table (void) + for (int i = 0; i <= curr_bif; i++) + { + fprintf (init_file, +- " rs6000_builtin_info[RS6000_BIF_%s].fntype" ++ " rs6000_builtin_info_fntype[RS6000_BIF_%s]" + "\n = %s;\n", + bifs[i].idname, bifs[i].fndecl); + +@@ -2736,7 +2740,7 @@ write_init_ovld_table (void) + for (int i = 0; i <= curr_ovld; i++) + { + fprintf (init_file, +- " rs6000_instance_info[RS6000_INST_%s].fntype" ++ " rs6000_instance_info_fntype[RS6000_INST_%s]" + "\n = %s;\n", + ovlds[i].ovld_id_name, ovlds[i].fndecl); + +@@ -2793,7 +2797,7 @@ write_init_ovld_table (void) + ".first_instance\n", + stanza->stanza_id); + fprintf (init_file, +- " = &rs6000_instance_info[RS6000_INST_%s];\n\n", ++ " = RS6000_INST_%s;\n\n", + ovlds[i].ovld_id_name); + } + } +--- a/src/gcc/config/rs6000/rs6000-logue.cc ++++ b/src/gcc/config/rs6000/rs6000-logue.cc +@@ -591,21 +591,21 @@ rs6000_savres_strategy (rs6000_stack_t *info, + +---------------------------------------+ + | Parameter save area (+padding*) (P) | 32 + +---------------------------------------+ +- | Optional ROP hash slot (R) | 32+P ++ | Alloca space (A) | 32+P + +---------------------------------------+ +- | Alloca space (A) | 32+P+R ++ | Local variable space (L) | 32+P+A + +---------------------------------------+ +- | Local variable space (L) | 32+P+R+A ++ | Optional ROP hash slot (R) | 32+P+A+L + +---------------------------------------+ +- | Save area for AltiVec registers (W) | 32+P+R+A+L ++ | Save area for AltiVec registers (W) | 32+P+A+L+R + +---------------------------------------+ +- | AltiVec alignment padding (Y) | 32+P+R+A+L+W ++ | AltiVec alignment padding (Y) | 32+P+A+L+R+W + +---------------------------------------+ +- | Save area for GP registers (G) | 32+P+R+A+L+W+Y ++ | Save area for GP registers (G) | 32+P+A+L+R+W+Y + +---------------------------------------+ +- | Save area for FP registers (F) | 32+P+R+A+L+W+Y+G ++ | Save area for FP registers (F) | 32+P+A+L+R+W+Y+G + +---------------------------------------+ +- old SP->| back chain to caller's caller | 32+P+R+A+L+W+Y+G+F ++ old SP->| back chain to caller's caller | 32+P+A+L+R+W+Y+G+F + +---------------------------------------+ + + * If the alloca area is present, the parameter save area is +@@ -716,17 +716,11 @@ rs6000_stack_info (void) + info->calls_p = (!crtl->is_leaf || cfun->machine->ra_needs_full_frame); + info->rop_hash_size = 0; + +- if (TARGET_POWER10 +- && info->calls_p +- && DEFAULT_ABI == ABI_ELFv2 +- && rs6000_rop_protect) ++ /* If we want ROP protection and this function makes a call, indicate ++ we need to create a stack slot to save the hashed return address in. */ ++ if (rs6000_rop_protect ++ && info->calls_p) + info->rop_hash_size = 8; +- else if (rs6000_rop_protect && DEFAULT_ABI != ABI_ELFv2) +- { +- /* We can't check this in rs6000_option_override_internal since +- DEFAULT_ABI isn't established yet. */ +- error ("%qs requires the ELFv2 ABI", "-mrop-protect"); +- } + + /* Determine if we need to save the condition code registers. */ + if (save_reg_p (CR2_REGNO) +@@ -817,17 +811,16 @@ rs6000_stack_info (void) + gcc_assert (info->altivec_size == 0 + || info->altivec_save_offset % 16 == 0); + +- /* Adjust for AltiVec case. */ +- info->ehrd_offset = info->altivec_save_offset - ehrd_size; +- + /* Adjust for ROP protection. */ + info->rop_hash_save_offset + = info->altivec_save_offset - info->rop_hash_size; +- info->ehrd_offset -= info->rop_hash_size; + } + else +- info->ehrd_offset = info->gp_save_offset - ehrd_size; ++ /* Adjust for ROP protection. */ ++ info->rop_hash_save_offset ++ = info->gp_save_offset - info->rop_hash_size; + ++ info->ehrd_offset = info->rop_hash_save_offset - ehrd_size; + info->ehcr_offset = info->ehrd_offset - ehcr_size; + info->cr_save_offset = reg_size; /* first word when 64-bit. */ + info->lr_save_offset = 2*reg_size; +@@ -3276,9 +3269,8 @@ rs6000_emit_prologue (void) + /* NOTE: The hashst isn't needed if we're going to do a sibcall, + but there's no way to know that here. Harmless except for + performance, of course. */ +- if (TARGET_POWER10 && rs6000_rop_protect && info->rop_hash_size != 0) ++ if (info->rop_hash_size) + { +- gcc_assert (DEFAULT_ABI == ABI_ELFv2); + rtx stack_ptr = gen_rtx_REG (Pmode, STACK_POINTER_REGNUM); + rtx addr = gen_rtx_PLUS (Pmode, stack_ptr, + GEN_INT (info->rop_hash_save_offset)); +@@ -4311,9 +4303,6 @@ rs6000_emit_epilogue (enum epilogue_type epilogue_type) + + rs6000_stack_t *info = rs6000_stack_info (); + +- if (epilogue_type == EPILOGUE_TYPE_NORMAL && crtl->calls_eh_return) +- epilogue_type = EPILOGUE_TYPE_EH_RETURN; +- + int strategy = info->savres_strategy; + bool using_load_multiple = !!(strategy & REST_MULTIPLE); + bool restoring_GPRs_inline = !!(strategy & REST_INLINE_GPRS); +@@ -4791,7 +4780,9 @@ rs6000_emit_epilogue (enum epilogue_type epilogue_type) + + /* In the ELFv2 ABI we need to restore all call-saved CR fields from + *separate* slots if the routine calls __builtin_eh_return, so +- that they can be independently restored by the unwinder. */ ++ that they can be independently restored by the unwinder. Since ++ it is for CR fields restoring, it should be done for any epilogue ++ types (not EPILOGUE_TYPE_EH_RETURN specific). */ + if (DEFAULT_ABI == ABI_ELFv2 && crtl->calls_eh_return) + { + int i, cr_off = info->ehcr_offset; +@@ -5056,12 +5047,9 @@ rs6000_emit_epilogue (enum epilogue_type epilogue_type) + + /* The ROP hash check must occur after the stack pointer is restored + (since the hash involves r1), and is not performed for a sibcall. */ +- if (TARGET_POWER10 +- && rs6000_rop_protect +- && info->rop_hash_size != 0 ++ if (info->rop_hash_size + && epilogue_type != EPILOGUE_TYPE_SIBCALL) + { +- gcc_assert (DEFAULT_ABI == ABI_ELFv2); + rtx stack_ptr = gen_rtx_REG (Pmode, STACK_POINTER_REGNUM); + rtx addr = gen_rtx_PLUS (Pmode, stack_ptr, + GEN_INT (info->rop_hash_save_offset)); +--- a/src/gcc/config/rs6000/rs6000.cc ++++ b/src/gcc/config/rs6000/rs6000.cc +@@ -4850,6 +4850,18 @@ rs6000_option_override_internal (bool global_init_p) + } + } + ++ /* We only support ROP protection on certain targets. */ ++ if (rs6000_rop_protect) ++ { ++ /* Disallow CPU targets we don't support. */ ++ if (!TARGET_POWER8) ++ error ("%<-mrop-protect%> requires %<-mcpu=power8%> or later"); ++ ++ /* Disallow ABI targets we don't support. */ ++ if (DEFAULT_ABI != ABI_ELFv2) ++ error ("%<-mrop-protect%> requires the ELFv2 ABI"); ++ } ++ + /* Initialize all of the registers. */ + rs6000_init_hard_regno_mode_ok (global_init_p); + +@@ -5894,7 +5906,8 @@ rs6000_machine_from_flags (void) + HOST_WIDE_INT flags = rs6000_isa_flags; + + /* Disable the flags that should never influence the .machine selection. */ +- flags &= ~(OPTION_MASK_PPC_GFXOPT | OPTION_MASK_PPC_GPOPT | OPTION_MASK_ISEL); ++ flags &= ~(OPTION_MASK_PPC_GFXOPT | OPTION_MASK_PPC_GPOPT | OPTION_MASK_ISEL ++ | OPTION_MASK_ALTIVEC); + + if ((flags & (ISA_3_1_MASKS_SERVER & ~ISA_3_0_MASKS_SERVER)) != 0) + return "power10"; +@@ -5919,6 +5932,8 @@ void + emit_asm_machine (void) + { + fprintf (asm_out_file, "\t.machine %s\n", rs6000_machine); ++ if (TARGET_ALTIVEC) ++ fprintf (asm_out_file, "\t.machine altivec\n"); + } + #endif + +@@ -23166,28 +23181,28 @@ altivec_expand_vec_perm_const (rtx target, rtx op0, rtx op1, + CODE_FOR_altivec_vpkuwum_direct, + {2, 3, 6, 7, 10, 11, 14, 15, 18, 19, 22, 23, 26, 27, 30, 31}}, + {OPTION_MASK_ALTIVEC, +- BYTES_BIG_ENDIAN ? CODE_FOR_altivec_vmrghb_direct +- : CODE_FOR_altivec_vmrglb_direct, ++ BYTES_BIG_ENDIAN ? CODE_FOR_altivec_vmrghb_direct_be ++ : CODE_FOR_altivec_vmrglb_direct_le, + {0, 16, 1, 17, 2, 18, 3, 19, 4, 20, 5, 21, 6, 22, 7, 23}}, + {OPTION_MASK_ALTIVEC, +- BYTES_BIG_ENDIAN ? CODE_FOR_altivec_vmrghh_direct +- : CODE_FOR_altivec_vmrglh_direct, ++ BYTES_BIG_ENDIAN ? CODE_FOR_altivec_vmrghh_direct_be ++ : CODE_FOR_altivec_vmrglh_direct_le, + {0, 1, 16, 17, 2, 3, 18, 19, 4, 5, 20, 21, 6, 7, 22, 23}}, + {OPTION_MASK_ALTIVEC, +- BYTES_BIG_ENDIAN ? CODE_FOR_altivec_vmrghw_direct_v4si +- : CODE_FOR_altivec_vmrglw_direct_v4si, ++ BYTES_BIG_ENDIAN ? CODE_FOR_altivec_vmrghw_direct_v4si_be ++ : CODE_FOR_altivec_vmrglw_direct_v4si_le, + {0, 1, 2, 3, 16, 17, 18, 19, 4, 5, 6, 7, 20, 21, 22, 23}}, + {OPTION_MASK_ALTIVEC, +- BYTES_BIG_ENDIAN ? CODE_FOR_altivec_vmrglb_direct +- : CODE_FOR_altivec_vmrghb_direct, ++ BYTES_BIG_ENDIAN ? CODE_FOR_altivec_vmrglb_direct_be ++ : CODE_FOR_altivec_vmrghb_direct_le, + {8, 24, 9, 25, 10, 26, 11, 27, 12, 28, 13, 29, 14, 30, 15, 31}}, + {OPTION_MASK_ALTIVEC, +- BYTES_BIG_ENDIAN ? CODE_FOR_altivec_vmrglh_direct +- : CODE_FOR_altivec_vmrghh_direct, ++ BYTES_BIG_ENDIAN ? CODE_FOR_altivec_vmrglh_direct_be ++ : CODE_FOR_altivec_vmrghh_direct_le, + {8, 9, 24, 25, 10, 11, 26, 27, 12, 13, 28, 29, 14, 15, 30, 31}}, + {OPTION_MASK_ALTIVEC, +- BYTES_BIG_ENDIAN ? CODE_FOR_altivec_vmrglw_direct_v4si +- : CODE_FOR_altivec_vmrghw_direct_v4si, ++ BYTES_BIG_ENDIAN ? CODE_FOR_altivec_vmrglw_direct_v4si_be ++ : CODE_FOR_altivec_vmrghw_direct_v4si_le, + {8, 9, 10, 11, 24, 25, 26, 27, 12, 13, 14, 15, 28, 29, 30, 31}}, + {OPTION_MASK_P8_VECTOR, + BYTES_BIG_ENDIAN ? CODE_FOR_p8_vmrgew_v4sf_direct +--- a/src/gcc/config/rs6000/rs6000.md ++++ b/src/gcc/config/rs6000/rs6000.md +@@ -14147,6 +14147,8 @@ (define_expand "eh_return" + "" + { + emit_insn (gen_eh_set_lr (Pmode, operands[0])); ++ emit_jump_insn (gen_eh_return_internal ()); ++ emit_barrier (); + DONE; + }) + +@@ -14163,6 +14165,19 @@ (define_insn_and_split "@eh_set_lr_" + DONE; + }) + ++(define_insn_and_split "eh_return_internal" ++ [(eh_return)] ++ "" ++ "#" ++ "epilogue_completed" ++ [(const_int 0)] ++{ ++ if (!TARGET_SCHED_PROLOG) ++ emit_insn (gen_blockage ()); ++ rs6000_emit_epilogue (EPILOGUE_TYPE_EH_RETURN); ++ DONE; ++}) ++ + (define_insn "prefetch" + [(prefetch (match_operand 0 "indexed_or_indirect_address" "a") + (match_operand:SI 1 "const_int_operand" "n") +@@ -15650,9 +15665,9 @@ (define_insn "*cmpeqb_internal" + + (define_insn "hashst" + [(set (match_operand:DI 0 "simple_offsettable_mem_operand" "=m") +- (unspec_volatile:DI [(match_operand:DI 1 "int_reg_operand" "r")] ++ (unspec_volatile:DI [(match_operand:DI 1 "int_reg_operand" "r")] + UNSPEC_HASHST))] +- "TARGET_POWER10 && rs6000_rop_protect" ++ "rs6000_rop_protect" + { + static char templ[32]; + const char *p = rs6000_privileged ? "p" : ""; +@@ -15665,7 +15680,7 @@ (define_insn "hashchk" + [(unspec_volatile [(match_operand:DI 0 "int_reg_operand" "r") + (match_operand:DI 1 "simple_offsettable_mem_operand" "m")] + UNSPEC_HASHCHK)] +- "TARGET_POWER10 && rs6000_rop_protect" ++ "rs6000_rop_protect" + { + static char templ[32]; + const char *p = rs6000_privileged ? "p" : ""; +--- a/src/gcc/config/rs6000/vsx.md ++++ b/src/gcc/config/rs6000/vsx.md +@@ -4683,12 +4683,14 @@ (define_expand "vsx_xxmrghw_" + (const_int 1) (const_int 5)])))] + "VECTOR_MEM_VSX_P (mode)" + { +- rtx (*fun) (rtx, rtx, rtx); +- fun = BYTES_BIG_ENDIAN ? gen_altivec_vmrghw_direct_ +- : gen_altivec_vmrglw_direct_; +- if (!BYTES_BIG_ENDIAN) +- std::swap (operands[1], operands[2]); +- emit_insn (fun (operands[0], operands[1], operands[2])); ++ if (BYTES_BIG_ENDIAN) ++ emit_insn (gen_altivec_vmrghw_direct_v4si_be (operands[0], ++ operands[1], ++ operands[2])); ++ else ++ emit_insn (gen_altivec_vmrglw_direct_v4si_le (operands[0], ++ operands[2], ++ operands[1])); + DONE; + } + [(set_attr "type" "vecperm")]) +@@ -4703,12 +4705,14 @@ (define_expand "vsx_xxmrglw_" + (const_int 3) (const_int 7)])))] + "VECTOR_MEM_VSX_P (mode)" + { +- rtx (*fun) (rtx, rtx, rtx); +- fun = BYTES_BIG_ENDIAN ? gen_altivec_vmrglw_direct_ +- : gen_altivec_vmrghw_direct_; +- if (!BYTES_BIG_ENDIAN) +- std::swap (operands[1], operands[2]); +- emit_insn (fun (operands[0], operands[1], operands[2])); ++ if (BYTES_BIG_ENDIAN) ++ emit_insn (gen_altivec_vmrglw_direct_v4si_be (operands[0], ++ operands[1], ++ operands[2])); ++ else ++ emit_insn (gen_altivec_vmrghw_direct_v4si_le (operands[0], ++ operands[2], ++ operands[1])); + DONE; + } + [(set_attr "type" "vecperm")]) +--- a/src/gcc/config/s390/3931.md ++++ b/src/gcc/config/s390/3931.md +@@ -404,7 +404,6 @@ (define_attr "z16_unit_fxb" "" + vlvgh, + vlvgp, + vst, +-vstbr, + vstbrf, + vstbrg, + vstbrh, +@@ -627,7 +626,6 @@ (define_attr "z16_unit_lsu" "" + tmy, + vl, + vlbb, +-vlbr, + vlbrf, + vlbrg, + vlbrh, +@@ -661,7 +659,6 @@ (define_attr "z16_unit_lsu" "" + vlrl, + vlrlr, + vst, +-vstbr, + vstbrf, + vstbrg, + vstbrh, +@@ -1077,7 +1074,6 @@ (define_attr "z16_unit_vfu" "" + vrepf, + vrepg, + vreph, +-vrepi, + vrepib, + vrepif, + vrepig, +@@ -1930,7 +1926,6 @@ (define_insn_reservation "z16_1" 1 + vrepf, + vrepg, + vreph, +-vrepi, + vrepib, + vrepif, + vrepig, +@@ -2156,7 +2151,6 @@ (define_insn_reservation "z16_3" 3 + vistrhs, + vl, + vlbb, +-vlbr, + vlbrf, + vlbrg, + vlbrh, +@@ -2248,7 +2242,6 @@ (define_insn_reservation "z16_4" 4 + tbeginc, + tend, + vst, +-vstbr, + vstbrf, + vstbrg, + vstbrh, +--- a/src/gcc/config/s390/s390.md ++++ b/src/gcc/config/s390/s390.md +@@ -744,7 +744,7 @@ (define_mode_attr xde [(TF "x") (FPRX2 "x") (DF "d") (SF "e") (TD "x") + ;; In FP templates, a in "mr" will expand to "mxr" in + ;; TF/TDmode, "mdr" in DF/DDmode, "meer" in SFmode and "mer in + ;; SDmode. +-(define_mode_attr xdee [(TF "x") (DF "d") (SF "ee") (TD "x") (DD "d") (SD "e")]) ++(define_mode_attr xdee [(TF "x") (FPRX2 "x") (DF "d") (SF "ee") (TD "x") (DD "d") (SD "e")]) + + ;; The decimal floating point variants of add, sub, div and mul support 3 + ;; fp register operands. The following attributes allow to merge the bfp and +@@ -9480,7 +9480,8 @@ (define_insn "*c" + (define_insn "*icjump_64" + [(set (pc) + (if_then_else +- (match_operator 1 "s390_comparison" [(reg CC_REGNUM) (const_int 0)]) ++ (match_operator 1 "s390_comparison" [(reg CC_REGNUM) ++ (match_operand 2 "const_int_operand" "")]) + (pc) + (label_ref (match_operand 0 "" ""))))] + "" +--- a/src/gcc/config/s390/vector.md ++++ b/src/gcc/config/s390/vector.md +@@ -134,7 +134,7 @@ (define_mode_attr bhfgq[(V1QI "b") (V2QI "b") (V4QI "b") (V8QI "b") (V16QI "b") + (V1TI "q") (TI "q") + (V1SF "f") (V2SF "f") (V4SF "f") + (V1DF "g") (V2DF "g") +- (V1TF "q")]) ++ (V1TF "q") (TF "q")]) + + ; This is for vmalhw. It gets an 'w' attached to avoid confusion with + ; multiply and add logical high vmalh. +@@ -359,8 +359,8 @@ (define_insn "mov" + lr\t%0,%1 + mvi\t%0,0 + mviy\t%0,0 +- mvi\t%0,-1 +- mviy\t%0,-1 ++ mvi\t%0,255 ++ mviy\t%0,255 + lhi\t%0,0 + lhi\t%0,-1 + llc\t%0,%1 +--- a/src/gcc/config/sh/sh.cc ++++ b/src/gcc/config/sh/sh.cc +@@ -12279,7 +12279,17 @@ sh_recog_treg_set_expr (rtx op, machine_mode mode) + have to capture its current state and restore it afterwards. */ + recog_data_d prev_recog_data = recog_data; + +- rtx_insn* i = make_insn_raw (gen_rtx_SET (get_t_reg_rtx (), op)); ++ /* Note we can't use insn_raw here since that increases the uid ++ and could cause debug compare differences; this insn never leaves ++ this function so create a dummy one. */ ++ rtx_insn* i = as_a (rtx_alloc (INSN)); ++ ++ INSN_UID (i) = 1; ++ PATTERN (i) = gen_rtx_SET (get_t_reg_rtx (), op); ++ INSN_CODE (i) = -1; ++ REG_NOTES (i) = NULL; ++ INSN_LOCATION (i) = curr_insn_location (); ++ BLOCK_FOR_INSN (i) = NULL; + SET_PREV_INSN (i) = NULL; + SET_NEXT_INSN (i) = NULL; + +--- a/src/gcc/cp/ChangeLog ++++ b/src/gcc/cp/ChangeLog +@@ -1,3 +1,49 @@ ++2024-08-09 Patrick Palka ++ ++ PR c++/113063 ++ PR c++/116289 ++ * method.cc (synthesize_method): Use cp_evaluated. ++ ++2024-06-17 Jakub Jelinek ++ ++ Backported from master: ++ 2024-06-17 Jakub Jelinek ++ ++ PR target/111343 ++ PR c++/115511 ++ * typeck.cc (cp_compare_floating_point_conversion_ranks): If an ++ extended floating point type mv1 has same set of values as more ++ than one standard floating point type and mv2 is float, return 2. ++ ++2024-05-24 Jason Merrill ++ ++ Backported from master: ++ 2023-09-22 Jason Merrill ++ ++ PR c++/111529 ++ * parser.cc (cp_parser_lambda_declarator_opt): Don't suggest ++ -std=c++14 for lambda templates. ++ * pt.cc (tsubst_expr): Move ANNOTATE_EXPR handling... ++ (tsubst_copy_and_build): ...here. ++ ++2024-05-24 Jason Merrill ++ ++ Backported from master: ++ 2024-01-25 Jason Merrill ++ ++ PR c++/113598 ++ * init.cc (build_vec_init): Don't use {} for PMF. ++ ++2024-05-21 Jonathan Wakely ++ ++ Backported from master: ++ 2024-05-21 Jonathan Wakely ++ ++ PR libstdc++/107800 ++ * cxxapi-data.csv : Change dialect to cxx20. ++ * std-name-hint.gperf: Regenerate. ++ * std-name-hint.h: Regenerate. ++ + 2024-05-21 Release Manager + + * GCC 13.3.0 released. +--- a/src/gcc/cp/cxxapi-data.csv ++++ b/src/gcc/cp/cxxapi-data.csv +@@ -460,7 +460,7 @@ + # unimplemented ,default_accessor,1,no + # unimplemented ,mdspan,1,cxx23 + ,pointer_traits,1,cxx11 +-,to_address,1,cxx11 ++,to_address,1,cxx20 + ,align,1,cxx11 + ,assume_aligned,1,cxx20 + ,allocator_arg_t,1,cxx11 +--- a/src/gcc/cp/init.cc ++++ b/src/gcc/cp/init.cc +@@ -4859,7 +4859,9 @@ build_vec_init (tree base, tree maxindex, tree init, + But for non-classes, that's the same as value-initialization. */ + if (empty_list) + { +- if (cxx_dialect >= cxx11 && AGGREGATE_TYPE_P (type)) ++ if (cxx_dialect >= cxx11 ++ && (CLASS_TYPE_P (type) ++ || TREE_CODE (type) == ARRAY_TYPE)) + { + init = build_constructor (init_list_type_node, NULL); + } +--- a/src/gcc/cp/method.cc ++++ b/src/gcc/cp/method.cc +@@ -1797,6 +1797,7 @@ synthesize_method (tree fndecl) + it now. */ + push_deferring_access_checks (dk_no_deferred); + ++ cp_evaluated ev; + if (! context) + push_to_top_level (); + else if (nested) +--- a/src/gcc/cp/parser.cc ++++ b/src/gcc/cp/parser.cc +@@ -11558,11 +11558,8 @@ cp_parser_lambda_declarator_opt (cp_parser* parser, tree lambda_expr) + an opening angle if present. */ + if (cp_lexer_next_token_is (parser->lexer, CPP_LESS)) + { +- if (cxx_dialect < cxx14) +- pedwarn (parser->lexer->next_token->location, OPT_Wc__14_extensions, +- "lambda templates are only available with " +- "%<-std=c++14%> or %<-std=gnu++14%>"); +- else if (pedantic && cxx_dialect < cxx20) ++ if (cxx_dialect < cxx20 ++ && (pedantic || cxx_dialect < cxx14)) + pedwarn (parser->lexer->next_token->location, OPT_Wc__20_extensions, + "lambda templates are only available with " + "%<-std=c++20%> or %<-std=gnu++20%>"); +--- a/src/gcc/cp/pt.cc ++++ b/src/gcc/cp/pt.cc +@@ -19926,13 +19926,6 @@ tsubst_expr (tree t, tree args, tsubst_flags_t complain, tree in_decl) + templated_operator_saved_lookups (t), + complain)); + +- case ANNOTATE_EXPR: +- tmp = RECUR (TREE_OPERAND (t, 0)); +- RETURN (build3_loc (EXPR_LOCATION (t), ANNOTATE_EXPR, +- TREE_TYPE (tmp), tmp, +- RECUR (TREE_OPERAND (t, 1)), +- RECUR (TREE_OPERAND (t, 2)))); +- + case PREDICT_EXPR: + RETURN (add_stmt (copy_node (t))); + +@@ -21862,6 +21855,13 @@ tsubst_copy_and_build (tree t, + RETURN (op); + } + ++ case ANNOTATE_EXPR: ++ op1 = RECUR (TREE_OPERAND (t, 0)); ++ RETURN (build3_loc (EXPR_LOCATION (t), ANNOTATE_EXPR, ++ TREE_TYPE (op1), op1, ++ RECUR (TREE_OPERAND (t, 1)), ++ RECUR (TREE_OPERAND (t, 2)))); ++ + default: + /* Handle Objective-C++ constructs, if appropriate. */ + { +--- a/src/gcc/cp/std-name-hint.gperf ++++ b/src/gcc/cp/std-name-hint.gperf +@@ -220,7 +220,7 @@ pointer_traits, "", cxx11 + reinterpret_pointer_cast, "", cxx17 + shared_ptr, "", cxx11 + static_pointer_cast, "", cxx11 +-to_address, "", cxx11 ++to_address, "", cxx20 + uninitialized_construct_using_allocator, "", cxx20 + unique_ptr, "", cxx11 + uses_allocator, "", cxx11 +--- a/src/gcc/cp/std-name-hint.h ++++ b/src/gcc/cp/std-name-hint.h +@@ -291,7 +291,7 @@ std_name_hint_lookup::find (const char *str, size_t len) + #line 472 "std-name-hint.gperf" + {"variant_npos", "", cxx17}, + #line 223 "std-name-hint.gperf" +- {"to_address", "", cxx11}, ++ {"to_address", "", cxx20}, + #line 460 "std-name-hint.gperf" + {"pair", "", cxx98}, + #line 269 "std-name-hint.gperf" +--- a/src/gcc/cp/typeck.cc ++++ b/src/gcc/cp/typeck.cc +@@ -393,6 +393,9 @@ cp_compare_floating_point_conversion_ranks (tree t1, tree t2) + has higher rank. */ + if (cnt > 1 && mv2 == long_double_type_node) + return -2; ++ /* And similarly if t2 is float, t2 has lower rank. */ ++ if (cnt > 1 && mv2 == float_type_node) ++ return 2; + /* Otherwise, they have equal rank, but extended types + (other than std::bfloat16_t) have higher subrank. + std::bfloat16_t shouldn't have equal rank to any standard +--- a/src/gcc/cse.cc ++++ b/src/gcc/cse.cc +@@ -239,7 +239,7 @@ static int next_qty; + the constant being compared against, or zero if the comparison + is not against a constant. `comparison_qty' holds the quantity + being compared against when the result is known. If the comparison +- is not with a register, `comparison_qty' is -1. */ ++ is not with a register, `comparison_qty' is INT_MIN. */ + + struct qty_table_elem + { +@@ -4068,7 +4068,7 @@ record_jump_cond (enum rtx_code code, machine_mode mode, rtx op0, + else + { + ent->comparison_const = op1; +- ent->comparison_qty = -1; ++ ent->comparison_qty = INT_MIN; + } + + return; +--- a/src/gcc/expmed.cc ++++ b/src/gcc/expmed.cc +@@ -5607,11 +5607,9 @@ emit_store_flag_1 (rtx target, enum rtx_code code, rtx op0, rtx op1, + enum insn_code icode; + machine_mode compare_mode; + enum mode_class mclass; +- enum rtx_code scode; + + if (unsignedp) + code = unsigned_condition (code); +- scode = swap_condition (code); + + /* If one operand is constant, make it the second one. Only do this + if the other operand is not constant as well. */ +@@ -5726,6 +5724,8 @@ emit_store_flag_1 (rtx target, enum rtx_code code, rtx op0, rtx op1, + + if (GET_MODE_CLASS (mode) == MODE_FLOAT) + { ++ enum rtx_code scode = swap_condition (code); ++ + tem = emit_cstore (target, icode, scode, mode, compare_mode, + unsignedp, op1, op0, normalizep, target_mode); + if (tem) +--- a/src/gcc/fold-const.cc ++++ b/src/gcc/fold-const.cc +@@ -85,6 +85,7 @@ along with GCC; see the file COPYING3. If not see + #include "vec-perm-indices.h" + #include "asan.h" + #include "gimple-range.h" ++#include "internal-fn.h" + + /* Nonzero if we are folding constants inside an initializer or a C++ + manifestly-constant-evaluated context; zero otherwise. +@@ -14887,7 +14888,6 @@ tree_call_nonnegative_warnv_p (tree type, combined_fn fn, tree arg0, tree arg1, + CASE_CFN_FFS: + CASE_CFN_PARITY: + CASE_CFN_POPCOUNT: +- CASE_CFN_CLZ: + CASE_CFN_CLRSB: + case CFN_BUILT_IN_BSWAP16: + case CFN_BUILT_IN_BSWAP32: +@@ -14896,6 +14896,22 @@ tree_call_nonnegative_warnv_p (tree type, combined_fn fn, tree arg0, tree arg1, + /* Always true. */ + return true; + ++ CASE_CFN_CLZ: ++ if (fn != CFN_CLZ) ++ return true; ++ else if (INTEGRAL_TYPE_P (TREE_TYPE (arg0))) ++ { ++ tree atype = TREE_TYPE (arg0); ++ int val = 0; ++ if (direct_internal_fn_supported_p (IFN_CLZ, atype, ++ OPTIMIZE_FOR_BOTH) ++ && CLZ_DEFINED_VALUE_AT_ZERO (SCALAR_INT_TYPE_MODE (atype), ++ val) == 2 ++ && val >= 0) ++ return true; ++ } ++ break; ++ + CASE_CFN_SQRT: + CASE_CFN_SQRT_FN: + /* sqrt(-0.0) is -0.0. */ +--- a/src/gcc/fortran/ChangeLog ++++ b/src/gcc/fortran/ChangeLog +@@ -1,3 +1,150 @@ ++2024-08-05 Paul Thomas ++ ++ Backported from master: ++ 2024-07-18 Paul Thomas ++ ++ PR fortran/108889 ++ * gfortran.h: Add bit field 'allocated_in_scope' to gfc_symbol. ++ * trans-array.cc (gfc_array_allocate): Set 'allocated_in_scope' ++ after allocation if not a component reference. ++ (gfc_alloc_allocatable_for_assignment): If 'allocated_in_scope' ++ not set, not a component ref and not allocated, set the array ++ bounds and offset to give zero length in all dimensions. Then ++ set allocated_in_scope. ++ ++2024-07-21 Harald Anlauf ++ ++ Backported from master: ++ 2024-07-19 Harald Anlauf ++ ++ PR fortran/103115 ++ * trans-array.cc (gfc_trans_array_constructor_value): If the first ++ element of an array constructor is deferred-length character and ++ therefore does not have an element size known at compile time, do ++ not try to collect subsequent constant elements into a constructor ++ for optimization. ++ ++2024-07-20 Paul Thomas ++ ++ Backported from master: ++ 2024-05-13 Paul Thomas ++ ++ PR fortran/113363 ++ * trans-array.cc (gfc_array_init_size): Use the expr3 dtype so ++ that the correct element size is used. ++ * trans-expr.cc (gfc_conv_procedure_call): Remove restriction ++ that ss and ss->loop be present for the finalization of class ++ array function results. ++ (trans_class_assignment): Use free and malloc, rather than ++ realloc, for character expressions assigned to unlimited poly ++ entities. ++ * trans-stmt.cc (gfc_trans_allocate): Build a correct rhs for ++ the assignment of an unlimited polymorphic 'source'. ++ ++2024-07-12 Paul Thomas ++ ++ Backported from master: ++ 2024-05-23 Paul Thomas ++ ++ PR fortran/103312 ++ * dependency.cc (gfc_dep_compare_expr): Handle component call ++ expressions. Return -2 as default and return 0 if compared with ++ a function expression that is from an interface body and has ++ the same name. ++ * expr.cc (gfc_reduce_init_expr): If the expression is a comp ++ call do not attempt to reduce, defer to resolution and return ++ false. ++ * trans-types.cc (gfc_get_dtype_rank_type, ++ gfc_get_nodesc_array_type): Fix whitespace. ++ ++2024-07-08 Paul Thomas ++ ++ Backported from master: ++ 2024-05-12 Paul Thomas ++ ++ PR fortran/84006 ++ PR fortran/100027 ++ PR fortran/98534 ++ * iresolve.cc (gfc_resolve_transfer): Emit a TODO error for ++ unlimited polymorphic mold. ++ * trans-expr.cc (gfc_resize_class_size_with_len): Use the fold ++ even if a block is not available in which to fix the result. ++ (trans_class_assignment): Enable correct assignment of ++ character expressions to unlimited polymorphic variables using ++ lhs _len field and rse string_length. ++ * trans-intrinsic.cc (gfc_conv_intrinsic_storage_size): Extract ++ the class expression so that the unlimited polymorphic class ++ expression can be used in gfc_resize_class_size_with_len to ++ obtain the storage size for character payloads. Guard the use ++ of GFC_DECL_SAVED_DESCRIPTOR by testing for DECL_LANG_SPECIFIC ++ to prevent the ICE. Also, invert the order to use the class ++ expression extracted from the argument. ++ (gfc_conv_intrinsic_transfer): In same way as 'storage_size', ++ use the _len field to obtaining the correct length for arg 1. ++ Add a branch for the element size in bytes of class expressions ++ with provision to make use of the unlimited polymorphic _len ++ field. Again, the class references are explicitly identified. ++ 'mold_expr' was already declared. Use it instead of 'arg'. Do ++ not fix 'dest_word_len' for deferred character sources because ++ reallocation on assign makes use of it before it is assigned. ++ ++2024-06-19 Harald Anlauf ++ ++ Backported from master: ++ 2024-06-04 Harald Anlauf ++ ++ PR fortran/83865 ++ * trans-stmt.cc (gfc_trans_allocate): Restrict special case for ++ source-expression with zero-length character to rank 0, so that ++ the array shape is not discarded. ++ ++2024-05-28 Tobias Burnus ++ ++ Backported from master: ++ 2024-05-20 Tobias Burnus ++ ++ PR fortran/115150 ++ * trans-intrinsic.cc (gfc_conv_intrinsic_bound): Fix SHAPE ++ for zero-size arrays ++ ++2024-05-22 Harald Anlauf ++ ++ Backported from master: ++ 2024-05-05 Harald Anlauf ++ ++ PR fortran/114827 ++ * trans-array.cc (gfc_alloc_allocatable_for_assignment): Take into ++ account _len of unlimited polymorphic entities when calculating ++ the effective element size for allocation size and array span. ++ Set _len of lhs to _len of rhs. ++ * trans-expr.cc (trans_class_assignment): Take into account _len ++ of unlimited polymorphic entities for allocation size. ++ ++2024-05-22 Andrew Jenner ++ ++ Backported from master: ++ 2023-11-28 Andrew Jenner ++ Tobias Burnus ++ ++ PR fortran/110415 ++ * trans-expr.cc (trans_class_vptr_len_assignment): Add ++ from_vptrp parameter. Populate it. Don't check for DECL_P ++ when deciding whether to create temporary. ++ (trans_class_pointer_fcn, gfc_trans_pointer_assignment): Add ++ NULL argument to trans_class_vptr_len_assignment calls. ++ (trans_class_assignment): Get rhs_vptr from ++ trans_class_vptr_len_assignment and use it for determining size ++ for allocation/reallocation. Use return value from realloc. ++ ++2024-05-21 Harald Anlauf ++ ++ Backported from master: ++ 2024-05-11 Harald Anlauf ++ ++ PR fortran/115039 ++ * expr.cc (gfc_traverse_expr): An inquiry ref does not constitute ++ a dependency and cannot collide with a symbol. ++ + 2024-05-21 Release Manager + + * GCC 13.3.0 released. +--- a/src/gcc/fortran/dependency.cc ++++ b/src/gcc/fortran/dependency.cc +@@ -440,6 +440,38 @@ gfc_dep_compare_expr (gfc_expr *e1, gfc_expr *e2) + return mpz_sgn (e2->value.op.op2->value.integer); + } + ++ ++ if (e1->expr_type == EXPR_COMPCALL) ++ { ++ /* This will have emerged from interface.cc(gfc_check_typebound_override) ++ via gfc_check_result_characteristics. It is possible that other ++ variants exist that are 'equal' but play it safe for now by setting ++ the relationship as 'indeterminate'. */ ++ if (e2->expr_type == EXPR_FUNCTION && e2->ref) ++ { ++ gfc_ref *ref = e2->ref; ++ gfc_symbol *s = NULL; ++ ++ if (e1->value.compcall.tbp->u.specific) ++ s = e1->value.compcall.tbp->u.specific->n.sym; ++ ++ /* Check if the proc ptr points to an interface declaration and the ++ names are the same; ie. the overriden proc. of an abstract type. ++ The checking of the arguments will already have been done. */ ++ for (; ref && s; ref = ref->next) ++ if (!ref->next && ref->type == REF_COMPONENT ++ && ref->u.c.component->attr.proc_pointer ++ && ref->u.c.component->ts.interface ++ && ref->u.c.component->ts.interface->attr.if_source ++ == IFSRC_IFBODY ++ && !strcmp (s->name, ref->u.c.component->name)) ++ return 0; ++ } ++ ++ /* Assume as default that TKR checking is sufficient. */ ++ return -2; ++ } ++ + if (e1->expr_type != e2->expr_type) + return -3; + +--- a/src/gcc/fortran/expr.cc ++++ b/src/gcc/fortran/expr.cc +@@ -3188,6 +3188,11 @@ gfc_reduce_init_expr (gfc_expr *expr) + { + bool t; + ++ /* It is far too early to resolve a class compcall. Punt to resolution. */ ++ if (expr && expr->expr_type == EXPR_COMPCALL ++ && expr->symtree->n.sym->ts.type == BT_CLASS) ++ return false; ++ + gfc_init_expr_flag = true; + t = gfc_resolve_expr (expr); + if (t) +@@ -5483,7 +5488,7 @@ gfc_traverse_expr (gfc_expr *expr, gfc_symbol *sym, + break; + + case REF_INQUIRY: +- return true; ++ return false; + + default: + gcc_unreachable (); +--- a/src/gcc/fortran/gfortran.h ++++ b/src/gcc/fortran/gfortran.h +@@ -1927,6 +1927,10 @@ typedef struct gfc_symbol + /* Set if this should be passed by value, but is not a VALUE argument + according to the Fortran standard. */ + unsigned pass_as_value:1; ++ /* Set if an allocatable array variable has been allocated in the current ++ scope. Used in the suppression of uninitialized warnings in reallocation ++ on assignment. */ ++ unsigned allocated_in_scope:1; + + int refs; + struct gfc_namespace *ns; /* namespace containing this symbol */ +--- a/src/gcc/fortran/iresolve.cc ++++ b/src/gcc/fortran/iresolve.cc +@@ -3017,6 +3017,10 @@ gfc_resolve_transfer (gfc_expr *f, gfc_expr *source ATTRIBUTE_UNUSED, + } + } + ++ if (UNLIMITED_POLY (mold)) ++ gfc_error ("TODO: unlimited polymorphic MOLD in TRANSFER intrinsic at %L", ++ &mold->where); ++ + f->ts = mold->ts; + + if (size == NULL && mold->rank == 0) +--- a/src/gcc/fortran/trans-array.cc ++++ b/src/gcc/fortran/trans-array.cc +@@ -2119,7 +2119,9 @@ gfc_trans_array_constructor_value (stmtblock_t * pblock, + p = gfc_constructor_next (p); + n++; + } +- if (n < 4) ++ /* Constructor with few constant elements, or element size not ++ known at compile time (e.g. deferred-length character). */ ++ if (n < 4 || !INTEGER_CST_P (TYPE_SIZE_UNIT (type))) + { + /* Scalar values. */ + gfc_init_se (&se, NULL); +@@ -5795,6 +5797,11 @@ gfc_array_init_size (tree descriptor, int rank, int corank, tree * poffset, + tmp = gfc_conv_descriptor_dtype (descriptor); + gfc_add_modify (pblock, tmp, gfc_get_dtype_rank_type (rank, type)); + } ++ else if (expr3_desc && GFC_DESCRIPTOR_TYPE_P (TREE_TYPE (expr3_desc))) ++ { ++ tmp = gfc_conv_descriptor_dtype (descriptor); ++ gfc_add_modify (pblock, tmp, gfc_conv_descriptor_dtype (expr3_desc)); ++ } + else + { + tmp = gfc_conv_descriptor_dtype (descriptor); +@@ -6334,6 +6341,8 @@ gfc_array_allocate (gfc_se * se, gfc_expr * expr, tree status, tree errmsg, + else + gfc_add_expr_to_block (&se->pre, set_descriptor); + ++ expr->symtree->n.sym->allocated_in_scope = 1; ++ + return true; + } + +@@ -10638,6 +10647,8 @@ gfc_alloc_allocatable_for_assignment (gfc_loopinfo *loop, + stmtblock_t realloc_block; + stmtblock_t alloc_block; + stmtblock_t fblock; ++ stmtblock_t loop_pre_block; ++ gfc_ref *ref; + gfc_ss *rss; + gfc_ss *lss; + gfc_array_info *linfo; +@@ -10838,6 +10849,45 @@ gfc_alloc_allocatable_for_assignment (gfc_loopinfo *loop, + array1, build_int_cst (TREE_TYPE (array1), 0)); + cond_null= gfc_evaluate_now (cond_null, &fblock); + ++ /* If the data is null, set the descriptor bounds and offset. This suppresses ++ the maybe used uninitialized warning and forces the use of malloc because ++ the size is zero in all dimensions. Note that this block is only executed ++ if the lhs is unallocated and is only applied once in any namespace. ++ Component references are not subject to the warnings. */ ++ for (ref = expr1->ref; ref; ref = ref->next) ++ if (ref->type == REF_COMPONENT) ++ break; ++ ++ if (!expr1->symtree->n.sym->allocated_in_scope && !ref) ++ { ++ gfc_start_block (&loop_pre_block); ++ for (n = 0; n < expr1->rank; n++) ++ { ++ gfc_conv_descriptor_lbound_set (&loop_pre_block, desc, ++ gfc_rank_cst[n], ++ gfc_index_one_node); ++ gfc_conv_descriptor_ubound_set (&loop_pre_block, desc, ++ gfc_rank_cst[n], ++ gfc_index_zero_node); ++ gfc_conv_descriptor_stride_set (&loop_pre_block, desc, ++ gfc_rank_cst[n], ++ gfc_index_zero_node); ++ } ++ ++ tmp = gfc_conv_descriptor_offset (desc); ++ gfc_add_modify (&loop_pre_block, tmp, gfc_index_zero_node); ++ ++ tmp = fold_build2_loc (input_location, EQ_EXPR, ++ logical_type_node, array1, ++ build_int_cst (TREE_TYPE (array1), 0)); ++ tmp = build3_v (COND_EXPR, tmp, ++ gfc_finish_block (&loop_pre_block), ++ build_empty_stmt (input_location)); ++ gfc_prepend_expr_to_block (&loop->pre, tmp); ++ ++ expr1->symtree->n.sym->allocated_in_scope = 1; ++ } ++ + tmp = build3_v (COND_EXPR, cond_null, + build1_v (GOTO_EXPR, jump_label1), + build_empty_stmt (input_location)); +@@ -11008,6 +11058,19 @@ gfc_alloc_allocatable_for_assignment (gfc_loopinfo *loop, + gfc_add_modify (&fblock, linfo->delta[dim], tmp); + } + ++ /* Take into account _len of unlimited polymorphic entities, so that span ++ for array descriptors and allocation sizes are computed correctly. */ ++ if (UNLIMITED_POLY (expr2)) ++ { ++ tree len = gfc_class_len_get (TREE_OPERAND (desc2, 0)); ++ len = fold_build2_loc (input_location, MAX_EXPR, size_type_node, ++ fold_convert (size_type_node, len), ++ size_one_node); ++ elemsize2 = fold_build2_loc (input_location, MULT_EXPR, ++ gfc_array_index_type, elemsize2, ++ fold_convert (gfc_array_index_type, len)); ++ } ++ + if (GFC_DESCRIPTOR_TYPE_P (TREE_TYPE (desc))) + gfc_conv_descriptor_span_set (&fblock, desc, elemsize2); + +@@ -11054,6 +11117,9 @@ gfc_alloc_allocatable_for_assignment (gfc_loopinfo *loop, + gfc_add_modify (&fblock, tmp, + fold_convert (TREE_TYPE (tmp), + TYPE_SIZE_UNIT (type))); ++ else if (UNLIMITED_POLY (expr2)) ++ gfc_add_modify (&fblock, tmp, ++ gfc_class_len_get (TREE_OPERAND (desc2, 0))); + else + gfc_add_modify (&fblock, tmp, + build_int_cst (TREE_TYPE (tmp), 0)); +--- a/src/gcc/fortran/trans-expr.cc ++++ b/src/gcc/fortran/trans-expr.cc +@@ -317,6 +317,8 @@ gfc_resize_class_size_with_len (stmtblock_t * block, tree class_expr, tree size) + size = gfc_evaluate_now (size, block); + tmp = gfc_evaluate_now (fold_convert (type , tmp), block); + } ++ else ++ tmp = fold_convert (type , tmp); + tmp2 = fold_build2_loc (input_location, MULT_EXPR, + type, size, tmp); + tmp = fold_build2_loc (input_location, GT_EXPR, +@@ -7982,8 +7984,7 @@ gfc_conv_procedure_call (gfc_se * se, gfc_symbol * sym, + call the finalization function of the temporary. Note that the + nullification of allocatable components needed by the result + is done in gfc_trans_assignment_1. */ +- if (expr && ((gfc_is_class_array_function (expr) +- && se->ss && se->ss->loop) ++ if (expr && (gfc_is_class_array_function (expr) + || gfc_is_alloc_class_scalar_function (expr)) + && se->expr && GFC_CLASS_TYPE_P (TREE_TYPE (se->expr)) + && expr->must_finalize) +@@ -9748,7 +9749,8 @@ trans_get_upoly_len (stmtblock_t *block, gfc_expr *expr) + static tree + trans_class_vptr_len_assignment (stmtblock_t *block, gfc_expr * le, + gfc_expr * re, gfc_se *rse, +- tree * to_lenp, tree * from_lenp) ++ tree * to_lenp, tree * from_lenp, ++ tree * from_vptrp) + { + gfc_se se; + gfc_expr * vptr_expr; +@@ -9756,10 +9758,11 @@ trans_class_vptr_len_assignment (stmtblock_t *block, gfc_expr * le, + bool set_vptr = false, temp_rhs = false; + stmtblock_t *pre = block; + tree class_expr = NULL_TREE; ++ tree from_vptr = NULL_TREE; + + /* Create a temporary for complicated expressions. */ + if (re->expr_type != EXPR_VARIABLE && re->expr_type != EXPR_NULL +- && rse->expr != NULL_TREE && !DECL_P (rse->expr)) ++ && rse->expr != NULL_TREE) + { + if (re->ts.type == BT_CLASS && !GFC_CLASS_TYPE_P (TREE_TYPE (rse->expr))) + class_expr = gfc_get_class_from_expr (rse->expr); +@@ -9856,6 +9859,7 @@ trans_class_vptr_len_assignment (stmtblock_t *block, gfc_expr * le, + tmp = rse->expr; + + se.expr = gfc_class_vptr_get (tmp); ++ from_vptr = se.expr; + if (UNLIMITED_POLY (re)) + from_len = gfc_class_len_get (tmp); + +@@ -9877,6 +9881,7 @@ trans_class_vptr_len_assignment (stmtblock_t *block, gfc_expr * le, + gfc_free_expr (vptr_expr); + gfc_add_block_to_block (block, &se.pre); + gcc_assert (se.post.head == NULL_TREE); ++ from_vptr = se.expr; + } + gfc_add_modify (pre, lhs_vptr, fold_convert (TREE_TYPE (lhs_vptr), + se.expr)); +@@ -9905,11 +9910,13 @@ trans_class_vptr_len_assignment (stmtblock_t *block, gfc_expr * le, + } + } + +- /* Return the _len trees only, when requested. */ ++ /* Return the _len and _vptr trees only, when requested. */ + if (to_lenp) + *to_lenp = to_len; + if (from_lenp) + *from_lenp = from_len; ++ if (from_vptrp) ++ *from_vptrp = from_vptr; + return lhs_vptr; + } + +@@ -9978,7 +9985,7 @@ trans_class_pointer_fcn (stmtblock_t *block, gfc_se *lse, gfc_se *rse, + { + expr1_vptr = trans_class_vptr_len_assignment (block, expr1, + expr2, rse, +- NULL, NULL); ++ NULL, NULL, NULL); + gfc_add_block_to_block (block, &rse->pre); + tmp = gfc_create_var (TREE_TYPE (rse->expr), "ptrtemp"); + gfc_add_modify (&lse->pre, tmp, rse->expr); +@@ -10054,7 +10061,7 @@ gfc_trans_pointer_assignment (gfc_expr * expr1, gfc_expr * expr2) + if (non_proc_ptr_assign && expr1->ts.type == BT_CLASS) + { + trans_class_vptr_len_assignment (&block, expr1, expr2, &rse, NULL, +- NULL); ++ NULL, NULL); + lse.expr = gfc_class_data_get (lse.expr); + } + +@@ -10183,7 +10190,8 @@ gfc_trans_pointer_assignment (gfc_expr * expr1, gfc_expr * expr2) + if (expr1->ts.type == BT_CLASS) + expr1_vptr = trans_class_vptr_len_assignment (&block, expr1, + expr2, &rse, +- NULL, NULL); ++ NULL, NULL, ++ NULL); + } + } + else if (expr2->expr_type == EXPR_VARIABLE) +@@ -10200,7 +10208,7 @@ gfc_trans_pointer_assignment (gfc_expr * expr1, gfc_expr * expr2) + rse.expr = NULL_TREE; + rse.string_length = strlen_rhs; + trans_class_vptr_len_assignment (&block, expr1, expr2, &rse, +- NULL, NULL); ++ NULL, NULL, NULL); + } + + if (remap == NULL) +@@ -10233,7 +10241,7 @@ gfc_trans_pointer_assignment (gfc_expr * expr1, gfc_expr * expr2) + { + expr1_vptr = trans_class_vptr_len_assignment (&block, expr1, + expr2, &rse, NULL, +- NULL); ++ NULL, NULL); + gfc_add_block_to_block (&block, &rse.pre); + tmp = gfc_create_var (TREE_TYPE (rse.expr), "ptrtemp"); + gfc_add_modify (&lse.pre, tmp, rse.expr); +@@ -11621,7 +11629,7 @@ trans_class_assignment (stmtblock_t *block, gfc_expr *lhs, gfc_expr *rhs, + gfc_se *lse, gfc_se *rse, bool use_vptr_copy, + bool class_realloc) + { +- tree tmp, fcn, stdcopy, to_len, from_len, vptr, old_vptr; ++ tree tmp, fcn, stdcopy, to_len, from_len, vptr, old_vptr, rhs_vptr; + vec *args = NULL; + bool final_expr; + +@@ -11645,7 +11653,9 @@ trans_class_assignment (stmtblock_t *block, gfc_expr *lhs, gfc_expr *rhs, + } + + vptr = trans_class_vptr_len_assignment (block, lhs, rhs, rse, &to_len, +- &from_len); ++ &from_len, &rhs_vptr); ++ if (rhs_vptr == NULL_TREE) ++ rhs_vptr = vptr; + + /* Generate (re)allocation of the lhs. */ + if (class_realloc) +@@ -11658,7 +11668,29 @@ trans_class_assignment (stmtblock_t *block, gfc_expr *lhs, gfc_expr *rhs, + else + old_vptr = build_int_cst (TREE_TYPE (vptr), 0); + +- size = gfc_vptr_size_get (vptr); ++ size = gfc_vptr_size_get (rhs_vptr); ++ ++ /* Take into account _len of unlimited polymorphic entities. ++ TODO: handle class(*) allocatable function results on rhs. */ ++ if (UNLIMITED_POLY (rhs)) ++ { ++ tree len; ++ if (rhs->expr_type == EXPR_VARIABLE) ++ len = trans_get_upoly_len (block, rhs); ++ else ++ len = gfc_class_len_get (tmp); ++ len = fold_build2_loc (input_location, MAX_EXPR, size_type_node, ++ fold_convert (size_type_node, len), ++ size_one_node); ++ size = fold_build2_loc (input_location, MULT_EXPR, TREE_TYPE (size), ++ size, fold_convert (TREE_TYPE (size), len)); ++ } ++ else if (rhs->ts.type == BT_CHARACTER && rse->string_length) ++ size = fold_build2_loc (input_location, MULT_EXPR, ++ gfc_charlen_type_node, size, ++ rse->string_length); ++ ++ + tmp = lse->expr; + class_han = GFC_CLASS_TYPE_P (TREE_TYPE (tmp)) + ? gfc_class_data_get (tmp) : tmp; +@@ -11672,16 +11704,25 @@ trans_class_assignment (stmtblock_t *block, gfc_expr *lhs, gfc_expr *rhs, + + /* Reallocate if dynamic types are different. */ + gfc_init_block (&re_alloc); +- re = build_call_expr_loc (input_location, +- builtin_decl_explicit (BUILT_IN_REALLOC), 2, +- fold_convert (pvoid_type_node, class_han), +- size); +- tmp = fold_build2_loc (input_location, NE_EXPR, +- logical_type_node, vptr, old_vptr); +- re = fold_build3_loc (input_location, COND_EXPR, void_type_node, +- tmp, re, build_empty_stmt (input_location)); +- gfc_add_expr_to_block (&re_alloc, re); +- ++ if (UNLIMITED_POLY (lhs) && rhs->ts.type == BT_CHARACTER) ++ { ++ gfc_add_expr_to_block (&re_alloc, gfc_call_free (class_han)); ++ gfc_allocate_using_malloc (&re_alloc, class_han, size, NULL_TREE); ++ } ++ else ++ { ++ tmp = fold_convert (pvoid_type_node, class_han); ++ re = build_call_expr_loc (input_location, ++ builtin_decl_explicit (BUILT_IN_REALLOC), ++ 2, tmp, size); ++ re = fold_build2_loc (input_location, MODIFY_EXPR, TREE_TYPE (tmp), ++ tmp, re); ++ tmp = fold_build2_loc (input_location, NE_EXPR, ++ logical_type_node, rhs_vptr, old_vptr); ++ re = fold_build3_loc (input_location, COND_EXPR, void_type_node, ++ tmp, re, build_empty_stmt (input_location)); ++ gfc_add_expr_to_block (&re_alloc, re); ++ } + tree realloc_expr = lhs->ts.type == BT_CLASS ? + gfc_finish_block (&re_alloc) : + build_empty_stmt (input_location); +--- a/src/gcc/fortran/trans-intrinsic.cc ++++ b/src/gcc/fortran/trans-intrinsic.cc +@@ -3090,7 +3090,9 @@ gfc_conv_intrinsic_bound (gfc_se * se, gfc_expr * expr, enum gfc_isym_id op) + lbound, gfc_index_one_node); + } + else if (op == GFC_ISYM_SHAPE) +- se->expr = size; ++ se->expr = fold_build2_loc (input_location, MAX_EXPR, ++ gfc_array_index_type, size, ++ gfc_index_zero_node); + else + gcc_unreachable (); + +@@ -8252,7 +8254,9 @@ gfc_conv_intrinsic_storage_size (gfc_se *se, gfc_expr *expr) + { + gfc_expr *arg; + gfc_se argse; +- tree type, result_type, tmp; ++ tree type, result_type, tmp, class_decl = NULL; ++ gfc_symbol *sym; ++ bool unlimited = false; + + arg = expr->value.function.actual->expr; + +@@ -8263,10 +8267,12 @@ gfc_conv_intrinsic_storage_size (gfc_se *se, gfc_expr *expr) + { + if (arg->ts.type == BT_CLASS) + { ++ unlimited = UNLIMITED_POLY (arg); + gfc_add_vptr_component (arg); + gfc_add_size_component (arg); + gfc_conv_expr (&argse, arg); + tmp = fold_convert (result_type, argse.expr); ++ class_decl = gfc_get_class_from_expr (argse.expr); + goto done; + } + +@@ -8278,14 +8284,20 @@ gfc_conv_intrinsic_storage_size (gfc_se *se, gfc_expr *expr) + { + argse.want_pointer = 0; + gfc_conv_expr_descriptor (&argse, arg); ++ sym = arg->expr_type == EXPR_VARIABLE ? arg->symtree->n.sym : NULL; + if (arg->ts.type == BT_CLASS) + { +- if (arg->rank > 0) ++ unlimited = UNLIMITED_POLY (arg); ++ if (TREE_CODE (argse.expr) == COMPONENT_REF) ++ tmp = gfc_class_vtab_size_get (TREE_OPERAND (argse.expr, 0)); ++ else if (arg->rank > 0 && sym ++ && DECL_LANG_SPECIFIC (sym->backend_decl)) + tmp = gfc_class_vtab_size_get ( +- GFC_DECL_SAVED_DESCRIPTOR (arg->symtree->n.sym->backend_decl)); ++ GFC_DECL_SAVED_DESCRIPTOR (sym->backend_decl)); + else +- tmp = gfc_class_vtab_size_get (TREE_OPERAND (argse.expr, 0)); ++ gcc_unreachable (); + tmp = fold_convert (result_type, tmp); ++ class_decl = gfc_get_class_from_expr (argse.expr); + goto done; + } + type = gfc_get_element_type (TREE_TYPE (argse.expr)); +@@ -8299,6 +8311,9 @@ gfc_conv_intrinsic_storage_size (gfc_se *se, gfc_expr *expr) + tmp = fold_convert (result_type, tmp); + + done: ++ if (unlimited && class_decl) ++ tmp = gfc_resize_class_size_with_len (NULL, class_decl, tmp); ++ + se->expr = fold_build2_loc (input_location, MULT_EXPR, result_type, tmp, + build_int_cst (result_type, BITS_PER_UNIT)); + gfc_add_block_to_block (&se->pre, &argse.pre); +@@ -8421,7 +8436,10 @@ gfc_conv_intrinsic_transfer (gfc_se * se, gfc_expr * expr) + { + tmp = build_fold_indirect_ref_loc (input_location, argse.expr); + if (GFC_CLASS_TYPE_P (TREE_TYPE (tmp))) +- source = gfc_class_data_get (tmp); ++ { ++ source = gfc_class_data_get (tmp); ++ class_ref = tmp; ++ } + else + { + /* Array elements are evaluated as a reference to the data. +@@ -8448,9 +8466,17 @@ gfc_conv_intrinsic_transfer (gfc_se * se, gfc_expr * expr) + break; + case BT_CLASS: + if (class_ref != NULL_TREE) +- tmp = gfc_class_vtab_size_get (class_ref); ++ { ++ tmp = gfc_class_vtab_size_get (class_ref); ++ if (UNLIMITED_POLY (source_expr)) ++ tmp = gfc_resize_class_size_with_len (NULL, class_ref, tmp); ++ } + else +- tmp = gfc_class_vtab_size_get (argse.expr); ++ { ++ tmp = gfc_class_vtab_size_get (argse.expr); ++ if (UNLIMITED_POLY (source_expr)) ++ tmp = gfc_resize_class_size_with_len (NULL, argse.expr, tmp); ++ } + break; + default: + source_type = TREE_TYPE (build_fold_indirect_ref_loc (input_location, +@@ -8503,6 +8529,13 @@ gfc_conv_intrinsic_transfer (gfc_se * se, gfc_expr * expr) + if (arg->expr->ts.type == BT_CHARACTER) + tmp = size_of_string_in_bytes (arg->expr->ts.kind, + argse.string_length); ++ else if (arg->expr->ts.type == BT_CLASS) ++ { ++ class_ref = TREE_OPERAND (argse.expr, 0); ++ tmp = gfc_class_vtab_size_get (class_ref); ++ if (UNLIMITED_POLY (arg->expr)) ++ tmp = gfc_resize_class_size_with_len (&argse.pre, class_ref, tmp); ++ } + else + tmp = fold_convert (gfc_array_index_type, + size_in_bytes (source_type)); +@@ -8543,15 +8576,14 @@ gfc_conv_intrinsic_transfer (gfc_se * se, gfc_expr * expr) + + if (arg->expr->rank == 0) + { +- gfc_conv_expr_reference (&argse, arg->expr); ++ gfc_conv_expr_reference (&argse, mold_expr); + mold_type = TREE_TYPE (build_fold_indirect_ref_loc (input_location, + argse.expr)); + } + else + { +- gfc_init_se (&argse, NULL); + argse.want_pointer = 0; +- gfc_conv_expr_descriptor (&argse, arg->expr); ++ gfc_conv_expr_descriptor (&argse, mold_expr); + mold_type = gfc_get_element_type (TREE_TYPE (argse.expr)); + } + +@@ -8562,27 +8594,41 @@ gfc_conv_intrinsic_transfer (gfc_se * se, gfc_expr * expr) + { + /* If this TRANSFER is nested in another TRANSFER, use a type + that preserves all bits. */ +- if (arg->expr->ts.type == BT_LOGICAL) +- mold_type = gfc_get_int_type (arg->expr->ts.kind); ++ if (mold_expr->ts.type == BT_LOGICAL) ++ mold_type = gfc_get_int_type (mold_expr->ts.kind); + } + + /* Obtain the destination word length. */ +- switch (arg->expr->ts.type) ++ switch (mold_expr->ts.type) + { + case BT_CHARACTER: +- tmp = size_of_string_in_bytes (arg->expr->ts.kind, argse.string_length); +- mold_type = gfc_get_character_type_len (arg->expr->ts.kind, ++ tmp = size_of_string_in_bytes (mold_expr->ts.kind, argse.string_length); ++ mold_type = gfc_get_character_type_len (mold_expr->ts.kind, + argse.string_length); + break; + case BT_CLASS: +- tmp = gfc_class_vtab_size_get (argse.expr); ++ if (scalar_mold) ++ class_ref = argse.expr; ++ else ++ class_ref = TREE_OPERAND (argse.expr, 0); ++ tmp = gfc_class_vtab_size_get (class_ref); ++ if (UNLIMITED_POLY (arg->expr)) ++ tmp = gfc_resize_class_size_with_len (&argse.pre, class_ref, tmp); + break; + default: + tmp = fold_convert (gfc_array_index_type, size_in_bytes (mold_type)); + break; + } +- dest_word_len = gfc_create_var (gfc_array_index_type, NULL); +- gfc_add_modify (&se->pre, dest_word_len, tmp); ++ ++ /* Do not fix dest_word_len if it is a variable, since the temporary can wind ++ up being used before the assignment. */ ++ if (mold_expr->ts.type == BT_CHARACTER && mold_expr->ts.deferred) ++ dest_word_len = tmp; ++ else ++ { ++ dest_word_len = gfc_create_var (gfc_array_index_type, NULL); ++ gfc_add_modify (&se->pre, dest_word_len, tmp); ++ } + + /* Finally convert SIZE, if it is present. */ + arg = arg->next; +--- a/src/gcc/fortran/trans-stmt.cc ++++ b/src/gcc/fortran/trans-stmt.cc +@@ -6398,8 +6398,9 @@ gfc_trans_allocate (gfc_code * code) + else + gfc_add_block_to_block (&post, &se.post); + +- /* Special case when string in expr3 is zero. */ ++ /* Special case when string in expr3 is scalar and has length zero. */ + if (code->expr3->ts.type == BT_CHARACTER ++ && code->expr3->rank == 0 + && integer_zerop (se.string_length)) + { + gfc_init_se (&se, NULL); +@@ -7058,6 +7059,46 @@ gfc_trans_allocate (gfc_code * code) + gfc_expr *rhs = e3rhs ? e3rhs : gfc_copy_expr (code->expr3); + flag_realloc_lhs = 0; + ++ /* The handling of code->expr3 above produces a derived type of ++ type "STAR", whose size defaults to size(void*). In order to ++ have the right type information for the assignment, we must ++ reconstruct an unlimited polymorphic rhs. */ ++ if (UNLIMITED_POLY (code->expr3) ++ && e3rhs && e3rhs->ts.type == BT_DERIVED ++ && !strcmp (e3rhs->ts.u.derived->name, "STAR")) ++ { ++ gfc_ref *ref; ++ gcc_assert (TREE_CODE (expr3_vptr) == COMPONENT_REF); ++ tmp = gfc_create_var (gfc_typenode_for_spec (&code->expr3->ts), ++ "e3"); ++ gfc_add_modify (&block, tmp, ++ gfc_get_class_from_expr (expr3_vptr)); ++ rhs->symtree->n.sym->backend_decl = tmp; ++ rhs->ts = code->expr3->ts; ++ rhs->symtree->n.sym->ts = rhs->ts; ++ for (ref = init_expr->ref; ref; ref = ref->next) ++ { ++ /* Copy over the lhs _data component ref followed by the ++ full array reference for source expressions with rank. ++ Otherwise, just copy the _data component ref. */ ++ if (code->expr3->rank ++ && ref && ref->next && !ref->next->next) ++ { ++ rhs->ref = gfc_copy_ref (ref); ++ break; ++ } ++ else if ((init_expr->rank && !code->expr3->rank ++ && ref && ref->next && !ref->next->next) ++ || (ref && !ref->next)) ++ { ++ rhs->ref = gfc_copy_ref (ref); ++ gfc_free_ref_list (rhs->ref->next); ++ rhs->ref->next = NULL; ++ break; ++ } ++ } ++ } ++ + /* Set the symbol to be artificial so that the result is not finalized. */ + init_expr->symtree->n.sym->attr.artificial = 1; + tmp = gfc_trans_assignment (init_expr, rhs, true, false, true, +--- a/src/gcc/fortran/trans-types.cc ++++ b/src/gcc/fortran/trans-types.cc +@@ -1591,7 +1591,7 @@ gfc_get_dtype_rank_type (int rank, tree etype) + size = size_in_bytes (etype); + break; + } +- ++ + gcc_assert (size); + + STRIP_NOPS (size); +@@ -1736,7 +1736,7 @@ gfc_get_nodesc_array_type (tree etype, gfc_array_spec * as, gfc_packed packed, + tmp = gfc_conv_mpz_to_tree (expr->value.integer, + gfc_index_integer_kind); + else +- tmp = NULL_TREE; ++ tmp = NULL_TREE; + GFC_TYPE_ARRAY_LBOUND (type, n) = tmp; + + expr = as->upper[n]; +--- a/src/gcc/ipa-icf-gimple.cc ++++ b/src/gcc/ipa-icf-gimple.cc +@@ -542,6 +542,10 @@ func_checker::compare_loops (basic_block bb1, basic_block bb2) + return return_false_with_msg ("unroll"); + if (!compare_variable_decl (l1->simduid, l2->simduid)) + return return_false_with_msg ("simduid"); ++ if ((l1->any_upper_bound != l2->any_upper_bound) ++ || (l1->any_upper_bound ++ && (l1->nb_iterations_upper_bound != l2->nb_iterations_upper_bound))) ++ return return_false_with_msg ("nb_iterations_upper_bound"); + + return true; + } +--- a/src/gcc/jit/ChangeLog ++++ b/src/gcc/jit/ChangeLog +@@ -1,3 +1,12 @@ ++2024-06-11 Andrew Pinski ++ ++ Backported from master: ++ 2024-06-11 Andrew Pinski ++ ++ PR jit/115442 ++ * jit-recording.cc: Define INCLUDE_SSTREAM before including ++ system.h and don't directly incldue sstream. ++ + 2024-05-21 Release Manager + + * GCC 13.3.0 released. +--- a/src/gcc/jit/jit-recording.cc ++++ b/src/gcc/jit/jit-recording.cc +@@ -19,6 +19,7 @@ along with GCC; see the file COPYING3. If not see + . */ + + #include "config.h" ++#define INCLUDE_SSTREAM + #include "system.h" + #include "coretypes.h" + #include "tm.h" +--- a/src/gcc/match.pd ++++ b/src/gcc/match.pd +@@ -2023,12 +2023,14 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT) + (mult (convert @0) @1))) + + /* Narrow integer multiplication by a zero_one_valued_p operand. +- Multiplication by [0,1] is guaranteed not to overflow. */ ++ Multiplication by [0,1] is guaranteed not to overflow except for ++ 1bit signed types. */ + (simplify + (convert (mult@0 zero_one_valued_p@1 INTEGER_CST@2)) + (if (INTEGRAL_TYPE_P (type) + && INTEGRAL_TYPE_P (TREE_TYPE (@0)) +- && TYPE_PRECISION (type) < TYPE_PRECISION (TREE_TYPE (@0))) ++ && TYPE_PRECISION (type) < TYPE_PRECISION (TREE_TYPE (@0)) ++ && (TYPE_UNSIGNED (type) || TYPE_PRECISION (type) > 1)) + (mult (convert @1) (convert @2)))) + + /* (X << C) != 0 can be simplified to X, when C is zero_one_valued_p. +--- a/src/gcc/opt-suggestions.cc ++++ b/src/gcc/opt-suggestions.cc +@@ -167,9 +167,9 @@ option_proposer::build_option_suggestions (const char *prefix) + add_misspelling_candidates (m_option_suggestions, option, + opt_text); + ++ struct cl_option optb; + for (int j = 0; sanitizer_opts[j].name != NULL; ++j) + { +- struct cl_option optb; + /* -fsanitize=all is not valid, only -fno-sanitize=all. + So don't register the positive misspelling candidates + for it. */ +--- a/src/gcc/opts-common.cc ++++ b/src/gcc/opts-common.cc +@@ -502,6 +502,7 @@ add_misspelling_candidates (auto_vec *candidates, + for (unsigned i = 0; i < ARRAY_SIZE (option_map); i++) + { + const char *opt0 = option_map[i].opt0; ++ const char *opt1 = option_map[i].opt1; + const char *new_prefix = option_map[i].new_prefix; + size_t new_prefix_len = strlen (new_prefix); + +@@ -510,8 +511,9 @@ add_misspelling_candidates (auto_vec *candidates, + + if (strncmp (opt_text, new_prefix, new_prefix_len) == 0) + { +- char *alternative = concat (opt0 + 1, opt_text + new_prefix_len, +- NULL); ++ char *alternative ++ = concat (opt0 + 1, opt1 ? " " : "", opt1 ? opt1 : "", ++ opt_text + new_prefix_len, NULL); + candidates->safe_push (alternative); + } + } +--- a/src/gcc/testsuite/ChangeLog ++++ b/src/gcc/testsuite/ChangeLog +@@ -1,3 +1,573 @@ ++2024-09-03 Haochen Jiang ++ ++ * gcc.target/i386/avx512fp16-vfpclassph-1c.c: New test. ++ ++2024-09-02 liuhongt ++ ++ Backported from master: ++ 2024-08-30 liuhongt ++ ++ * gcc.target/i386/pr116512.c: New test. ++ ++2024-08-22 liuhongt ++ ++ * gcc.target/i386/pieces-memcpy-10.c: Use -mmove-max=256 and ++ -mstore-max=256. ++ * gcc.target/i386/pieces-memcpy-6.c: Ditto. ++ * gcc.target/i386/pieces-memset-38.c: Ditto. ++ * gcc.target/i386/pieces-memset-40.c: Ditto. ++ * gcc.target/i386/pieces-memset-41.c: Ditto. ++ * gcc.target/i386/pieces-memset-42.c: Ditto. ++ * gcc.target/i386/pieces-memset-43.c: Ditto. ++ * gcc.target/i386/pieces-strcpy-2.c: Ditto. ++ ++2024-08-22 liuhongt ++ ++ Backported from master: ++ 2024-08-22 liuhongt ++ ++ * gcc.target/i386/pieces-memcpy-10.c: Add -mprefer-vector-width=128. ++ * gcc.target/i386/pieces-memcpy-6.c: Ditto. ++ * gcc.target/i386/pieces-memset-38.c: Ditto. ++ * gcc.target/i386/pieces-memset-40.c: Ditto. ++ * gcc.target/i386/pieces-memset-41.c: Ditto. ++ * gcc.target/i386/pieces-memset-42.c: Ditto. ++ * gcc.target/i386/pieces-memset-43.c: Ditto. ++ * gcc.target/i386/pieces-strcpy-2.c: Ditto. ++ * gcc.target/i386/pieces-memcpy-22.c: New test. ++ * gcc.target/i386/pieces-memset-51.c: New test. ++ * gcc.target/i386/pieces-strcpy-3.c: New test. ++ ++2024-08-21 Alexandre Oliva ++ ++ Backported from master: ++ 2024-06-26 Alexandre Oliva ++ Richard Earnshaw ++ ++ PR tree-optimization/113281 ++ * gcc.target/arm/simd/mve-vshr.c: Add expected ranges. ++ ++2024-08-19 Jan Hubicka ++ ++ Backported from master: ++ 2024-07-22 Jan Hubicka ++ ++ * gcc.c-torture/compile/pr115277.c: New test. ++ ++2024-08-18 Georg-Johann Lay ++ ++ Backported from master: ++ 2024-08-18 Georg-Johann Lay ++ ++ PR target/116407 ++ * gcc.target/avr/torture/pr116407-2.c: New test. ++ * gcc.target/avr/torture/pr116407-4.c: New test. ++ ++2024-08-16 Richard Sandiford ++ ++ Backported from master: ++ 2024-04-05 Richard Sandiford ++ ++ PR target/114603 ++ * gcc.target/aarch64/sve/acle/general/cnot_1.c: New test. ++ ++2024-08-16 Richard Sandiford ++ ++ Backported from master: ++ 2024-04-08 Richard Sandiford ++ ++ PR target/114607 ++ * gcc.target/aarch64/sve/acle/asm/sudot_s32.c: New test. ++ ++2024-08-12 liuhongt ++ ++ Backported from master: ++ 2024-07-30 liuhongt ++ ++ * gcc.target/i386/pr116043.c: New test. ++ ++2024-08-09 Patrick Palka ++ ++ PR c++/113063 ++ PR c++/116289 ++ * g++.dg/cpp2a/spaceship-synth16.C: New test. ++ * g++.dg/cpp2a/spaceship-synth16a.C: New test. ++ ++2024-08-06 Andrew Pinski ++ ++ Backported from master: ++ 2024-08-06 Andrew Pinski ++ ++ PR target/116189 ++ * c-c++-common/torture/pr116189-1.c: New test. ++ ++2024-08-05 Paul Thomas ++ ++ Backported from master: ++ 2024-07-18 Paul Thomas ++ ++ PR fortran/108889 ++ * gfortran.dg/pr108889.f90: New test. ++ ++2024-07-30 Haochen Jiang ++ ++ * gcc.target/i386/prefetchi-1b.c: New test. ++ ++2024-07-29 Haochen Jiang ++ ++ * gcc.target/i386/avx512bw-vpalignr-1b.c: New test. ++ * gcc.target/i386/avx512dq-vfpclasssd-1b.c: Ditto. ++ * gcc.target/i386/avx512dq-vfpclassss-1b.c: Ditto. ++ * gcc.target/i386/avx512dq-vreducesd-1b.c: Ditto. ++ * gcc.target/i386/avx512dq-vreducess-1b.c: Ditto. ++ * gcc.target/i386/avx512vl-valignq-1b.c: Ditto. ++ ++2024-07-24 Peter Bergner ++ ++ Backported from master: ++ 2024-07-19 Peter Bergner ++ ++ PR target/114759 ++ PR target/115988 ++ * gcc.target/powerpc/pr114759-3.c: Catch unsupported ABI errors. ++ ++2024-07-24 Peter Bergner ++ ++ Backported from master: ++ 2024-07-17 Peter Bergner ++ ++ PR target/114759 ++ * gcc.target/powerpc/pr114759-3.c: New test. ++ ++2024-07-24 Peter Bergner ++ ++ Backported from master: ++ 2024-07-17 Peter Bergner ++ ++ PR target/114759 ++ * gcc.target/powerpc/pr114759-2.c: New test. ++ * lib/target-supports.exp (rop_ok): Use ++ check_effective_target_has_arch_pwr8. ++ ++2024-07-24 Peter Bergner ++ ++ Backported from master: ++ 2024-06-17 Peter Bergner ++ ++ PR target/115389 ++ * gcc.target/powerpc/pr115389.c: New test. ++ ++2024-07-23 Haochen Jiang ++ ++ * gcc.target/i386/prefetchi-1.c: Check (%rip). ++ ++2024-07-23 Alexandre Oliva ++ ++ Backported from master: ++ 2024-07-23 Alexandre Oliva ++ ++ PR target/106069 ++ * g++.target/powerpc/pr106069.C: Reorder dg directives. ++ ++2024-07-21 Harald Anlauf ++ ++ Backported from master: ++ 2024-07-19 Harald Anlauf ++ ++ PR fortran/103115 ++ * gfortran.dg/string_array_constructor_4.f90: New test. ++ ++2024-07-20 Paul Thomas ++ ++ Backported from master: ++ 2024-05-13 Paul Thomas ++ ++ PR fortran/113363 ++ * gfortran.dg/pr113363.f90: New test. ++ ++2024-07-20 René Rebe ++ ++ Backported from master: ++ 2024-07-18 René Rebe ++ Peter Bergner ++ ++ PR target/97367 ++ * gcc.target/powerpc/pr97367.c: New test. ++ ++2024-07-17 Uros Bizjak ++ ++ Backported from master: ++ 2024-07-17 Uros Bizjak ++ ++ PR target/115526 ++ * gcc.target/alpha/pr115526.c: New test. ++ ++2024-07-15 liuhongt ++ ++ Backported from master: ++ 2024-07-15 liuhongt ++ ++ * gcc.target/i386/pr115872.c: New test. ++ ++2024-07-13 Lulu Cheng ++ ++ Backported from master: ++ 2024-07-12 Lulu Cheng ++ ++ PR target/115752 ++ * gcc.target/loongarch/pr115752.c: New test. ++ ++2024-07-12 Paul Thomas ++ ++ Backported from master: ++ 2024-05-23 Paul Thomas ++ ++ PR fortran/103312 ++ * gfortran.dg/pr103312.f90: New test. ++ ++2024-07-11 Andre Vieira ++ ++ Backported from master: ++ 2024-07-11 Andre Vieira ++ ++ * gcc.target/arm/mve/intrinsics/vsetq_lane_su64.c: New test. ++ ++2024-07-10 Torbjörn SVENSSON ++ ++ Backported from master: ++ 2024-07-10 Torbjörn SVENSSON ++ ++ PR target/105090 ++ * gcc.target/arm/copysign_softfloat_1.c: Drop check for lsr ++ ++2024-07-08 Paul Thomas ++ ++ Backported from master: ++ 2024-05-12 Paul Thomas ++ ++ PR fortran/84006 ++ PR fortran/100027 ++ PR fortran/98534 ++ * gfortran.dg/storage_size_7.f90: New test. ++ * gfortran.dg/transfer_class_4.f90: New test. ++ ++2024-07-05 Georg-Johann Lay ++ ++ Backported from master: ++ 2024-07-05 Georg-Johann Lay ++ ++ PR target/87376 ++ * gcc.target/avr/torture/pr87376.c: New test. ++ ++2024-07-04 Kyrylo Tkachov ++ ++ Backported from master: ++ 2024-07-03 Kyrylo Tkachov ++ ++ PR target/115475 ++ * gcc.target/aarch64/acle/bf16_sve_feature.c: New test. ++ ++2024-07-04 Kyrylo Tkachov ++ ++ Backported from master: ++ 2024-07-03 Kyrylo Tkachov ++ ++ PR target/115457 ++ * gcc.target/aarch64/acle/bf16_feature.c: New test. ++ ++2024-07-03 Georg-Johann Lay ++ ++ Backported from master: ++ 2024-07-03 Georg-Johann Lay ++ ++ PR target/98762 ++ * gcc.target/avr/torture/pr98762.c: New test. ++ ++2024-07-03 Kewen Lin ++ ++ Backported from master: ++ 2024-06-26 Kewen Lin ++ Xionghu Luo ++ ++ PR target/106069 ++ PR target/115355 ++ * gcc.target/powerpc/pr106069-2.c: New test. ++ ++2024-07-03 Kewen Lin ++ ++ Backported from master: ++ 2024-06-26 Kewen Lin ++ Xionghu Luo ++ ++ PR target/106069 ++ PR target/115355 ++ * gcc.target/powerpc/pr106069-1.c: New test. ++ ++2024-07-01 Georg-Johann Lay ++ ++ Backported from master: ++ 2024-07-01 Georg-Johann Lay ++ ++ PR target/88236 ++ PR target/115726 ++ * gcc.target/avr/torture/pr88236-pr115726.c: New test. ++ ++2024-06-28 Kewen Lin ++ ++ Backported from master: ++ 2024-06-21 Kewen Lin ++ Xionghu Luo ++ ++ PR target/106069 ++ PR target/115355 ++ * g++.target/powerpc/pr106069.C: New test. ++ * gcc.target/powerpc/pr115355.c: New test. ++ ++2024-06-27 Andrew Carlotti ++ ++ Backported from master: ++ 2023-12-16 Andrew Carlotti ++ ++ PR target/115618 ++ * gcc.target/aarch64/options_set_4.c: Add terminating newline. ++ * gcc.target/aarch64/options_set_27.c: New test. ++ ++2024-06-24 Kewen Lin ++ ++ Backported from master: ++ 2024-05-29 Kewen Lin ++ ++ PR target/114846 ++ * gcc.target/powerpc/pr114846.c: New test. ++ ++2024-06-20 Jakub Jelinek ++ ++ Backported from master: ++ 2024-06-17 Jakub Jelinek ++ ++ PR driver/115440 ++ * g++.dg/cpp1z/pr115440.C: New test. ++ ++2024-06-19 Harald Anlauf ++ ++ Backported from master: ++ 2024-06-04 Harald Anlauf ++ ++ PR fortran/83865 ++ * gfortran.dg/allocate_with_source_32.f90: New test. ++ ++2024-06-17 Jakub Jelinek ++ ++ Backported from master: ++ 2024-06-17 Jakub Jelinek ++ ++ PR c/115290 ++ * c-c++-common/Warray-compare-3.c: New test. ++ ++2024-06-17 Jakub Jelinek ++ ++ Backported from master: ++ 2024-06-17 Jakub Jelinek ++ ++ PR target/111343 ++ PR c++/115511 ++ * g++.dg/cpp23/ext-floating18.C: New test. ++ ++2024-06-12 Torbjörn SVENSSON ++ ++ Backported from master: ++ 2024-06-12 Torbjörn SVENSSON ++ Yvan ROUX ++ ++ PR target/115253 ++ * gcc.target/arm/cmse/extend-return.c: Update test case ++ condition for Armv8.1-M. ++ ++2024-06-11 Jakub Jelinek ++ ++ Backported from master: ++ 2024-06-06 Jakub Jelinek ++ ++ PR c/114493 ++ * gcc.dg/pr114493-1.c: New test. ++ * gcc.dg/pr114493-2.c: New test. ++ ++2024-06-11 Jakub Jelinek ++ ++ Backported from master: ++ 2024-06-04 Jakub Jelinek ++ ++ PR middle-end/108789 ++ * gcc.c-torture/execute/pr108789.c: New test. ++ ++2024-06-11 Jakub Jelinek ++ ++ Backported from master: ++ 2024-05-15 Jakub Jelinek ++ ++ PR rtl-optimization/114902 ++ PR rtl-optimization/115092 ++ * gcc.dg/pr114902.c: New test. ++ * gcc.dg/pr115092.c: New test. ++ ++2024-06-10 Eric Botcazou ++ ++ * gnat.dg/incomplete8.adb: New test. ++ ++2024-06-10 Eric Botcazou ++ ++ PR ada/114398 ++ * gnat.dg/access11.adb: New test. ++ ++2024-06-03 Uros Bizjak ++ ++ Backported from master: ++ 2024-05-31 Uros Bizjak ++ ++ PR target/115297 ++ * gcc.target/alpha/pr115297.c: New test. ++ ++2024-06-01 Georg-Johann Lay ++ ++ Backported from master: ++ 2024-06-01 Georg-Johann Lay ++ ++ PR tree-optimization/115307 ++ * gcc.target/avr/torture/pr115307-isinf.c: New test. ++ ++2024-06-01 Georg-Johann Lay ++ ++ Backported from master: ++ 2024-06-01 Georg-Johann Lay ++ ++ PR target/115317 ++ * gcc.target/avr/torture/pr115317-isinf.c: New test. ++ ++2024-05-31 Richard Sandiford ++ ++ Backported from master: ++ 2024-01-29 Richard Sandiford ++ ++ PR target/113281 ++ * gcc.dg/vect/pr113281-1.c: New test. ++ * gcc.dg/vect/pr113281-2.c: Likewise. ++ * gcc.dg/vect/pr113281-3.c: Likewise. ++ * gcc.dg/vect/pr113281-4.c: Likewise. ++ * gcc.dg/vect/pr113281-5.c: Likewise. ++ ++2024-05-31 Richard Sandiford ++ ++ Backported from master: ++ 2024-05-24 Richard Sandiford ++ ++ PR tree-optimization/115192 ++ * gcc.dg/vect/pr115192.c: New test. ++ ++2024-05-28 Tobias Burnus ++ ++ Backported from master: ++ 2024-05-20 Tobias Burnus ++ ++ PR fortran/115150 ++ * gfortran.dg/shape_12.f90: New test. ++ ++2024-05-24 Jason Merrill ++ ++ Backported from master: ++ 2023-09-22 Jason Merrill ++ ++ PR c++/111529 ++ * g++.dg/ext/unroll-4.C: New test. ++ ++2024-05-24 Jason Merrill ++ ++ Backported from master: ++ 2024-01-25 Jason Merrill ++ ++ PR c++/113598 ++ * g++.dg/cpp0x/initlist-pmf2.C: New test. ++ ++2024-05-22 Torbjörn SVENSSON ++ ++ Backported from master: ++ 2024-05-22 Torbjörn SVENSSON ++ ++ * gcc.target/arm/cmse/extend-param.c: Add regression test. Add ++ -fshort-enums. ++ * gcc.target/arm/cmse/extend-return.c: Add -fshort-enums option. ++ ++2024-05-22 Harald Anlauf ++ ++ Backported from master: ++ 2024-05-05 Harald Anlauf ++ ++ PR fortran/114827 ++ * gfortran.dg/asan/unlimited_polymorphic_34.f90: New test. ++ ++2024-05-22 Andrew Jenner ++ ++ Backported from master: ++ 2023-11-28 Andrew Jenner ++ Tobias Burnus ++ ++ PR fortran/110415 ++ * gfortran.dg/pr110415.f90: New test. ++ * gfortran.dg/asan/pr110415-2.f90: New test. ++ * gfortran.dg/asan/pr110415-3.f90: New test. ++ ++2024-05-22 Jakub Jelinek ++ ++ Backported from master: ++ 2024-05-22 Jakub Jelinek ++ ++ PR tree-optimization/115152 ++ * gcc.dg/pr115152.c: New test. ++ ++2024-05-22 Jakub Jelinek ++ ++ Backported from master: ++ 2024-05-22 Jakub Jelinek ++ ++ PR sanitizer/115172 ++ * gcc.dg/asan/pr115172.c: New test. ++ ++2024-05-21 Harald Anlauf ++ ++ Backported from master: ++ 2024-05-11 Harald Anlauf ++ ++ PR fortran/115039 ++ * gfortran.dg/statement_function_5.f90: New test. ++ ++2024-05-21 Kewen Lin ++ ++ Backported from master: ++ 2024-04-10 Kewen Lin ++ ++ PR testsuite/114662 ++ * gcc.dg/lto/pr113359-2_0.c: Use unsigned long long instead of ++ unsigned long. ++ * gcc.dg/lto/pr113359-2_1.c: Likewise. ++ ++2024-05-21 Andrew Pinski ++ ++ Backported from master: ++ 2024-05-20 Andrew Pinski ++ ++ PR tree-optimization/115143 ++ * gcc.c-torture/compile/pr115143-1.c: New test. ++ * gcc.c-torture/compile/pr115143-2.c: New test. ++ * gcc.c-torture/compile/pr115143-3.c: New test. ++ ++2024-05-21 Andrew Pinski ++ ++ Backported from master: ++ 2024-05-21 Andrew Pinski ++ ++ PR tree-optimization/115154 ++ * c-c++-common/ubsan/signed1bitfield-1.c: New test. ++ * gcc.c-torture/execute/signed1bitfield-1.c: New test. ++ + 2024-05-21 Release Manager + + * GCC 13.3.0 released. +new file mode 100644 +--- /dev/null ++++ b/src/gcc/testsuite/c-c++-common/Warray-compare-3.c +@@ -0,0 +1,13 @@ ++/* PR c/115290 */ ++/* { dg-do compile } */ ++/* { dg-options "-Warray-compare" } */ ++ ++int a[32][32], b[32][32]; ++ ++int ++foo (int x, int y) ++{ ++ return (x ? a : b) == (y ? a : b); /* { dg-warning "comparison between two arrays" } */ ++/* { dg-message "use '&\\\(\[^\n\r]*\\\)\\\[0\\\] == &\\\(\[^\n\r]*\\\)\\\[0\\\]' to compare the addresses" "" { target c } .-1 } */ ++/* { dg-message "use unary '\\\+' which decays operands to pointers or '&\\\(\[^\n\r]*\\\)\\\[0\\\] == &\\\(\[^\n\r]*\\\)\\\[0\\\]' to compare the addresses" "" { target c++ } .-2 } */ ++} +new file mode 100644 +--- /dev/null ++++ b/src/gcc/testsuite/c-c++-common/torture/pr116189-1.c +@@ -0,0 +1,30 @@ ++/* { dg-additional-options "-fcompare-debug" } */ ++ ++/* PR target/116189 */ ++ ++/* In the sh backend, we used to create insn in the path of rtx_costs. ++ This means sometimes the max uid for insns would be different between ++ debugging and non debugging which then would cause gcse's hashtable ++ to have different number of slots which would cause a different walk ++ for that hash table. */ ++ ++extern void ff(void); ++extern short nn[8][4]; ++typedef unsigned short move_table[4]; ++extern signed long long ira_overall_cost; ++extern signed long long ira_load_cost; ++extern move_table *x_ira_register_move_cost[1]; ++struct move { struct move *next; }; ++unsigned short t; ++void emit_move_list(struct move * list, int freq, unsigned char mode, int regno) { ++ int cost; ++ for (; list != 0; list = list->next) ++ { ++ ff(); ++ unsigned short aclass = t; ++ cost = (nn)[mode][aclass] ; ++ ira_load_cost = cost; ++ cost = x_ira_register_move_cost[mode][aclass][aclass] * freq ; ++ ira_overall_cost = cost; ++ } ++} +new file mode 100644 +--- /dev/null ++++ b/src/gcc/testsuite/c-c++-common/ubsan/signed1bitfield-1.c +@@ -0,0 +1,25 @@ ++/* { dg-do run } */ ++/* { dg-options "-O2 -fsanitize=undefined" } */ ++ ++/* PR tree-optimization/115154 */ ++/* This was being miscompiled with -fsanitize=undefined due to ++ `(signed:1)(t*5)` being transformed into `-((signed:1)t)` which ++ is undefined. */ ++ ++struct s { ++ signed b : 1; ++} f; ++int i = 55; ++__attribute__((noinline)) ++void check(int a) ++{ ++ if (!a) ++ __builtin_abort(); ++} ++int main() { ++ int t = i != 5; ++ t = t*5; ++ f.b = t; ++ int tt = f.b; ++ check(f.b); ++} +new file mode 100644 +--- /dev/null ++++ b/src/gcc/testsuite/g++.dg/cpp0x/initlist-pmf2.C +@@ -0,0 +1,12 @@ ++// PR c++/113598 ++// { dg-additional-options -Wno-c++11-extensions } ++ ++struct Cpu ++{ ++ int op_nop(); ++}; ++typedef int(Cpu::*OpCode)(); ++void f() ++{ ++ new OpCode[256]{&Cpu::op_nop}; ++} +new file mode 100644 +--- /dev/null ++++ b/src/gcc/testsuite/g++.dg/cpp1z/pr115440.C +@@ -0,0 +1,8 @@ ++// PR driver/115440 ++// { dg-do compile { target c++17_only } } ++// { dg-options "--c++17" } ++ ++int i; ++ ++// { dg-bogus "unrecognized command-line option '--c\\\+\\\+17'; did you mean '--stdc\\\+\\\+17'" "" { target *-*-* } 0 } ++// { dg-error "unrecognized command-line option '--c\\\+\\\+17'" "" { target *-*-* } 0 } +new file mode 100644 +--- /dev/null ++++ b/src/gcc/testsuite/g++.dg/cpp23/ext-floating18.C +@@ -0,0 +1,26 @@ ++// P1467R9 - Extended floating-point types and standard names. ++// { dg-do compile { target c++23 } } ++// { dg-options "" } ++// { dg-add-options float32 } ++ ++constexpr int foo (float) { return 1; } ++constexpr int foo (double) { return 2; } ++constexpr int foo (long double) { return 3; } ++ ++#ifdef __STDCPP_FLOAT32_T__ ++#if __FLT_MAX_EXP__ == __FLT32_MAX_EXP__ \ ++ && __FLT_MAX_DIG__ == __FLT32_MAX_DIG__ ++#if __FLT_MAX_EXP__ == __DBL_MAX_EXP__ \ ++ && __FLT_MAX_DIG__ == __DBL_MAX_DIG__ ++static_assert (foo (1.0f32) == 2); ++#else ++static_assert (foo (1.0f32) == 1); ++#endif ++#endif ++#endif ++#ifdef __STDCPP_FLOAT64_T__ ++#if __DBL_MAX_EXP__ == __FLT64_MAX_EXP__ \ ++ && __DBL_MAX_DIG__ == __FLT64_MAX_DIG__ ++static_assert (foo (1.0f64) == 2); ++#endif ++#endif +new file mode 100644 +--- /dev/null ++++ b/src/gcc/testsuite/g++.dg/cpp2a/spaceship-synth16.C +@@ -0,0 +1,13 @@ ++// PR c++/113063 ++// { dg-do link { target c++20 } } ++ ++#include ++ ++int main() { ++ struct X { ++ auto operator<=>(const X&) const = default; ++ }; ++ X x; ++ static_assert(noexcept(x <=> x)); ++ x <=> x; ++} +new file mode 100644 +--- /dev/null ++++ b/src/gcc/testsuite/g++.dg/cpp2a/spaceship-synth16a.C +@@ -0,0 +1,16 @@ ++// PR c++/116289 ++// PR c++/113063 ++// { dg-do link { target c++20 } } ++// A version of spaceship-synth16.C where the local class isn't empty. ++ ++#include ++ ++int main() { ++ struct X { ++ int m = 0; ++ auto operator<=>(const X&) const = default; ++ }; ++ X x; ++ static_assert(noexcept(x <=> x)); ++ x <=> x; ++} +new file mode 100644 +--- /dev/null ++++ b/src/gcc/testsuite/g++.dg/ext/unroll-4.C +@@ -0,0 +1,16 @@ ++// PR c++/111529 ++// { dg-do compile { target c++11 } } ++// { dg-additional-options -Wno-c++20-extensions } ++ ++template ++void f() { ++ []() { ++ #pragma GCC unroll 9 ++ for (int i = 1; i; --i) { ++ } ++ }; ++} ++ ++int main() { ++ f<0>(); ++} +new file mode 100644 +--- /dev/null ++++ b/src/gcc/testsuite/g++.target/powerpc/pr106069.C +@@ -0,0 +1,119 @@ ++/* { dg-do run } */ ++/* { dg-options "-O -fno-tree-forwprop -maltivec" } */ ++/* { dg-require-effective-target vmx_hw } */ ++ ++typedef __attribute__ ((altivec (vector__))) unsigned native_simd_type; ++ ++union ++{ ++ native_simd_type V; ++ int R[4]; ++} store_le_vec; ++ ++struct S ++{ ++ S () = default; ++ S (unsigned B0) ++ { ++ native_simd_type val{B0}; ++ m_simd = val; ++ } ++ void store_le (unsigned int out[]) ++ { ++ store_le_vec.V = m_simd; ++ unsigned int x0 = store_le_vec.R[0]; ++ __builtin_memcpy (out, &x0, 4); ++ } ++ S rotl (unsigned int r) ++ { ++ native_simd_type rot{r}; ++ return __builtin_vec_rl (m_simd, rot); ++ } ++ void operator+= (S other) ++ { ++ m_simd = __builtin_vec_add (m_simd, other.m_simd); ++ } ++ void operator^= (S other) ++ { ++ m_simd = __builtin_vec_xor (m_simd, other.m_simd); ++ } ++ static void transpose (S &B0, S B1, S B2, S B3) ++ { ++ native_simd_type T0 = __builtin_vec_mergeh (B0.m_simd, B2.m_simd); ++ native_simd_type T1 = __builtin_vec_mergeh (B1.m_simd, B3.m_simd); ++ native_simd_type T2 = __builtin_vec_mergel (B0.m_simd, B2.m_simd); ++ native_simd_type T3 = __builtin_vec_mergel (B1.m_simd, B3.m_simd); ++ B0 = __builtin_vec_mergeh (T0, T1); ++ B3 = __builtin_vec_mergel (T2, T3); ++ } ++ S (native_simd_type x) : m_simd (x) {} ++ native_simd_type m_simd; ++}; ++ ++void ++foo (unsigned int output[], unsigned state[]) ++{ ++ S R00 = state[0]; ++ S R01 = state[0]; ++ S R02 = state[2]; ++ S R03 = state[0]; ++ S R05 = state[5]; ++ S R06 = state[6]; ++ S R07 = state[7]; ++ S R08 = state[8]; ++ S R09 = state[9]; ++ S R10 = state[10]; ++ S R11 = state[11]; ++ S R12 = state[12]; ++ S R13 = state[13]; ++ S R14 = state[4]; ++ S R15 = state[15]; ++ for (int r = 0; r != 10; ++r) ++ { ++ R09 += R13; ++ R11 += R15; ++ R05 ^= R09; ++ R06 ^= R10; ++ R07 ^= R11; ++ R07 = R07.rotl (7); ++ R00 += R05; ++ R01 += R06; ++ R02 += R07; ++ R15 ^= R00; ++ R12 ^= R01; ++ R13 ^= R02; ++ R00 += R05; ++ R01 += R06; ++ R02 += R07; ++ R15 ^= R00; ++ R12 = R12.rotl (8); ++ R13 = R13.rotl (8); ++ R10 += R15; ++ R11 += R12; ++ R08 += R13; ++ R09 += R14; ++ R05 ^= R10; ++ R06 ^= R11; ++ R07 ^= R08; ++ R05 = R05.rotl (7); ++ R06 = R06.rotl (7); ++ R07 = R07.rotl (7); ++ } ++ R00 += state[0]; ++ S::transpose (R00, R01, R02, R03); ++ R00.store_le (output); ++} ++ ++unsigned int res[1]; ++unsigned main_state[]{1634760805, 60878, 2036477234, 6, ++ 0, 825562964, 1471091955, 1346092787, ++ 506976774, 4197066702, 518848283, 118491664, ++ 0, 0, 0, 0}; ++int ++main () ++{ ++ foo (res, main_state); ++ if (res[0] != 0x41fcef98) ++ __builtin_abort (); ++ return 0; ++} +new file mode 100644 +--- /dev/null ++++ b/src/gcc/testsuite/gcc.c-torture/compile/pr115143-1.c +@@ -0,0 +1,21 @@ ++/* PR tree-optimization/115143 */ ++/* This used to ICE. ++ minmax part of phiopt would transform, ++ would transform `a!=0?min(a, b) : 0` into `min(a,b)` ++ which was correct except b was defined by a phi in the inner ++ bb which was not handled. */ ++short a, d; ++char b; ++long c; ++unsigned long e, f; ++void g(unsigned long h) { ++ if (c ? e : b) ++ if (e) ++ if (d) { ++ a = f ? ({ ++ unsigned long i = d ? f : 0, j = e ? h : 0; ++ i < j ? i : j; ++ }) : 0; ++ } ++} ++ +new file mode 100644 +--- /dev/null ++++ b/src/gcc/testsuite/gcc.c-torture/compile/pr115143-2.c +@@ -0,0 +1,30 @@ ++/* { dg-options "-fgimple" } */ ++/* PR tree-optimization/115143 */ ++/* This used to ICE. ++ minmax part of phiopt would transform, ++ would transform `a!=0?min(a, b) : 0` into `min(a,b)` ++ which was correct except b was defined by a phi in the inner ++ bb which was not handled. */ ++unsigned __GIMPLE (ssa,startwith("phiopt")) ++foo (unsigned a, unsigned b) ++{ ++ unsigned j; ++ unsigned _23; ++ unsigned _12; ++ ++ __BB(2): ++ if (a_6(D) != 0u) ++ goto __BB3; ++ else ++ goto __BB4; ++ ++ __BB(3): ++ j_10 = __PHI (__BB2: b_11(D)); ++ _23 = __MIN (a_6(D), j_10); ++ goto __BB4; ++ ++ __BB(4): ++ _12 = __PHI (__BB3: _23, __BB2: 0u); ++ return _12; ++ ++} +new file mode 100644 +--- /dev/null ++++ b/src/gcc/testsuite/gcc.c-torture/compile/pr115143-3.c +@@ -0,0 +1,29 @@ ++/* { dg-options "-fgimple" } */ ++/* PR tree-optimization/115143 */ ++/* This used to ICE. ++ minmax part of phiopt would transform, ++ would transform `a!=0?min(a, b) : 0` into `min(a,b)` ++ which was correct except b was defined by a phi in the inner ++ bb which was not handled. */ ++unsigned __GIMPLE (ssa,startwith("phiopt")) ++foo (unsigned a, unsigned b) ++{ ++ unsigned j; ++ unsigned _23; ++ unsigned _12; ++ ++ __BB(2): ++ if (a_6(D) > 0u) ++ goto __BB3; ++ else ++ goto __BB4; ++ ++ __BB(3): ++ j_10 = __PHI (__BB2: b_7(D)); ++ _23 = __MIN (a_6(D), j_10); ++ goto __BB4; ++ ++ __BB(4): ++ _12 = __PHI (__BB3: _23, __BB2: 0u); ++ return _12; ++} +new file mode 100644 +--- /dev/null ++++ b/src/gcc/testsuite/gcc.c-torture/compile/pr115277.c +@@ -0,0 +1,28 @@ ++int array[1000]; ++void ++test (int a) ++{ ++ if (__builtin_expect (a > 3, 1)) ++ return; ++ for (int i = 0; i < a; i++) ++ array[i]=i; ++} ++void ++test2 (int a) ++{ ++ if (__builtin_expect (a > 10, 1)) ++ return; ++ for (int i = 0; i < a; i++) ++ array[i]=i; ++} ++int ++main() ++{ ++ test(1); ++ test(2); ++ test(3); ++ test2(10); ++ if (array[9] != 9) ++ __builtin_abort (); ++ return 0; ++} +new file mode 100644 +--- /dev/null ++++ b/src/gcc/testsuite/gcc.c-torture/execute/pr108789.c +@@ -0,0 +1,39 @@ ++/* PR middle-end/108789 */ ++ ++int ++add (unsigned *r, const unsigned *a, const unsigned *b) ++{ ++ return __builtin_add_overflow (*a, *b, r); ++} ++ ++int ++mul (unsigned *r, const unsigned *a, const unsigned *b) ++{ ++ return __builtin_mul_overflow (*a, *b, r); ++} ++ ++int ++main () ++{ ++ unsigned x; ++ ++ /* 1073741824U + 1073741824U should not overflow. */ ++ x = (__INT_MAX__ + 1U) / 2; ++ if (add (&x, &x, &x)) ++ __builtin_abort (); ++ ++ /* 256U * 256U should not overflow */ ++ x = 1U << (sizeof (int) * __CHAR_BIT__ / 4); ++ if (mul (&x, &x, &x)) ++ __builtin_abort (); ++ ++ /* 2147483648U + 2147483648U should overflow */ ++ x = __INT_MAX__ + 1U; ++ if (!add (&x, &x, &x)) ++ __builtin_abort (); ++ ++ /* 65536U * 65536U should overflow */ ++ x = 1U << (sizeof (int) * __CHAR_BIT__ / 2); ++ if (!mul (&x, &x, &x)) ++ __builtin_abort (); ++} +new file mode 100644 +--- /dev/null ++++ b/src/gcc/testsuite/gcc.c-torture/execute/signed1bitfield-1.c +@@ -0,0 +1,23 @@ ++/* PR tree-optimization/115154 */ ++/* This was being miscompiled to `(signed:1)(t*5)` ++ being transformed into `-((signed:1)t)` which is undefined. ++ Note there is a pattern which removes the negative in some cases ++ which works around the issue. */ ++ ++struct { ++ signed b : 1; ++} f; ++int i = 55; ++__attribute__((noinline)) ++void check(int a) ++{ ++ if (!a) ++ __builtin_abort(); ++} ++int main() { ++ int t = i != 5; ++ t = t*5; ++ f.b = t; ++ int tt = f.b; ++ check(f.b); ++} +new file mode 100644 +--- /dev/null ++++ b/src/gcc/testsuite/gcc.dg/asan/pr115172.c +@@ -0,0 +1,20 @@ ++/* PR sanitizer/115172 */ ++/* { dg-do compile { target i?86-*-* x86_64-*-* } } */ ++/* { dg-options "-O2 -fsanitize=address,bool -ffat-lto-objects -fdump-tree-asan1" } */ ++/* { dg-final { scan-tree-dump-not "\.ASAN_CHECK " "asan1" } } */ ++ ++#ifdef __x86_64__ ++#define SEG __seg_gs ++#else ++#define SEG __seg_fs ++#endif ++ ++extern struct S { _Bool b; } s; ++void bar (void); ++ ++void ++foo (void) ++{ ++ if (*(volatile _Bool SEG *) (__UINTPTR_TYPE__) &s.b) ++ bar (); ++} +--- a/src/gcc/testsuite/gcc.dg/lto/pr113359-2_0.c ++++ b/src/gcc/testsuite/gcc.dg/lto/pr113359-2_0.c +@@ -8,15 +8,15 @@ + struct SA + { + unsigned int ax; +- unsigned long ay; +- unsigned long az; ++ unsigned long long ay; ++ unsigned long long az; + }; + + struct SB + { + unsigned int bx; +- unsigned long by; +- unsigned long bz; ++ unsigned long long by; ++ unsigned long long bz; + }; + + struct ZA +--- a/src/gcc/testsuite/gcc.dg/lto/pr113359-2_1.c ++++ b/src/gcc/testsuite/gcc.dg/lto/pr113359-2_1.c +@@ -5,15 +5,15 @@ + struct SA + { + unsigned int ax; +- unsigned long ay; +- unsigned long az; ++ unsigned long long ay; ++ unsigned long long az; + }; + + struct SB + { + unsigned int bx; +- unsigned long by; +- unsigned long bz; ++ unsigned long long by; ++ unsigned long long bz; + }; + + struct ZA +new file mode 100644 +--- /dev/null ++++ b/src/gcc/testsuite/gcc.dg/pr114493-1.c +@@ -0,0 +1,19 @@ ++/* PR c/114493 */ ++/* { dg-do compile { target lto } } */ ++/* { dg-options "-O2 -flto" } */ ++ ++void foo (void); ++struct S; ++struct S bar (struct S **); ++struct S qux (const struct S **); ++ ++struct __attribute__((__may_alias__)) S { ++ int s; ++}; ++ ++struct S ++baz (void) ++{ ++ foo (); ++ return (struct S) {}; ++} +new file mode 100644 +--- /dev/null ++++ b/src/gcc/testsuite/gcc.dg/pr114493-2.c +@@ -0,0 +1,26 @@ ++/* PR c/114493 */ ++/* { dg-do compile { target lto } } */ ++/* { dg-options "-O2 -flto -std=c2x" } */ ++ ++void foo (void); ++struct S; ++struct S bar (struct S **); ++struct S qux (const struct S **); ++ ++void ++corge (void) ++{ ++ struct S { int s; } s; ++ s.s = 0; ++} ++ ++struct __attribute__((__may_alias__)) S { ++ int s; ++}; ++ ++struct S ++baz (void) ++{ ++ foo (); ++ return (struct S) {}; ++} +new file mode 100644 +--- /dev/null ++++ b/src/gcc/testsuite/gcc.dg/pr114902.c +@@ -0,0 +1,23 @@ ++/* PR rtl-optimization/114902 */ ++/* { dg-do run } */ ++/* { dg-options "-O1 -fno-tree-fre -fno-tree-forwprop -fno-tree-ccp -fno-tree-dominator-opts" } */ ++ ++__attribute__((noipa)) ++int foo (int x) ++{ ++ int a = ~x; ++ int t = a & 1; ++ int e = -t; ++ int b = e >= -1; ++ if (b) ++ return 0; ++ __builtin_trap (); ++} ++ ++int ++main () ++{ ++ foo (-1); ++ foo (0); ++ foo (1); ++} +new file mode 100644 +--- /dev/null ++++ b/src/gcc/testsuite/gcc.dg/pr115092.c +@@ -0,0 +1,16 @@ ++/* PR rtl-optimization/115092 */ ++/* { dg-do run } */ ++/* { dg-options "-O1 -fgcse -ftree-pre -fno-tree-dominator-opts -fno-tree-fre -fno-guess-branch-probability" } */ ++ ++int a, b, c = 1, d, e; ++ ++int ++main () ++{ ++ int f, g = a; ++ b = -2; ++ f = -(1 >> ((c && b) & ~a)); ++ if (f <= b) ++ d = g / e; ++ return 0; ++} +new file mode 100644 +--- /dev/null ++++ b/src/gcc/testsuite/gcc.dg/pr115152.c +@@ -0,0 +1,17 @@ ++/* PR tree-optimization/115152 */ ++/* { dg-do run } */ ++/* { dg-options "-O3 -fno-tree-fre -fno-tree-dominator-opts -fno-tree-loop-im" } */ ++ ++int a, b, c, d; ++signed char e[1] = { 1 }; ++ ++int ++main () ++{ ++ for (a = 0; a < 3; a++) ++ for (b = 0; b < 2; b++) ++ c = e[0] = e[0] ^ d; ++ if (!c) ++ __builtin_abort (); ++ return 0; ++} +new file mode 100644 +--- /dev/null ++++ b/src/gcc/testsuite/gcc.dg/vect/pr113281-1.c +@@ -0,0 +1,17 @@ ++#include "tree-vect.h" ++ ++unsigned char a; ++ ++int main() { ++ check_vect (); ++ ++ short b = a = 0; ++ for (; a != 19; a++) ++ if (a) ++ b = 32872 >> a; ++ ++ if (b == 0) ++ return 0; ++ else ++ return 1; ++} +new file mode 100644 +--- /dev/null ++++ b/src/gcc/testsuite/gcc.dg/vect/pr113281-2.c +@@ -0,0 +1,50 @@ ++/* { dg-do compile } */ ++ ++#define N 128 ++ ++short x[N]; ++short y[N]; ++ ++void ++f1 (void) ++{ ++ for (int i = 0; i < N; ++i) ++ x[i] >>= y[i]; ++} ++ ++void ++f2 (void) ++{ ++ for (int i = 0; i < N; ++i) ++ x[i] >>= (y[i] < 32 ? y[i] : 32); ++} ++ ++void ++f3 (void) ++{ ++ for (int i = 0; i < N; ++i) ++ x[i] >>= (y[i] < 31 ? y[i] : 31); ++} ++ ++void ++f4 (void) ++{ ++ for (int i = 0; i < N; ++i) ++ x[i] >>= (y[i] & 31); ++} ++ ++void ++f5 (void) ++{ ++ for (int i = 0; i < N; ++i) ++ x[i] >>= 0x8000 >> y[i]; ++} ++ ++void ++f6 (void) ++{ ++ for (int i = 0; i < N; ++i) ++ x[i] >>= 0x8000 >> (y[i] & 31); ++} ++ ++/* { dg-final { scan-tree-dump-not {can narrow[^\n]+>>} "vect" } } */ +new file mode 100644 +--- /dev/null ++++ b/src/gcc/testsuite/gcc.dg/vect/pr113281-3.c +@@ -0,0 +1,39 @@ ++/* { dg-do compile } */ ++ ++#define N 128 ++ ++short x[N]; ++short y[N]; ++ ++void ++f1 (void) ++{ ++ for (int i = 0; i < N; ++i) ++ x[i] >>= (y[i] < 30 ? y[i] : 30); ++} ++ ++void ++f2 (void) ++{ ++ for (int i = 0; i < N; ++i) ++ x[i] >>= ((y[i] & 15) + 2); ++} ++ ++void ++f3 (void) ++{ ++ for (int i = 0; i < N; ++i) ++ x[i] >>= (y[i] < 16 ? y[i] : 16); ++} ++ ++void ++f4 (void) ++{ ++ for (int i = 0; i < N; ++i) ++ x[i] = 32768 >> ((y[i] & 15) + 3); ++} ++ ++/* { dg-final { scan-tree-dump {can narrow to signed:31 without loss [^\n]+>>} "vect" } } */ ++/* { dg-final { scan-tree-dump {can narrow to signed:18 without loss [^\n]+>>} "vect" } } */ ++/* { dg-final { scan-tree-dump {can narrow to signed:17 without loss [^\n]+>>} "vect" } } */ ++/* { dg-final { scan-tree-dump {can narrow to unsigned:19 without loss [^\n]+>>} "vect" } } */ +new file mode 100644 +--- /dev/null ++++ b/src/gcc/testsuite/gcc.dg/vect/pr113281-4.c +@@ -0,0 +1,55 @@ ++/* { dg-do compile } */ ++ ++#define N 128 ++ ++short x[N]; ++short y[N]; ++ ++void ++f1 (void) ++{ ++ for (int i = 0; i < N; ++i) ++ x[i] >>= (y[i] & 15); ++} ++ ++void ++f2 (void) ++{ ++ for (int i = 0; i < N; ++i) ++ x[i] >>= ((y[i] & 7) + 8); ++} ++ ++void ++f3 (void) ++{ ++ for (int i = 0; i < N; ++i) ++ x[i] >>= ((y[i] & 7) ^ 11); ++} ++ ++void ++f4 (void) ++{ ++ for (int i = 0; i < N; ++i) ++ x[i] >>= (y[i] < 15 ? y[i] : 15); ++} ++ ++void ++f5 (void) ++{ ++ for (int i = 0; i < N; ++i) ++ x[i] >>= (y[i] < 15 ? y[i] : 1); ++} ++ ++void ++f6 (void) ++{ ++ for (int i = 0; i < N; ++i) ++ x[i] = 32768 >> (y[i] & 15); ++} ++ ++/* { dg-final { scan-tree-dump {:11:[^\n]+can narrow to signed:16 without loss [^\n]+>>} "vect" } } */ ++/* { dg-final { scan-tree-dump {:18:[^\n]+can narrow to signed:16 without loss [^\n]+>>} "vect" } } */ ++/* { dg-final { scan-tree-dump {:25:[^\n]+can narrow to signed:16 without loss [^\n]+>>} "vect" } } */ ++/* { dg-final { scan-tree-dump {:32:[^\n]+can narrow to signed:16 without loss [^\n]+>>} "vect" } } */ ++/* { dg-final { scan-tree-dump {:39:[^\n]+can narrow to signed:16 without loss [^\n]+>>} "vect" } } */ ++/* { dg-final { scan-tree-dump {can narrow to unsigned:16 without loss [^\n]+>>} "vect" } } */ +new file mode 100644 +--- /dev/null ++++ b/src/gcc/testsuite/gcc.dg/vect/pr113281-5.c +@@ -0,0 +1,66 @@ ++/* { dg-do compile } */ ++ ++#define N 128 ++ ++short x[N]; ++short y[N]; ++ ++void ++f1 (void) ++{ ++ for (int i = 0; i < N; ++i) ++ { ++ int a = y[i]; ++ int b = ~a; ++ x[i] = b; ++ } ++} ++ ++void ++f2 (void) ++{ ++ for (int i = 0; i < N; ++i) ++ { ++ int a = y[i]; ++ int b = -a; ++ x[i] = b; ++ } ++} ++ ++void ++f3 (void) ++{ ++ for (int i = 0; i < N; ++i) ++ { ++ int a = x[i]; ++ int b = a / y[i]; ++ x[i] = b; ++ } ++} ++ ++void ++f4 (void) ++{ ++ for (int i = 0; i < N; ++i) ++ { ++ int a = x[i]; ++ int b = a < y[i] ? a : y[i]; ++ x[i] = b; ++ } ++} ++ ++void ++f5 (void) ++{ ++ for (int i = 0; i < N; ++i) ++ { ++ int a = x[i]; ++ int b = a > y[i] ? a : y[i]; ++ x[i] = b; ++ } ++} ++ ++/* { dg-final { scan-tree-dump {can narrow to signed:17 without loss [^\n]+= -} "vect" } } */ ++/* { dg-final { scan-tree-dump {can narrow to signed:16 without loss [^\n]+= ~} "vect" } } */ ++/* { dg-final { scan-tree-dump {can narrow to signed:16 without loss [^\n]+ MIN_EXPR} "vect" } } */ ++/* { dg-final { scan-tree-dump {can narrow to signed:16 without loss [^\n]+ MAX_EXPR} "vect" } } */ +new file mode 100644 +--- /dev/null ++++ b/src/gcc/testsuite/gcc.dg/vect/pr115192.c +@@ -0,0 +1,28 @@ ++#include "tree-vect.h" ++ ++int data[4 * 16 * 16] __attribute__((aligned(16))); ++ ++__attribute__((noipa)) void ++foo (__SIZE_TYPE__ n) ++{ ++ for (__SIZE_TYPE__ i = 1; i < n; ++i) ++ { ++ data[i * n * 4] = data[(i - 1) * n * 4] + 1; ++ data[i * n * 4 + 1] = data[(i - 1) * n * 4 + 1] + 2; ++ } ++} ++ ++int ++main () ++{ ++ check_vect (); ++ ++ data[0] = 10; ++ data[1] = 20; ++ ++ foo (3); ++ ++ if (data[24] != 12 || data[25] != 24) ++ __builtin_abort (); ++ return 0; ++} +new file mode 100644 +--- /dev/null ++++ b/src/gcc/testsuite/gcc.target/aarch64/acle/bf16_feature.c +@@ -0,0 +1,10 @@ ++/* { dg-do compile } */ ++ ++#pragma GCC target "+bf16" ++#ifndef __ARM_FEATURE_BF16 ++#error "__ARM_FEATURE_BF16 is not defined but should be!" ++#endif ++ ++void ++foo (void) {} ++ +new file mode 100644 +--- /dev/null ++++ b/src/gcc/testsuite/gcc.target/aarch64/acle/bf16_sve_feature.c +@@ -0,0 +1,10 @@ ++/* { dg-do compile } */ ++ ++#pragma GCC target "+sve+bf16" ++#ifndef __ARM_FEATURE_SVE_BF16 ++#error "__ARM_FEATURE_SVE_BF16 is not defined but should be!" ++#endif ++ ++void ++foo (void) {} ++ +new file mode 100644 +--- /dev/null ++++ b/src/gcc/testsuite/gcc.target/aarch64/options_set_27.c +@@ -0,0 +1,9 @@ ++/* { dg-do compile } */ ++/* { dg-additional-options "-march=armv8.2-a+aes+sha3" } */ ++ ++int main () ++{ ++ return 0; ++} ++ ++/* { dg-final { scan-assembler-times {\.arch armv8\.2\-a\+crc\+aes\+sha3\n} 1 } } */ +--- a/src/gcc/testsuite/gcc.target/aarch64/options_set_4.c ++++ b/src/gcc/testsuite/gcc.target/aarch64/options_set_4.c +@@ -6,7 +6,7 @@ int main () + return 0; + } + +-/* { dg-final { scan-assembler-times {\.arch armv8\.2\-a\+crc\+crypto} 1 } } */ ++/* { dg-final { scan-assembler-times {\.arch armv8\.2\-a\+crc\+crypto\n} 1 } } */ + + /* Check if individual bits that make up a grouping is specified that only the + grouping is kept. */ +--- a/src/gcc/testsuite/gcc.target/aarch64/sve/acle/asm/sudot_s32.c ++++ b/src/gcc/testsuite/gcc.target/aarch64/sve/acle/asm/sudot_s32.c +@@ -6,7 +6,7 @@ + + /* + ** sudot_s32_tied1: +-** usdot z0\.s, z2\.b, z4\.b ++** usdot z0\.s, z4\.b, z2\.b + ** ret + */ + TEST_TRIPLE_Z (sudot_s32_tied1, svint32_t, svint8_t, svuint8_t, +@@ -17,7 +17,7 @@ TEST_TRIPLE_Z (sudot_s32_tied1, svint32_t, svint8_t, svuint8_t, + ** sudot_s32_tied2: + ** mov (z[0-9]+)\.d, z0\.d + ** movprfx z0, z4 +-** usdot z0\.s, z2\.b, \1\.b ++** usdot z0\.s, \1\.b, z2\.b + ** ret + */ + TEST_TRIPLE_Z_REV (sudot_s32_tied2, svint32_t, svint8_t, svuint8_t, +@@ -27,7 +27,7 @@ TEST_TRIPLE_Z_REV (sudot_s32_tied2, svint32_t, svint8_t, svuint8_t, + /* + ** sudot_w0_s32_tied: + ** mov (z[0-9]+\.b), w0 +-** usdot z0\.s, z2\.b, \1 ++** usdot z0\.s, \1, z2\.b + ** ret + */ + TEST_TRIPLE_ZX (sudot_w0_s32_tied, svint32_t, svint8_t, uint8_t, +@@ -37,7 +37,7 @@ TEST_TRIPLE_ZX (sudot_w0_s32_tied, svint32_t, svint8_t, uint8_t, + /* + ** sudot_9_s32_tied: + ** mov (z[0-9]+\.b), #9 +-** usdot z0\.s, z2\.b, \1 ++** usdot z0\.s, \1, z2\.b + ** ret + */ + TEST_TRIPLE_Z (sudot_9_s32_tied, svint32_t, svint8_t, uint8_t, +new file mode 100644 +--- /dev/null ++++ b/src/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cnot_1.c +@@ -0,0 +1,23 @@ ++/* { dg-options "-O2" } */ ++/* { dg-final { check-function-bodies "**" "" } } */ ++ ++#include ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++/* ++** foo: ++** cmpeq (p[0-7])\.s, p0/z, z0\.s, #0 ++** mov z0\.s, \1/z, #1 ++** ret ++*/ ++svint32_t foo(svbool_t pg, svint32_t y) ++{ ++ return svsel(svcmpeq(pg, y, 0), svdup_s32(1), svdup_s32(0)); ++} ++ ++#ifdef __cplusplus ++} ++#endif +new file mode 100644 +--- /dev/null ++++ b/src/gcc/testsuite/gcc.target/alpha/pr115297.c +@@ -0,0 +1,13 @@ ++/* PR target/115297 */ ++/* { dg-do compile } */ ++/* { dg-options "-O1" } */ ++ ++enum { BPF_F_USER_BUILD_ID } __bpf_get_stack_size; ++long __bpf_get_stack_flags, bpf_get_stack___trans_tmp_2; ++ ++void bpf_get_stack() { ++ unsigned elem_size; ++ int err = elem_size = __bpf_get_stack_flags ?: sizeof(long); ++ if (__builtin_expect(__bpf_get_stack_size % elem_size, 0)) ++ bpf_get_stack___trans_tmp_2 = err; ++} +new file mode 100644 +--- /dev/null ++++ b/src/gcc/testsuite/gcc.target/alpha/pr115526.c +@@ -0,0 +1,46 @@ ++/* PR target/115526 */ ++/* { dg-do assemble } */ ++/* { dg-options "-O2 -Wno-attributes -fvisibility=hidden -fPIC -mcpu=ev4" } */ ++ ++struct _ts { ++ struct _dtoa_state *interp; ++}; ++struct Bigint { ++ int k; ++} *_Py_dg_strtod_bs; ++struct _dtoa_state { ++ struct Bigint p5s; ++ struct Bigint *freelist[]; ++}; ++extern _Thread_local struct _ts _Py_tss_tstate; ++typedef struct Bigint Bigint; ++int pow5mult_k; ++long _Py_dg_strtod_ndigits; ++void PyMem_Free(); ++void Bfree(Bigint *v) { ++ if (v) ++ { ++ if (v->k) ++ PyMem_Free(); ++ else { ++ struct _dtoa_state *interp = _Py_tss_tstate.interp; ++ interp->freelist[v->k] = v; ++ } ++ } ++} ++static Bigint *pow5mult(Bigint *b) { ++ for (;;) { ++ if (pow5mult_k & 1) { ++ Bfree(b); ++ if (b == 0) ++ return 0; ++ } ++ if (!(pow5mult_k >>= 1)) ++ break; ++ } ++ return 0; ++} ++void _Py_dg_strtod() { ++ if (_Py_dg_strtod_ndigits) ++ pow5mult(_Py_dg_strtod_bs); ++} +--- a/src/gcc/testsuite/gcc.target/arm/cmse/extend-param.c ++++ b/src/gcc/testsuite/gcc.target/arm/cmse/extend-param.c +@@ -1,5 +1,5 @@ + /* { dg-do compile } */ +-/* { dg-options "-mcmse" } */ ++/* { dg-options "-mcmse -fshort-enums" } */ + /* { dg-final { check-function-bodies "**" "" "" } } */ + + #include +@@ -78,7 +78,6 @@ __attribute__((cmse_nonsecure_entry)) char enumSecureFunc (enum offset index) { + if (index >= ARRAY_SIZE) + return 0; + return array[index]; +- + } + + /* +@@ -88,9 +87,23 @@ __attribute__((cmse_nonsecure_entry)) char enumSecureFunc (enum offset index) { + ** ... + */ + __attribute__((cmse_nonsecure_entry)) char boolSecureFunc (bool index) { +- + if (index >= ARRAY_SIZE) + return 0; + return array[index]; ++} + +-} +\ No newline at end of file ++/* ++**__acle_se_boolCharShortEnumSecureFunc: ++** ... ++** uxtb r0, r0 ++** uxtb r1, r1 ++** uxth r2, r2 ++** uxtb r3, r3 ++** ... ++*/ ++__attribute__((cmse_nonsecure_entry,optimize(0))) char boolCharShortEnumSecureFunc (bool a, unsigned char b, unsigned short c, enum offset d) { ++ size_t index = a + b + c + d; ++ if (index >= ARRAY_SIZE) ++ return 0; ++ return array[index]; ++} +--- a/src/gcc/testsuite/gcc.target/arm/cmse/extend-return.c ++++ b/src/gcc/testsuite/gcc.target/arm/cmse/extend-return.c +@@ -1,5 +1,7 @@ + /* { dg-do compile } */ +-/* { dg-options "-mcmse" } */ ++/* { dg-options "-mcmse -fshort-enums" } */ ++/* ARMv8-M expectation with target { ! arm_cmse_clear_ok }. */ ++/* ARMv8.1-M expectation with target arm_cmse_clear_ok. */ + /* { dg-final { check-function-bodies "**" "" "" } } */ + + #include +@@ -20,7 +22,15 @@ typedef enum offset __attribute__ ((cmse_nonsecure_call)) ns_enum_foo_t (void); + typedef bool __attribute__ ((cmse_nonsecure_call)) ns_bool_foo_t (void); + + /* +-**unsignNonsecure0: ++**unsignNonsecure0: { target arm_cmse_clear_ok } ++** ... ++** blxns r[0-3] ++** ... ++** uxtb r0, r0 ++** ... ++*/ ++/* ++**unsignNonsecure0: { target { ! arm_cmse_clear_ok } } + ** ... + ** bl __gnu_cmse_nonsecure_call + ** uxtb r0, r0 +@@ -32,7 +42,15 @@ unsigned char unsignNonsecure0 (ns_unsign_foo_t * ns_foo_p) + } + + /* +-**signNonsecure0: ++**signNonsecure0: { target arm_cmse_clear_ok } ++** ... ++** blxns r[0-3] ++** ... ++** sxtb r0, r0 ++** ... ++*/ ++/* ++**signNonsecure0: { target { ! arm_cmse_clear_ok } } + ** ... + ** bl __gnu_cmse_nonsecure_call + ** sxtb r0, r0 +@@ -44,7 +62,15 @@ signed char signNonsecure0 (ns_sign_foo_t * ns_foo_p) + } + + /* +-**shortUnsignNonsecure0: ++**shortUnsignNonsecure0: { target arm_cmse_clear_ok } ++** ... ++** blxns r[0-3] ++** ... ++** uxth r0, r0 ++** ... ++*/ ++/* ++**shortUnsignNonsecure0: { target { ! arm_cmse_clear_ok } } + ** ... + ** bl __gnu_cmse_nonsecure_call + ** uxth r0, r0 +@@ -56,7 +82,15 @@ unsigned short shortUnsignNonsecure0 (ns_short_unsign_foo_t * ns_foo_p) + } + + /* +-**shortSignNonsecure0: ++**shortSignNonsecure0: { target arm_cmse_clear_ok } ++** ... ++** blxns r[0-3] ++** ... ++** sxth r0, r0 ++** ... ++*/ ++/* ++**shortSignNonsecure0: { target { ! arm_cmse_clear_ok } } + ** ... + ** bl __gnu_cmse_nonsecure_call + ** sxth r0, r0 +@@ -68,7 +102,15 @@ signed short shortSignNonsecure0 (ns_short_sign_foo_t * ns_foo_p) + } + + /* +-**enumNonsecure0: ++**enumNonsecure0: { target arm_cmse_clear_ok } ++** ... ++** blxns r[0-3] ++** ... ++** uxtb r0, r0 ++** ... ++*/ ++/* ++**enumNonsecure0: { target { ! arm_cmse_clear_ok } } + ** ... + ** bl __gnu_cmse_nonsecure_call + ** uxtb r0, r0 +@@ -80,7 +122,15 @@ unsigned char __attribute__((noipa)) enumNonsecure0 (ns_enum_foo_t * ns_foo_p) + } + + /* +-**boolNonsecure0: ++**boolNonsecure0: { target arm_cmse_clear_ok } ++** ... ++** blxns r[0-3] ++** ... ++** uxtb r0, r0 ++** ... ++*/ ++/* ++**boolNonsecure0: { target { ! arm_cmse_clear_ok } } + ** ... + ** bl __gnu_cmse_nonsecure_call + ** uxtb r0, r0 +@@ -89,4 +139,4 @@ unsigned char __attribute__((noipa)) enumNonsecure0 (ns_enum_foo_t * ns_foo_p) + unsigned char boolNonsecure0 (ns_bool_foo_t * ns_foo_p) + { + return ns_foo_p (); +-} +\ No newline at end of file ++} +--- a/src/gcc/testsuite/gcc.target/arm/copysign_softfloat_1.c ++++ b/src/gcc/testsuite/gcc.target/arm/copysign_softfloat_1.c +@@ -42,7 +42,6 @@ main (int argc, char **argv) + int index = 0; + + /* { dg-final { scan-assembler-times "bfi" 2 { target arm_softfloat } } } */ +-/* { dg-final { scan-assembler-times "lsr" 1 { target arm_softfloat } } } */ + for (index; index < N; index++) + { + if (__builtin_copysignf (a_f[index], b_f[index]) != c_f[index]) +new file mode 100644 +--- /dev/null ++++ b/src/gcc/testsuite/gcc.target/arm/mve/intrinsics/vsetq_lane_su64.c +@@ -0,0 +1,63 @@ ++/* { dg-require-effective-target arm_v8_1m_mve_ok } */ ++/* { dg-add-options arm_v8_1m_mve } */ ++/* { dg-require-effective-target arm_hard_ok } */ ++/* { dg-additional-options "-mfloat-abi=hard -O2" } */ ++/* { dg-final { check-function-bodies "**" "" } } */ ++ ++#include "arm_mve.h" ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++/* ++**fn1: ++** vmov d0, r0, r1 ++** bx lr ++*/ ++uint64x2_t ++fn1 (uint64_t a, uint64x2_t b) ++{ ++ return vsetq_lane_u64 (a, b, 0); ++} ++ ++/* ++**fn2: ++** vmov d1, r0, r1 ++** bx lr ++*/ ++uint64x2_t ++fn2 (uint64_t a, uint64x2_t b) ++{ ++ return vsetq_lane_u64 (a, b, 1); ++} ++ ++/* ++**fn3: ++** vmov d0, r0, r1 ++** bx lr ++*/ ++int64x2_t ++fn3 (int64_t a, int64x2_t b) ++{ ++ return vsetq_lane_s64 (a, b, 0); ++} ++ ++/* ++**fn4: ++** vmov d1, r0, r1 ++** bx lr ++*/ ++int64x2_t ++fn4 (int64_t a, int64x2_t b) ++{ ++ return vsetq_lane_s64 (a, b, 1); ++} ++ ++ ++#ifdef __cplusplus ++} ++#endif ++ ++/* { dg-final { scan-assembler-not "__ARM_undef" } } */ ++ +--- a/src/gcc/testsuite/gcc.target/arm/simd/mve-vshr.c ++++ b/src/gcc/testsuite/gcc.target/arm/simd/mve-vshr.c +@@ -9,6 +9,8 @@ + void test_ ## NAME ##_ ## SIGN ## BITS ## x ## NB (TYPE##BITS##_t * __restrict__ dest, TYPE##BITS##_t *a, TYPE##BITS##_t *b) { \ + int i; \ + for (i=0; i= (unsigned)(BITS)) \ ++ __builtin_unreachable(); \ + dest[i] = a[i] OP b[i]; \ + } \ + } +new file mode 100644 +--- /dev/null ++++ b/src/gcc/testsuite/gcc.target/avr/torture/pr115307-isinf.c +@@ -0,0 +1,21 @@ ++/* { dg-do compile } */ ++ ++int call_isinff (float f) ++{ ++ int isinff (float); ++ return isinff (f); ++} ++ ++int call_isinf (double f) ++{ ++ int isinf (double); ++ return isinf (f); ++} ++ ++int call_isinfl (long double f) ++{ ++ int isinfl (long double); ++ return isinfl (f); ++} ++ ++/* { dg-final { scan-assembler-not "unord" } } */ +new file mode 100644 +--- /dev/null ++++ b/src/gcc/testsuite/gcc.target/avr/torture/pr115317-isinf.c +@@ -0,0 +1,55 @@ ++/* { dg-do run { target { ! avr_tiny } } } */ ++ ++extern int isinff (float); ++extern int isinf (double); ++extern int isinfl (long double); ++ ++int tst_isinf (float x, int val) ++{ ++ double y; ++ long double z; ++ ++ __asm ("" : "+r"(x)); ++ if (isinff (x) != val) ++ __builtin_exit (__LINE__); ++ ++ y = x; ++ __asm ("" : "+r"(y)); ++ if (isinf (y) != val) ++ __builtin_exit (__LINE__); ++ ++ z = x; ++ __asm ("" : "+r"(z)); ++ if (isinfl (z) != val) ++ __builtin_exit (__LINE__); ++} ++ ++static float make_f (__UINT32_TYPE__ i) ++{ ++ float f; ++ __builtin_memcpy (&f, &i, 4); ++ return f; ++} ++ ++int main (void) ++{ ++ tst_isinf (__builtin_huge_valf(), 1); ++ tst_isinf (-__builtin_huge_valf(), -1); ++ tst_isinf (__builtin_nanf(""), 0); ++ tst_isinf (0.0f, 0); ++ tst_isinf (-0.0f, 0); ++ tst_isinf (1.0f, 0); ++ tst_isinf (-1.0f, 0); ++ tst_isinf (make_f (0x7f800000), 1); ++ tst_isinf (make_f (0xff800000), -1); ++ tst_isinf (make_f (0x7f7fffff), 0); ++ tst_isinf (make_f (0xff7fffff), 0); ++ tst_isinf (make_f (0x7f800001), 0); ++ tst_isinf (make_f (0xff800001), 0); ++ tst_isinf (make_f (0x00800000), 0); ++ tst_isinf (make_f (0x80800000), 0); ++ tst_isinf (make_f (0x00400000), 0); ++ tst_isinf (make_f (0x80400000), 0); ++ ++ return 0; ++} +new file mode 100644 +--- /dev/null ++++ b/src/gcc/testsuite/gcc.target/avr/torture/pr116407-2.c +@@ -0,0 +1,34 @@ ++/* { dg-do link } */ ++ ++typedef __UINT16_TYPE__ u16; ++typedef __INT16_TYPE__ T; ++ ++#ifdef __OPTIMIZE__ ++ ++static __inline__ __attribute__((always_inline)) ++void delay (T x, u16 nops) ++{ ++ do ++ __builtin_avr_nops (nops); ++ while (--x != -1); ++} ++ ++#ifdef __AVR_HAVE_JMP_CALL__ ++ ++void delay_2043 (T x) { delay (x, 2043); } ++void delay_2044 (T x) { delay (x, 2044); } ++void delay_2045 (T x) { delay (x, 2045); } ++void delay_2046 (T x) { delay (x, 2046); } ++ ++#endif /* have JUMP, CALL */ ++ ++void delay_61 (T x) { delay (x, 61); } ++void delay_62 (T x) { delay (x, 62); } ++void delay_63 (T x) { delay (x, 63); } ++ ++#endif /* optimize */ ++ ++int main (void) ++{ ++ return 0; ++} +new file mode 100644 +--- /dev/null ++++ b/src/gcc/testsuite/gcc.target/avr/torture/pr116407-4.c +@@ -0,0 +1,34 @@ ++/* { dg-do link } */ ++ ++typedef __UINT16_TYPE__ u16; ++typedef __INT32_TYPE__ T; ++ ++#ifdef __OPTIMIZE__ ++ ++static __inline__ __attribute__((always_inline)) ++void delay (T x, u16 nops) ++{ ++ do ++ __builtin_avr_nops (nops); ++ while (--x != -1); ++} ++ ++#ifdef __AVR_HAVE_JMP_CALL__ ++ ++void delay_2043 (T x) { delay (x, 2043); } ++void delay_2044 (T x) { delay (x, 2044); } ++void delay_2045 (T x) { delay (x, 2045); } ++void delay_2046 (T x) { delay (x, 2046); } ++ ++#endif /* have JUMP, CALL */ ++ ++void delay_61 (T x) { delay (x, 61); } ++void delay_62 (T x) { delay (x, 62); } ++void delay_63 (T x) { delay (x, 63); } ++ ++#endif /* optimize */ ++ ++int main (void) ++{ ++ return 0; ++} +new file mode 100644 +--- /dev/null ++++ b/src/gcc/testsuite/gcc.target/avr/torture/pr87376.c +@@ -0,0 +1,60 @@ ++/* { dg-do run { target { ! avr_tiny } } } */ ++/* { dg-additional-options "-std=gnu99" } */ ++ ++typedef __UINT64_TYPE__ uint64_t; ++ ++extern const __memx uint64_t aa __asm ("real_aa"); ++extern const uint64_t bb __asm ("real_bb"); ++ ++const __memx uint64_t real_aa = 0x1122334455667788; ++const uint64_t real_bb = 0x0908070605040302; ++ ++__attribute__((noinline,noclone)) ++uint64_t add1 (void) ++{ ++ return aa + bb; ++} ++ ++__attribute__((noinline,noclone)) ++uint64_t add2 (void) ++{ ++ return bb + aa; ++} ++ ++__attribute__((noinline,noclone)) ++uint64_t sub1 (void) ++{ ++ return aa - bb; ++} ++ ++__attribute__((noinline,noclone)) ++uint64_t sub2 (void) ++{ ++ return bb - aa; ++} ++ ++__attribute__((noinline,noclone)) ++uint64_t neg1 (void) ++{ ++ return -aa; ++} ++ ++int main (void) ++{ ++ if (neg1() != -real_aa) ++ __builtin_exit (__LINE__); ++ ++ if (add1() != real_aa + real_bb) ++ __builtin_exit (__LINE__); ++ ++ if (add2() != real_bb + real_aa) ++ __builtin_exit (__LINE__); ++ ++ if (sub1() != real_aa - real_bb) ++ __builtin_exit (__LINE__); ++ ++ if (sub2() != real_bb - real_aa) ++ __builtin_exit (__LINE__); ++ ++ return 0; ++} +new file mode 100644 +--- /dev/null ++++ b/src/gcc/testsuite/gcc.target/avr/torture/pr88236-pr115726.c +@@ -0,0 +1,115 @@ ++/* { dg-do run { target { ! avr_tiny } } } */ ++/* { dg-additional-options "-std=gnu99" } */ ++ ++const __flash char fvals8[] = { 1, 2, 3 }; ++char rvals8[] = { 0, 2, 4 }; ++ ++const __flash int fvals16[] = { 1, 2, 3 }; ++int rvals16[] = { 0, 2, 4 }; ++ ++__attribute__((noinline, noclone)) ++char xload8_r30 (const __memx char *pc) ++{ ++ register char c __asm ("r30"); ++ c = *pc; ++ __asm (";;" : "+r" (c)); ++ return c; ++} ++ ++__attribute__((noinline, noclone)) ++int xload16_r30 (const __memx int *pc) ++{ ++ register int c __asm ("r30"); ++ c = *pc; ++ __asm (";;" : "+r" (c)); ++ return c; ++} ++ ++__attribute__((noinline, noclone)) ++char xload8_r22 (const __memx char *pc) ++{ ++ register char c __asm ("r22"); ++ c = *pc; ++ __asm (";;" : "+r" (c)); ++ return c; ++} ++ ++__attribute__((noinline, noclone)) ++int xload16_r22 (const __memx int *pc) ++{ ++ register int c __asm ("r22"); ++ c = *pc; ++ __asm (";;" : "+r" (c)); ++ return c; ++} ++ ++__attribute__((noinline, noclone)) ++int xload16_r20 (const __memx int *pc) ++{ ++ register int c __asm ("r20"); ++ c = *pc; ++ __asm (";;" : "+r" (c)); ++ return c; ++} ++ ++void test8 (void) ++{ ++ char c; ++ for (int i = 0; i < 3; ++i) ++ { ++ c = xload8_r30 (fvals8 + i); ++ if (c != 1 + i) ++ __builtin_exit (__LINE__); ++ ++ c = xload8_r22 (fvals8 + i); ++ if (c != 1 + i) ++ __builtin_exit (__LINE__); ++ ++ c = xload8_r30 (rvals8 + i); ++ if (c != 2 * i) ++ __builtin_exit (__LINE__); ++ ++ c = xload8_r22 (rvals8 + i); ++ if (c != 2 * i) ++ __builtin_exit (__LINE__); ++ } ++} ++ ++void test16 (void) ++{ ++ int c; ++ for (int i = 0; i < 3; ++i) ++ { ++ c = xload16_r30 (fvals16 + i); ++ if (c != 1 + i) ++ __builtin_exit (__LINE__); ++ ++ c = xload16_r22 (fvals16 + i); ++ if (c != 1 + i) ++ __builtin_exit (__LINE__); ++ ++ c = xload16_r20 (fvals16 + i); ++ if (c != 1 + i) ++ __builtin_exit (__LINE__); ++ ++ c = xload16_r30 (rvals16 + i); ++ if (c != 2 * i) ++ __builtin_exit (__LINE__); ++ ++ c = xload16_r22 (rvals16 + i); ++ if (c != 2 * i) ++ __builtin_exit (__LINE__); ++ ++ c = xload16_r20 (rvals16 + i); ++ if (c != 2 * i) ++ __builtin_exit (__LINE__); ++ } ++} ++ ++int main (void) ++{ ++ test8(); ++ test16(); ++ ++ return 0; ++} +new file mode 100644 +--- /dev/null ++++ b/src/gcc/testsuite/gcc.target/avr/torture/pr98762.c +@@ -0,0 +1,19 @@ ++/* { dg-do run } */ ++/* { dg-additional-options "-std=c99" } */ ++ ++long long acc = 0x1122334455667788; ++ ++__attribute__((noinline,noclone)) ++void addhi (short a) ++{ ++ acc += (long long) a << 32; ++} ++ ++int main (void) ++{ ++ addhi (0x0304); ++ if (acc != 0x1122364855667788) ++ __builtin_abort(); ++ ++ return 0; ++} +new file mode 100644 +--- /dev/null ++++ b/src/gcc/testsuite/gcc.target/i386/avx512bw-vpalignr-1b.c +@@ -0,0 +1,18 @@ ++/* { dg-do compile } */ ++/* { dg-options "-O0 -mavx512bw -mavx512vl" } */ ++/* { dg-final { scan-assembler-times "vpalignr\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */ ++/* { dg-final { scan-assembler-times "vpalignr\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */ ++ ++#include ++ ++volatile __m256i y; ++volatile __m128i x; ++volatile __mmask32 m2; ++volatile __mmask16 m3; ++ ++void extern ++avx512bw_test (void) ++{ ++ y = _mm256_mask_alignr_epi8 (y, m2, y, y, 10); ++ x = _mm_mask_alignr_epi8 (x, m3, x, x, 10); ++} +new file mode 100644 +--- /dev/null ++++ b/src/gcc/testsuite/gcc.target/i386/avx512dq-vfpclasssd-1b.c +@@ -0,0 +1,14 @@ ++/* { dg-do compile } */ ++/* { dg-options "-mavx512dq -O0" } */ ++/* { dg-final { scan-assembler-times "vfpclasssd\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n^k\]*%k\[0-7\]\{%k\[0-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */ ++ ++#include ++ ++volatile __m128d x128; ++volatile __mmask8 m8; ++ ++void extern ++avx512dq_test (void) ++{ ++ m8 = _mm_mask_fpclass_sd_mask (m8, x128, 13); ++} +new file mode 100644 +--- /dev/null ++++ b/src/gcc/testsuite/gcc.target/i386/avx512dq-vfpclassss-1b.c +@@ -0,0 +1,14 @@ ++/* { dg-do compile } */ ++/* { dg-options "-mavx512dq -O0" } */ ++/* { dg-final { scan-assembler-times "vfpclassss\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n^k\]*%k\[0-7\]\{%k\[0-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */ ++ ++#include ++ ++volatile __m128 x128; ++volatile __mmask8 m8; ++ ++void extern ++avx512dq_test (void) ++{ ++ m8 = _mm_mask_fpclass_ss_mask (m8, x128, 13); ++} +new file mode 100644 +--- /dev/null ++++ b/src/gcc/testsuite/gcc.target/i386/avx512dq-vreducesd-1b.c +@@ -0,0 +1,16 @@ ++/* { dg-do compile } */ ++/* { dg-options "-mavx512dq -O0" } */ ++/* { dg-final { scan-assembler-times "vreducesd\[ \\t\]+\[^\{\n\]*\{sae\}\[^\n\]*%xmm\[0-9\]+\[^\n\]*%xmm\[0-9\]+\[^\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */ ++ ++#include ++ ++#define IMM 123 ++ ++volatile __m128d x1, x2, xx1, xx2; ++volatile __mmask8 m; ++ ++void extern ++avx512dq_test (void) ++{ ++ xx1 = _mm_reduce_round_sd (xx1, xx2, IMM, _MM_FROUND_NO_EXC); ++} +new file mode 100644 +--- /dev/null ++++ b/src/gcc/testsuite/gcc.target/i386/avx512dq-vreducess-1b.c +@@ -0,0 +1,16 @@ ++/* { dg-do compile } */ ++/* { dg-options "-mavx512dq -O0" } */ ++/* { dg-final { scan-assembler-times "vreducess\[ \\t\]+\[^\{\n\]*\{sae\}\[^\n\]*%xmm\[0-9\]+\[^\n\]*%xmm\[0-9\]+\[^\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */ ++ ++#include ++ ++#define IMM 123 ++ ++volatile __m128 x1, x2, xx1, xx2; ++volatile __mmask8 m; ++ ++void extern ++avx512dq_test (void) ++{ ++ xx1 = _mm_reduce_round_ss (xx1, xx2, IMM, _MM_FROUND_NO_EXC); ++} +new file mode 100644 +--- /dev/null ++++ b/src/gcc/testsuite/gcc.target/i386/avx512fp16-vfpclassph-1c.c +@@ -0,0 +1,77 @@ ++/* { dg-do run } */ ++/* { dg-options "-O0 -mavx512fp16" } */ ++/* { dg-require-effective-target avx512fp16 } */ ++ ++#define AVX512FP16 ++#include "avx512f-helper.h" ++ ++#include ++#include ++#include ++#define SIZE (AVX512F_LEN / 16) ++#include "avx512f-mask-type.h" ++ ++#ifndef __FPCLASSPH__ ++#define __FPCLASSPH__ ++int check_fp_class_hp (_Float16 src, int imm) ++{ ++ int qNaN_res = isnan (src); ++ int sNaN_res = isnan (src); ++ int Pzero_res = (src == 0.0); ++ int Nzero_res = (src == -0.0); ++ int PInf_res = (isinf (src) == 1); ++ int NInf_res = (isinf (src) == -1); ++ int Denorm_res = (fpclassify (src) == FP_SUBNORMAL); ++ int FinNeg_res = __builtin_finite (src) && (src < 0); ++ ++ int result = (((imm & 1) && qNaN_res) ++ || (((imm >> 1) & 1) && Pzero_res) ++ || (((imm >> 2) & 1) && Nzero_res) ++ || (((imm >> 3) & 1) && PInf_res) ++ || (((imm >> 4) & 1) && NInf_res) ++ || (((imm >> 5) & 1) && Denorm_res) ++ || (((imm >> 6) & 1) && FinNeg_res) ++ || (((imm >> 7) & 1) && sNaN_res)); ++ return result; ++} ++#endif ++ ++MASK_TYPE ++CALC (_Float16 *s1, int imm) ++{ ++ int i; ++ MASK_TYPE res = 0; ++ ++ for (i = 0; i < SIZE; i++) ++ if (check_fp_class_hp(s1[i], imm)) ++ res = res | (1 << i); ++ ++ return res; ++} ++ ++void ++TEST (void) ++{ ++ int i; ++ UNION_TYPE (AVX512F_LEN, h) src; ++ MASK_TYPE res1, res2, res_ref = 0; ++ MASK_TYPE mask = MASK_VALUE; ++ ++ src.a[SIZE - 1] = NAN; ++ src.a[SIZE - 2] = 1.0 / 0.0; ++ for (i = 0; i < SIZE - 2; i++) ++ { ++ src.a[i] = -24.43 + 0.6 * i; ++ } ++ ++ res1 = INTRINSIC (_fpclass_ph_mask) (src.x, 0xFF); ++ res2 = INTRINSIC (_mask_fpclass_ph_mask) (mask, src.x, 0xFF); ++ ++ res_ref = CALC (src.a, 0xFF); ++ ++ if (res_ref != res1) ++ abort (); ++ ++ if ((mask & res_ref) != res2) ++ abort (); ++} +new file mode 100644 +--- /dev/null ++++ b/src/gcc/testsuite/gcc.target/i386/avx512vl-valignq-1b.c +@@ -0,0 +1,15 @@ ++/* { dg-do compile } */ ++/* { dg-options "-O0 -mavx512vl" } */ ++/* { dg-final { scan-assembler-times "valignq\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */ ++ ++#include ++ ++volatile __m256i y; ++volatile __m128i x; ++volatile __mmask8 m; ++ ++void extern ++avx512vl_test (void) ++{ ++ x = _mm_mask_alignr_epi64 (x, m, x, x, 1); ++} +--- a/src/gcc/testsuite/gcc.target/i386/pieces-memcpy-10.c ++++ b/src/gcc/testsuite/gcc.target/i386/pieces-memcpy-10.c +@@ -1,5 +1,5 @@ + /* { dg-do compile } */ +-/* { dg-options "-O2 -mno-avx2 -mavx -mtune=sandybridge" } */ ++/* { dg-options "-O2 -mno-avx2 -mavx -mmove-max=128 -mstore-max=128 -mtune=sandybridge" } */ + + extern char *dst, *src; + +new file mode 100644 +--- /dev/null ++++ b/src/gcc/testsuite/gcc.target/i386/pieces-memcpy-22.c +@@ -0,0 +1,12 @@ ++/* { dg-do compile { target { ! ia32 } } } */ ++/* { dg-options "-O2 -mno-avx2 -mavx -mtune=generic" } */ ++ ++extern char *dst, *src; ++ ++void ++foo (void) ++{ ++ __builtin_memcpy (dst, src, 33); ++} ++ ++/* { dg-final { scan-assembler-times "vmovdqu\[ \\t\]+\[^\n\]*%ymm" 2 } } */ +--- a/src/gcc/testsuite/gcc.target/i386/pieces-memcpy-6.c ++++ b/src/gcc/testsuite/gcc.target/i386/pieces-memcpy-6.c +@@ -1,5 +1,5 @@ + /* { dg-do compile { target { ! ia32 } } } */ +-/* { dg-options "-O2 -mno-avx2 -mavx -mtune=sandybridge" } */ ++/* { dg-options "-O2 -mno-avx2 -mavx -mmove-max=128 -mstore-max=128 -mtune=sandybridge" } */ + + extern char *dst, *src; + +--- a/src/gcc/testsuite/gcc.target/i386/pieces-memset-38.c ++++ b/src/gcc/testsuite/gcc.target/i386/pieces-memset-38.c +@@ -1,5 +1,5 @@ + /* { dg-do compile } */ +-/* { dg-options "-O2 -mno-avx512f -mavx2 -mtune=sandybridge" } */ ++/* { dg-options "-O2 -mno-avx512f -mavx2 -mmove-max=128 -mstore-max=128 -mtune=sandybridge" } */ + + extern char *dst; + +--- a/src/gcc/testsuite/gcc.target/i386/pieces-memset-40.c ++++ b/src/gcc/testsuite/gcc.target/i386/pieces-memset-40.c +@@ -1,5 +1,5 @@ + /* { dg-do compile } */ +-/* { dg-options "-O2 -mno-avx512f -mavx2 -mtune=sandybridge" } */ ++/* { dg-options "-O2 -mno-avx512f -mavx2 -mmove-max=128 -mstore-max=128 -mtune=sandybridge" } */ + + extern char *dst; + +--- a/src/gcc/testsuite/gcc.target/i386/pieces-memset-41.c ++++ b/src/gcc/testsuite/gcc.target/i386/pieces-memset-41.c +@@ -1,5 +1,5 @@ + /* { dg-do compile } */ +-/* { dg-options "-O2 -mno-avx2 -mavx -mtune=sandybridge -mno-stackrealign" } */ ++/* { dg-options "-O2 -mno-avx2 -mavx -mmove-max=128 -mstore-max=128 -mtune=sandybridge -mno-stackrealign" } */ + + extern char *dst; + +--- a/src/gcc/testsuite/gcc.target/i386/pieces-memset-42.c ++++ b/src/gcc/testsuite/gcc.target/i386/pieces-memset-42.c +@@ -1,5 +1,5 @@ + /* { dg-do compile } */ +-/* { dg-options "-O2 -mno-avx2 -mavx -mtune=sandybridge" } */ ++/* { dg-options "-O2 -mno-avx2 -mavx -mmove-max=128 -mstore-max=128 -mtune=sandybridge" } */ + + extern char *dst; + +--- a/src/gcc/testsuite/gcc.target/i386/pieces-memset-43.c ++++ b/src/gcc/testsuite/gcc.target/i386/pieces-memset-43.c +@@ -1,5 +1,5 @@ + /* { dg-do compile } */ +-/* { dg-options "-O2 -mno-avx2 -mavx -mtune=sandybridge" } */ ++/* { dg-options "-O2 -mno-avx2 -mavx -mmove-max=128 -mstore-max=128 -mtune=sandybridge" } */ + + extern char *dst; + +new file mode 100644 +--- /dev/null ++++ b/src/gcc/testsuite/gcc.target/i386/pieces-memset-51.c +@@ -0,0 +1,12 @@ ++/* { dg-do compile } */ ++/* { dg-options "-O2 -mno-avx2 -mavx -mtune=generic" } */ ++ ++extern char *dst; ++ ++void ++foo (int x) ++{ ++ __builtin_memset (dst, x, 64); ++} ++ ++/* { dg-final { scan-assembler-times "vmovdqu\[ \\t\]+\[^\n\]*%ymm" 2 } } */ +--- a/src/gcc/testsuite/gcc.target/i386/pieces-strcpy-2.c ++++ b/src/gcc/testsuite/gcc.target/i386/pieces-strcpy-2.c +@@ -1,5 +1,5 @@ + /* { dg-do compile { target { ! ia32 } } } */ +-/* { dg-options "-O2 -mno-avx2 -mavx -mtune=sandybridge" } */ ++/* { dg-options "-O2 -mno-avx2 -mavx -mmove-max=128 -mstore-max=128 -mtune=sandybridge" } */ + + extern char *strcpy (char *, const char *); + +new file mode 100644 +--- /dev/null ++++ b/src/gcc/testsuite/gcc.target/i386/pieces-strcpy-3.c +@@ -0,0 +1,15 @@ ++/* { dg-do compile { target { ! ia32 } } } */ ++/* { dg-options "-O2 -mno-avx2 -mavx -mtune=generic" } */ ++ ++extern char *strcpy (char *, const char *); ++ ++void ++foo (char *s) ++{ ++ strcpy (s, ++ "1234567890abcdef123456abcdef5678123456abcdef567abcdef678" ++ "1234567"); ++} ++ ++/* { dg-final { scan-assembler-times "vmovdqa\[ \\t\]+\[^\n\]*%ymm" 2 } } */ ++/* { dg-final { scan-assembler-times "vmovdqu\[ \\t\]+\[^\n\]*%ymm" 2 } } */ +new file mode 100644 +--- /dev/null ++++ b/src/gcc/testsuite/gcc.target/i386/pr115872.c +@@ -0,0 +1,16 @@ ++/* { dg-do compile } */ ++/* { dg-options "-O2 -g" } */ ++ ++long set_work_pending_p; ++_Bool set_work_pending() { ++ _Bool __trans_tmp_1; ++ long mask = 1, old = __atomic_fetch_or(&set_work_pending_p, mask, 0); ++ __trans_tmp_1 = old & mask; ++ return !__trans_tmp_1; ++} ++void __queue_work() { ++ _Bool ret = set_work_pending(); ++ if (ret) ++ __queue_work(); ++} ++ +new file mode 100644 +--- /dev/null ++++ b/src/gcc/testsuite/gcc.target/i386/pr116043.c +@@ -0,0 +1,33 @@ ++/* { dg-do compile } */ ++/* { dg-options "-mavx512bf16 -O3" } */ ++/* { dg-final { scan-assembler-not {(?n)lea.*@gottpoff} } } */ ++ ++extern __thread int a, c, i, j, k, l; ++int *b; ++struct d { ++ int e; ++} f, g; ++char *h; ++ ++void m(struct d *n) { ++ b = &k; ++ for (; n->e; b++, n--) { ++ i = b && a; ++ if (i) ++ j = c; ++ } ++} ++ ++char *o(struct d *n) { ++ for (; n->e;) ++ return h; ++} ++ ++int q() { ++ if (l) ++ return 1; ++ int p = *o(&g); ++ m(&f); ++ m(&g); ++ l = p; ++} +new file mode 100644 +--- /dev/null ++++ b/src/gcc/testsuite/gcc.target/i386/pr116512.c +@@ -0,0 +1,26 @@ ++/* { dg-do compile } */ ++/* { dg-options "-march=x86-64-v4 -O2" } */ ++/* { dg-final { scan-assembler-not "vzeroupper" { target { ! ia32 } } } } */ ++ ++#include ++ ++struct B { ++ union { ++ __m512 f; ++ __m512i s; ++ }; ++}; ++ ++struct B foo(int n) { ++ struct B res; ++ res.s = _mm512_set1_epi32(n); ++ ++ return res; ++} ++ ++__m512i bar(int n) { ++ struct B res; ++ res.s = _mm512_set1_epi32(n); ++ ++ return res.s; ++} +--- a/src/gcc/testsuite/gcc.target/i386/prefetchi-1.c ++++ b/src/gcc/testsuite/gcc.target/i386/prefetchi-1.c +@@ -1,7 +1,7 @@ + /* { dg-do compile { target { ! ia32 } } } */ + /* { dg-options "-mprefetchi -O2" } */ +-/* { dg-final { scan-assembler-times "\[ \\t\]+prefetchit0\[ \\t\]+" 2 } } */ +-/* { dg-final { scan-assembler-times "\[ \\t\]+prefetchit1\[ \\t\]+" 2 } } */ ++/* { dg-final { scan-assembler-times "\[ \\t\]+prefetchit0\[ \\t\]+bar\\(%rip\\)" 2 } } */ ++/* { dg-final { scan-assembler-times "\[ \\t\]+prefetchit1\[ \\t\]+bar\\(%rip\\)" 2 } } */ + + #include + +new file mode 100644 +--- /dev/null ++++ b/src/gcc/testsuite/gcc.target/i386/prefetchi-1b.c +@@ -0,0 +1,26 @@ ++/* { dg-do compile { target { ! ia32 } } } */ ++/* { dg-options "-mprefetchi -O0" } */ ++/* { dg-final { scan-assembler-times "\[ \\t\]+prefetchit0\[ \\t\]+bar\\(%rip\\)" 1 } } */ ++/* { dg-final { scan-assembler-times "\[ \\t\]+prefetchit1\[ \\t\]+bar\\(%rip\\)" 1 } } */ ++ ++#include ++ ++int ++bar (int a) ++{ ++ return a + 1; ++} ++ ++int ++foo1 (int b) ++{ ++ _m_prefetchit0 (bar); ++ return bar (b) + 1; ++} ++ ++int ++foo2 (int b) ++{ ++ _m_prefetchit1 (bar); ++ return bar (b) + 1; ++} +new file mode 100644 +--- /dev/null ++++ b/src/gcc/testsuite/gcc.target/loongarch/pr115752.c +@@ -0,0 +1,8 @@ ++/* { dg-do compile } */ ++ ++long double ++test (long double xx) ++{ ++ __asm ("" :: "f"(xx)); /* { dg-error "inconsistent operand constraints in an 'asm'" } */ ++ return xx + 1; ++} +new file mode 100644 +--- /dev/null ++++ b/src/gcc/testsuite/gcc.target/powerpc/pr106069-1.c +@@ -0,0 +1,39 @@ ++/* { dg-do run } */ ++/* { dg-options "-O2" } */ ++/* { dg-require-effective-target vmx_hw } */ ++ ++/* Test vector merge for 8-bit element size, ++ it will abort if the RTL pattern isn't expected. */ ++ ++#include "altivec.h" ++ ++__attribute__((noipa)) ++signed char elem_6 (vector signed char a, vector signed char b) ++{ ++ vector signed char c = vec_mergeh (a,b); ++ return vec_extract (c, 6); ++} ++ ++__attribute__((noipa)) ++unsigned char elem_15 (vector unsigned char a, vector unsigned char b) ++{ ++ vector unsigned char c = vec_mergel (a,b); ++ return vec_extract (c, 15); ++} ++ ++int ++main () ++{ ++ vector unsigned char v1 ++ = {3, 33, 22, 12, 34, 14, 5, 25, 30, 11, 0, 21, 17, 27, 38, 8}; ++ vector unsigned char v2 ++ = {81, 82, 83, 84, 68, 67, 66, 65, 99, 100, 101, 102, 250, 125, 0, 6}; ++ signed char x1 = elem_6 ((vector signed char) v1, (vector signed char) v2); ++ unsigned char x2 = elem_15 (v1, v2); ++ ++ if (x1 != 12 || x2 != 6) ++ __builtin_abort (); ++ ++ return 0; ++} ++ +new file mode 100644 +--- /dev/null ++++ b/src/gcc/testsuite/gcc.target/powerpc/pr106069-2.c +@@ -0,0 +1,37 @@ ++/* { dg-do run } */ ++/* { dg-options "-O2" } */ ++/* { dg-require-effective-target vmx_hw } */ ++ ++/* Test vector merge for 16-bit element size, ++ it will abort if the RTL pattern isn't expected. */ ++ ++#include "altivec.h" ++ ++__attribute__((noipa)) ++signed short elem_2 (vector signed short a, vector signed short b) ++{ ++ vector signed short c = vec_mergeh (a,b); ++ return vec_extract (c, 2); ++} ++ ++__attribute__((noipa)) ++unsigned short elem_7 (vector unsigned short a, vector unsigned short b) ++{ ++ vector unsigned short c = vec_mergel (a,b); ++ return vec_extract (c, 7); ++} ++ ++int ++main () ++{ ++ vector unsigned short v1 = {3, 22, 12, 34, 5, 25, 30, 11}; ++ vector unsigned short v2 = {84, 168, 267, 966, 65, 399, 999, 99}; ++ signed short x1 = elem_2 ((vector signed short) v1, (vector signed short) v2); ++ unsigned short x2 = elem_7 (v1, v2); ++ ++ if (x1 != 22 || x2 != 99) ++ __builtin_abort (); ++ ++ return 0; ++} ++ +new file mode 100644 +--- /dev/null ++++ b/src/gcc/testsuite/gcc.target/powerpc/pr114759-2.c +@@ -0,0 +1,17 @@ ++/* { dg-do compile } */ ++/* { dg-options "-O2 -mdejagnu-cpu=power8 -mrop-protect" } */ ++/* { dg-require-effective-target rop_ok } Only enable on supported ABIs. */ ++ ++/* Verify we generate ROP-protect hash insns when compiling for Power8. */ ++ ++extern void foo (void); ++ ++int ++bar (void) ++{ ++ foo (); ++ return 5; ++} ++ ++/* { dg-final { scan-assembler-times {\mhashst\M} 1 } } */ ++/* { dg-final { scan-assembler-times {\mhashchk\M} 1 } } */ +new file mode 100644 +--- /dev/null ++++ b/src/gcc/testsuite/gcc.target/powerpc/pr114759-3.c +@@ -0,0 +1,21 @@ ++/* PR target/114759 */ ++/* { dg-do compile } */ ++/* { dg-options "-O2 -mdejagnu-cpu=power7 -mrop-protect" } */ ++ ++/* Verify we emit an error if we use -mrop-protect with an unsupported cpu ++ or ABI. */ ++ ++extern void foo (void); ++ ++int ++bar (void) ++{ ++ foo (); ++ return 5; ++} ++ ++/* The correct line number is in the preamble to the error message, not ++ in the final line (which is all that dg-error inspects). Hence, we have ++ to tell dg-error to ignore the line number. */ ++/* { dg-error "'-mrop-protect' requires '-mcpu=power8'" "PR114759" { target *-*-* } 0 } */ ++/* { dg-error "'-mrop-protect' requires the ELFv2 ABI" "PR114759" { target { ! rop_ok } } 0 } */ +new file mode 100644 +--- /dev/null ++++ b/src/gcc/testsuite/gcc.target/powerpc/pr114846.c +@@ -0,0 +1,20 @@ ++/* { dg-do run } */ ++/* { dg-require-effective-target builtin_eh_return } */ ++ ++/* Ensure it runs successfully. */ ++ ++__attribute__ ((noipa)) ++int f (int *a, long offset, void *handler) ++{ ++ if (*a == 5) ++ return 5; ++ __builtin_eh_return (offset, handler); ++} ++ ++int main () ++{ ++ int t = 5; ++ if (f (&t, 0, 0) != 5) ++ __builtin_abort (); ++ return 0; ++} +new file mode 100644 +--- /dev/null ++++ b/src/gcc/testsuite/gcc.target/powerpc/pr115355.c +@@ -0,0 +1,37 @@ ++/* { dg-do run } */ ++/* { dg-require-effective-target p9vector_hw } */ ++/* Force vectorization with -fno-vect-cost-model to have vector unpack ++ which exposes the issue in PR115355. */ ++/* { dg-options "-O2 -mdejagnu-cpu=power9 -fno-vect-cost-model" } */ ++ ++/* Verify it runs successfully. */ ++ ++__attribute__((noipa)) ++void setToIdentityGOOD(unsigned long long *mVec, unsigned int mLen) ++{ ++ #pragma GCC novector ++ for (unsigned int i = 0; i < mLen; i++) ++ mVec[i] = i; ++} ++ ++__attribute__((noipa)) ++void setToIdentityBAD(unsigned long long *mVec, unsigned int mLen) ++{ ++ for (unsigned int i = 0; i < mLen; i++) ++ mVec[i] = i; ++} ++ ++unsigned long long vec1[100]; ++unsigned long long vec2[100]; ++ ++int main() ++{ ++ unsigned int l = 29; ++ setToIdentityGOOD (vec1, 29); ++ setToIdentityBAD (vec2, 29); ++ ++ if (__builtin_memcmp (vec1, vec2, l * sizeof (vec1[0])) != 0) ++ __builtin_abort (); ++ ++ return 0; ++} +new file mode 100644 +--- /dev/null ++++ b/src/gcc/testsuite/gcc.target/powerpc/pr115389.c +@@ -0,0 +1,17 @@ ++/* PR target/115389 */ ++/* { dg-do assemble } */ ++/* { dg-options "-O2 -mdejagnu-cpu=power10 -mrop-protect -mno-vsx -mno-altivec -mabi=no-altivec -save-temps" } */ ++/* { dg-require-effective-target rop_ok } */ ++ ++/* Verify we do not emit invalid offsets for our ROP insns. */ ++ ++extern void foo (void); ++long ++bar (void) ++{ ++ foo (); ++ return 0; ++} ++ ++/* { dg-final { scan-assembler-times {\mhashst\M} 1 } } */ ++/* { dg-final { scan-assembler-times {\mhashchk\M} 1 } } */ +new file mode 100644 +--- /dev/null ++++ b/src/gcc/testsuite/gcc.target/powerpc/pr97367.c +@@ -0,0 +1,13 @@ ++/* PR target/97367 */ ++/* { dg-options "-mdejagnu-cpu=G5" } */ ++ ++/* Verify we emit a ".machine power4" and ".machine altivec" rather ++ than a ".machine power7". */ ++ ++int dummy (void) ++{ ++ return 0; ++} ++ ++/* { dg-final { scan-assembler {\.machine power4\M} } } */ ++/* { dg-final { scan-assembler {\.machine altivec\M} } } */ +new file mode 100644 +--- /dev/null ++++ b/src/gcc/testsuite/gfortran.dg/allocate_with_source_32.f90 +@@ -0,0 +1,33 @@ ++! { dg-do run } ++! ++! PR fortran/83865 ++! ++! Test ALLOCATE with SOURCE= of deferred length character, where ++! the source-expression is an array of character with length 0. ++ ++program p ++ implicit none ++ character(:), allocatable :: z(:) ++ character(1) :: cc(4) = "" ++ allocate (z, source=['']) ++ if (len (z) /= 0 .or. size (z) /= 1) stop 1 ++ deallocate (z) ++ allocate (z, source=['','']) ++ if (len (z) /= 0 .or. size (z) /= 2) stop 2 ++ deallocate (z) ++ allocate (z, source=[ character(0) :: 'a','b','c']) ++ if (len (z) /= 0 .or. size (z) /= 3) stop 3 ++ deallocate (z) ++ allocate (z, source=[ character(0) :: cc ]) ++ if (len (z) /= 0 .or. size (z) /= 4) stop 4 ++ deallocate (z) ++ associate (x => f()) ++ if (len (x) /= 0 .or. size (x) /= 1) stop 5 ++ if (x(1) /= '') stop 6 ++ end associate ++contains ++ function f() result(z) ++ character(:), allocatable :: z(:) ++ allocate (z, source=['']) ++ end function f ++end +new file mode 100755 +--- /dev/null ++++ b/src/gcc/testsuite/gfortran.dg/asan/pr110415-2.f90 +@@ -0,0 +1,45 @@ ++! { dg-do run } ++! ++! Contributed by Brad Richardson ++! ++implicit none ++ type, abstract :: p ++ integer :: a = 4 ++ end type p ++ ++ type, extends(p) :: c ++ integer :: b = 7 ++ character(len=:), allocatable :: str, str2(:) ++ end type c ++ ++ type, extends(p) :: d ++ integer :: ef = 7 ++ end type d ++ ++ class(p), allocatable :: a ++ ++ a = func() ++ ++ a = func2() ++ ++ a = func() ++ ++ deallocate(a) ++ ++contains ++ function func2() result(a) ++ class(p), allocatable :: a ++ a = d() ++ end function func2 ++ ++ function func() result(a) ++ class(p), allocatable :: a ++ ++ a = c() ++ select type(a) ++ type is (c) ++ a%str = 'abcd' ++ a%str2 = ['abcd','efgh'] ++ end select ++ end function func ++end program +new file mode 100755 +--- /dev/null ++++ b/src/gcc/testsuite/gfortran.dg/asan/pr110415-3.f90 +@@ -0,0 +1,49 @@ ++! { dg-do run } ++! ++! Contributed by Brad Richardson ++! ++implicit none ++ type, abstract :: p ++ integer :: a = 4 ++ end type p ++ ++ type, extends(p) :: c ++ integer :: b = 7 ++ character(len=:), allocatable :: str, str2(:) ++ end type c ++ ++ type, extends(p) :: d ++ integer :: ef = 7 ++ end type d ++ ++ class(p), allocatable :: a(:) ++ ++ a = func() ++ ++ a = func2() ++ ++ a = func() ++ ++ deallocate(a) ++ ++contains ++ function func2() result(a) ++ class(p), allocatable :: a(:) ++ a = [d(),d()] ++ end function func2 ++ ++ function func() result(a) ++ class(p), allocatable :: a(:) ++ ++ a = [c(),c(),c()] ++ select type(a) ++ type is (c) ++ a(1)%str = 'abcd' ++ a(2)%str = 'abc' ++ a(3)%str = 'abcd4' ++ a(1)%str2 = ['abcd','efgh'] ++ a(2)%str2 = ['bcd','fgh'] ++ a(3)%str2 = ['abcd6','efgh7'] ++ end select ++ end function func ++end program +new file mode 100644 +--- /dev/null ++++ b/src/gcc/testsuite/gfortran.dg/asan/unlimited_polymorphic_34.f90 +@@ -0,0 +1,135 @@ ++! { dg-do run } ++! PR fortran/114827 - issues with class(*) assignment found by valgrind ++! ++! Contributed by Neil Carlson ++ ++program main ++ implicit none ++ call run ++ call run1 ++ call run2 ++contains ++ ! Scalar tests ++ subroutine run () ++ character(*), parameter :: c = 'fubarfubarfubarfubarfubarfu' ++ character(*,kind=4), parameter :: d = 4_"abcdef" ++ complex, parameter :: z = (1.,2.) ++ class(*), allocatable :: y ++ ++ call foo (c, y) ++ select type (y) ++ type is (character(*)) ++! print *, y(5:6) ! ICE (-> pr114874) ++ if (y /= c) stop 1 ++ class default ++ stop 2 ++ end select ++ ++ call foo (z, y) ++ select type (y) ++ type is (complex) ++ if (y /= z) stop 3 ++ class default ++ stop 4 ++ end select ++ ++ call foo (d, y) ++ select type (y) ++ type is (character(*,kind=4)) ++! print *, y ! NAG fails here ++ if (y /= d) stop 5 ++ class default ++ stop 6 ++ end select ++ end subroutine ++ ! ++ subroutine foo (a, b) ++ class(*), intent(in) :: a ++ class(*), allocatable :: b ++ b = a ++ end subroutine ++ ++ ! Rank-1 tests ++ subroutine run1 () ++ character(*), parameter :: c(*) = ['fubar','snafu'] ++ character(*,kind=4), parameter :: d(*) = [4_"abc",4_"def"] ++ real, parameter :: r(*) = [1.,2.,3.] ++ class(*), allocatable :: y(:) ++ ++ call foo1 (c, y) ++ select type (y) ++ type is (character(*)) ++! print *, ">",y(2)(1:3),"< >", c(2)(1:3), "<" ++ if (any (y /= c)) stop 11 ++ if (y(2)(1:3) /= c(2)(1:3)) stop 12 ++ class default ++ stop 13 ++ end select ++ ++ call foo1 (r, y) ++ select type (y) ++ type is (real) ++ if (any (y /= r)) stop 14 ++ class default ++ stop 15 ++ end select ++ ++ call foo1 (d, y) ++ select type (y) ++ type is (character(*,kind=4)) ++! print *, ">",y(2)(2:3),"< >", d(2)(2:3), "<" ++ if (any (y /= d)) stop 16 ++ class default ++ stop 17 ++ end select ++ end subroutine ++ ! ++ subroutine foo1 (a, b) ++ class(*), intent(in) :: a(:) ++ class(*), allocatable :: b(:) ++ b = a ++ end subroutine ++ ++ ! Rank-2 tests ++ subroutine run2 () ++ character(7) :: c(2,3) ++ complex :: z(3,3) ++ integer :: i, j ++ class(*), allocatable :: y(:,:) ++ ++ c = reshape (['fubar11','snafu21',& ++ 'fubar12','snafu22',& ++ 'fubar13','snafu23'],shape(c)) ++ call foo2 (c, y) ++ select type (y) ++ type is (character(*)) ++! print *, y(2,1) ++ if (y(2,1) /= c(2,1)) stop 21 ++ if (any (y /= c)) stop 22 ++ class default ++ stop 23 ++ end select ++ ++ do j = 1, size (z,2) ++ do i = 1, size (z,1) ++ z(i,j) = cmplx (i,j) ++ end do ++ end do ++ call foo2 (z, y) ++ select type (y) ++ type is (complex) ++! print *, y(2,1) ++ if (any (y%re /= z%re)) stop 24 ++ if (any (y%im /= z%im)) stop 25 ++ class default ++ stop 26 ++ end select ++ end subroutine ++ ! ++ subroutine foo2 (a, b) ++ class(*), intent(in) :: a(:,:) ++ class(*), allocatable :: b(:,:) ++ b = a ++ end subroutine ++ ++end program +new file mode 100644 +--- /dev/null ++++ b/src/gcc/testsuite/gfortran.dg/pr103312.f90 +@@ -0,0 +1,87 @@ ++! { dg-do run } ++! ++! Test the fix for pr103312, in which the use of a component call in ++! initialization expressions, eg. character(this%size()), caused ICEs. ++! ++! Contributed by Arseny Solokha ++! ++module example ++ ++ type, abstract :: foo ++ integer :: i ++ contains ++ procedure(foo_size), deferred :: size ++ procedure(foo_func), deferred :: func ++ end type ++ ++ interface ++ function foo_func (this) result (string) ++ import :: foo ++ class(foo) :: this ++ character(this%size()) :: string ++ end function ++ pure integer function foo_size (this) ++ import foo ++ class(foo), intent(in) :: this ++ end function ++ end interface ++ ++end module ++ ++module extension ++ use example ++ implicit none ++ type, extends(foo) :: bar ++ contains ++ procedure :: size ++ procedure :: func ++ end type ++ ++contains ++ pure integer function size (this) ++ class(bar), intent(in) :: this ++ size = this%i ++ end function ++ function func (this) result (string) ++ class(bar) :: this ++ character(this%size()) :: string ++ string = repeat ("x", len (string)) ++ end function ++ ++end module ++ ++module unextended ++ implicit none ++ type :: foobar ++ integer :: i ++ contains ++ procedure :: size ++ procedure :: func ++ end type ++ ++contains ++ pure integer function size (this) ++ class(foobar), intent(in) :: this ++ size = this%i ++ end function ++ function func (this) result (string) ++ class(foobar) :: this ++ character(this%size()) :: string ++ character(:), allocatable :: chr ++ string = repeat ("y", len (string)) ++ allocate (character(this%size()) :: chr) ++ if (len (string) .ne. len (chr)) stop 1 ++ end function ++ ++end module ++ ++ use example ++ use extension ++ use unextended ++ type(bar) :: a ++ type(foobar) :: b ++ a%i = 5 ++ if (a%func() .ne. 'xxxxx') stop 2 ++ b%i = 7 ++ if (b%func() .ne. 'yyyyyyy') stop 3 ++end +new file mode 100644 +--- /dev/null ++++ b/src/gcc/testsuite/gfortran.dg/pr108889.f90 +@@ -0,0 +1,43 @@ ++! { dg-do compile } ++! { dg-options "-Wall -fdump-tree-original" } ++! ++! Contributed by Tobias Burnus ++! ++program main ++ implicit none ++ ++ type :: struct ++ real, allocatable :: var(:) ++ end type struct ++ ++ type(struct) :: single ++ real, allocatable :: ref1(:), ref2(:), ref3(:), ref4(:) ++ ++ ref2 = [1,2,3,4,5] ! Warnings here ++ ++ single%var = ref2 ! No warnings for components ++ ref1 = single%var ! Warnings here ++ ref1 = [1,2,3,4,5] ! Should not add to tree dump count ++ ++ allocate (ref3(5)) ++ ref3 = single%var ! No warnings following allocation ++ ++ call set_ref4 ++ ++ call test (ref1) ++ call test (ref2) ++ call test (ref3) ++ call test (ref4) ++ ++contains ++ subroutine test (arg) ++ real, allocatable :: arg(:) ++ if (size(arg) /= size(single%var)) stop 1 ++ if (lbound(arg, 1) /= 1) stop 2 ++ if (any (arg /= single%var)) stop 3 ++ end ++ subroutine set_ref4 ++ ref4 = single%var ! Warnings in contained scope ++ end ++end ++! { df-final { scan-tree-dump-times "ubound = 0" 3 "original" } } +\ No newline at end of file +new file mode 100644 +--- /dev/null ++++ b/src/gcc/testsuite/gfortran.dg/pr110415.f90 +@@ -0,0 +1,20 @@ ++! { dg-do run } ++! ++! Contributed by Brad Richardson ++! ++ type, abstract :: p ++ end type p ++ ++ type, extends(p) :: c ++ end type c ++ ++ class(p), allocatable :: a ++ ++ a = func() ++contains ++ function func() result(a) ++ class(p), allocatable :: a ++ ++ a = c() ++ end function func ++end program +new file mode 100644 +--- /dev/null ++++ b/src/gcc/testsuite/gfortran.dg/pr113363.f90 +@@ -0,0 +1,86 @@ ++! { dg-do run } ++! Test the fix for comment 1 in PR113363, which failed as in comments below. ++! Contributed by Harald Anlauf ++program p ++ implicit none ++ class(*), allocatable :: x(:), y ++ character(*), parameter :: arr(2) = ["hello ","bye "], & ++ sca = "Have a nice day" ++ character(10) :: const ++ ++! Bug was detected in polymorphic array function results ++ allocate(x, source = foo ()) ++ call check1 (x, arr) ! Wrong output "6 hello e" ++ deallocate (x) ++ x = foo () ++ call check1 (x, arr) ! Wrong output "0 " ++ associate (var => foo ()) ! OK after r14-9489-g3fd46d859cda10 ++ call check1 (var, arr) ! Now OK - outputs: "6 hello bye " ++ end associate ++ ++! Check scalar function results ! All OK ++ allocate (y, source = bar()) ++ call check2 (y, sca) ++ deallocate (y) ++ y = bar () ++ call check2 (y, sca) ++ deallocate (y) ++ associate (var => bar ()) ++ call check2 (var, sca) ++ end associate ++ ++! Finally variable expressions... ++ allocate (y, source = x(1)) ! Gave zero length here ++ call check2 (y, "hello") ++ y = x(2) ! Segfaulted here ++ call check2 (y, "bye ") ++ associate (var => x(2)) ! Gave zero length here ++ call check2 (var, "bye ") ++ end associate ++ ++! ...and constant expressions ! All OK ++ deallocate(y) ++ allocate (y, source = "abcde") ++ call check2 (y, "abcde") ++ const = "hijklmnopq" ++ y = const ++ call check2 (y, "hijklmnopq") ++ associate (var => "mnopq") ++ call check2 (var, "mnopq") ++ end associate ++ deallocate (x, y) ++ ++contains ++ ++ function foo() result(res) ++ class(*), allocatable :: res(:) ++ res = arr ++ end function foo ++ ++ function bar() result(res) ++ class(*), allocatable :: res ++ res = sca ++ end function bar ++ ++ subroutine check1 (x, carg) ++ class(*), intent(in) :: x(:) ++ character(*) :: carg(:) ++ select type (x) ++ type is (character(*)) ++ if (any (x .ne. carg)) stop 1 ++ class default ++ stop 2 ++ end select ++ end subroutine check1 ++ ++ subroutine check2 (x, carg) ++ class(*), intent(in) :: x ++ character(*) :: carg ++ select type (x) ++ type is (character(*)) ++ if (x .ne. carg) stop 3 ++ class default ++ stop 4 ++ end select ++ end subroutine check2 ++end +new file mode 100644 +--- /dev/null ++++ b/src/gcc/testsuite/gfortran.dg/shape_12.f90 +@@ -0,0 +1,51 @@ ++! { dg-do run } ++! ++! PR fortran/115150 ++! ++! Check that SHAPE handles zero-sized arrays correctly ++! ++implicit none ++call one ++call two ++ ++contains ++ ++subroutine one ++ real,allocatable :: A(:),B(:,:) ++ allocate(a(3:0), b(5:1, 2:5)) ++ ++ if (any (shape(a) /= [0])) stop 1 ++ if (any (shape(b) /= [0, 4])) stop 2 ++ if (size(a) /= 0) stop 3 ++ if (size(b) /= 0) stop 4 ++ if (any (lbound(a) /= [1])) stop 5 ++ if (any (lbound(b) /= [1, 2])) stop 6 ++ if (any (ubound(a) /= [0])) stop 5 ++ if (any (ubound(b) /= [0,5])) stop 6 ++end ++ ++subroutine two ++integer :: x1(10), x2(10,10) ++call f(x1, x2, -3) ++end ++ ++subroutine f(y1, y2, n) ++ integer, value :: n ++ integer :: y1(1:n) ++ integer :: y2(1:n,4,2:*) ++ call g(y1, y2) ++end ++ ++subroutine g(z1, z2) ++ integer :: z1(..), z2(..) ++ ++ if (any (shape(z1) /= [0])) stop 1 ++ if (any (shape(z2) /= [0, 4, -1])) stop 2 ++ if (size(z1) /= 0) stop 3 ++ if (size(z2) /= 0) stop 4 ++ if (any (lbound(z1) /= [1])) stop 5 ++ if (any (lbound(z2) /= [1, 1, 1])) stop 6 ++ if (any (ubound(z1) /= [0])) stop 5 ++ if (any (ubound(z2) /= [0, 4, -1])) stop 6 ++end ++end +new file mode 100644 +--- /dev/null ++++ b/src/gcc/testsuite/gfortran.dg/statement_function_5.f90 +@@ -0,0 +1,20 @@ ++! { dg-do compile } ++! PR fortran/115039 ++! ++! Check that inquiry refs work with statement functions ++! ++! { dg-additional-options "-std=legacy -fdump-tree-optimized" } ++! { dg-prune-output " Obsolescent feature" } ++! { dg-final { scan-tree-dump-not "_gfortran_stop_numeric" "optimized" } } ++ ++program testit ++ implicit none ++ complex :: x ++ real :: im ++ integer :: slen ++ character(5) :: s ++ im(x) = x%im + x%re + x%kind ++ slen(s) = s%len ++ if (im((1.0,3.0) + (2.0,4.0)) /= 14.) stop 1 ++ if (slen('abcdef') /= 5) stop 2 ++end program testit +new file mode 100644 +--- /dev/null ++++ b/src/gcc/testsuite/gfortran.dg/storage_size_7.f90 +@@ -0,0 +1,91 @@ ++! { dg-do run } ++! Fix STORAGE_SIZE intrinsic for polymorphic arguments PR84006 and PR100027. ++! Contributed by Steve Kargl ++! and José Rui Faustino de Sousa ++program p ++ use, intrinsic :: ISO_FORTRAN_ENV, only: int64 ++ type t ++ integer i ++ end type ++ type s ++ class(t), allocatable :: c(:) ++ end type ++ integer :: rslt, class_rslt ++ integer(kind=int64), target :: tgt ++ class(t), allocatable, target :: t_alloc(:) ++ class(s), allocatable, target :: s_alloc(:) ++ character(:), allocatable, target :: chr(:) ++ class(*), pointer :: ptr_s, ptr_a(:) ++ ++ allocate (t_alloc(2), source=t(1)) ++ rslt = storage_size(t_alloc(1)) ! Scalar arg - the original testcase ++ if (rslt .ne. 32) stop 1 ++ ++ rslt = storage_size(t_alloc) ! Array arg ++ if (rslt .ne. 32) stop 2 ++ ++ call pr100027 ++ ++ allocate (s_alloc(2), source=s([t(1), t(2)])) ++! This, of course, is processor dependent: gfortran gives 576, NAG 448 ++! and Intel 1216. ++ class_rslt = storage_size(s_alloc) ! Type with a class component ++ ptr_s => s_alloc(2) ++! However, the unlimited polymorphic result should be the same ++ if (storage_size (ptr_s) .ne. class_rslt) stop 3 ++ ptr_a => s_alloc ++ if (storage_size (ptr_a) .ne. class_rslt) stop 4 ++ ++ rslt = storage_size(s_alloc(1)%c(2)) ! Scalar component arg ++ if (rslt .ne. 32) stop 5 ++ ++ rslt = storage_size(s_alloc(1)%c) ! Scalar component of array arg ++ if (rslt .ne. 32) stop 6 ++ ++ ptr_s => tgt ++ rslt = storage_size (ptr_s) ! INTEGER(8) target ++ if (rslt .ne. 64) stop 7 ++ ++ allocate (chr(2), source = ["abcde", "fghij"]) ++ ptr_s => chr(2) ++ rslt = storage_size (ptr_s) ! CHARACTER(5) scalar ++ if (rslt .ne. 40) stop 8 ++ ++ ptr_a => chr ++ rslt = storage_size (ptr_a) ! CHARACTER(5) array ++ if (rslt .ne. 40) stop 9 ++ ++ deallocate (t_alloc, s_alloc, chr) ! For valgrind check ++ ++contains ++ ++! Original testcase from José Rui Faustino de Sousa ++ subroutine pr100027 ++ implicit none ++ ++ integer, parameter :: n = 11 ++ ++ type :: foo_t ++ end type foo_t ++ ++ type, extends(foo_t) :: bar_t ++ end type bar_t ++ ++ class(*), pointer :: apu(:) ++ class(foo_t), pointer :: apf(:) ++ class(bar_t), pointer :: apb(:) ++ type(bar_t), target :: atb(n) ++ ++ integer :: m ++ ++ apu => atb ++ m = storage_size(apu) ++ if (m .ne. 0) stop 10 ++ apf => atb ++ m = storage_size(apf) ++ if (m .ne. 0) stop 11 ++ apb => atb ++ m = storage_size(apb) ++ if (m .ne. 0) stop 12 ++ end ++end program p +new file mode 100644 +--- /dev/null ++++ b/src/gcc/testsuite/gfortran.dg/string_array_constructor_4.f90 +@@ -0,0 +1,59 @@ ++! { dg-do run } ++! PR fortran/103115 - character array constructor with >= 4 constant elements ++! ++! This used to ICE when the first element is deferred-length character ++! or could lead to wrong results. ++ ++program pr103115 ++ implicit none ++ integer :: i ++ character(*), parameter :: expect(*) = [ "1","2","3","4","5" ] ++ character(5) :: abc = "12345" ++ character(5), parameter :: def = "12345" ++ character(:), dimension(:), allocatable :: list ++ character(:), dimension(:), allocatable :: titles ++ titles = ["1"] ++ titles = [ titles& ++ ,"2"& ++ ,"3"& ++ ,"4"& ++ ,"5"& ! used to ICE ++ ] ++ if (len (titles) /= 1 .or. size (titles) /= 5) stop 1 ++ if (any (titles /= expect)) stop 2 ++ titles = ["1"] ++ titles = [ titles, (char(48+i),i=2,5) ] ++ if (len (titles) /= 1 .or. size (titles) /= 5) stop 3 ++ if (any (titles /= expect)) stop 4 ++ titles = ["1"] ++ titles = [ titles, ("2345"(i:i),i=1,4) ] ++ if (len (titles) /= 1 .or. size (titles) /= 5) stop 5 ++ if (any (titles /= expect)) stop 6 ++ titles = ["1"] ++ titles = [ titles, (def(i:i),i=2,5) ] ++ if (len (titles) /= 1 .or. size (titles) /= 5) stop 7 ++ if (any (titles /= expect)) stop 8 ++ list = [ (char(48+i),i=1,5) ] ++ titles = [ list(1), (char(48+i),i=2,5) ] ++ if (len (titles) /= 1 .or. size (titles) /= 5) stop 9 ++ if (any (titles /= expect)) stop 10 ++ titles = ["1"] ++ titles = [ titles, (abc(i:i),i=2,5) ] ++ if (len (titles) /= 1 .or. size (titles) /= 5) stop 11 ++ if (any (titles /= expect)) stop 12 ++ ++ ! with typespec: ++ list = [ (char(48+i),i=1,5) ] ++ titles = [ character(2) :: list(1), (char(48+i),i=2,5) ] ++ if (len (titles) /= 2 .or. size (titles) /= 5) stop 13 ++ if (any (titles /= expect)) stop 14 ++ titles = ["1"] ++ titles = [ character(2) :: titles, (char(48+i),i=2,5) ] ++ if (len (titles) /= 2 .or. size (titles) /= 5) stop 15 ++ if (any (titles /= expect)) stop 16 ++ titles = ["1"] ++ titles = [ character(2) :: titles, (def(i:i),i=2,5) ] ++ if (len (titles) /= 2 .or. size (titles) /= 5) stop 17 ++ if (any (titles /= expect)) stop 18 ++ deallocate (titles, list) ++end +new file mode 100644 +--- /dev/null ++++ b/src/gcc/testsuite/gfortran.dg/transfer_class_4.f90 +@@ -0,0 +1,87 @@ ++! { dg-do run } ++! ++! Fix TRANSFER intrinsic for unlimited polymorphic SOURCEs - PR98534 ++! Note that unlimited polymorphic MOLD is a TODO. ++! ++! Contributed by Paul Thomas ++! ++ use, intrinsic :: ISO_FORTRAN_ENV, only: real32 ++ implicit none ++ character(*), parameter :: string = "abcdefgh" ++ character(len=:), allocatable :: string_a(:) ++ class(*), allocatable :: star ++ class(*), allocatable :: star_a(:) ++ character(len=:), allocatable :: chr ++ character(len=:), allocatable :: chr_a(:) ++ integer :: sz, sum1, sum2, i ++ real(real32) :: r = 1.0 ++ ++! Part 1: worked correctly ++ star = r ++ sz = storage_size (star)/8 ++ allocate (character(len=sz) :: chr) ++ chr = transfer (star, chr) ++ sum1 = sum ([(ichar(chr(i:i)), i = 1, sz)]) ++ chr = transfer(1.0, chr) ++ sum2 = sum ([(ichar(chr(i:i)), i = 1, sz)]) ++ ++ if (sz /= storage_size (r)/8) stop 1 ++ if (sum1 /= sum2) stop 2 ++ ++ deallocate (star) ! The automatic reallocation causes invalid writes ++ ! and memory leaks. Even with this deallocation ++ ! The invalid writes still occur. ++ deallocate (chr) ++ ++! Part 2: Got everything wrong because '_len' field of unlimited polymorphic ++! expressions was not used. ++ star = string ++ sz = storage_size (star)/8 ++ if (sz /= len (string)) stop 3 ! storage_size failed ++ ++ sz = len (string) ! Ignore previous error in storage_size ++ allocate (character(len=sz) :: chr) ++ chr = transfer (star, chr) ++ sum1 = sum ([(ichar(chr(i:i)), i = 1, sz)]) ++ chr = transfer(string, chr) ++ sum2 = sum ([(ichar(chr(i:i)), i = 1, sz)]) ++ if (sum1 /= sum2) stop 4 ! transfer failed ++ ++! Check that arrays are OK for transfer ++ star_a = ['abcde','fghij'] ++ allocate (character (len = 5) :: chr_a(2)) ++ chr_a = transfer (star_a, chr_a) ++ if (any (chr_a .ne. ['abcde','fghij'])) stop 5 ++ ++! Check that string length and size are correctly handled ++ string_a = ["abcdefgh", "ijklmnop"] ++ star_a = string_a; ++ chr_a = transfer (star_a, chr_a) ! Old string length used for size ++ if (size(chr_a) .ne. 4) stop 6 ++ if (len(chr_a) .ne. 5) stop 7 ++ if (trim (chr_a(3)) .ne. "klmno") stop 8 ++ if (chr_a(4)(1:1) .ne. "p") stop 9 ++ ++ chr_a = transfer (star_a, string_a) ! Use correct string_length for payload ++ if (size(chr_a) .ne. 2) stop 10 ++ if (len(chr_a) .ne. 8) stop 11 ++ if (any (chr_a .ne. string_a)) stop 12 ++ ++! Check that an unlimited polymorphic function result is transferred OK ++ deallocate (chr_a) ++ string_a = ['abc', 'def', 'hij'] ++ chr_a = transfer (foo (string_a), string_a) ++ if (any (chr_a .ne. string_a)) stop 13 ++ ++! Finally, check that the SIZE gives correct results with unlimited sources. ++ chr_a = transfer (star_a, chr_a, 4) ++ if (chr_a (4) .ne. 'jkl') stop 14 ++ ++ deallocate (star, chr, star_a, chr_a, string_a) ++contains ++ function foo (arg) result(res) ++ character(*), intent(in) :: arg(:) ++ class(*), allocatable :: res(:) ++ res = arg ++ end ++end +new file mode 100644 +--- /dev/null ++++ b/src/gcc/testsuite/gnat.dg/access11.adb +@@ -0,0 +1,80 @@ ++-- PR ada/114398 ++-- Testcase by Dennis van Raaij ++ ++-- { dg-do run } ++ ++with Ada.Finalization; ++ ++procedure Access11 is ++ ++ package Pkg is ++ ++ type Int is ++ new Ada.Finalization.Limited_Controlled ++ with record ++ Value : Integer; ++ end record; ++ ++ procedure Set (This : out Int; To : Integer); ++ procedure Set (This : out Int; To : Int); ++ ++ function "+" (Left, Right : Int) return Int; ++ ++ overriding procedure Initialize (This : in out Int); ++ overriding procedure Finalize (This : in out Int); ++ ++ end Pkg; ++ ++ package body Pkg is ++ ++ procedure Set (This : out Int; To : Integer) is ++ begin ++ This.Value := To; ++ end Set; ++ ++ procedure Set (This : out Int; To : Int) is ++ begin ++ This.Value := To.Value; ++ end Set; ++ ++ function "+" (Left, Right : Int) return Int is ++ begin ++ return Result : Int do ++ Result.Value := Left.Value + Right.Value; ++ end return; ++ end "+"; ++ ++ overriding procedure Initialize (This : in out Int) is ++ begin ++ This.Value := 42; ++ end Initialize; ++ ++ overriding procedure Finalize (This : in out Int) is ++ begin ++ This.Value := 0; ++ end Finalize; ++ ++ end Pkg; ++ ++ use Pkg; ++ ++ type Binary_Operator is access ++ function (Left, Right : Int) return Int; ++ ++ procedure Test ++ (Op : Binary_Operator; ++ Left, Right : Int) ++ is ++ Result : Int; ++ begin ++ Result.Set (Op (Left, Right)); ++ end Test; ++ ++ A, B : Int; ++ ++begin ++ A.Set (7); ++ B.Set (9); ++ ++ Test ("+"'Access, A, B); ++end; +new file mode 100644 +--- /dev/null ++++ b/src/gcc/testsuite/gnat.dg/incomplete8.adb +@@ -0,0 +1,22 @@ ++-- PR ada/114708 ++-- Reported by Jere ++ ++-- { dg-do compile } ++ ++procedure Incomplete8 is ++ ++ generic ++ type Element_Type(<>); ++ package Test_Incomplete_Formal is ++ type Element_Access is access Element_Type; ++ end Test_Incomplete_Formal; ++ ++ type Node; ++ ++ package P is new Test_Incomplete_Formal(Node); ++ ++ type Node is limited null record; ++ ++begin ++ null; ++end; +--- a/src/gcc/testsuite/lib/target-supports.exp ++++ b/src/gcc/testsuite/lib/target-supports.exp +@@ -6919,7 +6919,7 @@ proc check_effective_target_powerpc_elfv2 { } { + # Return 1 if this is a PowerPC target supporting -mrop-protect + + proc check_effective_target_rop_ok { } { +- return [check_effective_target_power10_ok] && [check_effective_target_powerpc_elfv2] ++ return [check_effective_target_has_arch_pwr8] && [check_effective_target_powerpc_elfv2] + } + + # The VxWorks SPARC simulator accepts only EM_SPARC executables and +--- a/src/gcc/tree-data-ref.cc ++++ b/src/gcc/tree-data-ref.cc +@@ -73,6 +73,7 @@ along with GCC; see the file COPYING3. If not see + + */ + ++#define INCLUDE_ALGORITHM + #include "config.h" + #include "system.h" + #include "coretypes.h" +@@ -2629,7 +2630,9 @@ create_intersect_range_checks (class loop *loop, tree *cond_expr, + Because the maximum values are inclusive, there is an alias + if the maximum value of one segment is equal to the minimum + value of the other. */ +- min_align = MIN (dr_a.align, dr_b.align); ++ min_align = std::min (dr_a.align, dr_b.align); ++ min_align = std::min (min_align, known_alignment (dr_a.access_size)); ++ min_align = std::min (min_align, known_alignment (dr_b.access_size)); + cmp_code = LT_EXPR; + } + +--- a/src/gcc/tree-ssa-ccp.cc ++++ b/src/gcc/tree-ssa-ccp.cc +@@ -3321,9 +3321,10 @@ convert_atomic_bit_not (enum internal_fn fn, gimple *use_stmt, + return nullptr; + + gimple_stmt_iterator gsi; +- gsi = gsi_for_stmt (use_stmt); +- gsi_remove (&gsi, true); + tree var = make_ssa_name (TREE_TYPE (lhs)); ++ /* use_stmt need to be removed after use_nop_stmt, ++ so use_lhs can be released. */ ++ gimple *use_stmt_removal = use_stmt; + use_stmt = gimple_build_assign (var, BIT_AND_EXPR, lhs, and_mask); + gsi = gsi_for_stmt (use_not_stmt); + gsi_insert_before (&gsi, use_stmt, GSI_NEW_STMT); +@@ -3333,6 +3334,8 @@ convert_atomic_bit_not (enum internal_fn fn, gimple *use_stmt, + gsi_insert_after (&gsi, g, GSI_NEW_STMT); + gsi = gsi_for_stmt (use_not_stmt); + gsi_remove (&gsi, true); ++ gsi = gsi_for_stmt (use_stmt_removal); ++ gsi_remove (&gsi, true); + return use_stmt; + } + +@@ -3635,8 +3638,7 @@ optimize_atomic_bit_test_and (gimple_stmt_iterator *gsip, + */ + } + var = make_ssa_name (TREE_TYPE (use_rhs)); +- gsi = gsi_for_stmt (use_stmt); +- gsi_remove (&gsi, true); ++ gimple* use_stmt_removal = use_stmt; + g = gimple_build_assign (var, BIT_AND_EXPR, use_rhs, + and_mask); + gsi = gsi_for_stmt (use_nop_stmt); +@@ -3653,6 +3655,8 @@ optimize_atomic_bit_test_and (gimple_stmt_iterator *gsip, + gsi_insert_after (&gsi, g, GSI_NEW_STMT); + gsi = gsi_for_stmt (use_nop_stmt); + gsi_remove (&gsi, true); ++ gsi = gsi_for_stmt (use_stmt_removal); ++ gsi_remove (&gsi, true); + } + } + else +--- a/src/gcc/tree-ssa-phiopt.cc ++++ b/src/gcc/tree-ssa-phiopt.cc +@@ -2106,6 +2106,10 @@ minmax_replacement (basic_block cond_bb, basic_block middle_bb, basic_block alt_ + || gimple_code (assign) != GIMPLE_ASSIGN) + return false; + ++ /* There cannot be any phi nodes in the middle bb. */ ++ if (!gimple_seq_empty_p (phi_nodes (middle_bb))) ++ return false; ++ + lhs = gimple_assign_lhs (assign); + ass_code = gimple_assign_rhs_code (assign); + if (ass_code != MAX_EXPR && ass_code != MIN_EXPR) +@@ -2119,6 +2123,10 @@ minmax_replacement (basic_block cond_bb, basic_block middle_bb, basic_block alt_ + || gimple_code (assign) != GIMPLE_ASSIGN) + return false; + ++ /* There cannot be any phi nodes in the alt middle bb. */ ++ if (!gimple_seq_empty_p (phi_nodes (alt_middle_bb))) ++ return false; ++ + alt_lhs = gimple_assign_lhs (assign); + if (ass_code != gimple_assign_rhs_code (assign)) + return false; +@@ -2229,6 +2237,10 @@ minmax_replacement (basic_block cond_bb, basic_block middle_bb, basic_block alt_ + || gimple_code (assign) != GIMPLE_ASSIGN) + return false; + ++ /* There cannot be any phi nodes in the middle bb. */ ++ if (!gimple_seq_empty_p (phi_nodes (middle_bb))) ++ return false; ++ + lhs = gimple_assign_lhs (assign); + ass_code = gimple_assign_rhs_code (assign); + if (ass_code != MAX_EXPR && ass_code != MIN_EXPR) +--- a/src/gcc/tree-ssa-strlen.cc ++++ b/src/gcc/tree-ssa-strlen.cc +@@ -4836,7 +4836,7 @@ strlen_pass::count_nonzero_bytes_addr (tree exp, tree vuse, gimple *stmt, + if (maxlen + 1 < nbytes) + return false; + +- if (nbytes <= minlen) ++ if (nbytes <= minlen || !si->full_string_p) + *nulterm = false; + + if (nbytes < minlen) +@@ -4846,6 +4846,9 @@ strlen_pass::count_nonzero_bytes_addr (tree exp, tree vuse, gimple *stmt, + maxlen = nbytes; + } + ++ if (!si->full_string_p) ++ maxlen = nbytes; ++ + if (minlen < lenrange[0]) + lenrange[0] = minlen; + if (lenrange[1] < maxlen) +--- a/src/gcc/tree-vect-patterns.cc ++++ b/src/gcc/tree-vect-patterns.cc +@@ -5491,9 +5491,11 @@ vect_truncatable_operation_p (tree_code code) + { + switch (code) + { ++ case NEGATE_EXPR: + case PLUS_EXPR: + case MINUS_EXPR: + case MULT_EXPR: ++ case BIT_NOT_EXPR: + case BIT_AND_EXPR: + case BIT_IOR_EXPR: + case BIT_XOR_EXPR: +@@ -5652,38 +5654,85 @@ vect_determine_precisions_from_range (stmt_vec_info stmt_info, gassign *stmt) + unsigned int nops = gimple_num_ops (stmt); + + if (!vect_truncatable_operation_p (code)) +- /* Check that all relevant input operands are compatible, and update +- [MIN_VALUE, MAX_VALUE] to include their ranges. */ +- for (unsigned int i = 1; i < nops; ++i) +- { +- tree op = gimple_op (stmt, i); +- if (TREE_CODE (op) == INTEGER_CST) +- { +- /* Don't require the integer to have RHS_TYPE (which it might +- not for things like shift amounts, etc.), but do require it +- to fit the type. */ +- if (!int_fits_type_p (op, type)) +- return; +- +- min_value = wi::min (min_value, wi::to_wide (op, precision), sign); +- max_value = wi::max (max_value, wi::to_wide (op, precision), sign); +- } +- else if (TREE_CODE (op) == SSA_NAME) +- { +- /* Ignore codes that don't take uniform arguments. */ +- if (!types_compatible_p (TREE_TYPE (op), type)) +- return; ++ { ++ /* Handle operations that can be computed in type T if all inputs ++ and outputs can be represented in type T. Also handle left and ++ right shifts, where (in addition) the maximum shift amount must ++ be less than the number of bits in T. */ ++ bool is_shift; ++ switch (code) ++ { ++ case LSHIFT_EXPR: ++ case RSHIFT_EXPR: ++ is_shift = true; ++ break; + +- wide_int op_min_value, op_max_value; +- if (!vect_get_range_info (op, &op_min_value, &op_max_value)) +- return; ++ case ABS_EXPR: ++ case MIN_EXPR: ++ case MAX_EXPR: ++ case TRUNC_DIV_EXPR: ++ case CEIL_DIV_EXPR: ++ case FLOOR_DIV_EXPR: ++ case ROUND_DIV_EXPR: ++ case EXACT_DIV_EXPR: ++ /* Modulus is excluded because it is typically calculated by doing ++ a division, for which minimum signed / -1 isn't representable in ++ the original signed type. We could take the division range into ++ account instead, if handling modulus ever becomes important. */ ++ is_shift = false; ++ break; + +- min_value = wi::min (min_value, op_min_value, sign); +- max_value = wi::max (max_value, op_max_value, sign); +- } +- else ++ default: + return; +- } ++ } ++ for (unsigned int i = 1; i < nops; ++i) ++ { ++ tree op = gimple_op (stmt, i); ++ wide_int op_min_value, op_max_value; ++ if (TREE_CODE (op) == INTEGER_CST) ++ { ++ unsigned int op_precision = TYPE_PRECISION (TREE_TYPE (op)); ++ op_min_value = op_max_value = wi::to_wide (op, op_precision); ++ } ++ else if (TREE_CODE (op) == SSA_NAME) ++ { ++ if (!vect_get_range_info (op, &op_min_value, &op_max_value)) ++ return; ++ } ++ else ++ return; ++ ++ if (is_shift && i == 2) ++ { ++ /* There needs to be one more bit than the maximum shift amount. ++ ++ If the maximum shift amount is already 1 less than PRECISION ++ then we can't narrow the shift further. Dealing with that ++ case first ensures that we can safely use an unsigned range ++ below. ++ ++ op_min_value isn't relevant, since shifts by negative amounts ++ are UB. */ ++ if (wi::geu_p (op_max_value, precision - 1)) ++ return; ++ unsigned int min_bits = op_max_value.to_uhwi () + 1; ++ ++ /* As explained below, we can convert a signed shift into an ++ unsigned shift if the sign bit is always clear. At this ++ point we've already processed the ranges of the output and ++ the first input. */ ++ auto op_sign = sign; ++ if (sign == SIGNED && !wi::neg_p (min_value)) ++ op_sign = UNSIGNED; ++ op_min_value = wide_int::from (wi::min_value (min_bits, op_sign), ++ precision, op_sign); ++ op_max_value = wide_int::from (wi::max_value (min_bits, op_sign), ++ precision, op_sign); ++ } ++ min_value = wi::min (min_value, op_min_value, sign); ++ max_value = wi::max (max_value, op_max_value, sign); ++ } ++ } + + /* Try to switch signed types for unsigned types if we can. + This is better for two reasons. First, unsigned ops tend +--- a/src/gcc/ubsan.cc ++++ b/src/gcc/ubsan.cc +@@ -1719,13 +1719,17 @@ instrument_bool_enum_load (gimple_stmt_iterator *gsi) + || TREE_CODE (gimple_assign_lhs (stmt)) != SSA_NAME) + return; + ++ addr_space_t as = TYPE_ADDR_SPACE (TREE_TYPE (rhs)); ++ if (as != TYPE_ADDR_SPACE (utype)) ++ utype = build_qualified_type (utype, TYPE_QUALS (utype) ++ | ENCODE_QUAL_ADDR_SPACE (as)); + bool ends_bb = stmt_ends_bb_p (stmt); + location_t loc = gimple_location (stmt); + tree lhs = gimple_assign_lhs (stmt); + tree ptype = build_pointer_type (TREE_TYPE (rhs)); + tree atype = reference_alias_ptr_type (rhs); + gimple *g = gimple_build_assign (make_ssa_name (ptype), +- build_fold_addr_expr (rhs)); ++ build_fold_addr_expr (rhs)); + gimple_set_location (g, loc); + gsi_insert_before (gsi, g, GSI_SAME_STMT); + tree mem = build2 (MEM_REF, utype, gimple_assign_lhs (g), +--- a/src/gcc/varasm.cc ++++ b/src/gcc/varasm.cc +@@ -7632,6 +7632,8 @@ decl_binds_to_current_def_p (const_tree decl) + for all other declaration types. */ + if (DECL_WEAK (decl)) + return false; ++ if (DECL_COMDAT_GROUP (decl)) ++ return false; + if (DECL_COMMON (decl) + && (DECL_INITIAL (decl) == NULL + || (!in_lto_p && DECL_INITIAL (decl) == error_mark_node))) +--- a/src/libgcc/ChangeLog ++++ b/src/libgcc/ChangeLog +@@ -1,3 +1,11 @@ ++2024-06-12 Andre Vieira ++ ++ Backported from master: ++ 2024-06-06 Andre Vieira ++ ++ PR target/115360 ++ * config/arm/cmse_nonsecure_call.S: Add .type and .size directives. ++ + 2024-05-21 Release Manager + + * GCC 13.3.0 released. +--- a/src/libgcc/config/arm/cmse_nonsecure_call.S ++++ b/src/libgcc/config/arm/cmse_nonsecure_call.S +@@ -33,6 +33,7 @@ + #endif + + .thumb ++.type __gnu_cmse_nonsecure_call, %function + .global __gnu_cmse_nonsecure_call + __gnu_cmse_nonsecure_call: + #if defined(__ARM_ARCH_8M_MAIN__) +@@ -142,3 +143,4 @@ pop {r5-r7, pc} + #else + #error "This should only be used for armv8-m base- and mainline." + #endif ++.size __gnu_cmse_nonsecure_call, .-__gnu_cmse_nonsecure_call +--- a/src/libgcc/config/avr/libf7/ChangeLog ++++ b/src/libgcc/config/avr/libf7/ChangeLog +@@ -1,3 +1,11 @@ ++2024-06-01 Georg-Johann Lay ++ ++ Backported from master: ++ 2024-06-01 Georg-Johann Lay ++ ++ PR target/115317 ++ * libf7-asm.sx (__isinf): Map -Inf to -1. ++ + 2024-05-21 Release Manager + + * GCC 13.3.0 released. +--- a/src/libgcc/config/avr/libf7/libf7-asm.sx ++++ b/src/libgcc/config/avr/libf7/libf7-asm.sx +@@ -1639,19 +1639,24 @@ _ENDF __copysign + + + #ifdef F7MOD_D_isinf_ ++;;; +Inf -> +1 ++;;; -Inf -> -1 + _DEFUN __isinf + DALIAS isinf + LALIAS isinfl ++ ;; Save sign for later ++ push R25 + F7call class_D ++ pop TMP ++ ldi R24, 0 ++ ldi R25, 0 + ;; Inf: T = Z = 1. +- brtc 0f ++ brtc 0f ; ordinary number ++ brne 0f ; Nan + ldi R24, 1 +- breq 1f +-0: +- clr R24 +-1: +- clr R25 +- ret ++ sbrc TMP, 7 ++ sbiw R24, 2 ++0: ret + _ENDF __isinf + #endif /* F7MOD_D_isinf_ */ + +--- a/src/libgomp/ChangeLog ++++ b/src/libgomp/ChangeLog +@@ -1,3 +1,12 @@ ++2024-08-05 Paul Thomas ++ ++ Backported from master: ++ 2024-07-19 Paul Thomas ++ ++ * testsuite/libgomp.oacc-fortran/privatized-ref-2.f90: Cut ++ dg-note about 'a' and remove bogus warnings about its array ++ descriptor components being used uninitialized. ++ + 2024-05-21 Release Manager + + * GCC 13.3.0 released. +--- a/src/libgomp/testsuite/libgomp.oacc-fortran/privatized-ref-2.f90 ++++ b/src/libgomp/testsuite/libgomp.oacc-fortran/privatized-ref-2.f90 +@@ -29,16 +29,10 @@ program main + implicit none (type, external) + integer :: j + integer, allocatable :: A(:) +- ! { dg-note {'a' declared here} {} { target *-*-* } .-1 } + character(len=:), allocatable :: my_str + character(len=15), allocatable :: my_str15 + + A = [(3*j, j=1, 10)] +- ! { dg-bogus {'a\.offset' is used uninitialized} {PR77504 etc.} { xfail *-*-* } .-1 } +- ! { dg-bogus {'a\.dim\[0\]\.lbound' is used uninitialized} {PR77504 etc.} { xfail *-*-* } .-2 } +- ! { dg-bogus {'a\.dim\[0\]\.ubound' is used uninitialized} {PR77504 etc.} { xfail *-*-* } .-3 } +- ! { dg-bogus {'a\.dim\[0\]\.lbound' may be used uninitialized} {PR77504 etc.} { xfail { ! __OPTIMIZE__ } } .-4 } +- ! { dg-bogus {'a\.dim\[0\]\.ubound' may be used uninitialized} {PR77504 etc.} { xfail { ! __OPTIMIZE__ } } .-5 } + call foo (A, size(A)) + call bar (A) + my_str = "1234567890" +--- a/src/libstdc++-v3/ChangeLog ++++ b/src/libstdc++-v3/ChangeLog +@@ -1,3 +1,224 @@ ++2024-07-24 Jonathan Wakely ++ ++ Backported from master: ++ 2024-07-24 Jonathan Wakely ++ ++ PR libstdc++/116070 ++ * include/bits/stl_bvector.h: Check feature test macro before ++ using is_default_constructible_v. ++ ++2024-07-12 Jonathan Wakely ++ ++ Backported from master: ++ 2024-06-21 Jonathan Wakely ++ ++ PR libstdc++/115522 ++ * include/std/array (to_array): Workaround the fact that ++ std::is_trivial is not sufficient to check that a type is ++ trivially default constructible and assignable. ++ * testsuite/23_containers/array/creation/115522.cc: New test. ++ ++2024-07-09 Jonathan Wakely ++ ++ Backported from master: ++ 2024-07-08 Jonathan Wakely ++ ++ PR libstdc++/115807 ++ * include/c_compatibility/stdatomic.h (_Atomic): Ensure it ++ refers to std::atomic in the global namespace. ++ * testsuite/29_atomics/headers/stdatomic.h/115807.cc: New test. ++ ++2024-07-09 Jonathan Wakely ++ ++ Backported from master: ++ 2024-06-28 Jonathan Wakely ++ ++ PR libstdc++/115585 ++ * src/c++11/assert_fail.cc (__glibcxx_assert_fail): Add ++ definition for non-verbose builds. ++ ++2024-06-28 Jonathan Wakely ++ ++ Backported from master: ++ 2024-06-25 Jonathan Wakely ++ ++ * doc/xml/faq.xml: Replace viewcvs links with cgit links. ++ * doc/xml/manual/allocator.xml: Likewise. ++ * doc/xml/manual/mt_allocator.xml: Likewise. ++ * doc/html/*: Regenerate. ++ ++2024-06-28 Jonathan Wakely ++ ++ Backported from master: ++ 2024-06-27 Jonathan Wakely ++ ++ PR libstdc++/115668 ++ * include/bits/chrono_io.h (formatter::format): ++ Do not use chrono::abs. ++ * testsuite/20_util/duration/io.cc: Check formatting a duration ++ with unsigned rep. ++ ++2024-06-27 Alexandre Oliva ++ ++ Backported from master: ++ 2024-06-27 Alexandre Oliva ++ ++ PR libstdc++/115454 ++ * testsuite/experimental/simd/pr115454_find_last_set.cc: Defer ++ to check_vect_support_and_set_flags's default dg-do action. ++ ++2024-06-25 Jonathan Wakely ++ ++ * doc/xml/manual/status_cxx1998.xml: Remove confusing "not in ++ any particular release" text. ++ * doc/xml/manual/status_cxx2011.xml: Likewise. ++ * doc/xml/manual/status_cxx2014.xml: Likewise. ++ * doc/xml/manual/status_cxx2017.xml: Likewise. ++ * doc/xml/manual/status_cxx2020.xml: Likewise. ++ * doc/xml/manual/status_cxx2023.xml: Likewise. ++ * doc/xml/manual/status_cxxtr1.xml: Likewise. ++ * doc/xml/manual/status_cxxtr24733.xml: Likewise. ++ * doc/html/manual/status.html: Regenerate. ++ ++2024-06-21 Matthias Kretz ++ ++ Backported from master: ++ 2024-06-21 Matthias Kretz ++ ++ PR libstdc++/115575 ++ * testsuite/experimental/simd/pr115454_find_last_set.cc: Require ++ avx512f_runtime. Don't memcpy fixed_size masks. ++ ++2024-06-21 Matthias Kretz ++ ++ Backported from master: ++ 2024-06-20 Matthias Kretz ++ ++ PR libstdc++/115454 ++ * include/experimental/bits/simd_x86.h (_S_not_equal_to): Use ++ neq comparison instead of bitwise negation after eq. ++ (_S_find_last_set): Clear unused high bits before computing ++ bit_width. ++ * testsuite/experimental/simd/pr115454_find_last_set.cc: New ++ test. ++ ++2024-06-14 Jonathan Wakely ++ ++ Backported from master: ++ 2024-06-14 Jonathan Wakely ++ ++ * libsupc++/new_opa.cc [!_GLIBCXX_HOSTED]: Fix declaration of ++ posix_memalign. ++ ++2024-06-11 Matthias Kretz ++ ++ Backported from master: ++ 2024-06-04 Matthias Kretz ++ ++ PR libstdc++/115308 ++ * include/experimental/bits/simd.h (__int_for_sizeof): Remove ++ special cases for __clang__. ++ (_SimdWrapper): Change constructor overload set to allow ++ conversion from vector types with integral conversions via bit ++ reinterpretation. ++ ++2024-06-11 Matthias Kretz ++ ++ Backported from master: ++ 2024-05-29 Matthias Kretz ++ ++ PR libstdc++/115247 ++ * include/experimental/bits/simd.h (__as_vector): Don't use ++ vector_size(8) on __i386__. ++ (__vec_shuffle): Never return MMX vectors, widen to 16 bytes ++ instead. ++ (concat): Fix padding calculation to pick up widening logic from ++ __as_vector. ++ ++2024-06-11 Matthias Kretz ++ ++ Backported from master: ++ 2024-05-13 Matthias Kretz ++ ++ PR libstdc++/114958 ++ * include/experimental/bits/simd.h (__as_vector): Return scalar ++ simd as one-element vector. Return vector from single-vector ++ fixed_size simd. ++ (__vec_shuffle): New. ++ (__extract_part): Adjust return type signature. ++ (split): Use __extract_part for any split into non-fixed_size ++ simds. ++ (concat): If the return type stores a single vector, use ++ __vec_shuffle (which calls __builtin_shufflevector) to produce ++ the return value. ++ * include/experimental/bits/simd_builtin.h ++ (__shift_elements_right): Removed. ++ (__extract_part): Return single elements directly. Use ++ __vec_shuffle (which calls __builtin_shufflevector) to for all ++ non-trivial cases. ++ * include/experimental/bits/simd_fixed_size.h (__extract_part): ++ Return single elements directly. ++ * testsuite/experimental/simd/pr114958.cc: New test. ++ ++2024-06-01 Jonathan Wakely ++ ++ Backported from master: ++ 2024-06-01 Jonathan Wakely ++ ++ PR libstdc++/115269 ++ * doc/xml/manual/using.xml: Replace link to gcc-4.3.2 docs. ++ Replace list of -std=... options with a single entry for -std. ++ * doc/html/manual/using.html: Regenerate. ++ ++2024-05-28 Jakub Jelinek ++ ++ * testsuite/19_diagnostics/stacktrace/hash.cc: Adjust ++ dg-options to use -lstdc++exp. ++ ++2024-05-28 Jonathan Wakely ++ ++ Backported from master: ++ 2024-05-22 Jonathan Wakely ++ ++ PR libstdc++/114940 ++ * include/std/stacktrace (_GLIBCXX_SIZED_DELETE): New macro. ++ (basic_stacktrace::_Impl::_M_deallocate): Use it. ++ ++2024-05-21 Dimitrij Mijoski ++ ++ Backported from master: ++ 2023-10-21 Dimitrij Mijoski ++ ++ * testsuite/22_locale/codecvt/codecvt_unicode.h: Test length() ++ ++2024-05-21 Dimitrij Mijoski ++ ++ Backported from master: ++ 2023-09-29 Dimitrij Mijoski ++ ++ PR libstdc++/108976 ++ * src/c++11/codecvt.cc (read_utf8_code_point): Fix handing of ++ surrogates in UTF-8. ++ (ucs4_out): Fix handling of surrogates in UCS-4 -> UTF-8. ++ (ucs4_in): Fix handling of range with odd number of bytes. ++ (ucs4_out): Fix handling of surrogates in UCS-4 -> UTF-16. ++ (ucs2_out): Fix handling of surrogates in UCS-2 -> UTF-16. ++ (ucs2_in): Fix handling of range with odd number of bytes. ++ (__codecvt_utf16_base::do_in): Likewise. ++ (__codecvt_utf16_base::do_in): Likewise. ++ (__codecvt_utf16_base::do_in): Likewise. ++ * testsuite/22_locale/codecvt/codecvt_unicode.cc: Renames, add ++ tests for codecvt_utf16 and codecvt_utf16. ++ * testsuite/22_locale/codecvt/codecvt_unicode.h: Refactor UTF-8 ++ testing functions for char8_t, add more test cases for errors, ++ add testing functions for codecvt_utf16. ++ * testsuite/22_locale/codecvt/codecvt_unicode_wchar_t.cc: ++ Renames, add tests for codecvt_utf16. ++ * testsuite/22_locale/codecvt/codecvt_utf16/79980.cc (test06): ++ Fix test. ++ * testsuite/22_locale/codecvt/codecvt_unicode_char8_t.cc: New ++ test. ++ + 2024-05-21 Release Manager + + * GCC 13.3.0 released. +--- a/src/libstdc++-v3/doc/html/faq.html ++++ b/src/libstdc++-v3/doc/html/faq.html +@@ -148,7 +148,7 @@ + The libstdc++ project is contributed to by several developers + all over the world, in the same way as GCC or the Linux kernel. + The current maintainers are listed in the +- MAINTAINERS ++ MAINTAINERS + file (look for "c++ runtime libs"). +

+ Development and discussion is held on the libstdc++ mailing +--- a/src/libstdc++-v3/doc/html/manual/memory.html ++++ b/src/libstdc++-v3/doc/html/manual/memory.html +@@ -120,8 +120,8 @@ + Over multiple iterations, various STL container + objects have elements inserted to some maximum amount. A variety + of allocators are tested. +- Test source for sequence +- and associative ++ Test source for sequence ++ and associative + containers. +

  • + Insertion and erasure in a multi-threaded environment. +@@ -130,14 +130,14 @@ + on a per-thread basis, as well as measuring thread contention + for memory resources. + Test source +- here. ++ here. +

  • + A threaded producer/consumer model. +

    + Test source for +- sequence ++ sequence + and +- associative ++ associative + containers. +

  • + Since GCC 12 the default choice for +--- a/src/libstdc++-v3/doc/html/manual/mt_allocator_impl.html ++++ b/src/libstdc++-v3/doc/html/manual/mt_allocator_impl.html +@@ -155,7 +155,7 @@ that uses it is fully constructed. For most (but not all) STL + containers, this works, as an instance of the allocator is constructed + as part of a container's constructor. However, this assumption is + implementation-specific, and subject to change. For an example of a +-pool that frees memory, see the following +- +- example. ++pool that frees memory, see the ++ ext/mt_allocator/deallocate_local-6.cc ++ example. +

    +\ No newline at end of file +--- a/src/libstdc++-v3/doc/html/manual/status.html ++++ b/src/libstdc++-v3/doc/html/manual/status.html +@@ -6,7 +6,7 @@ + This status table is based on the table of contents of ISO/IEC 14882:2003. +

    + This section describes the C++ support in +-the GCC 13 release series, not in any particular release. ++the GCC 13 release series. +

    Table 1.1. C++ 1998/2003 Implementation Status

    SectionDescriptionStatusComments
    + 18 + +@@ -161,7 +161,7 @@ since that release. + This status table is based on the table of contents of ISO/IEC 14882:2011. +

    + This section describes the C++11 support in +-the GCC 13 release series, not in any particular release. ++the GCC 13 release series. +

    Table 1.2. C++ 2011 Implementation Status

    SectionDescriptionStatusComments
    + 18 + +@@ -434,7 +434,7 @@ Some subclauses are not shown in the table where the content is unchanged + since C++11 and the implementation is complete. +

    + This section describes the C++14 and library TS support in +-the GCC 13 release series, not in any particular release. ++the GCC 13 release series. +

    Table 1.3. C++ 2014 Implementation Status

    SectionDescriptionStatusComments
    + 18 + +@@ -579,7 +579,7 @@ so the API and ABI of features added in C++17 is only stable + since that release. +

    + This section describes the C++17 and library TS support in +-the GCC 13 release series, not in any particular release. ++the GCC 13 release series. +

    + The following table lists new library features that are included in + the C++17 standard. The "Proposal" column provides a link to the +@@ -1255,7 +1255,7 @@ options. The pre-defined symbol + presence of the required flag. +

    + This section describes the C++20 and library TS support in +-the GCC 13 release series, not in any particular release. ++the GCC 13 release series. +

    + The following table lists new library features that are included in + the C++20 standard. The "Proposal" column provides a link to the +@@ -1725,7 +1725,7 @@ options. The pre-defined symbol + presence of the required flag. +

    + This section describes the C++23 and library TS support in +-the GCC 13 release series, not in any particular release. ++the GCC 13 release series. +

    + The following table lists new library features that have been accepted into + the C++23 working draft. The "Proposal" column provides a link to the +@@ -2123,7 +2123,7 @@ In this implementation the header names are prefixed by + <tr1/memory>, and so on. +

    + This page describes the TR1 support in +-the GCC 13 release series, not in any particular release. ++the GCC 13 release series. +

    Table 1.11. C++ TR1 Implementation Status

    SectionDescriptionStatusComments
    2General Utilities
    2.1Reference wrappers  
    2.1.1Additions to header <functional> synopsisY 
    2.1.2Class template reference_wrapper  
    2.1.2.1reference_wrapper construct/copy/destroyY 
    2.1.2.2reference_wrapper assignmentY 
    2.1.2.3reference_wrapper accessY 
    2.1.2.4reference_wrapper invocationY 
    2.1.2.5reference_wrapper helper functionsY 
    2.2Smart pointers  
    2.2.1Additions to header <memory> synopsisY 
    2.2.2Class bad_weak_ptrY 
    2.2.3Class template shared_ptr  +

    + Uses code from +@@ -2144,7 +2144,7 @@ ISO/IEC TR 24733:2011, + decimal floating-point arithmetic". +

    + This page describes the TR 24733 support in +-the GCC 13 release series, not in any particular release. ++the GCC 13 release series. +

    Table 1.12. C++ TR 24733 Implementation Status

    SectionDescriptionStatusComments
    + 0 + +--- a/src/libstdc++-v3/doc/html/manual/using.html ++++ b/src/libstdc++-v3/doc/html/manual/using.html +@@ -4,7 +4,7 @@ + +  Next

    Chapter 3. Using

    Command Options

    + The set of features available in the GNU C++ library is shaped by +- several GCC ++ several GCC + Command Options. Options that impact libstdc++ are + enumerated and detailed in the table below. +

    +@@ -14,9 +14,11 @@ + g++ -std=gnu++17 since GCC 11, and + g++ -std=gnu++14 in GCC 6, 7, 8, 9, and 10, and + g++ -std=gnu++98 for older releases. +-

    Table 3.1. C++ Command Options

    Option FlagsDescription
    -std=c++98 or -std=c++03 +- Use the 1998 ISO C++ standard plus amendments.
    -std=gnu++98 or -std=gnu++03 +- As directly above, with GNU extensions.
    -std=c++11Use the 2011 ISO C++ standard.
    -std=gnu++11As directly above, with GNU extensions.
    -std=c++14Use the 2014 ISO C++ standard.
    -std=gnu++14As directly above, with GNU extensions.
    ++

    Table 3.1. C++ Command Options

    + +- -std=c++98 or -std=c++03 ++ -std + +- Use the 1998 ISO C++ standard plus amendments. +- +- +- +- -std=gnu++98 or -std=gnu++03 ++ ++ Select the C++ standard, and whether to use the base standard ++ or GNU dialect. + +- As directly above, with GNU extensions. +- +- +- +- -std=c++11 +- Use the 2011 ISO C++ standard. +- +- +- +- -std=gnu++11 +- As directly above, with GNU extensions. +- +- +- +- -std=c++14 +- Use the 2014 ISO C++ standard. +- +- +- +- -std=gnu++14 +- As directly above, with GNU extensions. + + + +--- a/src/libstdc++-v3/include/bits/chrono_io.h ++++ b/src/libstdc++-v3/include/bits/chrono_io.h +@@ -1608,7 +1608,10 @@ namespace __format + format(const chrono::duration<_Rep, _Period>& __d, + basic_format_context<_Out, _CharT>& __fc) const + { +- return _M_f._M_format(chrono::abs(__d), __fc, __d < __d.zero()); ++ if constexpr (numeric_limits<_Rep>::is_signed) ++ if (__d < __d.zero()) ++ return _M_f._M_format(-__d, __fc, true); ++ return _M_f._M_format(__d, __fc, false); + } + + private: +--- a/src/libstdc++-v3/include/bits/stl_bvector.h ++++ b/src/libstdc++-v3/include/bits/stl_bvector.h +@@ -593,7 +593,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER + _GLIBCXX20_CONSTEXPR + _Bvector_impl() _GLIBCXX_NOEXCEPT_IF( + is_nothrow_default_constructible<_Bit_alloc_type>::value) +-#if __cpp_concepts ++#if __cpp_concepts && __cpp_lib_type_trait_variable_templates + requires is_default_constructible_v<_Bit_alloc_type> + #endif + : _Bit_alloc_type() +--- a/src/libstdc++-v3/include/c_compatibility/stdatomic.h ++++ b/src/libstdc++-v3/include/c_compatibility/stdatomic.h +@@ -34,7 +34,7 @@ + + #define __cpp_lib_stdatomic_h 202011L + +-#define _Atomic(_Tp) std::atomic<_Tp> ++#define _Atomic(_Tp) ::std::atomic<_Tp> + + using std::memory_order; + using std::memory_order_relaxed; +--- a/src/libstdc++-v3/include/experimental/bits/simd.h ++++ b/src/libstdc++-v3/include/experimental/bits/simd.h +@@ -584,19 +584,12 @@ template + static_assert(_Bytes > 0); + if constexpr (_Bytes == sizeof(int)) + return int(); +- #ifdef __clang__ +- else if constexpr (_Bytes == sizeof(char)) +- return char(); +- #else + else if constexpr (_Bytes == sizeof(_SChar)) + return _SChar(); +- #endif + else if constexpr (_Bytes == sizeof(short)) + return short(); +- #ifndef __clang__ + else if constexpr (_Bytes == sizeof(long)) + return long(); +- #endif + else if constexpr (_Bytes == sizeof(_LLong)) + return _LLong(); + #ifdef __SIZEOF_INT128__ +@@ -1616,7 +1609,29 @@ template + if constexpr (__is_vector_type_v<_V>) + return __x; + else if constexpr (is_simd<_V>::value || is_simd_mask<_V>::value) +- return __data(__x)._M_data; ++ { ++ if constexpr (__is_fixed_size_abi_v) ++ { ++ static_assert(is_simd<_V>::value); ++ static_assert(_V::abi_type::template __traits< ++ typename _V::value_type>::_SimdMember::_S_tuple_size == 1); ++ return __as_vector(__data(__x).first); ++ } ++ else if constexpr (_V::size() > 1) ++ return __data(__x)._M_data; ++ else ++ { ++ static_assert(is_simd<_V>::value); ++ using _Tp = typename _V::value_type; ++#ifdef __i386__ ++ constexpr auto __bytes = sizeof(_Tp) == 8 ? 16 : sizeof(_Tp); ++ using _RV [[__gnu__::__vector_size__(__bytes)]] = _Tp; ++#else ++ using _RV [[__gnu__::__vector_size__(sizeof(_Tp))]] = _Tp; ++#endif ++ return _RV{__data(__x)}; ++ } ++ } + else if constexpr (__is_vectorizable_v<_V>) + return __vector_type_t<_V, 2>{__x}; + else +@@ -2026,6 +2041,72 @@ template > + return ~__a; + } + ++// }}} ++// __vec_shuffle{{{ ++template ++ _GLIBCXX_SIMD_INTRINSIC constexpr ++ __vector_type_t()[0])>, sizeof...(_Is)> ++ __vec_shuffle(_T0 __x, _T1 __y, index_sequence<_Is...> __seq, _Fun __idx_perm) ++ { ++ constexpr int _N0 = sizeof(__x) / sizeof(__x[0]); ++ constexpr int _N1 = sizeof(__y) / sizeof(__y[0]); ++ using _Tp = remove_reference_t()[0])>; ++ using _RV [[maybe_unused]] = __vector_type_t<_Tp, sizeof...(_Is)>; ++#if __has_builtin(__builtin_shufflevector) ++#ifdef __clang__ ++ // Clang requires _T0 == _T1 ++ if constexpr (sizeof(__x) > sizeof(__y) and _N1 == 1) ++ return __vec_shuffle(__x, _T0{__y[0]}, __seq, __idx_perm); ++ else if constexpr (sizeof(__x) > sizeof(__y)) ++ return __vec_shuffle(__x, __intrin_bitcast<_T0>(__y), __seq, __idx_perm); ++ else if constexpr (sizeof(__x) < sizeof(__y) and _N0 == 1) ++ return __vec_shuffle(_T1{__x[0]}, __y, __seq, [=](int __i) { ++ __i = __idx_perm(__i); ++ return __i < _N0 ? __i : __i - _N0 + _N1; ++ }); ++ else if constexpr (sizeof(__x) < sizeof(__y)) ++ return __vec_shuffle(__intrin_bitcast<_T1>(__x), __y, __seq, [=](int __i) { ++ __i = __idx_perm(__i); ++ return __i < _N0 ? __i : __i - _N0 + _N1; ++ }); ++ else ++#endif ++ { ++ const auto __r = __builtin_shufflevector(__x, __y, [=] { ++ constexpr int __j = __idx_perm(_Is); ++ static_assert(__j < _N0 + _N1); ++ return __j; ++ }()...); ++#ifdef __i386__ ++ if constexpr (sizeof(__r) == sizeof(_RV)) ++ return __r; ++ else ++ return _RV {__r[_Is]...}; ++#else ++ return __r; ++#endif ++ } ++#else ++ return _RV { ++ [=]() -> _Tp { ++ constexpr int __j = __idx_perm(_Is); ++ static_assert(__j < _N0 + _N1); ++ if constexpr (__j < 0) ++ return 0; ++ else if constexpr (__j < _N0) ++ return __x[__j]; ++ else ++ return __y[__j - _N0]; ++ }()... ++ }; ++#endif ++ } ++ ++template ++ _GLIBCXX_SIMD_INTRINSIC constexpr auto ++ __vec_shuffle(_T0 __x, _Seq __seq, _Fun __idx_perm) ++ { return __vec_shuffle(__x, _T0(), __seq, __idx_perm); } ++ + // }}} + // __concat{{{ + template , +@@ -2624,6 +2705,8 @@ template + + // }}} + // _SimdWrapper{{{ ++struct _DisabledSimdWrapper; ++ + template + struct _SimdWrapper< + _Tp, _Width, +@@ -2633,16 +2716,17 @@ template + == sizeof(__vector_type_t<_Tp, _Width>), + __vector_type_t<_Tp, _Width>> + { +- using _Base +- = _SimdWrapperBase<__has_iec559_behavior<__signaling_NaN, _Tp>::value +- && sizeof(_Tp) * _Width +- == sizeof(__vector_type_t<_Tp, _Width>), +- __vector_type_t<_Tp, _Width>>; ++ static constexpr bool _S_need_default_init ++ = __has_iec559_behavior<__signaling_NaN, _Tp>::value ++ and sizeof(_Tp) * _Width == sizeof(__vector_type_t<_Tp, _Width>); ++ ++ using _BuiltinType = __vector_type_t<_Tp, _Width>; ++ ++ using _Base = _SimdWrapperBase<_S_need_default_init, _BuiltinType>; + + static_assert(__is_vectorizable_v<_Tp>); + static_assert(_Width >= 2); // 1 doesn't make sense, use _Tp directly then + +- using _BuiltinType = __vector_type_t<_Tp, _Width>; + using value_type = _Tp; + + static inline constexpr size_t _S_full_size +@@ -2678,13 +2762,26 @@ template + _GLIBCXX_SIMD_INTRINSIC constexpr _SimdWrapper& + operator=(_SimdWrapper&&) = default; + +- template >, +- is_same<_V, __intrinsic_type_t<_Tp, _Width>>>>> ++ // Convert from exactly matching __vector_type_t ++ using _SimdWrapperBase<_S_need_default_init, _BuiltinType>::_SimdWrapperBase; ++ ++ // Convert from __intrinsic_type_t if __intrinsic_type_t and __vector_type_t differ, otherwise ++ // this ctor should not exist. Making the argument type unusable is our next best solution. ++ _GLIBCXX_SIMD_INTRINSIC constexpr ++ _SimdWrapper(conditional_t>, ++ _DisabledSimdWrapper, __intrinsic_type_t<_Tp, _Width>> __x) ++ : _Base(__vector_bitcast<_Tp, _Width>(__x)) {} ++ ++ // Convert from different __vector_type_t, but only if bit reinterpretation is a correct ++ // conversion of the value_type ++ template , ++ typename = enable_if_t ++ and is_integral_v>> + _GLIBCXX_SIMD_INTRINSIC constexpr + _SimdWrapper(_V __x) +- // __vector_bitcast can convert e.g. __m128 to __vector(2) float +- : _Base(__vector_bitcast<_Tp, _Width>(__x)) {} ++ : _Base(reinterpret_cast<_BuiltinType>(__x)) {} + + template && ...) +@@ -3886,7 +3983,7 @@ template + _GLIBCXX_SIMD_INTRINSIC _GLIBCXX_CONST constexpr +- _SimdWrapper<_Tp, _Np / _Total * _Combine> ++ conditional_t<_Np == _Total and _Combine == 1, _Tp, _SimdWrapper<_Tp, _Np / _Total * _Combine>> + __extract_part(const _SimdWrapper<_Tp, _Np> __x); + + template +@@ -4150,48 +4247,21 @@ template + __split_wrapper(_SL::template _S_pop_front<1>(), + __data(__x).second)); + } +- else if constexpr ((!is_same_v> && ...) +- && (!__is_fixed_size_abi_v< +- simd_abi::deduce_t<_Tp, _Sizes>> && ...)) ++ else if constexpr ((!__is_fixed_size_abi_v> && ...)) + { +- if constexpr (((_Sizes * 2 == _Np) && ...)) +- return {{__private_init, __extract_part<0, 2>(__data(__x))}, +- {__private_init, __extract_part<1, 2>(__data(__x))}}; +- else if constexpr (is_same_v<_SizeList<_Sizes...>, +- _SizeList<_Np / 3, _Np / 3, _Np / 3>>) +- return {{__private_init, __extract_part<0, 3>(__data(__x))}, +- {__private_init, __extract_part<1, 3>(__data(__x))}, +- {__private_init, __extract_part<2, 3>(__data(__x))}}; +- else if constexpr (is_same_v<_SizeList<_Sizes...>, +- _SizeList<2 * _Np / 3, _Np / 3>>) +- return {{__private_init, __extract_part<0, 3, 2>(__data(__x))}, +- {__private_init, __extract_part<2, 3>(__data(__x))}}; +- else if constexpr (is_same_v<_SizeList<_Sizes...>, +- _SizeList<_Np / 3, 2 * _Np / 3>>) +- return {{__private_init, __extract_part<0, 3>(__data(__x))}, +- {__private_init, __extract_part<1, 3, 2>(__data(__x))}}; +- else if constexpr (is_same_v<_SizeList<_Sizes...>, +- _SizeList<_Np / 2, _Np / 4, _Np / 4>>) +- return {{__private_init, __extract_part<0, 2>(__data(__x))}, +- {__private_init, __extract_part<2, 4>(__data(__x))}, +- {__private_init, __extract_part<3, 4>(__data(__x))}}; +- else if constexpr (is_same_v<_SizeList<_Sizes...>, +- _SizeList<_Np / 4, _Np / 4, _Np / 2>>) +- return {{__private_init, __extract_part<0, 4>(__data(__x))}, +- {__private_init, __extract_part<1, 4>(__data(__x))}, +- {__private_init, __extract_part<1, 2>(__data(__x))}}; +- else if constexpr (is_same_v<_SizeList<_Sizes...>, +- _SizeList<_Np / 4, _Np / 2, _Np / 4>>) +- return {{__private_init, __extract_part<0, 4>(__data(__x))}, +- {__private_init, __extract_center(__data(__x))}, +- {__private_init, __extract_part<3, 4>(__data(__x))}}; +- else if constexpr (((_Sizes * 4 == _Np) && ...)) +- return {{__private_init, __extract_part<0, 4>(__data(__x))}, +- {__private_init, __extract_part<1, 4>(__data(__x))}, +- {__private_init, __extract_part<2, 4>(__data(__x))}, +- {__private_init, __extract_part<3, 4>(__data(__x))}}; +- // else fall through ++ constexpr array __size = {_Sizes...}; ++ return __generate_from_n_evaluations( ++ [&](auto __i) constexpr { ++ constexpr size_t __offset = [&]() { ++ size_t __r = 0; ++ for (unsigned __j = 0; __j < __i; ++__j) ++ __r += __size[__j]; ++ return __r; ++ }(); ++ return __deduced_simd<_Tp, __size[__i]>( ++ __private_init, ++ __extract_part<__offset, _Np, __size[__i]>(__data(__x))); ++ }); + } + #ifdef _GLIBCXX_SIMD_USE_ALIASING_LOADS + const __may_alias<_Tp>* const __element_ptr +@@ -4253,14 +4323,37 @@ template + simd<_Tp, simd_abi::deduce_t<_Tp, (simd_size_v<_Tp, _As> + ...)>> + concat(const simd<_Tp, _As>&... __xs) + { +- using _Rp = __deduced_simd<_Tp, (simd_size_v<_Tp, _As> + ...)>; ++ constexpr int _Np = (simd_size_v<_Tp, _As> + ...); ++ using _Abi = simd_abi::deduce_t<_Tp, _Np>; ++ using _Rp = simd<_Tp, _Abi>; ++ using _RW = typename _SimdTraits<_Tp, _Abi>::_SimdMember; + if constexpr (sizeof...(__xs) == 1) + return simd_cast<_Rp>(__xs...); + else if ((... && __xs._M_is_constprop())) +- return simd<_Tp, +- simd_abi::deduce_t<_Tp, (simd_size_v<_Tp, _As> + ...)>>( +- [&](auto __i) constexpr _GLIBCXX_SIMD_ALWAYS_INLINE_LAMBDA ++ return _Rp([&](auto __i) constexpr _GLIBCXX_SIMD_ALWAYS_INLINE_LAMBDA + { return __subscript_in_pack<__i>(__xs...); }); ++ else if constexpr (__is_simd_wrapper_v<_RW> and sizeof...(__xs) == 2) ++ { ++ return {__private_init, ++ __vec_shuffle(__as_vector(__xs)..., std::make_index_sequence<_RW::_S_full_size>(), ++ [](int __i) { ++ constexpr int __sizes[2] = {int(simd_size_v<_Tp, _As>)...}; ++ constexpr int __vsizes[2] ++ = {int(sizeof(__as_vector(__xs)) / sizeof(_Tp))...}; ++ constexpr int __padding0 = __vsizes[0] - __sizes[0]; ++ return __i >= _Np ? -1 : __i < __sizes[0] ? __i : __i + __padding0; ++ })}; ++ } ++ else if constexpr (__is_simd_wrapper_v<_RW> and sizeof...(__xs) == 3) ++ return [](const auto& __x0, const auto& __x1, const auto& __x2) ++ _GLIBCXX_SIMD_ALWAYS_INLINE_LAMBDA { ++ return concat(concat(__x0, __x1), __x2); ++ }(__xs...); ++ else if constexpr (__is_simd_wrapper_v<_RW> and sizeof...(__xs) > 3) ++ return [](const auto& __x0, const auto& __x1, const auto&... __rest) ++ _GLIBCXX_SIMD_ALWAYS_INLINE_LAMBDA { ++ return concat(concat(__x0, __x1), concat(__rest...)); ++ }(__xs...); + else + { + _Rp __r{}; +--- a/src/libstdc++-v3/include/experimental/bits/simd_builtin.h ++++ b/src/libstdc++-v3/include/experimental/bits/simd_builtin.h +@@ -92,124 +92,16 @@ template >(__x._M_data); + } + +-// }}} +-// __shift_elements_right{{{ +-// if (__shift % 2ⁿ == 0) => the low n Bytes are correct +-template > +- _GLIBCXX_SIMD_INTRINSIC _Tp +- __shift_elements_right(_Tp __v) +- { +- [[maybe_unused]] const auto __iv = __to_intrin(__v); +- static_assert(__shift <= sizeof(_Tp)); +- if constexpr (__shift == 0) +- return __v; +- else if constexpr (__shift == sizeof(_Tp)) +- return _Tp(); +-#if _GLIBCXX_SIMD_X86INTRIN // {{{ +- else if constexpr (__have_sse && __shift == 8 +- && _TVT::template _S_is) +- return _mm_movehl_ps(__iv, __iv); +- else if constexpr (__have_sse2 && __shift == 8 +- && _TVT::template _S_is) +- return _mm_unpackhi_pd(__iv, __iv); +- else if constexpr (__have_sse2 && sizeof(_Tp) == 16) +- return reinterpret_cast( +- _mm_srli_si128(reinterpret_cast<__m128i>(__iv), __shift)); +- else if constexpr (__shift == 16 && sizeof(_Tp) == 32) +- { +- /*if constexpr (__have_avx && _TVT::template _S_is) +- return _mm256_permute2f128_pd(__iv, __iv, 0x81); +- else if constexpr (__have_avx && _TVT::template _S_is) +- return _mm256_permute2f128_ps(__iv, __iv, 0x81); +- else if constexpr (__have_avx) +- return reinterpret_cast( +- _mm256_permute2f128_si256(__iv, __iv, 0x81)); +- else*/ +- return __zero_extend(__hi128(__v)); +- } +- else if constexpr (__have_avx2 && sizeof(_Tp) == 32 && __shift < 16) +- { +- const auto __vll = __vector_bitcast<_LLong>(__v); +- return reinterpret_cast( +- _mm256_alignr_epi8(_mm256_permute2x128_si256(__vll, __vll, 0x81), +- __vll, __shift)); +- } +- else if constexpr (__have_avx && sizeof(_Tp) == 32 && __shift < 16) +- { +- const auto __vll = __vector_bitcast<_LLong>(__v); +- return reinterpret_cast( +- __concat(_mm_alignr_epi8(__hi128(__vll), __lo128(__vll), __shift), +- _mm_srli_si128(__hi128(__vll), __shift))); +- } +- else if constexpr (sizeof(_Tp) == 32 && __shift > 16) +- return __zero_extend(__shift_elements_right<__shift - 16>(__hi128(__v))); +- else if constexpr (sizeof(_Tp) == 64 && __shift == 32) +- return __zero_extend(__hi256(__v)); +- else if constexpr (__have_avx512f && sizeof(_Tp) == 64) +- { +- if constexpr (__shift >= 48) +- return __zero_extend( +- __shift_elements_right<__shift - 48>(__extract<3, 4>(__v))); +- else if constexpr (__shift >= 32) +- return __zero_extend( +- __shift_elements_right<__shift - 32>(__hi256(__v))); +- else if constexpr (__shift % 8 == 0) +- return reinterpret_cast( +- _mm512_alignr_epi64(__m512i(), __intrin_bitcast<__m512i>(__v), +- __shift / 8)); +- else if constexpr (__shift % 4 == 0) +- return reinterpret_cast( +- _mm512_alignr_epi32(__m512i(), __intrin_bitcast<__m512i>(__v), +- __shift / 4)); +- else if constexpr (__have_avx512bw && __shift < 16) +- { +- const auto __vll = __vector_bitcast<_LLong>(__v); +- return reinterpret_cast( +- _mm512_alignr_epi8(_mm512_shuffle_i32x4(__vll, __vll, 0xf9), +- __vll, __shift)); +- } +- else if constexpr (__have_avx512bw && __shift < 32) +- { +- const auto __vll = __vector_bitcast<_LLong>(__v); +- return reinterpret_cast( +- _mm512_alignr_epi8(_mm512_shuffle_i32x4(__vll, __m512i(), 0xee), +- _mm512_shuffle_i32x4(__vll, __vll, 0xf9), +- __shift - 16)); +- } +- else +- __assert_unreachable<_Tp>(); +- } +- /* +- } else if constexpr (__shift % 16 == 0 && sizeof(_Tp) == 64) +- return __auto_bitcast(__extract<__shift / 16, 4>(__v)); +- */ +-#endif // _GLIBCXX_SIMD_X86INTRIN }}} +- else +- { +- constexpr int __chunksize = __shift % 8 == 0 ? 8 +- : __shift % 4 == 0 ? 4 +- : __shift % 2 == 0 ? 2 +- : 1; +- auto __w = __vector_bitcast<__int_with_sizeof_t<__chunksize>>(__v); +- using _Up = decltype(__w); +- return __intrin_bitcast<_Tp>( +- __call_with_n_evaluations<(sizeof(_Tp) - __shift) / __chunksize>( +- [](auto... __chunks) _GLIBCXX_SIMD_ALWAYS_INLINE_LAMBDA { +- return _Up{__chunks...}; +- }, [&](auto __i) _GLIBCXX_SIMD_ALWAYS_INLINE_LAMBDA { +- return __w[__shift / __chunksize + __i]; +- })); +- } +- } +- + // }}} + // __extract_part(_SimdWrapper<_Tp, _Np>) {{{ + template + _GLIBCXX_SIMD_INTRINSIC _GLIBCXX_CONST constexpr +- _SimdWrapper<_Tp, _Np / _Total * _Combine> ++ conditional_t<_Np == _Total and _Combine == 1, _Tp, _SimdWrapper<_Tp, _Np / _Total * _Combine>> + __extract_part(const _SimdWrapper<_Tp, _Np> __x) + { +- if constexpr (_Index % 2 == 0 && _Total % 2 == 0 && _Combine % 2 == 0) ++ if constexpr (_Np == _Total and _Combine == 1) ++ return __x[_Index]; ++ else if constexpr (_Index % 2 == 0 && _Total % 2 == 0 && _Combine % 2 == 0) + return __extract_part<_Index / 2, _Total / 2, _Combine / 2>(__x); + else + { +@@ -235,39 +127,11 @@ template + return __x; + else if constexpr (_Index == 0) + return __intrin_bitcast<_R>(__as_vector(__x)); +-#if _GLIBCXX_SIMD_X86INTRIN // {{{ +- else if constexpr (sizeof(__x) == 32 +- && __return_size * sizeof(_Tp) <= 16) +- { +- constexpr size_t __bytes_to_skip = __values_to_skip * sizeof(_Tp); +- if constexpr (__bytes_to_skip == 16) +- return __vector_bitcast<_Tp, __return_size>( +- __hi128(__as_vector(__x))); +- else +- return __vector_bitcast<_Tp, __return_size>( +- _mm_alignr_epi8(__hi128(__vector_bitcast<_LLong>(__x)), +- __lo128(__vector_bitcast<_LLong>(__x)), +- __bytes_to_skip)); +- } +-#endif // _GLIBCXX_SIMD_X86INTRIN }}} +- else if constexpr (_Index > 0 +- && (__values_to_skip % __return_size != 0 +- || sizeof(_R) >= 8) +- && (__values_to_skip + __return_size) * sizeof(_Tp) +- <= 64 +- && sizeof(__x) >= 16) +- return __intrin_bitcast<_R>( +- __shift_elements_right<__values_to_skip * sizeof(_Tp)>( +- __as_vector(__x))); + else +- { +- _R __r = {}; +- __builtin_memcpy(&__r, +- reinterpret_cast(&__x) +- + sizeof(_Tp) * __values_to_skip, +- __return_size * sizeof(_Tp)); +- return __r; +- } ++ return __vec_shuffle(__as_vector(__x), make_index_sequence<__bit_ceil(__return_size)>(), ++ [](size_t __i) { ++ return __i + __values_to_skip; ++ }); + } + } + +--- a/src/libstdc++-v3/include/experimental/bits/simd_fixed_size.h ++++ b/src/libstdc++-v3/include/experimental/bits/simd_fixed_size.h +@@ -927,7 +927,9 @@ template ; + + // handle (optimize) the simple cases +- if constexpr (_Index == 0 && _Tuple::_S_first_size == __return_size) ++ if constexpr (__return_size == 1) ++ return __x[integral_constant()]; ++ else if constexpr (_Index == 0 && _Tuple::_S_first_size == __return_size) + return __x.first._M_data; + else if constexpr (_Index == 0 && _Total == _Combine) + return __x; +--- a/src/libstdc++-v3/include/experimental/bits/simd_x86.h ++++ b/src/libstdc++-v3/include/experimental/bits/simd_x86.h +@@ -2339,29 +2339,29 @@ template + __assert_unreachable<_Tp>(); + } + else if constexpr (sizeof(__xi) == 64 && sizeof(_Tp) == 8) +- return ~_mm512_mask_cmpeq_epi64_mask(__k1, __xi, __yi); ++ return _mm512_mask_cmpneq_epi64_mask(__k1, __xi, __yi); + else if constexpr (sizeof(__xi) == 64 && sizeof(_Tp) == 4) +- return ~_mm512_mask_cmpeq_epi32_mask(__k1, __xi, __yi); ++ return _mm512_mask_cmpneq_epi32_mask(__k1, __xi, __yi); + else if constexpr (sizeof(__xi) == 64 && sizeof(_Tp) == 2) +- return ~_mm512_mask_cmpeq_epi16_mask(__k1, __xi, __yi); ++ return _mm512_mask_cmpneq_epi16_mask(__k1, __xi, __yi); + else if constexpr (sizeof(__xi) == 64 && sizeof(_Tp) == 1) +- return ~_mm512_mask_cmpeq_epi8_mask(__k1, __xi, __yi); ++ return _mm512_mask_cmpneq_epi8_mask(__k1, __xi, __yi); + else if constexpr (sizeof(__xi) == 32 && sizeof(_Tp) == 8) +- return ~_mm256_mask_cmpeq_epi64_mask(__k1, __xi, __yi); ++ return _mm256_mask_cmpneq_epi64_mask(__k1, __xi, __yi); + else if constexpr (sizeof(__xi) == 32 && sizeof(_Tp) == 4) +- return ~_mm256_mask_cmpeq_epi32_mask(__k1, __xi, __yi); ++ return _mm256_mask_cmpneq_epi32_mask(__k1, __xi, __yi); + else if constexpr (sizeof(__xi) == 32 && sizeof(_Tp) == 2) +- return ~_mm256_mask_cmpeq_epi16_mask(__k1, __xi, __yi); ++ return _mm256_mask_cmpneq_epi16_mask(__k1, __xi, __yi); + else if constexpr (sizeof(__xi) == 32 && sizeof(_Tp) == 1) +- return ~_mm256_mask_cmpeq_epi8_mask(__k1, __xi, __yi); ++ return _mm256_mask_cmpneq_epi8_mask(__k1, __xi, __yi); + else if constexpr (sizeof(__xi) == 16 && sizeof(_Tp) == 8) +- return ~_mm_mask_cmpeq_epi64_mask(__k1, __xi, __yi); ++ return _mm_mask_cmpneq_epi64_mask(__k1, __xi, __yi); + else if constexpr (sizeof(__xi) == 16 && sizeof(_Tp) == 4) +- return ~_mm_mask_cmpeq_epi32_mask(__k1, __xi, __yi); ++ return _mm_mask_cmpneq_epi32_mask(__k1, __xi, __yi); + else if constexpr (sizeof(__xi) == 16 && sizeof(_Tp) == 2) +- return ~_mm_mask_cmpeq_epi16_mask(__k1, __xi, __yi); ++ return _mm_mask_cmpneq_epi16_mask(__k1, __xi, __yi); + else if constexpr (sizeof(__xi) == 16 && sizeof(_Tp) == 1) +- return ~_mm_mask_cmpeq_epi8_mask(__k1, __xi, __yi); ++ return _mm_mask_cmpneq_epi8_mask(__k1, __xi, __yi); + else + __assert_unreachable<_Tp>(); + } // }}} +@@ -5292,7 +5292,7 @@ template + _S_find_last_set(simd_mask<_Tp, _Abi> __k) + { + if constexpr (__is_avx512_abi<_Abi>()) +- return std::__bit_width(__k._M_data._M_data) - 1; ++ return std::__bit_width(_Abi::_S_masked(__k._M_data)._M_data) - 1; + else + return _Base::_S_find_last_set(__k); + } +--- a/src/libstdc++-v3/include/std/array ++++ b/src/libstdc++-v3/include/std/array +@@ -426,7 +426,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION + static_assert(is_constructible_v<_Tp, _Tp&>); + if constexpr (is_constructible_v<_Tp, _Tp&>) + { +- if constexpr (is_trivial_v<_Tp>) ++ if constexpr (is_trivially_copyable_v<_Tp> ++ && is_trivially_default_constructible_v<_Tp> ++ && is_copy_assignable_v<_Tp>) + { + array, _Nm> __arr; + if (!__is_constant_evaluated() && _Nm != 0) +@@ -455,7 +457,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION + static_assert(is_move_constructible_v<_Tp>); + if constexpr (is_move_constructible_v<_Tp>) + { +- if constexpr (is_trivial_v<_Tp>) ++ if constexpr (is_trivially_copyable_v<_Tp> ++ && is_trivially_default_constructible_v<_Tp> ++ && is_copy_assignable_v<_Tp>) + { + array, _Nm> __arr; + if (!__is_constant_evaluated() && _Nm != 0) +--- a/src/libstdc++-v3/include/std/stacktrace ++++ b/src/libstdc++-v3/include/std/stacktrace +@@ -600,6 +600,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION + #else + # define _GLIBCXX_OPERATOR_NEW ::operator new + # define _GLIBCXX_OPERATOR_DELETE ::operator delete ++#endif ++ ++#if __cpp_sized_deallocation ++# define _GLIBCXX_SIZED_DELETE(T, p, n) \ ++ _GLIBCXX_OPERATOR_DELETE((p), (n) * sizeof(T)) ++#else ++# define _GLIBCXX_SIZED_DELETE(T, p, n) _GLIBCXX_OPERATOR_DELETE(p) + #endif + + // Precondition: _M_frames == nullptr && __n != 0 +@@ -641,8 +648,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION + if (_M_capacity) + { + if constexpr (is_same_v>) +- _GLIBCXX_OPERATOR_DELETE (static_cast(_M_frames), +- _M_capacity * sizeof(value_type)); ++ _GLIBCXX_SIZED_DELETE(value_type, ++ static_cast(_M_frames), ++ _M_capacity); + else + __alloc.deallocate(_M_frames, _M_capacity); + _M_frames = nullptr; +@@ -650,6 +658,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION + } + } + ++#undef _GLIBCXX_SIZED_DELETE + #undef _GLIBCXX_OPERATOR_DELETE + #undef _GLIBCXX_OPERATOR_NEW + +--- a/src/libstdc++-v3/libsupc++/new_opa.cc ++++ b/src/libstdc++-v3/libsupc++/new_opa.cc +@@ -47,7 +47,7 @@ using std::size_t; + extern "C" + { + # if _GLIBCXX_HAVE_POSIX_MEMALIGN +- void *posix_memalign(void **, size_t alignment, size_t size); ++ int posix_memalign(void **, size_t alignment, size_t size); + # elif _GLIBCXX_HAVE_ALIGNED_ALLOC + void *aligned_alloc(size_t alignment, size_t size); + # elif _GLIBCXX_HAVE__ALIGNED_MALLOC +--- a/src/libstdc++-v3/src/c++11/assert_fail.cc ++++ b/src/libstdc++-v3/src/c++11/assert_fail.cc +@@ -22,10 +22,10 @@ + // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + // . + +-#include // for std::fprintf, stderr + #include // for std::abort + + #ifdef _GLIBCXX_VERBOSE_ASSERT ++#include // for std::fprintf, stderr + namespace std + { + [[__noreturn__]] +@@ -41,4 +41,12 @@ namespace std + abort(); + } + } ++#else ++namespace std ++{ ++ [[__noreturn__]] ++ void ++ __glibcxx_assert_fail(const char*, int, const char*, const char*) noexcept ++ { abort(); } ++} + #endif +--- a/src/libstdc++-v3/src/c++11/codecvt.cc ++++ b/src/libstdc++-v3/src/c++11/codecvt.cc +@@ -284,6 +284,8 @@ namespace + return invalid_mb_sequence; + if (c1 == 0xE0 && c2 < 0xA0) [[unlikely]] // overlong + return invalid_mb_sequence; ++ if (c1 == 0xED && c2 >= 0xA0) [[unlikely]] // surrogate ++ return invalid_mb_sequence; + if (avail < 3) [[unlikely]] + return incomplete_mb_character; + char32_t c3 = (unsigned char) from[2]; +@@ -484,6 +486,8 @@ namespace + while (from.size()) + { + const char32_t c = from[0]; ++ if (0xD800 <= c && c <= 0xDFFF) [[unlikely]] ++ return codecvt_base::error; + if (c > maxcode) [[unlikely]] + return codecvt_base::error; + if (!write_utf8_code_point(to, c)) [[unlikely]] +@@ -508,7 +512,7 @@ namespace + return codecvt_base::error; + to = codepoint; + } +- return from.size() ? codecvt_base::partial : codecvt_base::ok; ++ return from.nbytes() ? codecvt_base::partial : codecvt_base::ok; + } + + // ucs4 -> utf16 +@@ -521,6 +525,8 @@ namespace + while (from.size()) + { + const char32_t c = from[0]; ++ if (0xD800 <= c && c <= 0xDFFF) [[unlikely]] ++ return codecvt_base::error; + if (c > maxcode) [[unlikely]] + return codecvt_base::error; + if (!write_utf16_code_point(to, c, mode)) [[unlikely]] +@@ -653,7 +659,7 @@ namespace + while (from.size() && to.size()) + { + char16_t c = from[0]; +- if (is_high_surrogate(c)) ++ if (0xD800 <= c && c <= 0xDFFF) + return codecvt_base::error; + if (c > maxcode) + return codecvt_base::error; +@@ -680,7 +686,7 @@ namespace + return codecvt_base::error; + to = c; + } +- return from.size() == 0 ? codecvt_base::ok : codecvt_base::partial; ++ return from.nbytes() == 0 ? codecvt_base::ok : codecvt_base::partial; + } + + const char16_t* +@@ -1344,8 +1350,6 @@ do_in(state_type&, const extern_type* __from, const extern_type* __from_end, + auto res = ucs2_in(from, to, _M_maxcode, _M_mode); + __from_next = reinterpret_cast(from.next); + __to_next = to.next; +- if (res == codecvt_base::ok && __from_next != __from_end) +- res = codecvt_base::error; + return res; + } + +@@ -1419,8 +1423,6 @@ do_in(state_type&, const extern_type* __from, const extern_type* __from_end, + auto res = ucs4_in(from, to, _M_maxcode, _M_mode); + __from_next = reinterpret_cast(from.next); + __to_next = to.next; +- if (res == codecvt_base::ok && __from_next != __from_end) +- res = codecvt_base::error; + return res; + } + +@@ -1521,8 +1523,6 @@ do_in(state_type&, const extern_type* __from, const extern_type* __from_end, + #endif + __from_next = reinterpret_cast(from.next); + __to_next = reinterpret_cast(to.next); +- if (res == codecvt_base::ok && __from_next != __from_end) +- res = codecvt_base::error; + return res; + } + +--- a/src/libstdc++-v3/testsuite/19_diagnostics/stacktrace/hash.cc ++++ b/src/libstdc++-v3/testsuite/19_diagnostics/stacktrace/hash.cc +@@ -1,4 +1,4 @@ +-// { dg-options "-std=gnu++23 -lstdc++_libbacktrace" } ++// { dg-options "-std=gnu++23 -lstdc++exp" } + // { dg-do run { target c++23 } } + // { dg-require-effective-target stacktrace } + +--- a/src/libstdc++-v3/testsuite/20_util/duration/io.cc ++++ b/src/libstdc++-v3/testsuite/20_util/duration/io.cc +@@ -101,6 +101,12 @@ test_format() + std::chrono::duration d{0.5}; + s = std::format("{}", d); + VERIFY( s == "0.5ms" ); ++ ++ std::chrono::duration u{500}; // PR libstdc++/115668 ++ s = std::format("{}", u); ++ VERIFY( s == "500ms" ); ++ s = std::format("{:%Q %q}", u); ++ VERIFY( s == "500 ms" ); + } + + int main() +--- a/src/libstdc++-v3/testsuite/22_locale/codecvt/codecvt_unicode.cc ++++ b/src/libstdc++-v3/testsuite/22_locale/codecvt/codecvt_unicode.cc +@@ -27,38 +27,58 @@ void + test_utf8_utf32_codecvts () + { + using codecvt_c32 = codecvt; +- auto loc_c = locale::classic (); ++ auto &loc_c = locale::classic (); + VERIFY (has_facet (loc_c)); + + auto &cvt = use_facet (loc_c); +- test_utf8_utf32_codecvts (cvt); ++ test_utf8_utf32_cvt (cvt); + + codecvt_utf8 cvt2; +- test_utf8_utf32_codecvts (cvt2); ++ test_utf8_utf32_cvt (cvt2); + } + + void + test_utf8_utf16_codecvts () + { + using codecvt_c16 = codecvt; +- auto loc_c = locale::classic (); ++ auto &loc_c = locale::classic (); + VERIFY (has_facet (loc_c)); + + auto &cvt = use_facet (loc_c); +- test_utf8_utf16_cvts (cvt); ++ test_utf8_utf16_cvt (cvt); + + codecvt_utf8_utf16 cvt2; +- test_utf8_utf16_cvts (cvt2); ++ test_utf8_utf16_cvt (cvt2); + + codecvt_utf8_utf16 cvt3; +- test_utf8_utf16_cvts (cvt3); ++ test_utf8_utf16_cvt (cvt3); + } + + void + test_utf8_ucs2_codecvts () + { + codecvt_utf8 cvt; +- test_utf8_ucs2_cvts (cvt); ++ test_utf8_ucs2_cvt (cvt); ++} ++ ++void ++test_utf16_utf32_codecvts () ++{ ++ codecvt_utf16 cvt; ++ test_utf16_utf32_cvt (cvt, utf16_big_endian); ++ ++ codecvt_utf16 cvt2; ++ test_utf16_utf32_cvt (cvt2, utf16_little_endian); ++} ++ ++void ++test_utf16_ucs2_codecvts () ++{ ++ codecvt_utf16 cvt; ++ test_utf16_ucs2_cvt (cvt, utf16_big_endian); ++ ++ codecvt_utf16 cvt2; ++ test_utf16_ucs2_cvt (cvt2, utf16_little_endian); + } + + int +@@ -67,4 +87,6 @@ main () + test_utf8_utf32_codecvts (); + test_utf8_utf16_codecvts (); + test_utf8_ucs2_codecvts (); ++ test_utf16_utf32_codecvts (); ++ test_utf16_ucs2_codecvts (); + } +--- a/src/libstdc++-v3/testsuite/22_locale/codecvt/codecvt_unicode.h ++++ b/src/libstdc++-v3/testsuite/22_locale/codecvt/codecvt_unicode.h +@@ -17,7 +17,6 @@ + + #include + #include +-#include + #include + + struct test_offsets_ok +@@ -42,33 +41,33 @@ auto constexpr array_size (const T (&)[N]) -> size_t + return N; + } + +-template ++template + void +-utf8_to_utf32_in_ok (const std::codecvt &cvt) ++utf8_to_utf32_in_ok (const std::codecvt &cvt) + { + using namespace std; + // UTF-8 string of 1-byte CP, 2-byte CP, 3-byte CP and 4-byte CP +- const char in[] = "bш\uAAAA\U0010AAAA"; +- const char32_t exp_literal[] = U"bш\uAAAA\U0010AAAA"; +- CharT exp[array_size (exp_literal)] = {}; +- std::copy (begin (exp_literal), end (exp_literal), begin (exp)); +- +- static_assert (array_size (in) == 11, ""); +- static_assert (array_size (exp_literal) == 5, ""); +- static_assert (array_size (exp) == 5, ""); +- VERIFY (char_traits::length (in) == 10); +- VERIFY (char_traits::length (exp_literal) == 4); +- VERIFY (char_traits::length (exp) == 4); ++ const unsigned char input[] = "b\u0448\uAAAA\U0010AAAA"; ++ const char32_t expected[] = U"b\u0448\uAAAA\U0010AAAA"; ++ static_assert (array_size (input) == 11, ""); ++ static_assert (array_size (expected) == 5, ""); ++ ++ ExternT in[array_size (input)]; ++ InternT exp[array_size (expected)]; ++ copy (begin (input), end (input), begin (in)); ++ copy (begin (expected), end (expected), begin (exp)); ++ VERIFY (char_traits::length (in) == 10); ++ VERIFY (char_traits::length (exp) == 4); + + test_offsets_ok offsets[] = {{0, 0}, {1, 1}, {3, 2}, {6, 3}, {10, 4}}; + for (auto t : offsets) + { +- CharT out[array_size (exp) - 1] = {}; ++ InternT out[array_size (exp) - 1] = {}; + VERIFY (t.in_size <= array_size (in)); + VERIFY (t.out_size <= array_size (out)); + auto state = mbstate_t{}; +- auto in_next = (const char *) nullptr; +- auto out_next = (CharT *) nullptr; ++ auto in_next = (const ExternT *) nullptr; ++ auto out_next = (InternT *) nullptr; + auto res = codecvt_base::result (); + + res = cvt.in (state, in, in + t.in_size, in_next, out, out + t.out_size, +@@ -76,19 +75,24 @@ utf8_to_utf32_in_ok (const std::codecvt &cvt) + VERIFY (res == cvt.ok); + VERIFY (in_next == in + t.in_size); + VERIFY (out_next == out + t.out_size); +- VERIFY (char_traits::compare (out, exp, t.out_size) == 0); ++ VERIFY (char_traits::compare (out, exp, t.out_size) == 0); + if (t.out_size < array_size (out)) + VERIFY (out[t.out_size] == 0); ++ ++ state = {}; ++ auto len = cvt.length (state, in, in + t.in_size, t.out_size); ++ VERIFY (len >= 0); ++ VERIFY (static_cast (len) == t.in_size); + } + + for (auto t : offsets) + { +- CharT out[array_size (exp)] = {}; ++ InternT out[array_size (exp)] = {}; + VERIFY (t.in_size <= array_size (in)); + VERIFY (t.out_size <= array_size (out)); + auto state = mbstate_t{}; +- auto in_next = (const char *) nullptr; +- auto out_next = (CharT *) nullptr; ++ auto in_next = (const ExternT *) nullptr; ++ auto out_next = (InternT *) nullptr; + auto res = codecvt_base::result (); + + res +@@ -96,29 +100,34 @@ utf8_to_utf32_in_ok (const std::codecvt &cvt) + VERIFY (res == cvt.ok); + VERIFY (in_next == in + t.in_size); + VERIFY (out_next == out + t.out_size); +- VERIFY (char_traits::compare (out, exp, t.out_size) == 0); ++ VERIFY (char_traits::compare (out, exp, t.out_size) == 0); + if (t.out_size < array_size (out)) + VERIFY (out[t.out_size] == 0); ++ ++ state = {}; ++ auto len = cvt.length (state, in, in + t.in_size, array_size (out)); ++ VERIFY (len >= 0); ++ VERIFY (static_cast (len) == t.in_size); + } + } + +-template ++template + void +-utf8_to_utf32_in_partial (const std::codecvt &cvt) ++utf8_to_utf32_in_partial (const std::codecvt &cvt) + { + using namespace std; + // UTF-8 string of 1-byte CP, 2-byte CP, 3-byte CP and 4-byte CP +- const char in[] = "bш\uAAAA\U0010AAAA"; +- const char32_t exp_literal[] = U"bш\uAAAA\U0010AAAA"; +- CharT exp[array_size (exp_literal)] = {}; +- std::copy (begin (exp_literal), end (exp_literal), begin (exp)); +- +- static_assert (array_size (in) == 11, ""); +- static_assert (array_size (exp_literal) == 5, ""); +- static_assert (array_size (exp) == 5, ""); +- VERIFY (char_traits::length (in) == 10); +- VERIFY (char_traits::length (exp_literal) == 4); +- VERIFY (char_traits::length (exp) == 4); ++ const unsigned char input[] = "b\u0448\uAAAA\U0010AAAA"; ++ const char32_t expected[] = U"b\u0448\uAAAA\U0010AAAA"; ++ static_assert (array_size (input) == 11, ""); ++ static_assert (array_size (expected) == 5, ""); ++ ++ ExternT in[array_size (input)]; ++ InternT exp[array_size (expected)]; ++ copy (begin (input), end (input), begin (in)); ++ copy (begin (expected), end (expected), begin (exp)); ++ VERIFY (char_traits::length (in) == 10); ++ VERIFY (char_traits::length (exp) == 4); + + test_offsets_partial offsets[] = { + {1, 0, 0, 0}, // no space for first CP +@@ -144,14 +153,14 @@ utf8_to_utf32_in_partial (const std::codecvt &cvt) + + for (auto t : offsets) + { +- CharT out[array_size (exp) - 1] = {}; ++ InternT out[array_size (exp) - 1] = {}; + VERIFY (t.in_size <= array_size (in)); + VERIFY (t.out_size <= array_size (out)); + VERIFY (t.expected_in_next <= t.in_size); + VERIFY (t.expected_out_next <= t.out_size); + auto state = mbstate_t{}; +- auto in_next = (const char *) nullptr; +- auto out_next = (CharT *) nullptr; ++ auto in_next = (const ExternT *) nullptr; ++ auto out_next = (InternT *) nullptr; + auto res = codecvt_base::result (); + + res = cvt.in (state, in, in + t.in_size, in_next, out, out + t.out_size, +@@ -159,37 +168,63 @@ utf8_to_utf32_in_partial (const std::codecvt &cvt) + VERIFY (res == cvt.partial); + VERIFY (in_next == in + t.expected_in_next); + VERIFY (out_next == out + t.expected_out_next); +- VERIFY (char_traits::compare (out, exp, t.expected_out_next) == 0); ++ VERIFY (char_traits::compare (out, exp, t.expected_out_next) ++ == 0); + if (t.expected_out_next < array_size (out)) + VERIFY (out[t.expected_out_next] == 0); ++ ++ state = {}; ++ auto len = cvt.length (state, in, in + t.in_size, t.out_size); ++ VERIFY (len >= 0); ++ VERIFY (static_cast (len) == t.expected_in_next); + } + } + +-template ++template + void +-utf8_to_utf32_in_error (const std::codecvt &cvt) ++utf8_to_utf32_in_error (const std::codecvt &cvt) + { + using namespace std; +- // UTF-8 string of 1-byte CP, 2-byte CP, 3-byte CP and 4-byte CP +- const char valid_in[] = "bш\uAAAA\U0010AAAA"; +- const char32_t exp_literal[] = U"bш\uAAAA\U0010AAAA"; +- CharT exp[array_size (exp_literal)] = {}; +- std::copy (begin (exp_literal), end (exp_literal), begin (exp)); ++ // UTF-8 string of 1-byte CP, 2-byte CP, 3-byte CP, 4-byte CP ++ const unsigned char input[] = "b\u0448\uD700\U0010AAAA"; ++ const char32_t expected[] = U"b\u0448\uD700\U0010AAAA"; ++ static_assert (array_size (input) == 11, ""); ++ static_assert (array_size (expected) == 5, ""); ++ ++ ExternT in[array_size (input)]; ++ InternT exp[array_size (expected)]; ++ copy (begin (input), end (input), begin (in)); ++ copy (begin (expected), end (expected), begin (exp)); ++ VERIFY (char_traits::length (in) == 10); ++ VERIFY (char_traits::length (exp) == 4); ++ ++ // There are 5 classes of errors in UTF-8 decoding ++ // 1. Missing leading byte ++ // 2. Missing trailing byte ++ // 3. Surrogate CP ++ // 4. Overlong sequence ++ // 5. CP out of Unicode range ++ test_offsets_error offsets[] = { ++ ++ // 1. Missing leading byte. We will replace the leading byte with ++ // non-leading byte, such as a byte that is always invalid or a trailing ++ // byte. + +- static_assert (array_size (valid_in) == 11, ""); +- static_assert (array_size (exp_literal) == 5, ""); +- static_assert (array_size (exp) == 5, ""); +- VERIFY (char_traits::length (valid_in) == 10); +- VERIFY (char_traits::length (exp_literal) == 4); +- VERIFY (char_traits::length (exp) == 4); ++ // replace leading byte with invalid byte ++ {1, 4, 0, 0, 0xFF, 0}, ++ {3, 4, 1, 1, 0xFF, 1}, ++ {6, 4, 3, 2, 0xFF, 3}, ++ {10, 4, 6, 3, 0xFF, 6}, + +- test_offsets_error offsets[] = { ++ // replace leading byte with trailing byte ++ {1, 4, 0, 0, 0b10101010, 0}, ++ {3, 4, 1, 1, 0b10101010, 1}, ++ {6, 4, 3, 2, 0b10101010, 3}, ++ {10, 4, 6, 3, 0b10101010, 6}, + +- // replace leading byte with invalid byte +- {1, 4, 0, 0, '\xFF', 0}, +- {3, 4, 1, 1, '\xFF', 1}, +- {6, 4, 3, 2, '\xFF', 3}, +- {10, 4, 6, 3, '\xFF', 6}, ++ // 2. Missing trailing byte. We will replace the trailing byte with ++ // non-trailing byte, such as a byte that is always invalid or a leading ++ // byte (simple ASCII byte in our case). + + // replace first trailing byte with ASCII byte + {3, 4, 1, 1, 'z', 2}, +@@ -197,21 +232,27 @@ utf8_to_utf32_in_error (const std::codecvt &cvt) + {10, 4, 6, 3, 'z', 7}, + + // replace first trailing byte with invalid byte +- {3, 4, 1, 1, '\xFF', 2}, +- {6, 4, 3, 2, '\xFF', 4}, +- {10, 4, 6, 3, '\xFF', 7}, ++ {3, 4, 1, 1, 0xFF, 2}, ++ {6, 4, 3, 2, 0xFF, 4}, ++ {10, 4, 6, 3, 0xFF, 7}, + + // replace second trailing byte with ASCII byte + {6, 4, 3, 2, 'z', 5}, + {10, 4, 6, 3, 'z', 8}, + + // replace second trailing byte with invalid byte +- {6, 4, 3, 2, '\xFF', 5}, +- {10, 4, 6, 3, '\xFF', 8}, ++ {6, 4, 3, 2, 0xFF, 5}, ++ {10, 4, 6, 3, 0xFF, 8}, + + // replace third trailing byte + {10, 4, 6, 3, 'z', 9}, +- {10, 4, 6, 3, '\xFF', 9}, ++ {10, 4, 6, 3, 0xFF, 9}, ++ ++ // 2.1 The following test-cases raise doubt whether error or partial should ++ // be returned. For example, we have 4-byte sequence with valid leading ++ // byte. If we hide the last byte we need to return partial. But, if the ++ // second or third byte, which are visible to the call to codecvt, are ++ // malformed then error should be returned. + + // replace first trailing byte with ASCII byte, also incomplete at end + {5, 4, 3, 2, 'z', 4}, +@@ -219,30 +260,51 @@ utf8_to_utf32_in_error (const std::codecvt &cvt) + {9, 4, 6, 3, 'z', 7}, + + // replace first trailing byte with invalid byte, also incomplete at end +- {5, 4, 3, 2, '\xFF', 4}, +- {8, 4, 6, 3, '\xFF', 7}, +- {9, 4, 6, 3, '\xFF', 7}, ++ {5, 4, 3, 2, 0xFF, 4}, ++ {8, 4, 6, 3, 0xFF, 7}, ++ {9, 4, 6, 3, 0xFF, 7}, + + // replace second trailing byte with ASCII byte, also incomplete at end + {9, 4, 6, 3, 'z', 8}, + + // replace second trailing byte with invalid byte, also incomplete at end +- {9, 4, 6, 3, '\xFF', 8}, ++ {9, 4, 6, 3, 0xFF, 8}, ++ ++ // 3. Surrogate CP. We modify the second byte (first trailing) of the 3-byte ++ // CP U+D700 ++ {6, 4, 3, 2, 0b10100000, 4}, // turn U+D700 into U+D800 ++ {6, 4, 3, 2, 0b10101100, 4}, // turn U+D700 into U+DB00 ++ {6, 4, 3, 2, 0b10110000, 4}, // turn U+D700 into U+DC00 ++ {6, 4, 3, 2, 0b10111100, 4}, // turn U+D700 into U+DF00 ++ ++ // 4. Overlong sequence. The CPs in the input are chosen such as modifying ++ // just the leading byte is enough to make them overlong, i.e. for the ++ // 3-byte and 4-byte CP the second byte (first trailing) has enough leading ++ // zeroes. ++ {3, 4, 1, 1, 0b11000000, 1}, // make the 2-byte CP overlong ++ {3, 4, 1, 1, 0b11000001, 1}, // make the 2-byte CP overlong ++ {6, 4, 3, 2, 0b11100000, 3}, // make the 3-byte CP overlong ++ {10, 4, 6, 3, 0b11110000, 6}, // make the 4-byte CP overlong ++ ++ // 5. CP above range ++ // turn U+10AAAA into U+14AAAA by changing its leading byte ++ {10, 4, 6, 3, 0b11110101, 6}, ++ // turn U+10AAAA into U+11AAAA by changing its 2nd byte ++ {10, 4, 6, 3, 0b10011010, 7}, + }; + for (auto t : offsets) + { +- char in[array_size (valid_in)] = {}; +- CharT out[array_size (exp) - 1] = {}; ++ InternT out[array_size (exp) - 1] = {}; + VERIFY (t.in_size <= array_size (in)); + VERIFY (t.out_size <= array_size (out)); + VERIFY (t.expected_in_next <= t.in_size); + VERIFY (t.expected_out_next <= t.out_size); +- char_traits::copy (in, valid_in, array_size (valid_in)); ++ auto old_char = in[t.replace_pos]; + in[t.replace_pos] = t.replace_char; + + auto state = mbstate_t{}; +- auto in_next = (const char *) nullptr; +- auto out_next = (CharT *) nullptr; ++ auto in_next = (const ExternT *) nullptr; ++ auto out_next = (InternT *) nullptr; + auto res = codecvt_base::result (); + + res = cvt.in (state, in, in + t.in_size, in_next, out, out + t.out_size, +@@ -250,48 +312,56 @@ utf8_to_utf32_in_error (const std::codecvt &cvt) + VERIFY (res == cvt.error); + VERIFY (in_next == in + t.expected_in_next); + VERIFY (out_next == out + t.expected_out_next); +- VERIFY (char_traits::compare (out, exp, t.expected_out_next) == 0); ++ VERIFY (char_traits::compare (out, exp, t.expected_out_next) ++ == 0); + if (t.expected_out_next < array_size (out)) + VERIFY (out[t.expected_out_next] == 0); ++ ++ state = {}; ++ auto len = cvt.length (state, in, in + t.in_size, t.out_size); ++ VERIFY (len >= 0); ++ VERIFY (static_cast (len) == t.expected_in_next); ++ ++ in[t.replace_pos] = old_char; + } + } + +-template ++template + void +-utf8_to_utf32_in (const std::codecvt &cvt) ++utf8_to_utf32_in (const std::codecvt &cvt) + { + utf8_to_utf32_in_ok (cvt); + utf8_to_utf32_in_partial (cvt); + utf8_to_utf32_in_error (cvt); + } + +-template ++template + void +-utf32_to_utf8_out_ok (const std::codecvt &cvt) ++utf32_to_utf8_out_ok (const std::codecvt &cvt) + { + using namespace std; + // UTF-8 string of 1-byte CP, 2-byte CP, 3-byte CP and 4-byte CP +- const char32_t in_literal[] = U"bш\uAAAA\U0010AAAA"; +- const char exp[] = "bш\uAAAA\U0010AAAA"; +- CharT in[array_size (in_literal)] = {}; +- copy (begin (in_literal), end (in_literal), begin (in)); +- +- static_assert (array_size (in_literal) == 5, ""); +- static_assert (array_size (in) == 5, ""); +- static_assert (array_size (exp) == 11, ""); +- VERIFY (char_traits::length (in_literal) == 4); +- VERIFY (char_traits::length (in) == 4); +- VERIFY (char_traits::length (exp) == 10); +- +- const test_offsets_ok offsets[] = {{0, 0}, {1, 1}, {2, 3}, {3, 6}, {4, 10}}; ++ const char32_t input[] = U"b\u0448\uAAAA\U0010AAAA"; ++ const unsigned char expected[] = "b\u0448\uAAAA\U0010AAAA"; ++ static_assert (array_size (input) == 5, ""); ++ static_assert (array_size (expected) == 11, ""); ++ ++ InternT in[array_size (input)]; ++ ExternT exp[array_size (expected)]; ++ copy (begin (input), end (input), begin (in)); ++ copy (begin (expected), end (expected), begin (exp)); ++ VERIFY (char_traits::length (in) == 4); ++ VERIFY (char_traits::length (exp) == 10); ++ ++ test_offsets_ok offsets[] = {{0, 0}, {1, 1}, {2, 3}, {3, 6}, {4, 10}}; + for (auto t : offsets) + { +- char out[array_size (exp) - 1] = {}; ++ ExternT out[array_size (exp) - 1] = {}; + VERIFY (t.in_size <= array_size (in)); + VERIFY (t.out_size <= array_size (out)); + auto state = mbstate_t{}; +- auto in_next = (const CharT *) nullptr; +- auto out_next = (char *) nullptr; ++ auto in_next = (const InternT *) nullptr; ++ auto out_next = (ExternT *) nullptr; + auto res = codecvt_base::result (); + + res = cvt.out (state, in, in + t.in_size, in_next, out, out + t.out_size, +@@ -299,31 +369,31 @@ utf32_to_utf8_out_ok (const std::codecvt &cvt) + VERIFY (res == cvt.ok); + VERIFY (in_next == in + t.in_size); + VERIFY (out_next == out + t.out_size); +- VERIFY (char_traits::compare (out, exp, t.out_size) == 0); ++ VERIFY (char_traits::compare (out, exp, t.out_size) == 0); + if (t.out_size < array_size (out)) + VERIFY (out[t.out_size] == 0); + } + } + +-template ++template + void +-utf32_to_utf8_out_partial (const std::codecvt &cvt) ++utf32_to_utf8_out_partial (const std::codecvt &cvt) + { + using namespace std; + // UTF-8 string of 1-byte CP, 2-byte CP, 3-byte CP and 4-byte CP +- const char32_t in_literal[] = U"bш\uAAAA\U0010AAAA"; +- const char exp[] = "bш\uAAAA\U0010AAAA"; +- CharT in[array_size (in_literal)] = {}; +- copy (begin (in_literal), end (in_literal), begin (in)); +- +- static_assert (array_size (in_literal) == 5, ""); +- static_assert (array_size (in) == 5, ""); +- static_assert (array_size (exp) == 11, ""); +- VERIFY (char_traits::length (in_literal) == 4); +- VERIFY (char_traits::length (in) == 4); +- VERIFY (char_traits::length (exp) == 10); +- +- const test_offsets_partial offsets[] = { ++ const char32_t input[] = U"b\u0448\uAAAA\U0010AAAA"; ++ const unsigned char expected[] = "b\u0448\uAAAA\U0010AAAA"; ++ static_assert (array_size (input) == 5, ""); ++ static_assert (array_size (expected) == 11, ""); ++ ++ InternT in[array_size (input)]; ++ ExternT exp[array_size (expected)]; ++ copy (begin (input), end (input), begin (in)); ++ copy (begin (expected), end (expected), begin (exp)); ++ VERIFY (char_traits::length (in) == 4); ++ VERIFY (char_traits::length (exp) == 10); ++ ++ test_offsets_partial offsets[] = { + {1, 0, 0, 0}, // no space for first CP + + {2, 1, 1, 1}, // no space for second CP +@@ -340,14 +410,14 @@ utf32_to_utf8_out_partial (const std::codecvt &cvt) + }; + for (auto t : offsets) + { +- char out[array_size (exp) - 1] = {}; ++ ExternT out[array_size (exp) - 1] = {}; + VERIFY (t.in_size <= array_size (in)); + VERIFY (t.out_size <= array_size (out)); + VERIFY (t.expected_in_next <= t.in_size); + VERIFY (t.expected_out_next <= t.out_size); + auto state = mbstate_t{}; +- auto in_next = (const CharT *) nullptr; +- auto out_next = (char *) nullptr; ++ auto in_next = (const InternT *) nullptr; ++ auto out_next = (ExternT *) nullptr; + auto res = codecvt_base::result (); + + res = cvt.out (state, in, in + t.in_size, in_next, out, out + t.out_size, +@@ -355,44 +425,58 @@ utf32_to_utf8_out_partial (const std::codecvt &cvt) + VERIFY (res == cvt.partial); + VERIFY (in_next == in + t.expected_in_next); + VERIFY (out_next == out + t.expected_out_next); +- VERIFY (char_traits::compare (out, exp, t.expected_out_next) == 0); ++ VERIFY (char_traits::compare (out, exp, t.expected_out_next) ++ == 0); + if (t.expected_out_next < array_size (out)) + VERIFY (out[t.expected_out_next] == 0); + } + } + +-template ++template + void +-utf32_to_utf8_out_error (const std::codecvt &cvt) ++utf32_to_utf8_out_error (const std::codecvt &cvt) + { + using namespace std; +- const char32_t valid_in[] = U"bш\uAAAA\U0010AAAA"; +- const char exp[] = "bш\uAAAA\U0010AAAA"; +- +- static_assert (array_size (valid_in) == 5, ""); +- static_assert (array_size (exp) == 11, ""); +- VERIFY (char_traits::length (valid_in) == 4); +- VERIFY (char_traits::length (exp) == 10); +- +- test_offsets_error offsets[] = {{4, 10, 0, 0, 0x00110000, 0}, +- {4, 10, 1, 1, 0x00110000, 1}, +- {4, 10, 2, 3, 0x00110000, 2}, +- {4, 10, 3, 6, 0x00110000, 3}}; ++ // UTF-8 string of 1-byte CP, 2-byte CP, 3-byte CP and 4-byte CP ++ const char32_t input[] = U"b\u0448\uAAAA\U0010AAAA"; ++ const unsigned char expected[] = "b\u0448\uAAAA\U0010AAAA"; ++ static_assert (array_size (input) == 5, ""); ++ static_assert (array_size (expected) == 11, ""); ++ ++ InternT in[array_size (input)]; ++ ExternT exp[array_size (expected)]; ++ copy (begin (input), end (input), begin (in)); ++ copy (begin (expected), end (expected), begin (exp)); ++ VERIFY (char_traits::length (in) == 4); ++ VERIFY (char_traits::length (exp) == 10); ++ ++ test_offsets_error offsets[] = { ++ ++ // Surrogate CP ++ {4, 10, 0, 0, 0xD800, 0}, ++ {4, 10, 1, 1, 0xDBFF, 1}, ++ {4, 10, 2, 3, 0xDC00, 2}, ++ {4, 10, 3, 6, 0xDFFF, 3}, ++ ++ // CP out of range ++ {4, 10, 0, 0, 0x00110000, 0}, ++ {4, 10, 1, 1, 0x00110000, 1}, ++ {4, 10, 2, 3, 0x00110000, 2}, ++ {4, 10, 3, 6, 0x00110000, 3}}; + + for (auto t : offsets) + { +- CharT in[array_size (valid_in)] = {}; +- char out[array_size (exp) - 1] = {}; ++ ExternT out[array_size (exp) - 1] = {}; + VERIFY (t.in_size <= array_size (in)); + VERIFY (t.out_size <= array_size (out)); + VERIFY (t.expected_in_next <= t.in_size); + VERIFY (t.expected_out_next <= t.out_size); +- copy (begin (valid_in), end (valid_in), begin (in)); ++ auto old_char = in[t.replace_pos]; + in[t.replace_pos] = t.replace_char; + + auto state = mbstate_t{}; +- auto in_next = (const CharT *) nullptr; +- auto out_next = (char *) nullptr; ++ auto in_next = (const InternT *) nullptr; ++ auto out_next = (ExternT *) nullptr; + auto res = codecvt_base::result (); + + res = cvt.out (state, in, in + t.in_size, in_next, out, out + t.out_size, +@@ -400,56 +484,59 @@ utf32_to_utf8_out_error (const std::codecvt &cvt) + VERIFY (res == cvt.error); + VERIFY (in_next == in + t.expected_in_next); + VERIFY (out_next == out + t.expected_out_next); +- VERIFY (char_traits::compare (out, exp, t.expected_out_next) == 0); ++ VERIFY (char_traits::compare (out, exp, t.expected_out_next) ++ == 0); + if (t.expected_out_next < array_size (out)) + VERIFY (out[t.expected_out_next] == 0); ++ ++ in[t.replace_pos] = old_char; + } + } + +-template ++template + void +-utf32_to_utf8_out (const std::codecvt &cvt) ++utf32_to_utf8_out (const std::codecvt &cvt) + { + utf32_to_utf8_out_ok (cvt); + utf32_to_utf8_out_partial (cvt); + utf32_to_utf8_out_error (cvt); + } + +-template ++template + void +-test_utf8_utf32_codecvts (const std::codecvt &cvt) ++test_utf8_utf32_cvt (const std::codecvt &cvt) + { + utf8_to_utf32_in (cvt); + utf32_to_utf8_out (cvt); + } + +-template ++template + void +-utf8_to_utf16_in_ok (const std::codecvt &cvt) ++utf8_to_utf16_in_ok (const std::codecvt &cvt) + { + using namespace std; + // UTF-8 string of 1-byte CP, 2-byte CP, 3-byte CP and 4-byte CP +- const char in[] = "bш\uAAAA\U0010AAAA"; +- const char16_t exp_literal[] = u"bш\uAAAA\U0010AAAA"; +- CharT exp[array_size (exp_literal)] = {}; +- copy (begin (exp_literal), end (exp_literal), begin (exp)); +- +- static_assert (array_size (in) == 11, ""); +- static_assert (array_size (exp_literal) == 6, ""); +- static_assert (array_size (exp) == 6, ""); +- VERIFY (char_traits::length (in) == 10); +- VERIFY (char_traits::length (exp_literal) == 5); +- VERIFY (char_traits::length (exp) == 5); ++ const unsigned char input[] = "b\u0448\uAAAA\U0010AAAA"; ++ const char16_t expected[] = u"b\u0448\uAAAA\U0010AAAA"; ++ static_assert (array_size (input) == 11, ""); ++ static_assert (array_size (expected) == 6, ""); ++ ++ ExternT in[array_size (input)]; ++ InternT exp[array_size (expected)]; ++ copy (begin (input), end (input), begin (in)); ++ copy (begin (expected), end (expected), begin (exp)); ++ VERIFY (char_traits::length (in) == 10); ++ VERIFY (char_traits::length (exp) == 5); + + test_offsets_ok offsets[] = {{0, 0}, {1, 1}, {3, 2}, {6, 3}, {10, 5}}; + for (auto t : offsets) + { +- CharT out[array_size (exp) - 1] = {}; ++ InternT out[array_size (exp) - 1] = {}; + VERIFY (t.in_size <= array_size (in)); + VERIFY (t.out_size <= array_size (out)); + auto state = mbstate_t{}; +- auto in_next = (const char *) nullptr; +- auto out_next = (CharT *) nullptr; ++ auto in_next = (const ExternT *) nullptr; ++ auto out_next = (InternT *) nullptr; + auto res = codecvt_base::result (); + + res = cvt.in (state, in, in + t.in_size, in_next, out, out + t.out_size, +@@ -457,19 +544,24 @@ utf8_to_utf16_in_ok (const std::codecvt &cvt) + VERIFY (res == cvt.ok); + VERIFY (in_next == in + t.in_size); + VERIFY (out_next == out + t.out_size); +- VERIFY (char_traits::compare (out, exp, t.out_size) == 0); ++ VERIFY (char_traits::compare (out, exp, t.out_size) == 0); + if (t.out_size < array_size (out)) + VERIFY (out[t.out_size] == 0); ++ ++ state = {}; ++ auto len = cvt.length (state, in, in + t.in_size, t.out_size); ++ VERIFY (len >= 0); ++ VERIFY (static_cast (len) == t.in_size); + } + + for (auto t : offsets) + { +- CharT out[array_size (exp)] = {}; ++ InternT out[array_size (exp)] = {}; + VERIFY (t.in_size <= array_size (in)); + VERIFY (t.out_size <= array_size (out)); + auto state = mbstate_t{}; +- auto in_next = (const char *) nullptr; +- auto out_next = (CharT *) nullptr; ++ auto in_next = (const ExternT *) nullptr; ++ auto out_next = (InternT *) nullptr; + auto res = codecvt_base::result (); + + res +@@ -477,29 +569,34 @@ utf8_to_utf16_in_ok (const std::codecvt &cvt) + VERIFY (res == cvt.ok); + VERIFY (in_next == in + t.in_size); + VERIFY (out_next == out + t.out_size); +- VERIFY (char_traits::compare (out, exp, t.out_size) == 0); ++ VERIFY (char_traits::compare (out, exp, t.out_size) == 0); + if (t.out_size < array_size (out)) + VERIFY (out[t.out_size] == 0); ++ ++ state = {}; ++ auto len = cvt.length (state, in, in + t.in_size, array_size (out)); ++ VERIFY (len >= 0); ++ VERIFY (static_cast (len) == t.in_size); + } + } + +-template ++template + void +-utf8_to_utf16_in_partial (const std::codecvt &cvt) ++utf8_to_utf16_in_partial (const std::codecvt &cvt) + { + using namespace std; + // UTF-8 string of 1-byte CP, 2-byte CP, 3-byte CP and 4-byte CP +- const char in[] = "bш\uAAAA\U0010AAAA"; +- const char16_t exp_literal[] = u"bш\uAAAA\U0010AAAA"; +- CharT exp[array_size (exp_literal)] = {}; +- copy (begin (exp_literal), end (exp_literal), begin (exp)); +- +- static_assert (array_size (in) == 11, ""); +- static_assert (array_size (exp_literal) == 6, ""); +- static_assert (array_size (exp) == 6, ""); +- VERIFY (char_traits::length (in) == 10); +- VERIFY (char_traits::length (exp_literal) == 5); +- VERIFY (char_traits::length (exp) == 5); ++ const unsigned char input[] = "b\u0448\uAAAA\U0010AAAA"; ++ const char16_t expected[] = u"b\u0448\uAAAA\U0010AAAA"; ++ static_assert (array_size (input) == 11, ""); ++ static_assert (array_size (expected) == 6, ""); ++ ++ ExternT in[array_size (input)]; ++ InternT exp[array_size (expected)]; ++ copy (begin (input), end (input), begin (in)); ++ copy (begin (expected), end (expected), begin (exp)); ++ VERIFY (char_traits::length (in) == 10); ++ VERIFY (char_traits::length (exp) == 5); + + test_offsets_partial offsets[] = { + {1, 0, 0, 0}, // no space for first CP +@@ -530,14 +627,14 @@ utf8_to_utf16_in_partial (const std::codecvt &cvt) + + for (auto t : offsets) + { +- CharT out[array_size (exp) - 1] = {}; ++ InternT out[array_size (exp) - 1] = {}; + VERIFY (t.in_size <= array_size (in)); + VERIFY (t.out_size <= array_size (out)); + VERIFY (t.expected_in_next <= t.in_size); + VERIFY (t.expected_out_next <= t.out_size); + auto state = mbstate_t{}; +- auto in_next = (const char *) nullptr; +- auto out_next = (CharT *) nullptr; ++ auto in_next = (const ExternT *) nullptr; ++ auto out_next = (InternT *) nullptr; + auto res = codecvt_base::result (); + + res = cvt.in (state, in, in + t.in_size, in_next, out, out + t.out_size, +@@ -545,36 +642,63 @@ utf8_to_utf16_in_partial (const std::codecvt &cvt) + VERIFY (res == cvt.partial); + VERIFY (in_next == in + t.expected_in_next); + VERIFY (out_next == out + t.expected_out_next); +- VERIFY (char_traits::compare (out, exp, t.expected_out_next) == 0); ++ VERIFY (char_traits::compare (out, exp, t.expected_out_next) ++ == 0); + if (t.expected_out_next < array_size (out)) + VERIFY (out[t.expected_out_next] == 0); ++ ++ state = {}; ++ auto len = cvt.length (state, in, in + t.in_size, t.out_size); ++ VERIFY (len >= 0); ++ VERIFY (static_cast (len) == t.expected_in_next); + } + } + +-template ++template + void +-utf8_to_utf16_in_error (const std::codecvt &cvt) ++utf8_to_utf16_in_error (const std::codecvt &cvt) + { + using namespace std; +- const char valid_in[] = "bш\uAAAA\U0010AAAA"; +- const char16_t exp_literal[] = u"bш\uAAAA\U0010AAAA"; +- CharT exp[array_size (exp_literal)] = {}; +- copy (begin (exp_literal), end (exp_literal), begin (exp)); ++ // UTF-8 string of 1-byte CP, 2-byte CP, 3-byte CP, 4-byte CP ++ const unsigned char input[] = "b\u0448\uD700\U0010AAAA"; ++ const char16_t expected[] = u"b\u0448\uD700\U0010AAAA"; ++ static_assert (array_size (input) == 11, ""); ++ static_assert (array_size (expected) == 6, ""); ++ ++ ExternT in[array_size (input)]; ++ InternT exp[array_size (expected)]; ++ copy (begin (input), end (input), begin (in)); ++ copy (begin (expected), end (expected), begin (exp)); ++ VERIFY (char_traits::length (in) == 10); ++ VERIFY (char_traits::length (exp) == 5); ++ ++ // There are 5 classes of errors in UTF-8 decoding ++ // 1. Missing leading byte ++ // 2. Missing trailing byte ++ // 3. Surrogate CP ++ // 4. Overlong sequence ++ // 5. CP out of Unicode range ++ test_offsets_error offsets[] = { ++ ++ // 1. Missing leading byte. We will replace the leading byte with ++ // non-leading byte, such as a byte that is always invalid or a trailing ++ // byte. + +- static_assert (array_size (valid_in) == 11, ""); +- static_assert (array_size (exp_literal) == 6, ""); +- static_assert (array_size (exp) == 6, ""); +- VERIFY (char_traits::length (valid_in) == 10); +- VERIFY (char_traits::length (exp_literal) == 5); +- VERIFY (char_traits::length (exp) == 5); ++ // replace leading byte with invalid byte ++ {1, 5, 0, 0, 0xFF, 0}, ++ {3, 5, 1, 1, 0xFF, 1}, ++ {6, 5, 3, 2, 0xFF, 3}, ++ {10, 5, 6, 3, 0xFF, 6}, + +- test_offsets_error offsets[] = { ++ // replace leading byte with trailing byte ++ {1, 5, 0, 0, 0b10101010, 0}, ++ {3, 5, 1, 1, 0b10101010, 1}, ++ {6, 5, 3, 2, 0b10101010, 3}, ++ {10, 5, 6, 3, 0b10101010, 6}, + +- // replace leading byte with invalid byte +- {1, 5, 0, 0, '\xFF', 0}, +- {3, 5, 1, 1, '\xFF', 1}, +- {6, 5, 3, 2, '\xFF', 3}, +- {10, 5, 6, 3, '\xFF', 6}, ++ // 2. Missing trailing byte. We will replace the trailing byte with ++ // non-trailing byte, such as a byte that is always invalid or a leading ++ // byte (simple ASCII byte in our case). + + // replace first trailing byte with ASCII byte + {3, 5, 1, 1, 'z', 2}, +@@ -582,21 +706,27 @@ utf8_to_utf16_in_error (const std::codecvt &cvt) + {10, 5, 6, 3, 'z', 7}, + + // replace first trailing byte with invalid byte +- {3, 5, 1, 1, '\xFF', 2}, +- {6, 5, 3, 2, '\xFF', 4}, +- {10, 5, 6, 3, '\xFF', 7}, ++ {3, 5, 1, 1, 0xFF, 2}, ++ {6, 5, 3, 2, 0xFF, 4}, ++ {10, 5, 6, 3, 0xFF, 7}, + + // replace second trailing byte with ASCII byte + {6, 5, 3, 2, 'z', 5}, + {10, 5, 6, 3, 'z', 8}, + + // replace second trailing byte with invalid byte +- {6, 5, 3, 2, '\xFF', 5}, +- {10, 5, 6, 3, '\xFF', 8}, ++ {6, 5, 3, 2, 0xFF, 5}, ++ {10, 5, 6, 3, 0xFF, 8}, + + // replace third trailing byte + {10, 5, 6, 3, 'z', 9}, +- {10, 5, 6, 3, '\xFF', 9}, ++ {10, 5, 6, 3, 0xFF, 9}, ++ ++ // 2.1 The following test-cases raise doubt whether error or partial should ++ // be returned. For example, we have 4-byte sequence with valid leading ++ // byte. If we hide the last byte we need to return partial. But, if the ++ // second or third byte, which are visible to the call to codecvt, are ++ // malformed then error should be returned. + + // replace first trailing byte with ASCII byte, also incomplete at end + {5, 5, 3, 2, 'z', 4}, +@@ -604,30 +734,51 @@ utf8_to_utf16_in_error (const std::codecvt &cvt) + {9, 5, 6, 3, 'z', 7}, + + // replace first trailing byte with invalid byte, also incomplete at end +- {5, 5, 3, 2, '\xFF', 4}, +- {8, 5, 6, 3, '\xFF', 7}, +- {9, 5, 6, 3, '\xFF', 7}, ++ {5, 5, 3, 2, 0xFF, 4}, ++ {8, 5, 6, 3, 0xFF, 7}, ++ {9, 5, 6, 3, 0xFF, 7}, + + // replace second trailing byte with ASCII byte, also incomplete at end + {9, 5, 6, 3, 'z', 8}, + + // replace second trailing byte with invalid byte, also incomplete at end +- {9, 5, 6, 3, '\xFF', 8}, ++ {9, 5, 6, 3, 0xFF, 8}, ++ ++ // 3. Surrogate CP. We modify the second byte (first trailing) of the 3-byte ++ // CP U+D700 ++ {6, 5, 3, 2, 0b10100000, 4}, // turn U+D700 into U+D800 ++ {6, 5, 3, 2, 0b10101100, 4}, // turn U+D700 into U+DB00 ++ {6, 5, 3, 2, 0b10110000, 4}, // turn U+D700 into U+DC00 ++ {6, 5, 3, 2, 0b10111100, 4}, // turn U+D700 into U+DF00 ++ ++ // 4. Overlong sequence. The CPs in the input are chosen such as modifying ++ // just the leading byte is enough to make them overlong, i.e. for the ++ // 3-byte and 4-byte CP the second byte (first trailing) has enough leading ++ // zeroes. ++ {3, 5, 1, 1, 0b11000000, 1}, // make the 2-byte CP overlong ++ {3, 5, 1, 1, 0b11000001, 1}, // make the 2-byte CP overlong ++ {6, 5, 3, 2, 0b11100000, 3}, // make the 3-byte CP overlong ++ {10, 5, 6, 3, 0b11110000, 6}, // make the 4-byte CP overlong ++ ++ // 5. CP above range ++ // turn U+10AAAA into U+14AAAA by changing its leading byte ++ {10, 5, 6, 3, 0b11110101, 6}, ++ // turn U+10AAAA into U+11AAAA by changing its 2nd byte ++ {10, 5, 6, 3, 0b10011010, 7}, + }; + for (auto t : offsets) + { +- char in[array_size (valid_in)] = {}; +- CharT out[array_size (exp) - 1] = {}; ++ InternT out[array_size (exp) - 1] = {}; + VERIFY (t.in_size <= array_size (in)); + VERIFY (t.out_size <= array_size (out)); + VERIFY (t.expected_in_next <= t.in_size); + VERIFY (t.expected_out_next <= t.out_size); +- char_traits::copy (in, valid_in, array_size (valid_in)); ++ auto old_char = in[t.replace_pos]; + in[t.replace_pos] = t.replace_char; + + auto state = mbstate_t{}; +- auto in_next = (const char *) nullptr; +- auto out_next = (CharT *) nullptr; ++ auto in_next = (const ExternT *) nullptr; ++ auto out_next = (InternT *) nullptr; + auto res = codecvt_base::result (); + + res = cvt.in (state, in, in + t.in_size, in_next, out, out + t.out_size, +@@ -635,48 +786,56 @@ utf8_to_utf16_in_error (const std::codecvt &cvt) + VERIFY (res == cvt.error); + VERIFY (in_next == in + t.expected_in_next); + VERIFY (out_next == out + t.expected_out_next); +- VERIFY (char_traits::compare (out, exp, t.expected_out_next) == 0); ++ VERIFY (char_traits::compare (out, exp, t.expected_out_next) ++ == 0); + if (t.expected_out_next < array_size (out)) + VERIFY (out[t.expected_out_next] == 0); ++ ++ state = {}; ++ auto len = cvt.length (state, in, in + t.in_size, t.out_size); ++ VERIFY (len >= 0); ++ VERIFY (static_cast (len) == t.expected_in_next); ++ ++ in[t.replace_pos] = old_char; + } + } + +-template ++template + void +-utf8_to_utf16_in (const std::codecvt &cvt) ++utf8_to_utf16_in (const std::codecvt &cvt) + { + utf8_to_utf16_in_ok (cvt); + utf8_to_utf16_in_partial (cvt); + utf8_to_utf16_in_error (cvt); + } + +-template ++template + void +-utf16_to_utf8_out_ok (const std::codecvt &cvt) ++utf16_to_utf8_out_ok (const std::codecvt &cvt) + { + using namespace std; + // UTF-8 string of 1-byte CP, 2-byte CP, 3-byte CP and 4-byte CP +- const char16_t in_literal[] = u"bш\uAAAA\U0010AAAA"; +- const char exp[] = "bш\uAAAA\U0010AAAA"; +- CharT in[array_size (in_literal)]; +- copy (begin (in_literal), end (in_literal), begin (in)); +- +- static_assert (array_size (in_literal) == 6, ""); +- static_assert (array_size (exp) == 11, ""); +- static_assert (array_size (in) == 6, ""); +- VERIFY (char_traits::length (in_literal) == 5); +- VERIFY (char_traits::length (exp) == 10); +- VERIFY (char_traits::length (in) == 5); +- +- const test_offsets_ok offsets[] = {{0, 0}, {1, 1}, {2, 3}, {3, 6}, {5, 10}}; ++ const char16_t input[] = u"b\u0448\uAAAA\U0010AAAA"; ++ const unsigned char expected[] = "b\u0448\uAAAA\U0010AAAA"; ++ static_assert (array_size (input) == 6, ""); ++ static_assert (array_size (expected) == 11, ""); ++ ++ InternT in[array_size (input)]; ++ ExternT exp[array_size (expected)]; ++ copy (begin (input), end (input), begin (in)); ++ copy (begin (expected), end (expected), begin (exp)); ++ VERIFY (char_traits::length (in) == 5); ++ VERIFY (char_traits::length (exp) == 10); ++ ++ test_offsets_ok offsets[] = {{0, 0}, {1, 1}, {2, 3}, {3, 6}, {5, 10}}; + for (auto t : offsets) + { +- char out[array_size (exp) - 1] = {}; ++ ExternT out[array_size (exp) - 1] = {}; + VERIFY (t.in_size <= array_size (in)); + VERIFY (t.out_size <= array_size (out)); + auto state = mbstate_t{}; +- auto in_next = (const CharT *) nullptr; +- auto out_next = (char *) nullptr; ++ auto in_next = (const InternT *) nullptr; ++ auto out_next = (ExternT *) nullptr; + auto res = codecvt_base::result (); + + res = cvt.out (state, in, in + t.in_size, in_next, out, out + t.out_size, +@@ -684,31 +843,31 @@ utf16_to_utf8_out_ok (const std::codecvt &cvt) + VERIFY (res == cvt.ok); + VERIFY (in_next == in + t.in_size); + VERIFY (out_next == out + t.out_size); +- VERIFY (char_traits::compare (out, exp, t.out_size) == 0); ++ VERIFY (char_traits::compare (out, exp, t.out_size) == 0); + if (t.out_size < array_size (out)) + VERIFY (out[t.out_size] == 0); + } + } + +-template ++template + void +-utf16_to_utf8_out_partial (const std::codecvt &cvt) ++utf16_to_utf8_out_partial (const std::codecvt &cvt) + { + using namespace std; + // UTF-8 string of 1-byte CP, 2-byte CP, 3-byte CP and 4-byte CP +- const char16_t in_literal[] = u"bш\uAAAA\U0010AAAA"; +- const char exp[] = "bш\uAAAA\U0010AAAA"; +- CharT in[array_size (in_literal)]; +- copy (begin (in_literal), end (in_literal), begin (in)); +- +- static_assert (array_size (in_literal) == 6, ""); +- static_assert (array_size (exp) == 11, ""); +- static_assert (array_size (in) == 6, ""); +- VERIFY (char_traits::length (in_literal) == 5); +- VERIFY (char_traits::length (exp) == 10); +- VERIFY (char_traits::length (in) == 5); +- +- const test_offsets_partial offsets[] = { ++ const char16_t input[] = u"b\u0448\uAAAA\U0010AAAA"; ++ const unsigned char expected[] = "b\u0448\uAAAA\U0010AAAA"; ++ static_assert (array_size (input) == 6, ""); ++ static_assert (array_size (expected) == 11, ""); ++ ++ InternT in[array_size (input)]; ++ ExternT exp[array_size (expected)]; ++ copy (begin (input), end (input), begin (in)); ++ copy (begin (expected), end (expected), begin (exp)); ++ VERIFY (char_traits::length (in) == 5); ++ VERIFY (char_traits::length (exp) == 10); ++ ++ test_offsets_partial offsets[] = { + {1, 0, 0, 0}, // no space for first CP + + {2, 1, 1, 1}, // no space for second CP +@@ -732,14 +891,14 @@ utf16_to_utf8_out_partial (const std::codecvt &cvt) + }; + for (auto t : offsets) + { +- char out[array_size (exp) - 1] = {}; ++ ExternT out[array_size (exp) - 1] = {}; + VERIFY (t.in_size <= array_size (in)); + VERIFY (t.out_size <= array_size (out)); + VERIFY (t.expected_in_next <= t.in_size); + VERIFY (t.expected_out_next <= t.out_size); + auto state = mbstate_t{}; +- auto in_next = (const CharT *) nullptr; +- auto out_next = (char *) nullptr; ++ auto in_next = (const InternT *) nullptr; ++ auto out_next = (ExternT *) nullptr; + auto res = codecvt_base::result (); + + res = cvt.out (state, in, in + t.in_size, in_next, out, out + t.out_size, +@@ -747,26 +906,34 @@ utf16_to_utf8_out_partial (const std::codecvt &cvt) + VERIFY (res == cvt.partial); + VERIFY (in_next == in + t.expected_in_next); + VERIFY (out_next == out + t.expected_out_next); +- VERIFY (char_traits::compare (out, exp, t.expected_out_next) == 0); ++ VERIFY (char_traits::compare (out, exp, t.expected_out_next) ++ == 0); + if (t.expected_out_next < array_size (out)) + VERIFY (out[t.expected_out_next] == 0); + } + } + +-template ++template + void +-utf16_to_utf8_out_error (const std::codecvt &cvt) ++utf16_to_utf8_out_error (const std::codecvt &cvt) + { + using namespace std; +- const char16_t valid_in[] = u"bш\uAAAA\U0010AAAA"; +- const char exp[] = "bш\uAAAA\U0010AAAA"; +- +- static_assert (array_size (valid_in) == 6, ""); +- static_assert (array_size (exp) == 11, ""); +- VERIFY (char_traits::length (valid_in) == 5); +- VERIFY (char_traits::length (exp) == 10); +- +- test_offsets_error offsets[] = { ++ // UTF-8 string of 1-byte CP, 2-byte CP, 3-byte CP and 4-byte CP ++ const char16_t input[] = u"b\u0448\uAAAA\U0010AAAA"; ++ const unsigned char expected[] = "b\u0448\uAAAA\U0010AAAA"; ++ static_assert (array_size (input) == 6, ""); ++ static_assert (array_size (expected) == 11, ""); ++ ++ InternT in[array_size (input)]; ++ ExternT exp[array_size (expected)]; ++ copy (begin (input), end (input), begin (in)); ++ copy (begin (expected), end (expected), begin (exp)); ++ VERIFY (char_traits::length (in) == 5); ++ VERIFY (char_traits::length (exp) == 10); ++ ++ // The only possible error in UTF-16 is unpaired surrogate code units. ++ // So we replace valid code points (scalar values) with lone surrogate CU. ++ test_offsets_error offsets[] = { + {5, 10, 0, 0, 0xD800, 0}, + {5, 10, 0, 0, 0xDBFF, 0}, + {5, 10, 0, 0, 0xDC00, 0}, +@@ -796,18 +963,17 @@ utf16_to_utf8_out_error (const std::codecvt &cvt) + + for (auto t : offsets) + { +- CharT in[array_size (valid_in)] = {}; +- char out[array_size (exp) - 1] = {}; ++ ExternT out[array_size (exp) - 1] = {}; + VERIFY (t.in_size <= array_size (in)); + VERIFY (t.out_size <= array_size (out)); + VERIFY (t.expected_in_next <= t.in_size); + VERIFY (t.expected_out_next <= t.out_size); +- copy (begin (valid_in), end (valid_in), begin (in)); ++ auto old_char = in[t.replace_pos]; + in[t.replace_pos] = t.replace_char; + + auto state = mbstate_t{}; +- auto in_next = (const CharT *) nullptr; +- auto out_next = (char *) nullptr; ++ auto in_next = (const InternT *) nullptr; ++ auto out_next = (ExternT *) nullptr; + auto res = codecvt_base::result (); + + res = cvt.out (state, in, in + t.in_size, in_next, out, out + t.out_size, +@@ -815,56 +981,59 @@ utf16_to_utf8_out_error (const std::codecvt &cvt) + VERIFY (res == cvt.error); + VERIFY (in_next == in + t.expected_in_next); + VERIFY (out_next == out + t.expected_out_next); +- VERIFY (char_traits::compare (out, exp, t.expected_out_next) == 0); ++ VERIFY (char_traits::compare (out, exp, t.expected_out_next) ++ == 0); + if (t.expected_out_next < array_size (out)) + VERIFY (out[t.expected_out_next] == 0); ++ ++ in[t.replace_pos] = old_char; + } + } + +-template ++template + void +-utf16_to_utf8_out (const std::codecvt &cvt) ++utf16_to_utf8_out (const std::codecvt &cvt) + { + utf16_to_utf8_out_ok (cvt); + utf16_to_utf8_out_partial (cvt); + utf16_to_utf8_out_error (cvt); + } + +-template ++template + void +-test_utf8_utf16_cvts (const std::codecvt &cvt) ++test_utf8_utf16_cvt (const std::codecvt &cvt) + { + utf8_to_utf16_in (cvt); + utf16_to_utf8_out (cvt); + } + +-template ++template + void +-utf8_to_ucs2_in_ok (const std::codecvt &cvt) ++utf8_to_ucs2_in_ok (const std::codecvt &cvt) + { + using namespace std; + // UTF-8 string of 1-byte CP, 2-byte CP and 3-byte CP +- const char in[] = "bш\uAAAA"; +- const char16_t exp_literal[] = u"bш\uAAAA"; +- CharT exp[array_size (exp_literal)] = {}; +- copy (begin (exp_literal), end (exp_literal), begin (exp)); +- +- static_assert (array_size (in) == 7, ""); +- static_assert (array_size (exp_literal) == 4, ""); +- static_assert (array_size (exp) == 4, ""); +- VERIFY (char_traits::length (in) == 6); +- VERIFY (char_traits::length (exp_literal) == 3); +- VERIFY (char_traits::length (exp) == 3); ++ const unsigned char input[] = "b\u0448\uAAAA"; ++ const char16_t expected[] = u"b\u0448\uAAAA"; ++ static_assert (array_size (input) == 7, ""); ++ static_assert (array_size (expected) == 4, ""); ++ ++ ExternT in[array_size (input)]; ++ InternT exp[array_size (expected)]; ++ copy (begin (input), end (input), begin (in)); ++ copy (begin (expected), end (expected), begin (exp)); ++ VERIFY (char_traits::length (in) == 6); ++ VERIFY (char_traits::length (exp) == 3); + + test_offsets_ok offsets[] = {{0, 0}, {1, 1}, {3, 2}, {6, 3}}; + for (auto t : offsets) + { +- CharT out[array_size (exp) - 1] = {}; ++ InternT out[array_size (exp) - 1] = {}; + VERIFY (t.in_size <= array_size (in)); + VERIFY (t.out_size <= array_size (out)); + auto state = mbstate_t{}; +- auto in_next = (const char *) nullptr; +- auto out_next = (CharT *) nullptr; ++ auto in_next = (const ExternT *) nullptr; ++ auto out_next = (InternT *) nullptr; + auto res = codecvt_base::result (); + + res = cvt.in (state, in, in + t.in_size, in_next, out, out + t.out_size, +@@ -872,19 +1041,24 @@ utf8_to_ucs2_in_ok (const std::codecvt &cvt) + VERIFY (res == cvt.ok); + VERIFY (in_next == in + t.in_size); + VERIFY (out_next == out + t.out_size); +- VERIFY (char_traits::compare (out, exp, t.out_size) == 0); ++ VERIFY (char_traits::compare (out, exp, t.out_size) == 0); + if (t.out_size < array_size (out)) + VERIFY (out[t.out_size] == 0); ++ ++ state = {}; ++ auto len = cvt.length (state, in, in + t.in_size, t.out_size); ++ VERIFY (len >= 0); ++ VERIFY (static_cast (len) == t.in_size); + } + + for (auto t : offsets) + { +- CharT out[array_size (exp)] = {}; ++ InternT out[array_size (exp)] = {}; + VERIFY (t.in_size <= array_size (in)); + VERIFY (t.out_size <= array_size (out)); + auto state = mbstate_t{}; +- auto in_next = (const char *) nullptr; +- auto out_next = (CharT *) nullptr; ++ auto in_next = (const ExternT *) nullptr; ++ auto out_next = (InternT *) nullptr; + auto res = codecvt_base::result (); + + res +@@ -892,29 +1066,34 @@ utf8_to_ucs2_in_ok (const std::codecvt &cvt) + VERIFY (res == cvt.ok); + VERIFY (in_next == in + t.in_size); + VERIFY (out_next == out + t.out_size); +- VERIFY (char_traits::compare (out, exp, t.out_size) == 0); ++ VERIFY (char_traits::compare (out, exp, t.out_size) == 0); + if (t.out_size < array_size (out)) + VERIFY (out[t.out_size] == 0); ++ ++ state = {}; ++ auto len = cvt.length (state, in, in + t.in_size, array_size (out)); ++ VERIFY (len >= 0); ++ VERIFY (static_cast (len) == t.in_size); + } + } + +-template ++template + void +-utf8_to_ucs2_in_partial (const std::codecvt &cvt) ++utf8_to_ucs2_in_partial (const std::codecvt &cvt) + { + using namespace std; + // UTF-8 string of 1-byte CP, 2-byte CP and 3-byte CP +- const char in[] = "bш\uAAAA"; +- const char16_t exp_literal[] = u"bш\uAAAA"; +- CharT exp[array_size (exp_literal)] = {}; +- copy (begin (exp_literal), end (exp_literal), begin (exp)); +- +- static_assert (array_size (in) == 7, ""); +- static_assert (array_size (exp_literal) == 4, ""); +- static_assert (array_size (exp) == 4, ""); +- VERIFY (char_traits::length (in) == 6); +- VERIFY (char_traits::length (exp_literal) == 3); +- VERIFY (char_traits::length (exp) == 3); ++ const unsigned char input[] = "b\u0448\uAAAA"; ++ const char16_t expected[] = u"b\u0448\uAAAA"; ++ static_assert (array_size (input) == 7, ""); ++ static_assert (array_size (expected) == 4, ""); ++ ++ ExternT in[array_size (input)]; ++ InternT exp[array_size (expected)]; ++ copy (begin (input), end (input), begin (in)); ++ copy (begin (expected), end (expected), begin (exp)); ++ VERIFY (char_traits::length (in) == 6); ++ VERIFY (char_traits::length (exp) == 3); + + test_offsets_partial offsets[] = { + {1, 0, 0, 0}, // no space for first CP +@@ -932,14 +1111,14 @@ utf8_to_ucs2_in_partial (const std::codecvt &cvt) + + for (auto t : offsets) + { +- CharT out[array_size (exp) - 1] = {}; ++ InternT out[array_size (exp) - 1] = {}; + VERIFY (t.in_size <= array_size (in)); + VERIFY (t.out_size <= array_size (out)); + VERIFY (t.expected_in_next <= t.in_size); + VERIFY (t.expected_out_next <= t.out_size); + auto state = mbstate_t{}; +- auto in_next = (const char *) nullptr; +- auto out_next = (CharT *) nullptr; ++ auto in_next = (const ExternT *) nullptr; ++ auto out_next = (InternT *) nullptr; + auto res = codecvt_base::result (); + + res = cvt.in (state, in, in + t.in_size, in_next, out, out + t.out_size, +@@ -947,36 +1126,62 @@ utf8_to_ucs2_in_partial (const std::codecvt &cvt) + VERIFY (res == cvt.partial); + VERIFY (in_next == in + t.expected_in_next); + VERIFY (out_next == out + t.expected_out_next); +- VERIFY (char_traits::compare (out, exp, t.expected_out_next) == 0); ++ VERIFY (char_traits::compare (out, exp, t.expected_out_next) ++ == 0); + if (t.expected_out_next < array_size (out)) + VERIFY (out[t.expected_out_next] == 0); ++ ++ state = {}; ++ auto len = cvt.length (state, in, in + t.in_size, t.out_size); ++ VERIFY (len >= 0); ++ VERIFY (static_cast (len) == t.expected_in_next); + } + } + +-template ++template + void +-utf8_to_ucs2_in_error (const std::codecvt &cvt) ++utf8_to_ucs2_in_error (const std::codecvt &cvt) + { + using namespace std; +- const char valid_in[] = "bш\uAAAA\U0010AAAA"; +- const char16_t exp_literal[] = u"bш\uAAAA\U0010AAAA"; +- CharT exp[array_size (exp_literal)] = {}; +- copy (begin (exp_literal), end (exp_literal), begin (exp)); ++ const unsigned char input[] = "b\u0448\uD700\U0010AAAA"; ++ const char16_t expected[] = u"b\u0448\uD700\U0010AAAA"; ++ static_assert (array_size (input) == 11, ""); ++ static_assert (array_size (expected) == 6, ""); ++ ++ ExternT in[array_size (input)]; ++ InternT exp[array_size (expected)]; ++ copy (begin (input), end (input), begin (in)); ++ copy (begin (expected), end (expected), begin (exp)); ++ VERIFY (char_traits::length (in) == 10); ++ VERIFY (char_traits::length (exp) == 5); ++ ++ // There are 5 classes of errors in UTF-8 decoding ++ // 1. Missing leading byte ++ // 2. Missing trailing byte ++ // 3. Surrogate CP ++ // 4. Overlong sequence ++ // 5. CP out of Unicode range ++ test_offsets_error offsets[] = { ++ ++ // 1. Missing leading byte. We will replace the leading byte with ++ // non-leading byte, such as a byte that is always invalid or a trailing ++ // byte. + +- static_assert (array_size (valid_in) == 11, ""); +- static_assert (array_size (exp_literal) == 6, ""); +- static_assert (array_size (exp) == 6, ""); +- VERIFY (char_traits::length (valid_in) == 10); +- VERIFY (char_traits::length (exp_literal) == 5); +- VERIFY (char_traits::length (exp) == 5); ++ // replace leading byte with invalid byte ++ {1, 5, 0, 0, 0xFF, 0}, ++ {3, 5, 1, 1, 0xFF, 1}, ++ {6, 5, 3, 2, 0xFF, 3}, ++ {10, 5, 6, 3, 0xFF, 6}, + +- test_offsets_error offsets[] = { ++ // replace leading byte with trailing byte ++ {1, 5, 0, 0, 0b10101010, 0}, ++ {3, 5, 1, 1, 0b10101010, 1}, ++ {6, 5, 3, 2, 0b10101010, 3}, ++ {10, 5, 6, 3, 0b10101010, 6}, + +- // replace leading byte with invalid byte +- {1, 5, 0, 0, '\xFF', 0}, +- {3, 5, 1, 1, '\xFF', 1}, +- {6, 5, 3, 2, '\xFF', 3}, +- {10, 5, 6, 3, '\xFF', 6}, ++ // 2. Missing trailing byte. We will replace the trailing byte with ++ // non-trailing byte, such as a byte that is always invalid or a leading ++ // byte (simple ASCII byte in our case). + + // replace first trailing byte with ASCII byte + {3, 5, 1, 1, 'z', 2}, +@@ -984,72 +1189,90 @@ utf8_to_ucs2_in_error (const std::codecvt &cvt) + {10, 5, 6, 3, 'z', 7}, + + // replace first trailing byte with invalid byte +- {3, 5, 1, 1, '\xFF', 2}, +- {6, 5, 3, 2, '\xFF', 4}, +- {10, 5, 6, 3, '\xFF', 7}, ++ {3, 5, 1, 1, 0xFF, 2}, ++ {6, 5, 3, 2, 0xFF, 4}, ++ {10, 5, 6, 3, 0xFF, 7}, + + // replace second trailing byte with ASCII byte + {6, 5, 3, 2, 'z', 5}, + {10, 5, 6, 3, 'z', 8}, + + // replace second trailing byte with invalid byte +- {6, 5, 3, 2, '\xFF', 5}, +- {10, 5, 6, 3, '\xFF', 8}, ++ {6, 5, 3, 2, 0xFF, 5}, ++ {10, 5, 6, 3, 0xFF, 8}, + + // replace third trailing byte + {10, 5, 6, 3, 'z', 9}, +- {10, 5, 6, 3, '\xFF', 9}, +- +- // When we see a leading byte of 4-byte CP, we should return error, no +- // matter if it is incomplete at the end or has errors in the trailing +- // bytes. +- +- // Don't replace anything, show full 4-byte CP +- {10, 4, 6, 3, 'b', 0}, +- {10, 5, 6, 3, 'b', 0}, ++ {10, 5, 6, 3, 0xFF, 9}, + +- // Don't replace anything, show incomplete 4-byte CP at the end +- {7, 4, 6, 3, 'b', 0}, // incomplete fourth CP +- {8, 4, 6, 3, 'b', 0}, // incomplete fourth CP +- {9, 4, 6, 3, 'b', 0}, // incomplete fourth CP +- {7, 5, 6, 3, 'b', 0}, // incomplete fourth CP +- {8, 5, 6, 3, 'b', 0}, // incomplete fourth CP +- {9, 5, 6, 3, 'b', 0}, // incomplete fourth CP ++ // 2.1 The following test-cases raise doubt whether error or partial should ++ // be returned. For example, we have 4-byte sequence with valid leading ++ // byte. If we hide the last byte we need to return partial. But, if the ++ // second or third byte, which are visible to the call to codecvt, are ++ // malformed then error should be returned. + + // replace first trailing byte with ASCII byte, also incomplete at end + {5, 5, 3, 2, 'z', 4}, +- +- // replace first trailing byte with invalid byte, also incomplete at end +- {5, 5, 3, 2, '\xFF', 4}, +- +- // replace first trailing byte with ASCII byte, also incomplete at end + {8, 5, 6, 3, 'z', 7}, + {9, 5, 6, 3, 'z', 7}, + + // replace first trailing byte with invalid byte, also incomplete at end +- {8, 5, 6, 3, '\xFF', 7}, +- {9, 5, 6, 3, '\xFF', 7}, ++ {5, 5, 3, 2, 0xFF, 4}, ++ {8, 5, 6, 3, 0xFF, 7}, ++ {9, 5, 6, 3, 0xFF, 7}, + + // replace second trailing byte with ASCII byte, also incomplete at end + {9, 5, 6, 3, 'z', 8}, + + // replace second trailing byte with invalid byte, also incomplete at end +- {9, 5, 6, 3, '\xFF', 8}, ++ {9, 5, 6, 3, 0xFF, 8}, ++ ++ // 3. Surrogate CP. We modify the second byte (first trailing) of the 3-byte ++ // CP U+D700 ++ {6, 5, 3, 2, 0b10100000, 4}, // turn U+D700 into U+D800 ++ {6, 5, 3, 2, 0b10101100, 4}, // turn U+D700 into U+DB00 ++ {6, 5, 3, 2, 0b10110000, 4}, // turn U+D700 into U+DC00 ++ {6, 5, 3, 2, 0b10111100, 4}, // turn U+D700 into U+DF00 ++ ++ // 4. Overlong sequence. The CPs in the input are chosen such as modifying ++ // just the leading byte is enough to make them overlong, i.e. for the ++ // 3-byte and 4-byte CP the second byte (first trailing) has enough leading ++ // zeroes. ++ {3, 5, 1, 1, 0b11000000, 1}, // make the 2-byte CP overlong ++ {3, 5, 1, 1, 0b11000001, 1}, // make the 2-byte CP overlong ++ {6, 5, 3, 2, 0b11100000, 3}, // make the 3-byte CP overlong ++ {10, 5, 6, 3, 0b11110000, 6}, // make the 4-byte CP overlong ++ ++ // 5. CP above range ++ // turn U+10AAAA into U+14AAAA by changing its leading byte ++ {10, 5, 6, 3, 0b11110101, 6}, ++ // turn U+10AAAA into U+11AAAA by changing its 2nd byte ++ {10, 5, 6, 3, 0b10011010, 7}, ++ // Don't replace anything, show full 4-byte CP U+10AAAA ++ {10, 4, 6, 3, 'b', 0}, ++ {10, 5, 6, 3, 'b', 0}, ++ // Don't replace anything, show incomplete 4-byte CP at the end. It's still ++ // out of UCS2 range just by seeing the first byte. ++ {7, 4, 6, 3, 'b', 0}, // incomplete fourth CP ++ {8, 4, 6, 3, 'b', 0}, // incomplete fourth CP ++ {9, 4, 6, 3, 'b', 0}, // incomplete fourth CP ++ {7, 5, 6, 3, 'b', 0}, // incomplete fourth CP ++ {8, 5, 6, 3, 'b', 0}, // incomplete fourth CP ++ {9, 5, 6, 3, 'b', 0}, // incomplete fourth CP + }; + for (auto t : offsets) + { +- char in[array_size (valid_in)] = {}; +- CharT out[array_size (exp) - 1] = {}; ++ InternT out[array_size (exp) - 1] = {}; + VERIFY (t.in_size <= array_size (in)); + VERIFY (t.out_size <= array_size (out)); + VERIFY (t.expected_in_next <= t.in_size); + VERIFY (t.expected_out_next <= t.out_size); +- char_traits::copy (in, valid_in, array_size (valid_in)); ++ auto old_char = in[t.replace_pos]; + in[t.replace_pos] = t.replace_char; + + auto state = mbstate_t{}; +- auto in_next = (const char *) nullptr; +- auto out_next = (CharT *) nullptr; ++ auto in_next = (const ExternT *) nullptr; ++ auto out_next = (InternT *) nullptr; + auto res = codecvt_base::result (); + + res = cvt.in (state, in, in + t.in_size, in_next, out, out + t.out_size, +@@ -1057,48 +1280,56 @@ utf8_to_ucs2_in_error (const std::codecvt &cvt) + VERIFY (res == cvt.error); + VERIFY (in_next == in + t.expected_in_next); + VERIFY (out_next == out + t.expected_out_next); +- VERIFY (char_traits::compare (out, exp, t.expected_out_next) == 0); ++ VERIFY (char_traits::compare (out, exp, t.expected_out_next) ++ == 0); + if (t.expected_out_next < array_size (out)) + VERIFY (out[t.expected_out_next] == 0); ++ ++ state = {}; ++ auto len = cvt.length (state, in, in + t.in_size, t.out_size); ++ VERIFY (len >= 0); ++ VERIFY (static_cast (len) == t.expected_in_next); ++ ++ in[t.replace_pos] = old_char; + } + } + +-template ++template + void +-utf8_to_ucs2_in (const std::codecvt &cvt) ++utf8_to_ucs2_in (const std::codecvt &cvt) + { + utf8_to_ucs2_in_ok (cvt); + utf8_to_ucs2_in_partial (cvt); + utf8_to_ucs2_in_error (cvt); + } + +-template ++template + void +-ucs2_to_utf8_out_ok (const std::codecvt &cvt) ++ucs2_to_utf8_out_ok (const std::codecvt &cvt) + { + using namespace std; + // UTF-8 string of 1-byte CP, 2-byte CP and 3-byte CP +- const char16_t in_literal[] = u"bш\uAAAA"; +- const char exp[] = "bш\uAAAA"; +- CharT in[array_size (in_literal)] = {}; +- copy (begin (in_literal), end (in_literal), begin (in)); +- +- static_assert (array_size (in_literal) == 4, ""); +- static_assert (array_size (exp) == 7, ""); +- static_assert (array_size (in) == 4, ""); +- VERIFY (char_traits::length (in_literal) == 3); +- VERIFY (char_traits::length (exp) == 6); +- VERIFY (char_traits::length (in) == 3); +- +- const test_offsets_ok offsets[] = {{0, 0}, {1, 1}, {2, 3}, {3, 6}}; ++ const char16_t input[] = u"b\u0448\uAAAA"; ++ const unsigned char expected[] = "b\u0448\uAAAA"; ++ static_assert (array_size (input) == 4, ""); ++ static_assert (array_size (expected) == 7, ""); ++ ++ InternT in[array_size (input)]; ++ ExternT exp[array_size (expected)]; ++ copy (begin (input), end (input), begin (in)); ++ copy (begin (expected), end (expected), begin (exp)); ++ VERIFY (char_traits::length (in) == 3); ++ VERIFY (char_traits::length (exp) == 6); ++ ++ test_offsets_ok offsets[] = {{0, 0}, {1, 1}, {2, 3}, {3, 6}}; + for (auto t : offsets) + { +- char out[array_size (exp) - 1] = {}; ++ ExternT out[array_size (exp) - 1] = {}; + VERIFY (t.in_size <= array_size (in)); + VERIFY (t.out_size <= array_size (out)); + auto state = mbstate_t{}; +- auto in_next = (const CharT *) nullptr; +- auto out_next = (char *) nullptr; ++ auto in_next = (const InternT *) nullptr; ++ auto out_next = (ExternT *) nullptr; + auto res = codecvt_base::result (); + + res = cvt.out (state, in, in + t.in_size, in_next, out, out + t.out_size, +@@ -1106,31 +1337,31 @@ ucs2_to_utf8_out_ok (const std::codecvt &cvt) + VERIFY (res == cvt.ok); + VERIFY (in_next == in + t.in_size); + VERIFY (out_next == out + t.out_size); +- VERIFY (char_traits::compare (out, exp, t.out_size) == 0); ++ VERIFY (char_traits::compare (out, exp, t.out_size) == 0); + if (t.out_size < array_size (out)) + VERIFY (out[t.out_size] == 0); + } + } + +-template ++template + void +-ucs2_to_utf8_out_partial (const std::codecvt &cvt) ++ucs2_to_utf8_out_partial (const std::codecvt &cvt) + { + using namespace std; + // UTF-8 string of 1-byte CP, 2-byte CP and 3-byte CP +- const char16_t in_literal[] = u"bш\uAAAA"; +- const char exp[] = "bш\uAAAA"; +- CharT in[array_size (in_literal)] = {}; +- copy (begin (in_literal), end (in_literal), begin (in)); +- +- static_assert (array_size (in_literal) == 4, ""); +- static_assert (array_size (exp) == 7, ""); +- static_assert (array_size (in) == 4, ""); +- VERIFY (char_traits::length (in_literal) == 3); +- VERIFY (char_traits::length (exp) == 6); +- VERIFY (char_traits::length (in) == 3); +- +- const test_offsets_partial offsets[] = { ++ const char16_t input[] = u"b\u0448\uAAAA"; ++ const unsigned char expected[] = "b\u0448\uAAAA"; ++ static_assert (array_size (input) == 4, ""); ++ static_assert (array_size (expected) == 7, ""); ++ ++ InternT in[array_size (input)]; ++ ExternT exp[array_size (expected)]; ++ copy (begin (input), end (input), begin (in)); ++ copy (begin (expected), end (expected), begin (exp)); ++ VERIFY (char_traits::length (in) == 3); ++ VERIFY (char_traits::length (exp) == 6); ++ ++ test_offsets_partial offsets[] = { + {1, 0, 0, 0}, // no space for first CP + + {2, 1, 1, 1}, // no space for second CP +@@ -1142,14 +1373,14 @@ ucs2_to_utf8_out_partial (const std::codecvt &cvt) + }; + for (auto t : offsets) + { +- char out[array_size (exp) - 1] = {}; ++ ExternT out[array_size (exp) - 1] = {}; + VERIFY (t.in_size <= array_size (in)); + VERIFY (t.out_size <= array_size (out)); + VERIFY (t.expected_in_next <= t.in_size); + VERIFY (t.expected_out_next <= t.out_size); + auto state = mbstate_t{}; +- auto in_next = (const CharT *) nullptr; +- auto out_next = (char *) nullptr; ++ auto in_next = (const InternT *) nullptr; ++ auto out_next = (ExternT *) nullptr; + auto res = codecvt_base::result (); + + res = cvt.out (state, in, in + t.in_size, in_next, out, out + t.out_size, +@@ -1157,43 +1388,45 @@ ucs2_to_utf8_out_partial (const std::codecvt &cvt) + VERIFY (res == cvt.partial); + VERIFY (in_next == in + t.expected_in_next); + VERIFY (out_next == out + t.expected_out_next); +- VERIFY (char_traits::compare (out, exp, t.expected_out_next) == 0); ++ VERIFY (char_traits::compare (out, exp, t.expected_out_next) ++ == 0); + if (t.expected_out_next < array_size (out)) + VERIFY (out[t.expected_out_next] == 0); + } + } + +-template ++template + void +-ucs2_to_utf8_out_error (const std::codecvt &cvt) ++ucs2_to_utf8_out_error (const std::codecvt &cvt) + { + using namespace std; +- const char16_t valid_in[] = u"bш\uAAAA\U0010AAAA"; +- const char exp[] = "bш\uAAAA\U0010AAAA"; +- +- static_assert (array_size (valid_in) == 6, ""); +- static_assert (array_size (exp) == 11, ""); +- VERIFY (char_traits::length (valid_in) == 5); +- VERIFY (char_traits::length (exp) == 10); +- +- test_offsets_error offsets[] = { +- {5, 10, 0, 0, 0xD800, 0}, +- {5, 10, 0, 0, 0xDBFF, 0}, +- {5, 10, 0, 0, 0xDC00, 0}, +- {5, 10, 0, 0, 0xDFFF, 0}, +- +- {5, 10, 1, 1, 0xD800, 1}, +- {5, 10, 1, 1, 0xDBFF, 1}, +- {5, 10, 1, 1, 0xDC00, 1}, +- {5, 10, 1, 1, 0xDFFF, 1}, +- +- {5, 10, 2, 3, 0xD800, 2}, +- {5, 10, 2, 3, 0xDBFF, 2}, +- {5, 10, 2, 3, 0xDC00, 2}, +- {5, 10, 2, 3, 0xDFFF, 2}, +- +- // dont replace anything, just show the surrogate pair +- {5, 10, 3, 6, u'b', 0}, ++ const char16_t input[] = u"b\u0448\uAAAA\U0010AAAA"; ++ const unsigned char expected[] = "b\u0448\uAAAA\U0010AAAA"; ++ static_assert (array_size (input) == 6, ""); ++ static_assert (array_size (expected) == 11, ""); ++ ++ InternT in[array_size (input)]; ++ ExternT exp[array_size (expected)]; ++ copy (begin (input), end (input), begin (in)); ++ copy (begin (expected), end (expected), begin (exp)); ++ VERIFY (char_traits::length (in) == 5); ++ VERIFY (char_traits::length (exp) == 10); ++ ++ test_offsets_error offsets[] = { ++ {3, 6, 0, 0, 0xD800, 0}, ++ {3, 6, 0, 0, 0xDBFF, 0}, ++ {3, 6, 0, 0, 0xDC00, 0}, ++ {3, 6, 0, 0, 0xDFFF, 0}, ++ ++ {3, 6, 1, 1, 0xD800, 1}, ++ {3, 6, 1, 1, 0xDBFF, 1}, ++ {3, 6, 1, 1, 0xDC00, 1}, ++ {3, 6, 1, 1, 0xDFFF, 1}, ++ ++ {3, 6, 2, 3, 0xD800, 2}, ++ {3, 6, 2, 3, 0xDBFF, 2}, ++ {3, 6, 2, 3, 0xDC00, 2}, ++ {3, 6, 2, 3, 0xDFFF, 2}, + + // make the leading surrogate a trailing one + {5, 10, 3, 6, 0xDC00, 3}, +@@ -1206,6 +1439,9 @@ ucs2_to_utf8_out_error (const std::codecvt &cvt) + // make the trailing surrogate a BMP char + {5, 10, 3, 6, u'z', 4}, + ++ // don't replace anything in the test cases bellow, just show the surrogate ++ // pair (fourth CP) fully or partially ++ {5, 10, 3, 6, u'b', 0}, + {5, 7, 3, 6, u'b', 0}, // no space for fourth CP + {5, 8, 3, 6, u'b', 0}, // no space for fourth CP + {5, 9, 3, 6, u'b', 0}, // no space for fourth CP +@@ -1214,23 +1450,21 @@ ucs2_to_utf8_out_error (const std::codecvt &cvt) + {4, 7, 3, 6, u'b', 0}, // incomplete fourth CP, and no space for it + {4, 8, 3, 6, u'b', 0}, // incomplete fourth CP, and no space for it + {4, 9, 3, 6, u'b', 0}, // incomplete fourth CP, and no space for it +- + }; + + for (auto t : offsets) + { +- CharT in[array_size (valid_in)] = {}; +- char out[array_size (exp) - 1] = {}; ++ ExternT out[array_size (exp) - 1] = {}; + VERIFY (t.in_size <= array_size (in)); + VERIFY (t.out_size <= array_size (out)); + VERIFY (t.expected_in_next <= t.in_size); + VERIFY (t.expected_out_next <= t.out_size); +- copy (begin (valid_in), end (valid_in), begin (in)); ++ auto old_char = in[t.replace_pos]; + in[t.replace_pos] = t.replace_char; + + auto state = mbstate_t{}; +- auto in_next = (const CharT *) nullptr; +- auto out_next = (char *) nullptr; ++ auto in_next = (const InternT *) nullptr; ++ auto out_next = (ExternT *) nullptr; + auto res = codecvt_base::result (); + + res = cvt.out (state, in, in + t.in_size, in_next, out, out + t.out_size, +@@ -1238,25 +1472,831 @@ ucs2_to_utf8_out_error (const std::codecvt &cvt) + VERIFY (res == cvt.error); + VERIFY (in_next == in + t.expected_in_next); + VERIFY (out_next == out + t.expected_out_next); +- VERIFY (char_traits::compare (out, exp, t.expected_out_next) == 0); ++ VERIFY (char_traits::compare (out, exp, t.expected_out_next) ++ == 0); + if (t.expected_out_next < array_size (out)) + VERIFY (out[t.expected_out_next] == 0); ++ ++ in[t.replace_pos] = old_char; + } + } + +-template ++template + void +-ucs2_to_utf8_out (const std::codecvt &cvt) ++ucs2_to_utf8_out (const std::codecvt &cvt) + { + ucs2_to_utf8_out_ok (cvt); + ucs2_to_utf8_out_partial (cvt); + ucs2_to_utf8_out_error (cvt); + } + +-template ++template + void +-test_utf8_ucs2_cvts (const std::codecvt &cvt) ++test_utf8_ucs2_cvt (const std::codecvt &cvt) + { + utf8_to_ucs2_in (cvt); + ucs2_to_utf8_out (cvt); + } ++ ++enum utf16_endianess ++{ ++ utf16_big_endian, ++ utf16_little_endian ++}; ++ ++template ++Iter2 ++utf16_to_bytes (Iter1 f, Iter1 l, Iter2 o, utf16_endianess e) ++{ ++ if (e == utf16_big_endian) ++ for (; f != l; ++f) ++ { ++ *o++ = (*f >> 8) & 0xFF; ++ *o++ = *f & 0xFF; ++ } ++ else ++ for (; f != l; ++f) ++ { ++ *o++ = *f & 0xFF; ++ *o++ = (*f >> 8) & 0xFF; ++ } ++ return o; ++} ++ ++template ++void ++utf16_to_utf32_in_ok (const std::codecvt &cvt, ++ utf16_endianess endianess) ++{ ++ using namespace std; ++ const char16_t input[] = u"b\u0448\uAAAA\U0010AAAA"; ++ const char32_t expected[] = U"b\u0448\uAAAA\U0010AAAA"; ++ static_assert (array_size (input) == 6, ""); ++ static_assert (array_size (expected) == 5, ""); ++ ++ char in[array_size (input) * 2]; ++ InternT exp[array_size (expected)]; ++ utf16_to_bytes (begin (input), end (input), begin (in), endianess); ++ copy (begin (expected), end (expected), begin (exp)); ++ ++ test_offsets_ok offsets[] = {{0, 0}, {2, 1}, {4, 2}, {6, 3}, {10, 4}}; ++ for (auto t : offsets) ++ { ++ InternT out[array_size (exp) - 1] = {}; ++ VERIFY (t.in_size <= array_size (in)); ++ VERIFY (t.out_size <= array_size (out)); ++ auto state = mbstate_t{}; ++ auto in_next = (const char *) nullptr; ++ auto out_next = (InternT *) nullptr; ++ auto res = codecvt_base::result (); ++ ++ res = cvt.in (state, in, in + t.in_size, in_next, out, out + t.out_size, ++ out_next); ++ VERIFY (res == cvt.ok); ++ VERIFY (in_next == in + t.in_size); ++ VERIFY (out_next == out + t.out_size); ++ VERIFY (char_traits::compare (out, exp, t.out_size) == 0); ++ if (t.out_size < array_size (out)) ++ VERIFY (out[t.out_size] == 0); ++ ++ state = {}; ++ auto len = cvt.length (state, in, in + t.in_size, t.out_size); ++ VERIFY (len >= 0); ++ VERIFY (static_cast (len) == t.in_size); ++ } ++ ++ for (auto t : offsets) ++ { ++ InternT out[array_size (exp)] = {}; ++ VERIFY (t.in_size <= array_size (in)); ++ VERIFY (t.out_size <= array_size (out)); ++ auto state = mbstate_t{}; ++ auto in_next = (const char *) nullptr; ++ auto out_next = (InternT *) nullptr; ++ auto res = codecvt_base::result (); ++ ++ res ++ = cvt.in (state, in, in + t.in_size, in_next, out, end (out), out_next); ++ VERIFY (res == cvt.ok); ++ VERIFY (in_next == in + t.in_size); ++ VERIFY (out_next == out + t.out_size); ++ VERIFY (char_traits::compare (out, exp, t.out_size) == 0); ++ if (t.out_size < array_size (out)) ++ VERIFY (out[t.out_size] == 0); ++ ++ state = {}; ++ auto len = cvt.length (state, in, in + t.in_size, array_size (out)); ++ VERIFY (len >= 0); ++ VERIFY (static_cast (len) == t.in_size); ++ } ++} ++ ++template ++void ++utf16_to_utf32_in_partial (const std::codecvt &cvt, ++ utf16_endianess endianess) ++{ ++ using namespace std; ++ const char16_t input[] = u"b\u0448\uAAAA\U0010AAAA"; ++ const char32_t expected[] = U"b\u0448\uAAAA\U0010AAAA"; ++ static_assert (array_size (input) == 6, ""); ++ static_assert (array_size (expected) == 5, ""); ++ ++ char in[array_size (input) * 2]; ++ InternT exp[array_size (expected)]; ++ utf16_to_bytes (begin (input), end (input), begin (in), endianess); ++ copy (begin (expected), end (expected), begin (exp)); ++ ++ test_offsets_partial offsets[] = { ++ {2, 0, 0, 0}, // no space for first CP ++ {1, 1, 0, 0}, // incomplete first CP ++ {1, 0, 0, 0}, // incomplete first CP, and no space for it ++ ++ {4, 1, 2, 1}, // no space for second CP ++ {3, 2, 2, 1}, // incomplete second CP ++ {3, 1, 2, 1}, // incomplete second CP, and no space for it ++ ++ {6, 2, 4, 2}, // no space for third CP ++ {5, 3, 4, 2}, // incomplete third CP ++ {5, 2, 4, 2}, // incomplete third CP, and no space for it ++ ++ {10, 3, 6, 3}, // no space for fourth CP ++ {7, 4, 6, 3}, // incomplete fourth CP ++ {8, 4, 6, 3}, // incomplete fourth CP ++ {9, 4, 6, 3}, // incomplete fourth CP ++ {7, 3, 6, 3}, // incomplete fourth CP, and no space for it ++ {8, 3, 6, 3}, // incomplete fourth CP, and no space for it ++ {9, 3, 6, 3}, // incomplete fourth CP, and no space for it ++ }; ++ ++ for (auto t : offsets) ++ { ++ InternT out[array_size (exp) - 1] = {}; ++ VERIFY (t.in_size <= array_size (in)); ++ VERIFY (t.out_size <= array_size (out)); ++ VERIFY (t.expected_in_next <= t.in_size); ++ VERIFY (t.expected_out_next <= t.out_size); ++ auto state = mbstate_t{}; ++ auto in_next = (const char *) nullptr; ++ auto out_next = (InternT *) nullptr; ++ auto res = codecvt_base::result (); ++ ++ res = cvt.in (state, in, in + t.in_size, in_next, out, out + t.out_size, ++ out_next); ++ VERIFY (res == cvt.partial); ++ VERIFY (in_next == in + t.expected_in_next); ++ VERIFY (out_next == out + t.expected_out_next); ++ VERIFY (char_traits::compare (out, exp, t.expected_out_next) ++ == 0); ++ if (t.expected_out_next < array_size (out)) ++ VERIFY (out[t.expected_out_next] == 0); ++ ++ state = {}; ++ auto len = cvt.length (state, in, in + t.in_size, t.out_size); ++ VERIFY (len >= 0); ++ VERIFY (static_cast (len) == t.expected_in_next); ++ } ++} ++ ++template ++void ++utf16_to_utf32_in_error (const std::codecvt &cvt, ++ utf16_endianess endianess) ++{ ++ using namespace std; ++ char16_t input[] = u"b\u0448\uAAAA\U0010AAAA"; ++ const char32_t expected[] = U"b\u0448\uAAAA\U0010AAAA"; ++ static_assert (array_size (input) == 6, ""); ++ static_assert (array_size (expected) == 5, ""); ++ ++ InternT exp[array_size (expected)]; ++ copy (begin (expected), end (expected), begin (exp)); ++ ++ // The only possible error in UTF-16 is unpaired surrogate code units. ++ // So we replace valid code points (scalar values) with lone surrogate CU. ++ test_offsets_error offsets[] = { ++ {10, 4, 0, 0, 0xD800, 0}, ++ {10, 4, 0, 0, 0xDBFF, 0}, ++ {10, 4, 0, 0, 0xDC00, 0}, ++ {10, 4, 0, 0, 0xDFFF, 0}, ++ ++ {10, 4, 2, 1, 0xD800, 1}, ++ {10, 4, 2, 1, 0xDBFF, 1}, ++ {10, 4, 2, 1, 0xDC00, 1}, ++ {10, 4, 2, 1, 0xDFFF, 1}, ++ ++ {10, 4, 4, 2, 0xD800, 2}, ++ {10, 4, 4, 2, 0xDBFF, 2}, ++ {10, 4, 4, 2, 0xDC00, 2}, ++ {10, 4, 4, 2, 0xDFFF, 2}, ++ ++ // make the leading surrogate a trailing one ++ {10, 4, 6, 3, 0xDC00, 3}, ++ {10, 4, 6, 3, 0xDFFF, 3}, ++ ++ // make the trailing surrogate a leading one ++ {10, 4, 6, 3, 0xD800, 4}, ++ {10, 4, 6, 3, 0xDBFF, 4}, ++ ++ // make the trailing surrogate a BMP char ++ {10, 4, 6, 3, u'z', 4}, ++ }; ++ ++ for (auto t : offsets) ++ { ++ char in[array_size (input) * 2]; ++ InternT out[array_size (exp) - 1] = {}; ++ VERIFY (t.in_size <= array_size (in)); ++ VERIFY (t.out_size <= array_size (out)); ++ VERIFY (t.expected_in_next <= t.in_size); ++ VERIFY (t.expected_out_next <= t.out_size); ++ auto old_char = input[t.replace_pos]; ++ input[t.replace_pos] = t.replace_char; // replace in input, not in in ++ utf16_to_bytes (begin (input), end (input), begin (in), endianess); ++ ++ auto state = mbstate_t{}; ++ auto in_next = (const char *) nullptr; ++ auto out_next = (InternT *) nullptr; ++ auto res = codecvt_base::result (); ++ ++ res = cvt.in (state, in, in + t.in_size, in_next, out, out + t.out_size, ++ out_next); ++ VERIFY (res == cvt.error); ++ VERIFY (in_next == in + t.expected_in_next); ++ VERIFY (out_next == out + t.expected_out_next); ++ VERIFY (char_traits::compare (out, exp, t.expected_out_next) ++ == 0); ++ if (t.expected_out_next < array_size (out)) ++ VERIFY (out[t.expected_out_next] == 0); ++ ++ state = {}; ++ auto len = cvt.length (state, in, in + t.in_size, t.out_size); ++ VERIFY (len >= 0); ++ VERIFY (static_cast (len) == t.expected_in_next); ++ ++ input[t.replace_pos] = old_char; ++ } ++} ++ ++template ++void ++utf32_to_utf16_out_ok (const std::codecvt &cvt, ++ utf16_endianess endianess) ++{ ++ using namespace std; ++ const char32_t input[] = U"b\u0448\uAAAA\U0010AAAA"; ++ const char16_t expected[] = u"b\u0448\uAAAA\U0010AAAA"; ++ static_assert (array_size (input) == 5, ""); ++ static_assert (array_size (expected) == 6, ""); ++ ++ InternT in[array_size (input)]; ++ char exp[array_size (expected) * 2]; ++ copy (begin (input), end (input), begin (in)); ++ utf16_to_bytes (begin (expected), end (expected), begin (exp), endianess); ++ ++ test_offsets_ok offsets[] = {{0, 0}, {1, 2}, {2, 4}, {3, 6}, {4, 10}}; ++ for (auto t : offsets) ++ { ++ char out[array_size (exp) - 2] = {}; ++ VERIFY (t.in_size <= array_size (in)); ++ VERIFY (t.out_size <= array_size (out)); ++ auto state = mbstate_t{}; ++ auto in_next = (const InternT *) nullptr; ++ auto out_next = (char *) nullptr; ++ auto res = codecvt_base::result (); ++ ++ res = cvt.out (state, in, in + t.in_size, in_next, out, out + t.out_size, ++ out_next); ++ VERIFY (res == cvt.ok); ++ VERIFY (in_next == in + t.in_size); ++ VERIFY (out_next == out + t.out_size); ++ VERIFY (char_traits::compare (out, exp, t.out_size) == 0); ++ if (t.out_size < array_size (out)) ++ VERIFY (out[t.out_size] == 0); ++ } ++} ++ ++template ++void ++utf32_to_utf16_out_partial (const std::codecvt &cvt, ++ utf16_endianess endianess) ++{ ++ using namespace std; ++ const char32_t input[] = U"b\u0448\uAAAA\U0010AAAA"; ++ const char16_t expected[] = u"b\u0448\uAAAA\U0010AAAA"; ++ static_assert (array_size (input) == 5, ""); ++ static_assert (array_size (expected) == 6, ""); ++ ++ InternT in[array_size (input)]; ++ char exp[array_size (expected) * 2]; ++ copy (begin (input), end (input), begin (in)); ++ utf16_to_bytes (begin (expected), end (expected), begin (exp), endianess); ++ ++ test_offsets_partial offsets[] = { ++ {1, 0, 0, 0}, // no space for first CP ++ {1, 1, 0, 0}, // no space for first CP ++ ++ {2, 2, 1, 2}, // no space for second CP ++ {2, 3, 1, 2}, // no space for second CP ++ ++ {3, 4, 2, 4}, // no space for third CP ++ {3, 5, 2, 4}, // no space for third CP ++ ++ {4, 6, 3, 6}, // no space for fourth CP ++ {4, 7, 3, 6}, // no space for fourth CP ++ {4, 8, 3, 6}, // no space for fourth CP ++ {4, 9, 3, 6}, // no space for fourth CP ++ }; ++ for (auto t : offsets) ++ { ++ char out[array_size (exp) - 2] = {}; ++ VERIFY (t.in_size <= array_size (in)); ++ VERIFY (t.out_size <= array_size (out)); ++ VERIFY (t.expected_in_next <= t.in_size); ++ VERIFY (t.expected_out_next <= t.out_size); ++ auto state = mbstate_t{}; ++ auto in_next = (const InternT *) nullptr; ++ auto out_next = (char *) nullptr; ++ auto res = codecvt_base::result (); ++ ++ res = cvt.out (state, in, in + t.in_size, in_next, out, out + t.out_size, ++ out_next); ++ VERIFY (res == cvt.partial); ++ VERIFY (in_next == in + t.expected_in_next); ++ VERIFY (out_next == out + t.expected_out_next); ++ VERIFY (char_traits::compare (out, exp, t.expected_out_next) == 0); ++ if (t.expected_out_next < array_size (out)) ++ VERIFY (out[t.expected_out_next] == 0); ++ } ++} ++ ++template ++void ++utf32_to_utf16_out_error (const std::codecvt &cvt, ++ utf16_endianess endianess) ++{ ++ using namespace std; ++ const char32_t input[] = U"b\u0448\uAAAA\U0010AAAA"; ++ const char16_t expected[] = u"b\u0448\uAAAA\U0010AAAA"; ++ static_assert (array_size (input) == 5, ""); ++ static_assert (array_size (expected) == 6, ""); ++ ++ InternT in[array_size (input)]; ++ char exp[array_size (expected) * 2]; ++ copy (begin (input), end (input), begin (in)); ++ utf16_to_bytes (begin (expected), end (expected), begin (exp), endianess); ++ ++ test_offsets_error offsets[] = { ++ ++ // Surrogate CP ++ {4, 10, 0, 0, 0xD800, 0}, ++ {4, 10, 1, 2, 0xDBFF, 1}, ++ {4, 10, 2, 4, 0xDC00, 2}, ++ {4, 10, 3, 6, 0xDFFF, 3}, ++ ++ // CP out of range ++ {4, 10, 0, 0, 0x00110000, 0}, ++ {4, 10, 1, 2, 0x00110000, 1}, ++ {4, 10, 2, 4, 0x00110000, 2}, ++ {4, 10, 3, 6, 0x00110000, 3}}; ++ ++ for (auto t : offsets) ++ { ++ char out[array_size (exp) - 2] = {}; ++ VERIFY (t.in_size <= array_size (in)); ++ VERIFY (t.out_size <= array_size (out)); ++ VERIFY (t.expected_in_next <= t.in_size); ++ VERIFY (t.expected_out_next <= t.out_size); ++ auto old_char = in[t.replace_pos]; ++ in[t.replace_pos] = t.replace_char; ++ ++ auto state = mbstate_t{}; ++ auto in_next = (const InternT *) nullptr; ++ auto out_next = (char *) nullptr; ++ auto res = codecvt_base::result (); ++ ++ res = cvt.out (state, in, in + t.in_size, in_next, out, out + t.out_size, ++ out_next); ++ VERIFY (res == cvt.error); ++ VERIFY (in_next == in + t.expected_in_next); ++ VERIFY (out_next == out + t.expected_out_next); ++ VERIFY (char_traits::compare (out, exp, t.expected_out_next) == 0); ++ if (t.expected_out_next < array_size (out)) ++ VERIFY (out[t.expected_out_next] == 0); ++ ++ in[t.replace_pos] = old_char; ++ } ++} ++ ++template ++void ++test_utf16_utf32_cvt (const std::codecvt &cvt, ++ utf16_endianess endianess) ++{ ++ utf16_to_utf32_in_ok (cvt, endianess); ++ utf16_to_utf32_in_partial (cvt, endianess); ++ utf16_to_utf32_in_error (cvt, endianess); ++ utf32_to_utf16_out_ok (cvt, endianess); ++ utf32_to_utf16_out_partial (cvt, endianess); ++ utf32_to_utf16_out_error (cvt, endianess); ++} ++ ++template ++void ++utf16_to_ucs2_in_ok (const std::codecvt &cvt, ++ utf16_endianess endianess) ++{ ++ using namespace std; ++ const char16_t input[] = u"b\u0448\uAAAA"; ++ const char16_t expected[] = u"b\u0448\uAAAA"; ++ static_assert (array_size (input) == 4, ""); ++ static_assert (array_size (expected) == 4, ""); ++ ++ char in[array_size (input) * 2]; ++ InternT exp[array_size (expected)]; ++ utf16_to_bytes (begin (input), end (input), begin (in), endianess); ++ copy (begin (expected), end (expected), begin (exp)); ++ ++ test_offsets_ok offsets[] = {{0, 0}, {2, 1}, {4, 2}, {6, 3}}; ++ for (auto t : offsets) ++ { ++ InternT out[array_size (exp) - 1] = {}; ++ VERIFY (t.in_size <= array_size (in)); ++ VERIFY (t.out_size <= array_size (out)); ++ auto state = mbstate_t{}; ++ auto in_next = (const char *) nullptr; ++ auto out_next = (InternT *) nullptr; ++ auto res = codecvt_base::result (); ++ ++ res = cvt.in (state, in, in + t.in_size, in_next, out, out + t.out_size, ++ out_next); ++ VERIFY (res == cvt.ok); ++ VERIFY (in_next == in + t.in_size); ++ VERIFY (out_next == out + t.out_size); ++ VERIFY (char_traits::compare (out, exp, t.out_size) == 0); ++ if (t.out_size < array_size (out)) ++ VERIFY (out[t.out_size] == 0); ++ ++ state = {}; ++ auto len = cvt.length (state, in, in + t.in_size, t.out_size); ++ VERIFY (len >= 0); ++ VERIFY (static_cast (len) == t.in_size); ++ } ++ ++ for (auto t : offsets) ++ { ++ InternT out[array_size (exp)] = {}; ++ VERIFY (t.in_size <= array_size (in)); ++ VERIFY (t.out_size <= array_size (out)); ++ auto state = mbstate_t{}; ++ auto in_next = (const char *) nullptr; ++ auto out_next = (InternT *) nullptr; ++ auto res = codecvt_base::result (); ++ ++ res ++ = cvt.in (state, in, in + t.in_size, in_next, out, end (out), out_next); ++ VERIFY (res == cvt.ok); ++ VERIFY (in_next == in + t.in_size); ++ VERIFY (out_next == out + t.out_size); ++ VERIFY (char_traits::compare (out, exp, t.out_size) == 0); ++ if (t.out_size < array_size (out)) ++ VERIFY (out[t.out_size] == 0); ++ ++ state = {}; ++ auto len = cvt.length (state, in, in + t.in_size, array_size (out)); ++ VERIFY (len >= 0); ++ VERIFY (static_cast (len) == t.in_size); ++ } ++} ++ ++template ++void ++utf16_to_ucs2_in_partial (const std::codecvt &cvt, ++ utf16_endianess endianess) ++{ ++ using namespace std; ++ const char16_t input[] = u"b\u0448\uAAAA"; ++ const char16_t expected[] = u"b\u0448\uAAAA"; ++ static_assert (array_size (input) == 4, ""); ++ static_assert (array_size (expected) == 4, ""); ++ ++ char in[array_size (input) * 2]; ++ InternT exp[array_size (expected)]; ++ utf16_to_bytes (begin (input), end (input), begin (in), endianess); ++ copy (begin (expected), end (expected), begin (exp)); ++ ++ test_offsets_partial offsets[] = { ++ {2, 0, 0, 0}, // no space for first CP ++ {1, 1, 0, 0}, // incomplete first CP ++ {1, 0, 0, 0}, // incomplete first CP, and no space for it ++ ++ {4, 1, 2, 1}, // no space for second CP ++ {3, 2, 2, 1}, // incomplete second CP ++ {3, 1, 2, 1}, // incomplete second CP, and no space for it ++ ++ {6, 2, 4, 2}, // no space for third CP ++ {5, 3, 4, 2}, // incomplete third CP ++ {5, 2, 4, 2}, // incomplete third CP, and no space for it ++ }; ++ ++ for (auto t : offsets) ++ { ++ InternT out[array_size (exp) - 1] = {}; ++ VERIFY (t.in_size <= array_size (in)); ++ VERIFY (t.out_size <= array_size (out)); ++ VERIFY (t.expected_in_next <= t.in_size); ++ VERIFY (t.expected_out_next <= t.out_size); ++ auto state = mbstate_t{}; ++ auto in_next = (const char *) nullptr; ++ auto out_next = (InternT *) nullptr; ++ auto res = codecvt_base::result (); ++ ++ res = cvt.in (state, in, in + t.in_size, in_next, out, out + t.out_size, ++ out_next); ++ VERIFY (res == cvt.partial); ++ VERIFY (in_next == in + t.expected_in_next); ++ VERIFY (out_next == out + t.expected_out_next); ++ VERIFY (char_traits::compare (out, exp, t.expected_out_next) ++ == 0); ++ if (t.expected_out_next < array_size (out)) ++ VERIFY (out[t.expected_out_next] == 0); ++ ++ state = {}; ++ auto len = cvt.length (state, in, in + t.in_size, t.out_size); ++ VERIFY (len >= 0); ++ VERIFY (static_cast (len) == t.expected_in_next); ++ } ++} ++ ++template ++void ++utf16_to_ucs2_in_error (const std::codecvt &cvt, ++ utf16_endianess endianess) ++{ ++ using namespace std; ++ char16_t input[] = u"b\u0448\uAAAA\U0010AAAA"; ++ const char16_t expected[] = u"b\u0448\uAAAA\U0010AAAA"; ++ static_assert (array_size (input) == 6, ""); ++ static_assert (array_size (expected) == 6, ""); ++ ++ InternT exp[array_size (expected)]; ++ copy (begin (expected), end (expected), begin (exp)); ++ ++ // The only possible error in UTF-16 is unpaired surrogate code units. ++ // Additionally, because the target encoding is UCS-2, a proper pair of ++ // surrogates is also error. Simply, any surrogate CU is error. ++ test_offsets_error offsets[] = { ++ {6, 3, 0, 0, 0xD800, 0}, ++ {6, 3, 0, 0, 0xDBFF, 0}, ++ {6, 3, 0, 0, 0xDC00, 0}, ++ {6, 3, 0, 0, 0xDFFF, 0}, ++ ++ {6, 3, 2, 1, 0xD800, 1}, ++ {6, 3, 2, 1, 0xDBFF, 1}, ++ {6, 3, 2, 1, 0xDC00, 1}, ++ {6, 3, 2, 1, 0xDFFF, 1}, ++ ++ {6, 3, 4, 2, 0xD800, 2}, ++ {6, 3, 4, 2, 0xDBFF, 2}, ++ {6, 3, 4, 2, 0xDC00, 2}, ++ {6, 3, 4, 2, 0xDFFF, 2}, ++ ++ // make the leading surrogate a trailing one ++ {10, 5, 6, 3, 0xDC00, 3}, ++ {10, 5, 6, 3, 0xDFFF, 3}, ++ ++ // make the trailing surrogate a leading one ++ {10, 5, 6, 3, 0xD800, 4}, ++ {10, 5, 6, 3, 0xDBFF, 4}, ++ ++ // make the trailing surrogate a BMP char ++ {10, 5, 6, 3, u'z', 4}, ++ ++ // don't replace anything in the test cases bellow, just show the surrogate ++ // pair (fourth CP) fully or partially (just the first surrogate) ++ {10, 5, 6, 3, u'b', 0}, ++ {8, 5, 6, 3, u'b', 0}, ++ {9, 5, 6, 3, u'b', 0}, ++ ++ {10, 4, 6, 3, u'b', 0}, ++ {8, 4, 6, 3, u'b', 0}, ++ {9, 4, 6, 3, u'b', 0}, ++ }; ++ ++ for (auto t : offsets) ++ { ++ char in[array_size (input) * 2]; ++ InternT out[array_size (exp) - 1] = {}; ++ VERIFY (t.in_size <= array_size (in)); ++ VERIFY (t.out_size <= array_size (out)); ++ VERIFY (t.expected_in_next <= t.in_size); ++ VERIFY (t.expected_out_next <= t.out_size); ++ auto old_char = input[t.replace_pos]; ++ input[t.replace_pos] = t.replace_char; // replace in input, not in in ++ utf16_to_bytes (begin (input), end (input), begin (in), endianess); ++ ++ auto state = mbstate_t{}; ++ auto in_next = (const char *) nullptr; ++ auto out_next = (InternT *) nullptr; ++ auto res = codecvt_base::result (); ++ ++ res = cvt.in (state, in, in + t.in_size, in_next, out, out + t.out_size, ++ out_next); ++ VERIFY (res == cvt.error); ++ VERIFY (in_next == in + t.expected_in_next); ++ VERIFY (out_next == out + t.expected_out_next); ++ VERIFY (char_traits::compare (out, exp, t.expected_out_next) ++ == 0); ++ if (t.expected_out_next < array_size (out)) ++ VERIFY (out[t.expected_out_next] == 0); ++ ++ state = {}; ++ auto len = cvt.length (state, in, in + t.in_size, t.out_size); ++ VERIFY (len >= 0); ++ VERIFY (static_cast (len) == t.expected_in_next); ++ ++ input[t.replace_pos] = old_char; ++ } ++} ++ ++template ++void ++ucs2_to_utf16_out_ok (const std::codecvt &cvt, ++ utf16_endianess endianess) ++{ ++ using namespace std; ++ const char16_t input[] = u"b\u0448\uAAAA"; ++ const char16_t expected[] = u"b\u0448\uAAAA"; ++ static_assert (array_size (input) == 4, ""); ++ static_assert (array_size (expected) == 4, ""); ++ ++ InternT in[array_size (input)]; ++ char exp[array_size (expected) * 2]; ++ copy (begin (input), end (input), begin (in)); ++ utf16_to_bytes (begin (expected), end (expected), begin (exp), endianess); ++ ++ test_offsets_ok offsets[] = {{0, 0}, {1, 2}, {2, 4}, {3, 6}}; ++ for (auto t : offsets) ++ { ++ char out[array_size (exp) - 2] = {}; ++ VERIFY (t.in_size <= array_size (in)); ++ VERIFY (t.out_size <= array_size (out)); ++ auto state = mbstate_t{}; ++ auto in_next = (const InternT *) nullptr; ++ auto out_next = (char *) nullptr; ++ auto res = codecvt_base::result (); ++ ++ res = cvt.out (state, in, in + t.in_size, in_next, out, out + t.out_size, ++ out_next); ++ VERIFY (res == cvt.ok); ++ VERIFY (in_next == in + t.in_size); ++ VERIFY (out_next == out + t.out_size); ++ VERIFY (char_traits::compare (out, exp, t.out_size) == 0); ++ if (t.out_size < array_size (out)) ++ VERIFY (out[t.out_size] == 0); ++ } ++} ++ ++template ++void ++ucs2_to_utf16_out_partial (const std::codecvt &cvt, ++ utf16_endianess endianess) ++{ ++ using namespace std; ++ const char16_t input[] = u"b\u0448\uAAAA"; ++ const char16_t expected[] = u"b\u0448\uAAAA"; ++ static_assert (array_size (input) == 4, ""); ++ static_assert (array_size (expected) == 4, ""); ++ ++ InternT in[array_size (input)]; ++ char exp[array_size (expected) * 2]; ++ copy (begin (input), end (input), begin (in)); ++ utf16_to_bytes (begin (expected), end (expected), begin (exp), endianess); ++ ++ test_offsets_partial offsets[] = { ++ {1, 0, 0, 0}, // no space for first CP ++ {1, 1, 0, 0}, // no space for first CP ++ ++ {2, 2, 1, 2}, // no space for second CP ++ {2, 3, 1, 2}, // no space for second CP ++ ++ {3, 4, 2, 4}, // no space for third CP ++ {3, 5, 2, 4}, // no space for third CP ++ }; ++ for (auto t : offsets) ++ { ++ char out[array_size (exp) - 2] = {}; ++ VERIFY (t.in_size <= array_size (in)); ++ VERIFY (t.out_size <= array_size (out)); ++ VERIFY (t.expected_in_next <= t.in_size); ++ VERIFY (t.expected_out_next <= t.out_size); ++ auto state = mbstate_t{}; ++ auto in_next = (const InternT *) nullptr; ++ auto out_next = (char *) nullptr; ++ auto res = codecvt_base::result (); ++ ++ res = cvt.out (state, in, in + t.in_size, in_next, out, out + t.out_size, ++ out_next); ++ VERIFY (res == cvt.partial); ++ VERIFY (in_next == in + t.expected_in_next); ++ VERIFY (out_next == out + t.expected_out_next); ++ VERIFY (char_traits::compare (out, exp, t.expected_out_next) == 0); ++ if (t.expected_out_next < array_size (out)) ++ VERIFY (out[t.expected_out_next] == 0); ++ } ++} ++ ++template ++void ++ucs2_to_utf16_out_error (const std::codecvt &cvt, ++ utf16_endianess endianess) ++{ ++ using namespace std; ++ const char16_t input[] = u"b\u0448\uAAAA\U0010AAAA"; ++ const char16_t expected[] = u"b\u0448\uAAAA\U0010AAAA"; ++ static_assert (array_size (input) == 6, ""); ++ static_assert (array_size (expected) == 6, ""); ++ ++ InternT in[array_size (input)]; ++ char exp[array_size (expected) * 2]; ++ copy (begin (input), end (input), begin (in)); ++ utf16_to_bytes (begin (expected), end (expected), begin (exp), endianess); ++ ++ test_offsets_error offsets[] = { ++ {3, 6, 0, 0, 0xD800, 0}, ++ {3, 6, 0, 0, 0xDBFF, 0}, ++ {3, 6, 0, 0, 0xDC00, 0}, ++ {3, 6, 0, 0, 0xDFFF, 0}, ++ ++ {3, 6, 1, 2, 0xD800, 1}, ++ {3, 6, 1, 2, 0xDBFF, 1}, ++ {3, 6, 1, 2, 0xDC00, 1}, ++ {3, 6, 1, 2, 0xDFFF, 1}, ++ ++ {3, 6, 2, 4, 0xD800, 2}, ++ {3, 6, 2, 4, 0xDBFF, 2}, ++ {3, 6, 2, 4, 0xDC00, 2}, ++ {3, 6, 2, 4, 0xDFFF, 2}, ++ ++ // make the leading surrogate a trailing one ++ {5, 10, 3, 6, 0xDC00, 3}, ++ {5, 10, 3, 6, 0xDFFF, 3}, ++ ++ // make the trailing surrogate a leading one ++ {5, 10, 3, 6, 0xD800, 4}, ++ {5, 10, 3, 6, 0xDBFF, 4}, ++ ++ // make the trailing surrogate a BMP char ++ {5, 10, 3, 6, u'z', 4}, ++ ++ // don't replace anything in the test cases bellow, just show the surrogate ++ // pair (fourth CP) fully or partially (just the first surrogate) ++ {5, 10, 3, 6, u'b', 0}, ++ {5, 8, 3, 6, u'b', 0}, ++ {5, 9, 3, 6, u'b', 0}, ++ ++ {4, 10, 3, 6, u'b', 0}, ++ {4, 8, 3, 6, u'b', 0}, ++ {4, 9, 3, 6, u'b', 0}, ++ }; ++ ++ for (auto t : offsets) ++ { ++ char out[array_size (exp) - 2] = {}; ++ VERIFY (t.in_size <= array_size (in)); ++ VERIFY (t.out_size <= array_size (out)); ++ VERIFY (t.expected_in_next <= t.in_size); ++ VERIFY (t.expected_out_next <= t.out_size); ++ auto old_char = in[t.replace_pos]; ++ in[t.replace_pos] = t.replace_char; ++ ++ auto state = mbstate_t{}; ++ auto in_next = (const InternT *) nullptr; ++ auto out_next = (char *) nullptr; ++ auto res = codecvt_base::result (); ++ ++ res = cvt.out (state, in, in + t.in_size, in_next, out, out + t.out_size, ++ out_next); ++ VERIFY (res == cvt.error); ++ VERIFY (in_next == in + t.expected_in_next); ++ VERIFY (out_next == out + t.expected_out_next); ++ VERIFY (char_traits::compare (out, exp, t.expected_out_next) == 0); ++ if (t.expected_out_next < array_size (out)) ++ VERIFY (out[t.expected_out_next] == 0); ++ ++ in[t.replace_pos] = old_char; ++ } ++} ++ ++template ++void ++test_utf16_ucs2_cvt (const std::codecvt &cvt, ++ utf16_endianess endianess) ++{ ++ utf16_to_ucs2_in_ok (cvt, endianess); ++ utf16_to_ucs2_in_partial (cvt, endianess); ++ utf16_to_ucs2_in_error (cvt, endianess); ++ ucs2_to_utf16_out_ok (cvt, endianess); ++ ucs2_to_utf16_out_partial (cvt, endianess); ++ ucs2_to_utf16_out_error (cvt, endianess); ++} +new file mode 100644 +--- /dev/null ++++ b/src/libstdc++-v3/testsuite/22_locale/codecvt/codecvt_unicode_char8_t.cc +@@ -0,0 +1,53 @@ ++// Copyright (C) 2020-2023 Free Software Foundation, Inc. ++// ++// This file is part of the GNU ISO C++ Library. This library is free ++// software; you can redistribute it and/or modify it under the ++// terms of the GNU General Public License as published by the ++// Free Software Foundation; either version 3, or (at your option) ++// any later version. ++ ++// This library is distributed in the hope that it will be useful, ++// but WITHOUT ANY WARRANTY; without even the implied warranty of ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++// GNU General Public License for more details. ++ ++// You should have received a copy of the GNU General Public License along ++// with this library; see the file COPYING3. If not see ++// . ++ ++// { dg-do run { target c++11 } } ++// { dg-require-cstdint "" } ++// { dg-options "-fchar8_t" } ++ ++#include "codecvt_unicode.h" ++ ++using namespace std; ++ ++void ++test_utf8_utf32_codecvts () ++{ ++ using codecvt_c32_c8 = codecvt; ++ auto &loc_c = locale::classic (); ++ VERIFY (has_facet (loc_c)); ++ ++ auto &cvt = use_facet (loc_c); ++ test_utf8_utf32_cvt (cvt); ++} ++ ++void ++test_utf8_utf16_codecvts () ++{ ++ using codecvt_c16_c8 = codecvt; ++ auto &loc_c = locale::classic (); ++ VERIFY (has_facet (loc_c)); ++ ++ auto &cvt = use_facet (loc_c); ++ test_utf8_utf16_cvt (cvt); ++} ++ ++int ++main () ++{ ++ test_utf8_utf32_codecvts (); ++ test_utf8_utf16_codecvts (); ++} +--- a/src/libstdc++-v3/testsuite/22_locale/codecvt/codecvt_unicode_wchar_t.cc ++++ b/src/libstdc++-v3/testsuite/22_locale/codecvt/codecvt_unicode_wchar_t.cc +@@ -28,7 +28,7 @@ test_utf8_utf32_codecvts () + { + #if __SIZEOF_WCHAR_T__ == 4 + codecvt_utf8 cvt; +- test_utf8_utf32_codecvts (cvt); ++ test_utf8_utf32_cvt (cvt); + #endif + } + +@@ -37,7 +37,7 @@ test_utf8_utf16_codecvts () + { + #if __SIZEOF_WCHAR_T__ >= 2 + codecvt_utf8_utf16 cvt; +- test_utf8_utf16_cvts (cvt); ++ test_utf8_utf16_cvt (cvt); + #endif + } + +@@ -46,7 +46,31 @@ test_utf8_ucs2_codecvts () + { + #if __SIZEOF_WCHAR_T__ == 2 + codecvt_utf8 cvt; +- test_utf8_ucs2_cvts (cvt); ++ test_utf8_ucs2_cvt (cvt); ++#endif ++} ++ ++void ++test_utf16_utf32_codecvts () ++{ ++#if __SIZEOF_WCHAR_T__ == 4 ++ codecvt_utf16 cvt3; ++ test_utf16_utf32_cvt (cvt3, utf16_big_endian); ++ ++ codecvt_utf16 cvt4; ++ test_utf16_utf32_cvt (cvt4, utf16_little_endian); ++#endif ++} ++ ++void ++test_utf16_ucs2_codecvts () ++{ ++#if __SIZEOF_WCHAR_T__ == 2 ++ codecvt_utf16 cvt3; ++ test_utf16_ucs2_cvt (cvt3, utf16_big_endian); ++ ++ codecvt_utf16 cvt4; ++ test_utf16_ucs2_cvt (cvt4, utf16_little_endian); + #endif + } + +@@ -56,4 +80,6 @@ main () + test_utf8_utf32_codecvts (); + test_utf8_utf16_codecvts (); + test_utf8_ucs2_codecvts (); ++ test_utf16_utf32_codecvts (); ++ test_utf16_ucs2_codecvts (); + } +--- a/src/libstdc++-v3/testsuite/22_locale/codecvt/codecvt_utf16/79980.cc ++++ b/src/libstdc++-v3/testsuite/22_locale/codecvt/codecvt_utf16/79980.cc +@@ -83,7 +83,7 @@ test06() + const char src[] = "\0\x61\xAB\xCD"; + Conv conv("to_bytes failed", u"from_bytes failed"); + std::u16string result = conv.from_bytes(src, src+3); // incomplete character +- VERIFY( result == u"from_bytes failed" ); ++ VERIFY( result == u"\u0061" ); + VERIFY( conv.converted() == 2 ); + } + +new file mode 100644 +--- /dev/null ++++ b/src/libstdc++-v3/testsuite/23_containers/array/creation/115522.cc +@@ -0,0 +1,33 @@ ++// { dg-do compile { target c++20 } } ++ ++// PR libstdc++/115522 std::to_array no longer works for struct which is ++// trivial but not default constructible ++ ++#include ++ ++void ++test_deleted_ctor() ++{ ++ struct S ++ { ++ S() = delete; ++ S(int) { } ++ }; ++ ++ S arr[1] = {{1}}; ++ auto arr1 = std::to_array(arr); ++ auto arr2 = std::to_array(std::move(arr)); ++} ++ ++void ++test_deleted_assignment() ++{ ++ struct S ++ { ++ void operator=(const S&) = delete; ++ }; ++ ++ S arr[1] = {}; ++ auto a1 = std::to_array(arr); ++ auto a2 = std::to_array(std::move(arr)); ++} +new file mode 100644 +--- /dev/null ++++ b/src/libstdc++-v3/testsuite/29_atomics/headers/stdatomic.h/115807.cc +@@ -0,0 +1,14 @@ ++// { dg-do compile { target c++23 } } ++#include ++namespace other { ++ namespace std { ++ int atomic = 0; ++ } ++ _Atomic(long) a{}; ++} ++ ++#include ++ ++namespace non::std { ++ static_assert( ::std::is_same_v<_Atomic(int), ::std::atomic> ); ++} +new file mode 100644 +--- /dev/null ++++ b/src/libstdc++-v3/testsuite/experimental/simd/pr114958.cc +@@ -0,0 +1,20 @@ ++// { dg-options "-std=c++17" } ++// { dg-do compile { target x86_64-*-* } } ++// { dg-require-effective-target c++17 } ++// { dg-additional-options "-march=x86-64-v3" { target x86_64-*-* } } ++// { dg-require-cmath "" } ++// { dg-final { scan-assembler-times "vperm(?:q|pd)\\s+\\\$144" 1 } } ++ ++#include ++ ++namespace stdx = std::experimental; ++ ++using T = std::uint64_t; ++using V = stdx::simd>; ++using V1 = stdx::simd; ++ ++V perm(V data) ++{ ++ auto [carry, _] = stdx::split<3, 1>(data); ++ return concat(V1(), carry); ++} +new file mode 100644 +--- /dev/null ++++ b/src/libstdc++-v3/testsuite/experimental/simd/pr115454_find_last_set.cc +@@ -0,0 +1,50 @@ ++// { dg-options "-std=gnu++17" } ++// { dg-require-effective-target c++17 } ++// { dg-additional-options "-march=x86-64-v4" { target avx512f_runtime } } ++// { dg-require-cmath "" } ++ ++#include ++ ++namespace stdx = std::experimental; ++ ++using T = std::uint64_t; ++ ++template ++using V = stdx::simd>; ++ ++[[gnu::noinline, gnu::noipa]] ++int reduce(V x) ++{ ++ static_assert(stdx::find_last_set(V([](unsigned i) { return i; }) != V(0)) == 3); ++ return stdx::find_last_set(x != -1); ++} ++ ++[[gnu::noinline, gnu::noipa]] ++int reduce2() ++{ ++ using M8 = typename V::mask_type; ++ using M4 = typename V::mask_type; ++ if constexpr (sizeof(M8) == sizeof(M4) ++ && !std::is_same_v>) ++ // fixed_size invariant: padding bits of masks are zero, the memcpy would violate that ++ { ++ M4 k; ++ __builtin_memcpy(&__data(k), &__data(M8(true)), sizeof(M4)); ++ return stdx::find_last_set(k); ++ } ++ return 3; ++} ++ ++ ++int main() ++{ ++ const V x {}; ++ ++ const int r = reduce(x); ++ if (r != 3) ++ __builtin_abort(); ++ ++ const int r2 = reduce2(); ++ if (r2 != 3) ++ __builtin_abort(); ++} diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/gm2-bootstrap-compare.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/gm2-bootstrap-compare.diff new file mode 100644 index 0000000000..5edd82d5d3 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/gm2-bootstrap-compare.diff @@ -0,0 +1,12 @@ +# DP: ignore gm2version.o stage diff on some archtectures (m68k, riscv64) + +--- a/src/configure.ac ++++ b/src/configure.ac +@@ -3678,6 +3678,7 @@ AC_SUBST(stage2_werror_flag) + compare_exclusions="gcc/cc*-checksum\$(objext) | gcc/ada/*tools/*" + compare_exclusions="$compare_exclusions | gcc/m2/gm2-compiler-boot/M2Version*" + compare_exclusions="$compare_exclusions | gcc/m2/gm2-compiler-boot/SYSTEM*" ++compare_exclusions="$compare_exclusions | *m2/gm2version\$(objext)" + case "$target" in + hppa*64*-*-hpux*) ;; + hppa*-*-hpux*) compare_exclusions="$compare_exclusions | */libgcc/lib2funcs* | gcc/function-tests.o" ;; diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/gm2-texinfo.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/gm2-texinfo.diff new file mode 100644 index 0000000000..b7c1505e98 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/gm2-texinfo.diff @@ -0,0 +1,30 @@ +# DP: gm2.texi: Define our own gcctabopt macro, needed for dfsg builds. + +--- a/src/gcc/doc/gm2.texi ++++ b/src/gcc/doc/gm2.texi +@@ -51,6 +51,25 @@ man page gfdl(7). + @versionsubtitle + @author Gaius Mulley + ++@macro gcctabopt{body} ++@code{\body\} ++@end macro ++@macro gccoptlist{body} ++@smallexample ++\body\ ++@end smallexample ++@end macro ++@c Makeinfo handles the above macro OK, TeX needs manual line breaks; ++@c they get lost at some point in handling the macro. But if @macro is ++@c used here rather than @alias, it produces double line breaks. ++@iftex ++@alias gol = * ++@end iftex ++@ifnottex ++@macro gol ++@end macro ++@end ifnottex ++ + @page + @vskip 0pt plus 1filll + Published by the Free Software Foundation @* diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/go-testsuite.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/go-testsuite.diff new file mode 100644 index 0000000000..b424eb5b1f --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/go-testsuite.diff @@ -0,0 +1,19 @@ +# DP: Skip Go testcase on AArch64 which hangs on the buildds. + +--- a/src/gcc/testsuite/go.test/go-test.exp ++++ b/src/gcc/testsuite/go.test/go-test.exp +@@ -460,6 +460,14 @@ proc go-gc-tests { } { + continue + } + ++ # Hangs on the buildds ++ if { [istarget "aarch64*-*-*"] } { ++ if { [file tail $test] == "pprof.go" } { ++ untested $test ++ continue ++ } ++ } ++ + if { [file tail $test] == "init1.go" } { + # This tests whether GC runs during init, which for gccgo + # it currently does not. diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/hppa64-libgcov-fallback.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/hppa64-libgcov-fallback.diff new file mode 100644 index 0000000000..58e4410e1b --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/hppa64-libgcov-fallback.diff @@ -0,0 +1,15 @@ +--- a/src/libgcc/libgcov.h ++++ b/src/libgcc/libgcov.h +@@ -45,6 +45,12 @@ + #include "libgcc_tm.h" + #include "gcov.h" + ++/* hppa64-linux-gnu does not have this header, use the fallback. */ ++#if defined(__LP64__) && defined(_PA_RISC2_0) ++#undef HAVE_SYS_MMAN_H ++#define HAVE_SYS_MMAN_H 0 ++#endif ++ + #if HAVE_SYS_MMAN_H + #include + #endif diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/hurd-amd64.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/hurd-amd64.diff new file mode 100644 index 0000000000..624f3c0436 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/hurd-amd64.diff @@ -0,0 +1,116 @@ +commit 5707e9db9c398d311defc80c5b7822c9a07ead60 +Author: Samuel Thibault +Date: Sat May 6 13:50:36 2023 +0200 + + hurd: Add multilib paths for gnu-x86_64 + + We need the multilib paths in gcc to find e.g. glibc crt files on + Debian. This is essentially based on t-linux64 version. + + gcc/ChangeLog: + + * config/i386/t-gnu64: New file. + * config.gcc [x86_64-*-gnu*]: Add i386/t-gnu64 to + tmake_file. + +commit c768917402d4cba69a92c737e56e177f5b8ab0df +Author: Samuel Thibault +Date: Sat May 6 13:55:44 2023 +0200 + + hurd: Ad default-pie and static-pie support + + This fixes the Hurd spec in the default-pie case, and adds static-pie + support. + + gcc/ChangeLog: + + * config/i386/gnu.h: Use PIE_SPEC, add static-pie case. + * config/i386/gnu64.h: Use PIE_SPEC, add static-pie case. + +--- a/src/gcc/config.gcc ++++ b/src/gcc/config.gcc +@@ -5828,6 +5828,9 @@ case ${target} in + visium-*-*) + target_cpu_default2="TARGET_CPU_$with_cpu" + ;; ++ x86_64-*-gnu*) ++ tmake_file="$tmake_file i386/t-gnu64" ++ ;; + esac + + t= +--- /dev/null ++++ b/src/gcc/config/i386/t-gnu64 +@@ -0,0 +1,38 @@ ++# Copyright (C) 2002-2023 Free Software Foundation, Inc. ++# ++# This file is part of GCC. ++# ++# GCC is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 3, or (at your option) ++# any later version. ++# ++# GCC is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with GCC; see the file COPYING3. If not see ++# . ++ ++# On Debian, Ubuntu and other derivative distributions, the 32bit libraries ++# are found in /lib32 and /usr/lib32, /lib64 and /usr/lib64 are symlinks to ++# /lib and /usr/lib, while other distributions install libraries into /lib64 ++# and /usr/lib64. The LSB does not enforce the use of /lib64 and /usr/lib64, ++# it doesn't tell anything about the 32bit libraries on those systems. Set ++# MULTILIB_OSDIRNAMES according to what is found on the target. ++ ++# To support i386, x86-64 and x32 libraries, the directory structrue ++# should be: ++# ++# /lib has i386 libraries. ++# /lib64 has x86-64 libraries. ++# /libx32 has x32 libraries. ++# ++comma=, ++MULTILIB_OPTIONS = $(subst $(comma),/,$(TM_MULTILIB_CONFIG)) ++MULTILIB_DIRNAMES = $(patsubst m%, %, $(subst /, ,$(MULTILIB_OPTIONS))) ++MULTILIB_OSDIRNAMES = m64=../lib64$(call if_multiarch,:x86_64-gnu) ++MULTILIB_OSDIRNAMES+= m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:i386-gnu) ++MULTILIB_OSDIRNAMES+= mx32=../libx32$(call if_multiarch,:x86_64-gnux32) +--- a/src/gcc/config/i386/gnu.h ++++ b/src/gcc/config/i386/gnu.h +@@ -27,12 +27,12 @@ along with GCC. If not, see . symlink, and having a +# DP: /usr directory like the other ports. So this patch should NOT go +# DP: upstream. + +--- + config.gcc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/src/gcc/config.gcc ++++ b/src/gcc/config.gcc +@@ -583,7 +583,7 @@ + *-*-linux* | frv-*-*linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu | *-*-kopensolaris*-gnu) + :;; + *-*-gnu*) +- native_system_header_dir=/include ++ # native_system_header_dir=/include + ;; + esac + # glibc / uclibc / bionic switch. diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/hurd-multiarch.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/hurd-multiarch.diff new file mode 100644 index 0000000000..d814c6eee2 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/hurd-multiarch.diff @@ -0,0 +1,16 @@ +--- a/src/gcc/config/i386/t-gnu64 2023-05-06 22:43:39.395795420 +0200 ++++ b/src/gcc/config/i386/t-gnu64 2023-05-06 22:43:39.395795420 +0200 +@@ -36,3 +36,13 @@ + MULTILIB_OSDIRNAMES = m64=../lib64$(call if_multiarch,:x86_64-gnu) + MULTILIB_OSDIRNAMES+= m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:i386-gnu) + MULTILIB_OSDIRNAMES+= mx32=../libx32$(call if_multiarch,:x86_64-gnux32) ++ ++ifneq (,$(findstring x86_64,$(target))) ++ ifneq (,$(findstring biarchx32.h,$(tm_include_list))) ++ MULTIARCH_DIRNAME = $(call if_multiarch,x86_64-gnux32) ++ else ++ MULTIARCH_DIRNAME = $(call if_multiarch,x86_64-gnu) ++ endif ++else ++ MULTIARCH_DIRNAME = $(call if_multiarch,i386-gnu) ++endif diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/hurd-multilib-multiarch.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/hurd-multilib-multiarch.diff new file mode 100644 index 0000000000..6975ce8f36 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/hurd-multilib-multiarch.diff @@ -0,0 +1,23 @@ +--- a/src/gcc/config/i386/t-gnu64 2023-05-06 22:43:39.395795420 +0200 ++++ b/src/gcc/config/i386/t-gnu64 2023-05-06 22:43:39.395795420 +0200 +@@ -33,9 +33,19 @@ + comma=, + MULTILIB_OPTIONS = $(subst $(comma),/,$(TM_MULTILIB_CONFIG)) + MULTILIB_DIRNAMES = $(patsubst m%, %, $(subst /, ,$(MULTILIB_OPTIONS))) ++ifneq (,$(findstring gnux32,$(target))) + MULTILIB_OSDIRNAMES = m64=../lib64$(call if_multiarch,:x86_64-gnu) +-MULTILIB_OSDIRNAMES+= m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:i386-gnu) ++MULTILIB_OSDIRNAMES+= m32=../lib32$(call if_multiarch,:i386-gnu) ++MULTILIB_OSDIRNAMES+= mx32=../lib$(call if_multiarch,:x86_64-gnux32) ++else ifneq (,$(findstring x86_64,$(target))) ++MULTILIB_OSDIRNAMES = m64=../lib$(call if_multiarch,:x86_64-gnu) ++MULTILIB_OSDIRNAMES+= m32=../lib32$(call if_multiarch,:i386-gnu) + MULTILIB_OSDIRNAMES+= mx32=../libx32$(call if_multiarch,:x86_64-gnux32) ++else ++MULTILIB_OSDIRNAMES = m64=../lib64$(call if_multiarch,:x86_64-gnu) ++MULTILIB_OSDIRNAMES+= m32=../lib$(call if_multiarch,:i386-gnu) ++MULTILIB_OSDIRNAMES+= mx32=../libx32$(call if_multiarch,:x86_64-gnux32) ++endif + + ifneq (,$(findstring x86_64,$(target))) + ifneq (,$(findstring biarchx32.h,$(tm_include_list))) diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/ia64-disable-selective-scheduling.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/ia64-disable-selective-scheduling.diff new file mode 100644 index 0000000000..24ee7b3fd9 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/ia64-disable-selective-scheduling.diff @@ -0,0 +1,16 @@ +--- a/src/gcc/config/ia64/ia64.cc ++++ b/src/gcc/config/ia64/ia64.cc +@@ -6120,13 +6120,6 @@ ia64_option_override (void) + static void + ia64_override_options_after_change (void) + { +- if (optimize >= 3 +- && !OPTION_SET_P (flag_selective_scheduling) +- && !OPTION_SET_P (flag_selective_scheduling2)) +- { +- flag_selective_scheduling2 = 1; +- flag_sel_sched_pipelining = 1; +- } + if (mflag_sched_control_spec == 2) + { + /* Control speculation is on by default for the selective scheduler, diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/ignore-pie-specs-when-not-enabled.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/ignore-pie-specs-when-not-enabled.diff new file mode 100644 index 0000000000..8f5cc097cf --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/ignore-pie-specs-when-not-enabled.diff @@ -0,0 +1,56 @@ +# DP: Ignore dpkg's pie specs when pie is not enabled. + +Index: b/src/gcc/gcc.c +=================================================================== +--- a/src/gcc/gcc.c ++++ b/src/gcc/gcc.c +@@ -3715,6 +3715,36 @@ handle_foffload_option (const char *arg) + } + } + ++static bool ignore_pie_specs_when_not_enabled(const char *envvar, ++ const char *specname) ++{ ++ const char *envval = secure_getenv(envvar); ++ char *hardening; ++ bool ignore; ++ ++ if (strstr (specname, "/pie-compile.specs") == NULL ++ && strstr (specname, "/pie-link.specs") == NULL) ++ return false; ++ if (envval == NULL || strstr (envval, "hardening=") == NULL) ++ return true; ++ ignore = true; ++ hardening = (char *) xmalloc (strlen(envval) + 1); ++ strcpy (hardening, strstr (envval, "hardening=")); ++ if (strchr (hardening, ' ')) ++ *strchr (hardening, ' ') = '\0'; ++ if (strstr(hardening, "+all")) ++ { ++ if (strstr(hardening, "-pie") == NULL) ++ ignore = false; ++ } ++ else if (strstr(hardening, "+pie")) ++ { ++ ignore = false; ++ } ++ free (hardening); ++ return ignore; ++} ++ + /* Handle a driver option; arguments and return value as for + handle_option. */ + +@@ -3989,6 +4019,12 @@ driver_handle_option (struct gcc_options + break; + + case OPT_specs_: ++ if (ignore_pie_specs_when_not_enabled("DEB_BUILD_MAINT_OPTIONS", arg) ++ && ignore_pie_specs_when_not_enabled("DEB_BUILD_OPTIONS", arg)) ++ { ++ inform (0, "pie specs %s ignored when pie is not enabled", arg); ++ return true; ++ } + { + struct user_specs *user = XNEW (struct user_specs); + diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/kfreebsd-decimal-float.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/kfreebsd-decimal-float.diff new file mode 100644 index 0000000000..8149103a35 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/kfreebsd-decimal-float.diff @@ -0,0 +1,32 @@ +# DP: Enable decimal float support on kfreebsd-amd64 + +--- a/src/gcc/configure.ac ++++ b/src/gcc/configure.ac +@@ -927,6 +927,7 @@ AC_ARG_ENABLE(__cxa_atexit, + [], []) + + # Enable C extension for decimal float if target supports it. ++# touch the file, adding decimal support for kfreebsd-amd64 in config/dfp.m4 + GCC_AC_ENABLE_DECIMAL_FLOAT([$target]) + + dfp=`if test $enable_decimal_float != no; then echo 1; else echo 0; fi` +--- a/src/libdecnumber/configure.ac ++++ b/src/libdecnumber/configure.ac +@@ -77,6 +77,7 @@ AC_CANONICAL_TARGET + + # Default decimal format + # If you change the defaults here, be sure to change them in the GCC directory also ++# touch the file, adding decimal support for kfreebsd-amd64 in config/dfp.m4 + AC_MSG_CHECKING([for decimal floating point]) + + GCC_AC_ENABLE_DECIMAL_FLOAT([$target]) +--- a/src/libgcc/configure.ac ++++ b/src/libgcc/configure.ac +@@ -235,6 +235,7 @@ AC_CHECK_HEADERS(inttypes.h stdint.h std + AC_HEADER_STDC + + # Check for decimal float support. ++# touch the file, adding decimal support for kfreebsd-amd64 in config/dfp.m4 + AC_CACHE_CHECK([whether decimal floating point is supported], [libgcc_cv_dfp], + [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ + #include diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/libasan-sparc.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/libasan-sparc.diff new file mode 100644 index 0000000000..4b52ac21ea --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/libasan-sparc.diff @@ -0,0 +1,163 @@ +# DP: Re-apply sanitizer patch for sparc, dropped upstream + +# don't remove, this is regularly overwritten, see PR sanitizer/63958. + +libsanitizer/ + +2014-10-14 David S. Miller + + * sanitizer_common/sanitizer_platform_limits_linux.cc (time_t): + Define at __kernel_time_t, as needed for sparc. + (struct __old_kernel_stat): Don't check if __sparc__ is defined. + * libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h + (__sanitizer): Define struct___old_kernel_stat_sz, + struct_kernel_stat_sz, and struct_kernel_stat64_sz for sparc. + (__sanitizer_ipc_perm): Adjust for sparc targets. + (__sanitizer_shmid_ds): Likewsie. + (__sanitizer_sigaction): Likewsie. + (IOC_SIZE): Likewsie. + +Index: libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h +=================================================================== +--- a/src/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h (revision 216223) ++++ a/src/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h (revision 216224) +@@ -72,6 +72,14 @@ + const unsigned struct_kernel_stat_sz = 144; + #endif + const unsigned struct_kernel_stat64_sz = 104; ++#elif defined(__sparc__) && defined(__arch64__) ++ const unsigned struct___old_kernel_stat_sz = 0; ++ const unsigned struct_kernel_stat_sz = 104; ++ const unsigned struct_kernel_stat64_sz = 144; ++#elif defined(__sparc__) && !defined(__arch64__) ++ const unsigned struct___old_kernel_stat_sz = 0; ++ const unsigned struct_kernel_stat_sz = 64; ++ const unsigned struct_kernel_stat64_sz = 104; + #endif + struct __sanitizer_perf_event_attr { + unsigned type; +@@ -94,7 +102,7 @@ + + #if defined(__powerpc64__) + const unsigned struct___old_kernel_stat_sz = 0; +-#else ++#elif !defined(__sparc__) + const unsigned struct___old_kernel_stat_sz = 32; + #endif + +@@ -173,6 +181,18 @@ + unsigned short __pad1; + unsigned long __unused1; + unsigned long __unused2; ++#elif defined(__sparc__) ++# if defined(__arch64__) ++ unsigned mode; ++ unsigned short __pad1; ++# else ++ unsigned short __pad1; ++ unsigned short mode; ++ unsigned short __pad2; ++# endif ++ unsigned short __seq; ++ unsigned long long __unused1; ++ unsigned long long __unused2; + #else + unsigned short mode; + unsigned short __pad1; +@@ -190,6 +210,26 @@ + + struct __sanitizer_shmid_ds { + __sanitizer_ipc_perm shm_perm; ++ #if defined(__sparc__) ++ # if !defined(__arch64__) ++ u32 __pad1; ++ # endif ++ long shm_atime; ++ # if !defined(__arch64__) ++ u32 __pad2; ++ # endif ++ long shm_dtime; ++ # if !defined(__arch64__) ++ u32 __pad3; ++ # endif ++ long shm_ctime; ++ uptr shm_segsz; ++ int shm_cpid; ++ int shm_lpid; ++ unsigned long shm_nattch; ++ unsigned long __glibc_reserved1; ++ unsigned long __glibc_reserved2; ++ #else + #ifndef __powerpc__ + uptr shm_segsz; + #elif !defined(__powerpc64__) +@@ -227,6 +267,7 @@ + uptr __unused4; + uptr __unused5; + #endif ++#endif + }; + #elif SANITIZER_FREEBSD + struct __sanitizer_ipc_perm { +@@ -523,9 +564,13 @@ + #else + __sanitizer_sigset_t sa_mask; + #ifndef __mips__ ++#if defined(__sparc__) ++ unsigned long sa_flags; ++#else + int sa_flags; + #endif + #endif ++#endif + #if SANITIZER_LINUX + void (*sa_restorer)(); + #endif +@@ -745,7 +790,7 @@ + + #define IOC_NRBITS 8 + #define IOC_TYPEBITS 8 +-#if defined(__powerpc__) || defined(__powerpc64__) || defined(__mips__) ++#if defined(__powerpc__) || defined(__powerpc64__) || defined(__mips__) || defined(__sparc__) + #define IOC_SIZEBITS 13 + #define IOC_DIRBITS 3 + #define IOC_NONE 1U +@@ -775,7 +820,17 @@ + #define IOC_DIR(nr) (((nr) >> IOC_DIRSHIFT) & IOC_DIRMASK) + #define IOC_TYPE(nr) (((nr) >> IOC_TYPESHIFT) & IOC_TYPEMASK) + #define IOC_NR(nr) (((nr) >> IOC_NRSHIFT) & IOC_NRMASK) ++ ++#if defined(__sparc__) ++// In sparc the 14 bits SIZE field overlaps with the ++// least significant bit of DIR, so either IOC_READ or ++// IOC_WRITE shall be 1 in order to get a non-zero SIZE. ++# define IOC_SIZE(nr) \ ++ ((((((nr) >> 29) & 0x7) & (4U|2U)) == 0)? \ ++ 0 : (((nr) >> 16) & 0x3fff)) ++#else + #define IOC_SIZE(nr) (((nr) >> IOC_SIZESHIFT) & IOC_SIZEMASK) ++#endif + + extern unsigned struct_arpreq_sz; + extern unsigned struct_ifreq_sz; +Index: libsanitizer/sanitizer_common/sanitizer_platform_limits_linux.cc +=================================================================== +--- a/src/libsanitizer/sanitizer_common/sanitizer_platform_limits_linux.cc (revision 216223) ++++ a/src/libsanitizer/sanitizer_common/sanitizer_platform_limits_linux.cc (revision 216224) +@@ -36,6 +36,7 @@ + #define uid_t __kernel_uid_t + #define gid_t __kernel_gid_t + #define off_t __kernel_off_t ++#define time_t __kernel_time_t + // This header seems to contain the definitions of _kernel_ stat* structs. + #include + #undef ino_t +@@ -60,7 +61,7 @@ + } // namespace __sanitizer + + #if !defined(__powerpc64__) && !defined(__x86_64__) && !defined(__aarch64__)\ +- && !defined(__mips__) ++ && !defined(__mips__) && !defined(__sparc__) + COMPILER_CHECK(struct___old_kernel_stat_sz == sizeof(struct __old_kernel_stat)); + #endif + diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/libffi-race-condition.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/libffi-race-condition.diff new file mode 100644 index 0000000000..4e18c82077 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/libffi-race-condition.diff @@ -0,0 +1,33 @@ +From 48d2e46528fb6e621d95a7fa194069fd136b712d Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Stefan=20B=C3=BChler?= +Date: Wed, 7 Sep 2016 15:49:48 +0200 +Subject: [PATCH 1/2] dlmmap_locked always needs locking as it always modifies + execsize + +--- + src/closures.c | 13 ++++--------- + 1 file changed, 4 insertions(+), 9 deletions(-) + +--- a/src/libffi/src/closures.c ++++ b/src/libffi/src/closures.c +@@ -897,16 +897,11 @@ dlmmap (void *start, size_t length, int + MREMAP_DUP and prot at this point. */ + } + +- if (execsize == 0 || execfd == -1) +- { +- pthread_mutex_lock (&open_temp_exec_file_mutex); +- ptr = dlmmap_locked (start, length, prot, flags, offset); +- pthread_mutex_unlock (&open_temp_exec_file_mutex); ++ pthread_mutex_lock (&open_temp_exec_file_mutex); ++ ptr = dlmmap_locked (start, length, prot, flags, offset); ++ pthread_mutex_unlock (&open_temp_exec_file_mutex); + +- return ptr; +- } +- +- return dlmmap_locked (start, length, prot, flags, offset); ++ return ptr; + } + + /* Release memory at the given address, as well as the corresponding diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/libffi-ro-eh_frame_sect.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/libffi-ro-eh_frame_sect.diff new file mode 100644 index 0000000000..1674eb8531 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/libffi-ro-eh_frame_sect.diff @@ -0,0 +1,13 @@ +# DP: PR libffi/47248, force a read only eh frame section. + +--- a/src/libffi/configure.ac ++++ b/src/libffi/configure.ac +@@ -294,6 +294,8 @@ if test "x$GCC" = "xyes"; then + libffi_cv_hidden_visibility_attribute=yes + fi + fi ++ # FIXME: see PR libffi/47248 ++ libffi_cv_ro_eh_frame=yes + rm -f conftest.* + ]) + if test $libffi_cv_hidden_visibility_attribute = yes; then diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/libgo-cleanfiles.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/libgo-cleanfiles.diff new file mode 100644 index 0000000000..57fcf8653d --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/libgo-cleanfiles.diff @@ -0,0 +1,26 @@ +--- a/src/libgo/Makefile.am ++++ b/src/libgo/Makefile.am +@@ -1364,7 +1364,9 @@ mostlyclean-local: + find . -name '*-testsum' -print | xargs rm -f + find . -name '*-testlog' -print | xargs rm -f + +-CLEANFILES = *.go *.c s-* libgo.sum libgo.log runtime.inc ++CLEANFILES = *.go *.c s-* libgo.sum libgo.log runtime.inc \ ++ *.dep */*.dep */*/*.dep */*/*/*.dep */*/*.dep */*/*/*/*.dep \ ++ */*/*/*/*/*.dep + + clean-local: + find . -name '*.la' -print | xargs $(LIBTOOL) --mode=clean rm -f +--- a/src/libgo/Makefile.in ++++ b/src/libgo/Makefile.in +@@ -1205,7 +1205,9 @@ MOSTLYCLEANFILES = \ + libcalls-list \ + runtime.inc runtime.inc.tmp2 runtime.inc.tmp3 runtime.inc.raw + +-CLEANFILES = *.go *.c s-* libgo.sum libgo.log runtime.inc ++CLEANFILES = *.go *.c s-* libgo.sum libgo.log runtime.inc \ ++ *.dep */*.dep */*/*.dep */*/*/*.dep */*/*.dep */*/*/*/*.dep \ ++ */*/*/*/*/*.dep + MULTISRCTOP = + MULTIBUILDTOP = + MULTIDIRS = diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/libgo-hurd-hack.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/libgo-hurd-hack.diff new file mode 100644 index 0000000000..c25f8c1dd1 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/libgo-hurd-hack.diff @@ -0,0 +1,22 @@ +# FIXME: #1005297, PR 104660 + +--- a/src/Makefile.in ++++ b/src/Makefile.in +@@ -67372,6 +67372,8 @@ all-flex: maybe-all-build-texinfo + all-m4: maybe-all-build-texinfo + configure-target-libgo: maybe-configure-target-libffi + all-target-libgo: maybe-all-target-libffi ++all-target-libgo: maybe-all-target-libbacktrace ++all-target-libgo: maybe-all-target-libatomic + configure-target-libphobos: maybe-configure-target-libbacktrace + configure-stage1-target-libphobos: maybe-configure-stage1-target-libbacktrace + configure-stage2-target-libphobos: maybe-configure-stage2-target-libbacktrace +@@ -67539,8 +67541,6 @@ all-m4: maybe-all-intl + configure-target-fastjar: maybe-configure-target-zlib + all-target-fastjar: maybe-all-target-zlib + configure-target-libgo: maybe-all-target-libstdc++-v3 +-all-target-libgo: maybe-all-target-libbacktrace +-all-target-libgo: maybe-all-target-libatomic + configure-target-libgm2: maybe-all-target-libstdc++-v3 + all-target-libgm2: maybe-all-target-libatomic + configure-target-liboffloadmic: maybe-configure-target-libgomp diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/libgo-revert-timeout-exp.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/libgo-revert-timeout-exp.diff new file mode 100644 index 0000000000..af0b838ff7 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/libgo-revert-timeout-exp.diff @@ -0,0 +1,10 @@ +--- a/src/libgo/testsuite/lib/libgo.exp ++++ b/src/libgo/testsuite/lib/libgo.exp +@@ -49,7 +49,6 @@ load_gcc_lib wrapper.exp + load_gcc_lib target-supports.exp + load_gcc_lib target-utils.exp + load_gcc_lib gcc-defs.exp +-load_gcc_lib timeout.exp + load_gcc_lib go.exp + + proc libgo_init { args } { diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/libgo-setcontext-config.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/libgo-setcontext-config.diff new file mode 100644 index 0000000000..e6a35957c2 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/libgo-setcontext-config.diff @@ -0,0 +1,19 @@ +# DP: libgo: Overwrite the setcontext_clobbers_tls check on mips* + +--- a/src/libgo/configure.ac ++++ b/src/libgo/configure.ac +@@ -793,6 +793,14 @@ main () + CFLAGS="$CFLAGS_hold" + LIBS="$LIBS_hold" + ]) ++dnl overwrite for the mips* 64bit multilibs, fails on some buildds ++if test "$libgo_cv_lib_setcontext_clobbers_tls" = "yes"; then ++ case "$target" in ++ mips*-linux-*) ++ AC_MSG_WARN([FIXME: overwrite setcontext_clobbers_tls for $target:$ptr_type_size]) ++ libgo_cv_lib_setcontext_clobbers_tls=no ;; ++ esac ++fi + if test "$libgo_cv_lib_setcontext_clobbers_tls" = "yes"; then + AC_DEFINE(SETCONTEXT_CLOBBERS_TLS, 1, + [Define if setcontext clobbers TLS variables]) diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/libgo-testsuite.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/libgo-testsuite.diff new file mode 100644 index 0000000000..c5f81a2875 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/libgo-testsuite.diff @@ -0,0 +1,66 @@ +# DP: Only run the libgo testsuite for flags configured in RUNTESTFLAGS + +--- a/src/libgo/Makefile.am ++++ b/src/libgo/Makefile.am +@@ -922,7 +922,7 @@ BUILDGOX = \ + $(SHELL) $(srcdir)/mvifdiff.sh $@.tmp `echo $@ | sed -e 's/s-gox/gox/'` + + GOTESTFLAGS = +-GOBENCH = ++GOBENCH = + + # Check a package. + CHECK = \ +@@ -943,6 +943,12 @@ CHECK = \ + $(MKDIR_P) $(@D); \ + rm -f $@-testsum $@-testlog; \ + files=`$(SHELL) $(srcdir)/match.sh --goarch=$(GOARCH) --goos=$(GOOS) --srcdir=$(srcdir)/go/$(@D) --extrafiles="$(extra_go_files_$(subst .,_,$(subst /,_,$(@D))))" $(matchargs_$(subst /,_,$(@D)))`; \ ++ run_check=yes; \ ++ MULTILIBDIR="$(MULTILIBDIR)"; \ ++ case "$$MULTILIBDIR" in /64|/x32) \ ++ echo "$$RUNTESTFLAGS" | grep -q "$${MULTILIBDIR\#/*}" || run_check=; \ ++ esac; \ ++ if test "$$run_check" = "yes"; then \ + if test "$(USE_DEJAGNU)" = "yes"; then \ + $(SHELL) $(srcdir)/testsuite/gotest --goarch=$(GOARCH) --goos=$(GOOS) --dejagnu=yes --basedir=$(srcdir) --srcdir=$(srcdir)/go/$(@D) --pkgpath="$(@D)" --pkgfiles="$$files" --testname="$(@D)" $(GOTESTFLAGS); \ + elif test "$(GOBENCH)" != ""; then \ +@@ -958,6 +964,7 @@ CHECK = \ + echo "FAIL: $(@D)" > $@-testsum; \ + exit 1; \ + fi; \ ++ fi; \ + fi + + # Build all packages before checking any. +--- a/src/libgo/Makefile.in ++++ b/src/libgo/Makefile.in +@@ -1043,7 +1043,7 @@ BUILDGOX = \ + $(SHELL) $(srcdir)/mvifdiff.sh $@.tmp `echo $@ | sed -e 's/s-gox/gox/'` + + GOTESTFLAGS = +-GOBENCH = ++GOBENCH = + + # Check a package. + CHECK = \ +@@ -1064,6 +1064,12 @@ CHECK = \ + $(MKDIR_P) $(@D); \ + rm -f $@-testsum $@-testlog; \ + files=`$(SHELL) $(srcdir)/match.sh --goarch=$(GOARCH) --goos=$(GOOS) --srcdir=$(srcdir)/go/$(@D) --extrafiles="$(extra_go_files_$(subst .,_,$(subst /,_,$(@D))))" $(matchargs_$(subst /,_,$(@D)))`; \ ++ run_check=yes; \ ++ MULTILIBDIR="$(MULTILIBDIR)"; \ ++ case "$$MULTILIBDIR" in /64|/x32) \ ++ echo "$$RUNTESTFLAGS" | grep -q "$${MULTILIBDIR\#/*}" || run_check=; \ ++ esac; \ ++ if test "$$run_check" = "yes"; then \ + if test "$(USE_DEJAGNU)" = "yes"; then \ + $(SHELL) $(srcdir)/testsuite/gotest --goarch=$(GOARCH) --goos=$(GOOS) --dejagnu=yes --basedir=$(srcdir) --srcdir=$(srcdir)/go/$(@D) --pkgpath="$(@D)" --pkgfiles="$$files" --testname="$(@D)" $(GOTESTFLAGS); \ + elif test "$(GOBENCH)" != ""; then \ +@@ -1079,6 +1085,7 @@ CHECK = \ + echo "FAIL: $(@D)" > $@-testsum; \ + exit 1; \ + fi; \ ++ fi; \ + fi + + diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/libgomp-kfreebsd-testsuite.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/libgomp-kfreebsd-testsuite.diff new file mode 100644 index 0000000000..9471ca12b9 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/libgomp-kfreebsd-testsuite.diff @@ -0,0 +1,14 @@ +# DP: Disable lock-2.c test on kfreebsd-* + +--- a/src/libgomp/testsuite/libgomp.c/lock-2.c ++++ b/src/libgomp/testsuite/libgomp.c/lock-2.c +@@ -4,6 +4,9 @@ + int + main (void) + { ++#ifdef __FreeBSD_kernel__ ++ return 1; ++#endif + int l = 0; + omp_nest_lock_t lock; + omp_init_nest_lock (&lock); diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/libgomp-omp_h-multilib.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/libgomp-omp_h-multilib.diff new file mode 100644 index 0000000000..7f2cfa2093 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/libgomp-omp_h-multilib.diff @@ -0,0 +1,32 @@ +# DP: Fix up omp.h for multilibs. + +2008-06-09 Jakub Jelinek + + * omp.h.in (omp_nest_lock_t): Fix up for Linux multilibs. + +2015-03-25 Matthias Klose + + * omp.h.in (omp_nest_lock_t): Limit the fix Linux. + +--- a/src/libgomp/omp.h.in ++++ b/src/libgomp/omp.h.in +@@ -52,8 +52,19 @@ typedef struct + + typedef struct + { ++ /* ++ Derive OMP_NEST_LOCK_SIZE and OMP_NEST_LOCK_ALIGN, don't hard ++ code the values because the header is used for all multilibs. ++ OMP_NEST_LOCK_SIZE = @OMP_NEST_LOCK_SIZE@ ++ OMP_NEST_LOCK_ALIGN = @OMP_NEST_LOCK_ALIGN@ ++ */ ++#if defined(__linux__) && !(defined(__hppa__) || defined(__alpha__)) ++ unsigned char _x[8 + sizeof (void *)] ++ __attribute__((__aligned__(sizeof (void *)))); ++#else + unsigned char _x[@OMP_NEST_LOCK_SIZE@] + __attribute__((__aligned__(@OMP_NEST_LOCK_ALIGN@))); ++#endif + } omp_nest_lock_t; + #endif + diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/libiberty-sha1-1.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/libiberty-sha1-1.diff new file mode 100644 index 0000000000..dbdb710bfc --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/libiberty-sha1-1.diff @@ -0,0 +1,464 @@ +# DP: libiberty: Use x86 HW optimized sha1 + +--- a/src/include/sha1.h ++++ b/src/include/sha1.h +@@ -108,6 +108,13 @@ extern void sha1_process_block (const vo + extern void sha1_process_bytes (const void *buffer, size_t len, + struct sha1_ctx *ctx); + ++typedef void (*sha1_process_bytes_fn) (const void *, size_t, ++ struct sha1_ctx *); ++ ++/* Return sha1_process_bytes or some hardware optimized version thereof ++ depending on current CPU. */ ++extern sha1_process_bytes_fn sha1_choose_process_bytes (void); ++ + /* Process the remaining bytes in the buffer and put result from CTX + in first 20 bytes following RESBUF. The result is always in little + endian byte order, so that a byte-wise output yields to the wanted +--- a/src/libiberty/config.in ++++ b/src/libiberty/config.in +@@ -432,6 +432,9 @@ + /* Define to 1 if `vfork' works. */ + #undef HAVE_WORKING_VFORK + ++/* Define if you have x86 SHA1 HW acceleration support. */ ++#undef HAVE_X86_SHA1_HW_SUPPORT ++ + /* Define to 1 if you have the `_doprnt' function. */ + #undef HAVE__DOPRNT + +--- a/src/libiberty/configure ++++ b/src/libiberty/configure +@@ -7406,6 +7406,64 @@ case "${host}" in + esac + + ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SHA1 HW acceleration support" >&5 ++$as_echo_n "checking for SHA1 HW acceleration support... " >&6; } ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++ ++#include ++#include ++ ++__attribute__((__target__ ("sse4.1,sha"))) ++void foo (__m128i *buf, unsigned int e, __m128i msg0, __m128i msg1) ++{ ++ __m128i abcd = _mm_loadu_si128 ((const __m128i *) buf); ++ __m128i e0 = _mm_set_epi32 (e, 0, 0, 0); ++ abcd = _mm_shuffle_epi32 (abcd, 0x1b); ++ const __m128i shuf_mask = _mm_set_epi64x (0x0001020304050607ULL, 0x08090a0b0c0d0e0fULL); ++ abcd = _mm_shuffle_epi8 (abcd, shuf_mask); ++ e0 = _mm_sha1nexte_epu32 (e0, msg1); ++ abcd = _mm_sha1rnds4_epu32 (abcd, e0, 0); ++ msg0 = _mm_sha1msg1_epu32 (msg0, msg1); ++ msg0 = _mm_sha1msg2_epu32 (msg0, msg1); ++ msg0 = _mm_xor_si128 (msg0, msg1); ++ e0 = _mm_add_epi32 (e0, msg0); ++ e0 = abcd; ++ _mm_storeu_si128 (buf, abcd); ++ e = _mm_extract_epi32 (e0, 3); ++} ++ ++int bar (void) ++{ ++ unsigned int eax, ebx, ecx, edx; ++ if (__get_cpuid_count (7, 0, &eax, &ebx, &ecx, &edx) ++ && (ebx & bit_SHA) != 0 ++ && __get_cpuid (1, &eax, &ebx, &ecx, &edx) ++ && (ecx & bit_SSE4_1) != 0) ++ return 1; ++ return 0; ++} ++ ++int ++main () ++{ ++bar (); ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: x86 SHA1" >&5 ++$as_echo "x86 SHA1" >&6; } ++ ++$as_echo "#define HAVE_X86_SHA1_HW_SUPPORT 1" >>confdefs.h ++ ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ + + + +--- a/src/libiberty/configure.ac ++++ b/src/libiberty/configure.ac +@@ -728,6 +728,46 @@ case "${host}" in + esac + AC_SUBST(pexecute) + ++AC_MSG_CHECKING([for SHA1 HW acceleration support]) ++AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ ++#include ++#include ++ ++__attribute__((__target__ ("sse4.1,sha"))) ++void foo (__m128i *buf, unsigned int e, __m128i msg0, __m128i msg1) ++{ ++ __m128i abcd = _mm_loadu_si128 ((const __m128i *) buf); ++ __m128i e0 = _mm_set_epi32 (e, 0, 0, 0); ++ abcd = _mm_shuffle_epi32 (abcd, 0x1b); ++ const __m128i shuf_mask = _mm_set_epi64x (0x0001020304050607ULL, 0x08090a0b0c0d0e0fULL); ++ abcd = _mm_shuffle_epi8 (abcd, shuf_mask); ++ e0 = _mm_sha1nexte_epu32 (e0, msg1); ++ abcd = _mm_sha1rnds4_epu32 (abcd, e0, 0); ++ msg0 = _mm_sha1msg1_epu32 (msg0, msg1); ++ msg0 = _mm_sha1msg2_epu32 (msg0, msg1); ++ msg0 = _mm_xor_si128 (msg0, msg1); ++ e0 = _mm_add_epi32 (e0, msg0); ++ e0 = abcd; ++ _mm_storeu_si128 (buf, abcd); ++ e = _mm_extract_epi32 (e0, 3); ++} ++ ++int bar (void) ++{ ++ unsigned int eax, ebx, ecx, edx; ++ if (__get_cpuid_count (7, 0, &eax, &ebx, &ecx, &edx) ++ && (ebx & bit_SHA) != 0 ++ && __get_cpuid (1, &eax, &ebx, &ecx, &edx) ++ && (ecx & bit_SSE4_1) != 0) ++ return 1; ++ return 0; ++} ++]], [[bar ();]])], ++ [AC_MSG_RESULT([x86 SHA1]) ++ AC_DEFINE(HAVE_X86_SHA1_HW_SUPPORT, 1, ++ [Define if you have x86 SHA1 HW acceleration support.])], ++ [AC_MSG_RESULT([no])]) ++ + libiberty_AC_FUNC_STRNCMP + + # Install a library built with a cross compiler in $(tooldir) rather +--- a/src/libiberty/sha1.c ++++ b/src/libiberty/sha1.c +@@ -29,6 +29,11 @@ + #include + #include + ++#ifdef HAVE_X86_SHA1_HW_SUPPORT ++# include ++# include ++#endif ++ + #if USE_UNLOCKED_IO + # include "unlocked-io.h" + #endif +@@ -412,3 +417,303 @@ sha1_process_block (const void *buffer, + e = ctx->E += e; + } + } ++ ++#if defined(HAVE_X86_SHA1_HW_SUPPORT) ++/* HW specific version of sha1_process_bytes. */ ++ ++static void sha1_hw_process_block (const void *, size_t, struct sha1_ctx *); ++ ++static void ++sha1_hw_process_bytes (const void *buffer, size_t len, struct sha1_ctx *ctx) ++{ ++ /* When we already have some bits in our internal buffer concatenate ++ both inputs first. */ ++ if (ctx->buflen != 0) ++ { ++ size_t left_over = ctx->buflen; ++ size_t add = 128 - left_over > len ? len : 128 - left_over; ++ ++ memcpy (&((char *) ctx->buffer)[left_over], buffer, add); ++ ctx->buflen += add; ++ ++ if (ctx->buflen > 64) ++ { ++ sha1_hw_process_block (ctx->buffer, ctx->buflen & ~63, ctx); ++ ++ ctx->buflen &= 63; ++ /* The regions in the following copy operation cannot overlap. */ ++ memcpy (ctx->buffer, ++ &((char *) ctx->buffer)[(left_over + add) & ~63], ++ ctx->buflen); ++ } ++ ++ buffer = (const char *) buffer + add; ++ len -= add; ++ } ++ ++ /* Process available complete blocks. */ ++ if (len >= 64) ++ { ++#if !_STRING_ARCH_unaligned ++# define alignof(type) offsetof (struct { char c; type x; }, x) ++# define UNALIGNED_P(p) (((size_t) p) % alignof (sha1_uint32) != 0) ++ if (UNALIGNED_P (buffer)) ++ while (len > 64) ++ { ++ sha1_hw_process_block (memcpy (ctx->buffer, buffer, 64), 64, ctx); ++ buffer = (const char *) buffer + 64; ++ len -= 64; ++ } ++ else ++#endif ++ { ++ sha1_hw_process_block (buffer, len & ~63, ctx); ++ buffer = (const char *) buffer + (len & ~63); ++ len &= 63; ++ } ++ } ++ ++ /* Move remaining bytes in internal buffer. */ ++ if (len > 0) ++ { ++ size_t left_over = ctx->buflen; ++ ++ memcpy (&((char *) ctx->buffer)[left_over], buffer, len); ++ left_over += len; ++ if (left_over >= 64) ++ { ++ sha1_hw_process_block (ctx->buffer, 64, ctx); ++ left_over -= 64; ++ memmove (ctx->buffer, &ctx->buffer[16], left_over); ++ } ++ ctx->buflen = left_over; ++ } ++} ++ ++/* Process LEN bytes of BUFFER, accumulating context into CTX. ++ Using CPU specific intrinsics. */ ++ ++#ifdef HAVE_X86_SHA1_HW_SUPPORT ++__attribute__((__target__ ("sse4.1,sha"))) ++#endif ++static void ++sha1_hw_process_block (const void *buffer, size_t len, struct sha1_ctx *ctx) ++{ ++#ifdef HAVE_X86_SHA1_HW_SUPPORT ++ /* Implemented from ++ https://www.intel.com/content/www/us/en/developer/articles/technical/intel-sha-extensions.html */ ++ const __m128i *words = (const __m128i *) buffer; ++ const __m128i *endp = (const __m128i *) ((const char *) buffer + len); ++ __m128i abcd, abcd_save, e0, e0_save, e1, msg0, msg1, msg2, msg3; ++ const __m128i shuf_mask ++ = _mm_set_epi64x (0x0001020304050607ULL, 0x08090a0b0c0d0e0fULL); ++ char check[((offsetof (struct sha1_ctx, B) ++ == offsetof (struct sha1_ctx, A) + sizeof (ctx->A)) ++ && (offsetof (struct sha1_ctx, C) ++ == offsetof (struct sha1_ctx, A) + 2 * sizeof (ctx->A)) ++ && (offsetof (struct sha1_ctx, D) ++ == offsetof (struct sha1_ctx, A) + 3 * sizeof (ctx->A))) ++ ? 1 : -1]; ++ ++ /* First increment the byte count. RFC 1321 specifies the possible ++ length of the file up to 2^64 bits. Here we only compute the ++ number of bytes. Do a double word increment. */ ++ ctx->total[0] += len; ++ ctx->total[1] += ((len >> 31) >> 1) + (ctx->total[0] < len); ++ ++ (void) &check[0]; ++ abcd = _mm_loadu_si128 ((const __m128i *) &ctx->A); ++ e0 = _mm_set_epi32 (ctx->E, 0, 0, 0); ++ abcd = _mm_shuffle_epi32 (abcd, 0x1b); /* 0, 1, 2, 3 */ ++ ++ while (words < endp) ++ { ++ abcd_save = abcd; ++ e0_save = e0; ++ ++ /* 0..3 */ ++ msg0 = _mm_loadu_si128 (words); ++ msg0 = _mm_shuffle_epi8 (msg0, shuf_mask); ++ e0 = _mm_add_epi32 (e0, msg0); ++ e1 = abcd; ++ abcd = _mm_sha1rnds4_epu32 (abcd, e0, 0); ++ ++ /* 4..7 */ ++ msg1 = _mm_loadu_si128 (words + 1); ++ msg1 = _mm_shuffle_epi8 (msg1, shuf_mask); ++ e1 = _mm_sha1nexte_epu32 (e1, msg1); ++ e0 = abcd; ++ abcd = _mm_sha1rnds4_epu32 (abcd, e1, 0); ++ msg0 = _mm_sha1msg1_epu32 (msg0, msg1); ++ ++ /* 8..11 */ ++ msg2 = _mm_loadu_si128 (words + 2); ++ msg2 = _mm_shuffle_epi8 (msg2, shuf_mask); ++ e0 = _mm_sha1nexte_epu32 (e0, msg2); ++ e1 = abcd; ++ abcd = _mm_sha1rnds4_epu32 (abcd, e0, 0); ++ msg1 = _mm_sha1msg1_epu32 (msg1, msg2); ++ msg0 = _mm_xor_si128 (msg0, msg2); ++ ++ /* 12..15 */ ++ msg3 = _mm_loadu_si128 (words + 3); ++ msg3 = _mm_shuffle_epi8 (msg3, shuf_mask); ++ e1 = _mm_sha1nexte_epu32 (e1, msg3); ++ e0 = abcd; ++ msg0 = _mm_sha1msg2_epu32 (msg0, msg3); ++ abcd = _mm_sha1rnds4_epu32 (abcd, e1, 0); ++ msg2 = _mm_sha1msg1_epu32 (msg2, msg3); ++ msg1 = _mm_xor_si128 (msg1, msg3); ++ ++ /* 16..19 */ ++ e0 = _mm_sha1nexte_epu32 (e0, msg0); ++ e1 = abcd; ++ msg1 = _mm_sha1msg2_epu32 (msg1, msg0); ++ abcd = _mm_sha1rnds4_epu32 (abcd, e0, 0); ++ msg3 = _mm_sha1msg1_epu32 (msg3, msg0); ++ msg2 = _mm_xor_si128 (msg2, msg0); ++ ++ /* 20..23 */ ++ e1 = _mm_sha1nexte_epu32 (e1, msg1); ++ e0 = abcd; ++ msg2 = _mm_sha1msg2_epu32 (msg2, msg1); ++ abcd = _mm_sha1rnds4_epu32 (abcd, e1, 1); ++ msg0 = _mm_sha1msg1_epu32 (msg0, msg1); ++ msg3 = _mm_xor_si128 (msg3, msg1); ++ ++ /* 24..27 */ ++ e0 = _mm_sha1nexte_epu32 (e0, msg2); ++ e1 = abcd; ++ msg3 = _mm_sha1msg2_epu32 (msg3, msg2); ++ abcd = _mm_sha1rnds4_epu32 (abcd, e0, 1); ++ msg1 = _mm_sha1msg1_epu32 (msg1, msg2); ++ msg0 = _mm_xor_si128 (msg0, msg2); ++ ++ /* 28..31 */ ++ e1 = _mm_sha1nexte_epu32 (e1, msg3); ++ e0 = abcd; ++ msg0 = _mm_sha1msg2_epu32 (msg0, msg3); ++ abcd = _mm_sha1rnds4_epu32 (abcd, e1, 1); ++ msg2 = _mm_sha1msg1_epu32 (msg2, msg3); ++ msg1 = _mm_xor_si128 (msg1, msg3); ++ ++ /* 32..35 */ ++ e0 = _mm_sha1nexte_epu32 (e0, msg0); ++ e1 = abcd; ++ msg1 = _mm_sha1msg2_epu32 (msg1, msg0); ++ abcd = _mm_sha1rnds4_epu32 (abcd, e0, 1); ++ msg3 = _mm_sha1msg1_epu32 (msg3, msg0); ++ msg2 = _mm_xor_si128 (msg2, msg0); ++ ++ /* 36..39 */ ++ e1 = _mm_sha1nexte_epu32 (e1, msg1); ++ e0 = abcd; ++ msg2 = _mm_sha1msg2_epu32 (msg2, msg1); ++ abcd = _mm_sha1rnds4_epu32 (abcd, e1, 1); ++ msg0 = _mm_sha1msg1_epu32 (msg0, msg1); ++ msg3 = _mm_xor_si128 (msg3, msg1); ++ ++ /* 40..43 */ ++ e0 = _mm_sha1nexte_epu32 (e0, msg2); ++ e1 = abcd; ++ msg3 = _mm_sha1msg2_epu32 (msg3, msg2); ++ abcd = _mm_sha1rnds4_epu32 (abcd, e0, 2); ++ msg1 = _mm_sha1msg1_epu32 (msg1, msg2); ++ msg0 = _mm_xor_si128 (msg0, msg2); ++ ++ /* 44..47 */ ++ e1 = _mm_sha1nexte_epu32 (e1, msg3); ++ e0 = abcd; ++ msg0 = _mm_sha1msg2_epu32 (msg0, msg3); ++ abcd = _mm_sha1rnds4_epu32 (abcd, e1, 2); ++ msg2 = _mm_sha1msg1_epu32 (msg2, msg3); ++ msg1 = _mm_xor_si128 (msg1, msg3); ++ ++ /* 48..51 */ ++ e0 = _mm_sha1nexte_epu32 (e0, msg0); ++ e1 = abcd; ++ msg1 = _mm_sha1msg2_epu32 (msg1, msg0); ++ abcd = _mm_sha1rnds4_epu32 (abcd, e0, 2); ++ msg3 = _mm_sha1msg1_epu32 (msg3, msg0); ++ msg2 = _mm_xor_si128 (msg2, msg0); ++ ++ /* 52..55 */ ++ e1 = _mm_sha1nexte_epu32 (e1, msg1); ++ e0 = abcd; ++ msg2 = _mm_sha1msg2_epu32 (msg2, msg1); ++ abcd = _mm_sha1rnds4_epu32 (abcd, e1, 2); ++ msg0 = _mm_sha1msg1_epu32 (msg0, msg1); ++ msg3 = _mm_xor_si128 (msg3, msg1); ++ ++ /* 56..59 */ ++ e0 = _mm_sha1nexte_epu32 (e0, msg2); ++ e1 = abcd; ++ msg3 = _mm_sha1msg2_epu32 (msg3, msg2); ++ abcd = _mm_sha1rnds4_epu32 (abcd, e0, 2); ++ msg1 = _mm_sha1msg1_epu32 (msg1, msg2); ++ msg0 = _mm_xor_si128 (msg0, msg2); ++ ++ /* 60..63 */ ++ e1 = _mm_sha1nexte_epu32 (e1, msg3); ++ e0 = abcd; ++ msg0 = _mm_sha1msg2_epu32 (msg0, msg3); ++ abcd = _mm_sha1rnds4_epu32 (abcd, e1, 3); ++ msg2 = _mm_sha1msg1_epu32 (msg2, msg3); ++ msg1 = _mm_xor_si128 (msg1, msg3); ++ ++ /* 64..67 */ ++ e0 = _mm_sha1nexte_epu32 (e0, msg0); ++ e1 = abcd; ++ msg1 = _mm_sha1msg2_epu32 (msg1, msg0); ++ abcd = _mm_sha1rnds4_epu32 (abcd, e0, 3); ++ msg3 = _mm_sha1msg1_epu32 (msg3, msg0); ++ msg2 = _mm_xor_si128 (msg2, msg0); ++ ++ /* 68..71 */ ++ e1 = _mm_sha1nexte_epu32 (e1, msg1); ++ e0 = abcd; ++ msg2 = _mm_sha1msg2_epu32 (msg2, msg1); ++ abcd = _mm_sha1rnds4_epu32 (abcd, e1, 3); ++ msg3 = _mm_xor_si128 (msg3, msg1); ++ ++ /* 72..75 */ ++ e0 = _mm_sha1nexte_epu32 (e0, msg2); ++ e1 = abcd; ++ msg3 = _mm_sha1msg2_epu32 (msg3, msg2); ++ abcd = _mm_sha1rnds4_epu32 (abcd, e0, 3); ++ ++ /* 76..79 */ ++ e1 = _mm_sha1nexte_epu32 (e1, msg3); ++ e0 = abcd; ++ abcd = _mm_sha1rnds4_epu32 (abcd, e1, 3); ++ ++ /* Finalize. */ ++ e0 = _mm_sha1nexte_epu32 (e0, e0_save); ++ abcd = _mm_add_epi32 (abcd, abcd_save); ++ ++ words = words + 4; ++ } ++ ++ abcd = _mm_shuffle_epi32 (abcd, 0x1b); /* 0, 1, 2, 3 */ ++ _mm_storeu_si128 ((__m128i *) &ctx->A, abcd); ++ ctx->E = _mm_extract_epi32 (e0, 3); ++#endif ++} ++#endif ++ ++/* Return sha1_process_bytes or some hardware optimized version thereof ++ depending on current CPU. */ ++ ++sha1_process_bytes_fn ++sha1_choose_process_bytes (void) ++{ ++#ifdef HAVE_X86_SHA1_HW_SUPPORT ++ unsigned int eax, ebx, ecx, edx; ++ if (__get_cpuid_count (7, 0, &eax, &ebx, &ecx, &edx) ++ && (ebx & bit_SHA) != 0 ++ && __get_cpuid (1, &eax, &ebx, &ecx, &edx) ++ && (ecx & bit_SSE4_1) != 0) ++ return sha1_hw_process_bytes; ++#endif ++ return sha1_process_bytes; ++} diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/libiberty-sha1-2.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/libiberty-sha1-2.diff new file mode 100644 index 0000000000..3768cf801b --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/libiberty-sha1-2.diff @@ -0,0 +1,221 @@ +# DP: libiberty: Disable hwcaps for sha1.o + +--- a/src/config/hwcaps.m4 ++++ b/src/config/hwcaps.m4 +@@ -7,6 +7,7 @@ dnl HWCAP_CFLAGS='-Wa,-nH' if possible. + dnl + AC_DEFUN([GCC_CHECK_ASSEMBLER_HWCAP], [ + test -z "$HWCAP_CFLAGS" && HWCAP_CFLAGS='' ++ AC_REQUIRE([AC_CANONICAL_TARGET]) + + # Restrict the test to Solaris, other assemblers (e.g. AIX as) have -nH + # with a different meaning. +--- a/src/libiberty/Makefile.in ++++ b/src/libiberty/Makefile.in +@@ -114,7 +114,7 @@ INCDIR=$(srcdir)/$(MULTISRCTOP)../includ + + COMPILE.c = $(CC) -c @DEFS@ $(CFLAGS) $(CPPFLAGS) -I. -I$(INCDIR) \ + $(HDEFINES) @ac_libiberty_warn_cflags@ -D_GNU_SOURCE \ +- @CET_HOST_FLAGS@ ++ @CET_HOST_FLAGS@ @HWCAP_CFLAGS@ + + # Just to make sure we don't use a built-in rule with VPATH + .c.$(objext): +--- a/src/libiberty/aclocal.m4 ++++ b/src/libiberty/aclocal.m4 +@@ -15,7 +15,9 @@ m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_de + m4_include([../config/acx.m4]) + m4_include([../config/cet.m4]) + m4_include([../config/enable.m4]) ++m4_include([../config/hwcaps.m4]) + m4_include([../config/no-executables.m4]) ++m4_include([../config/override.m4]) + m4_include([../config/picflag.m4]) + m4_include([../config/warnings.m4]) + m4_include([acinclude.m4]) +--- a/src/libiberty/configure ++++ b/src/libiberty/configure +@@ -626,6 +626,11 @@ pexecute + target_header_dir + CHECK + LIBOBJS ++HWCAP_CFLAGS ++target_os ++target_vendor ++target_cpu ++target + CET_HOST_FLAGS + NOASANFLAG + PICFLAG +@@ -1323,6 +1328,7 @@ _ACEOF + System types: + --build=BUILD configure for building on BUILD [guessed] + --host=HOST cross-compile to build programs to run on HOST [BUILD] ++ --target=TARGET configure for building compilers for TARGET [HOST] + _ACEOF + fi + +@@ -2460,6 +2466,9 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + ++ ++ ++ + # This works around the fact that libtool configuration may change LD + # for this particular configuration, but some shells, instead of + # keeping the changes in LD private, export them just because LD is +@@ -4290,7 +4299,7 @@ else + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) ++#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +@@ -4336,7 +4345,7 @@ else + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) ++#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +@@ -4360,7 +4369,7 @@ rm -f core conftest.err conftest.$ac_obj + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) ++#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +@@ -4405,7 +4414,7 @@ else + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) ++#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +@@ -4429,7 +4438,7 @@ rm -f core conftest.err conftest.$ac_obj + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) ++#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +@@ -5493,6 +5502,88 @@ LDFLAGS="$cet_save_LDFLAGS" + + + ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 ++$as_echo_n "checking target system type... " >&6; } ++if ${ac_cv_target+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test "x$target_alias" = x; then ++ ac_cv_target=$ac_cv_host ++else ++ ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || ++ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 ++fi ++ ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 ++$as_echo "$ac_cv_target" >&6; } ++case $ac_cv_target in ++*-*-*) ;; ++*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;; ++esac ++target=$ac_cv_target ++ac_save_IFS=$IFS; IFS='-' ++set x $ac_cv_target ++shift ++target_cpu=$1 ++target_vendor=$2 ++shift; shift ++# Remember, the first character of IFS is used to create $*, ++# except with old shells: ++target_os=$* ++IFS=$ac_save_IFS ++case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac ++ ++ ++# The aliases save the names the user supplied, while $host etc. ++# will get canonicalized. ++test -n "$target_alias" && ++ test "$program_prefix$program_suffix$program_transform_name" = \ ++ NONENONEs,x,x, && ++ program_prefix=${target_alias}- ++ ++ test -z "$HWCAP_CFLAGS" && HWCAP_CFLAGS='' ++ ++ ++ # Restrict the test to Solaris, other assemblers (e.g. AIX as) have -nH ++ # with a different meaning. ++ case ${target_os} in ++ solaris2*) ++ ac_save_CFLAGS="$CFLAGS" ++ CFLAGS="$CFLAGS -Wa,-nH" ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for as that supports -Wa,-nH" >&5 ++$as_echo_n "checking for as that supports -Wa,-nH... " >&6; } ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++ ++int ++main () ++{ ++return 0; ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ ac_hwcap_flags=yes ++else ++ ac_hwcap_flags=no ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ if test "$ac_hwcap_flags" = "yes"; then ++ HWCAP_CFLAGS="-Wa,-nH $HWCAP_CFLAGS" ++ fi ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_hwcap_flags" >&5 ++$as_echo "$ac_hwcap_flags" >&6; } ++ ++ CFLAGS="$ac_save_CFLAGS" ++ ;; ++ esac ++ ++ ++ ++ + echo "# Warning: this fragment is automatically generated" > temp-frag + + if [ -n "${frag}" ] && [ -f "${frag}" ]; then +@@ -7647,6 +7738,8 @@ main () + if (*(data + i) != *(data3 + i)) + return 14; + close (fd); ++ free (data); ++ free (data3); + return 0; + } + _ACEOF +--- a/src/libiberty/configure.ac ++++ b/src/libiberty/configure.ac +@@ -253,6 +253,8 @@ AC_SUBST(NOASANFLAG) + GCC_CET_HOST_FLAGS(CET_HOST_FLAGS) + AC_SUBST(CET_HOST_FLAGS) + ++GCC_CHECK_ASSEMBLER_HWCAP ++ + echo "# Warning: this fragment is automatically generated" > temp-frag + + if [[ -n "${frag}" ]] && [[ -f "${frag}" ]]; then diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/libitm-no-fortify-source.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/libitm-no-fortify-source.diff new file mode 100644 index 0000000000..fe0c705927 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/libitm-no-fortify-source.diff @@ -0,0 +1,17 @@ +# DP: Build libitm with -U_FORTIFY_SOURCE on x86 and x86_64. + +--- a/src/libitm/configure.tgt ++++ b/src/libitm/configure.tgt +@@ -124,6 +124,12 @@ EOF + ;; + esac + ++# FIXME: ftbfs with -D_FORTIFY_SOURCE (error: invalid use of '__builtin_va_arg_pack ()) ++case "${target}" in ++ *-*-linux*) ++ XCFLAGS="${XCFLAGS} -U_FORTIFY_SOURCE" ++esac ++ + # For the benefit of top-level configure, determine if the cpu is supported. + test -d ${srcdir}/config/$ARCH || UNSUPPORTED=1 + diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/libphobos-zlib.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/libphobos-zlib.diff new file mode 100644 index 0000000000..ddf7c95d3f --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/libphobos-zlib.diff @@ -0,0 +1,72 @@ +# DP: Build zlib in any case to have a fall back for missing libz multilibs + +--- a/src/libphobos/configure.ac ++++ b/src/libphobos/configure.ac +@@ -142,6 +142,7 @@ DRUNTIME_LIBRARIES_BACKTRACE + DRUNTIME_LIBRARIES_DLOPEN + DRUNTIME_LIBRARIES_ZLIB + DRUNTIME_INSTALL_DIRECTORIES ++dnl fake change to regenerate the configure file + + # Add dependencies for libgphobos.spec file + SPEC_PHOBOS_DEPS="$LIBS" +--- a/src/libphobos/m4/druntime/libraries.m4 ++++ b/src/libphobos/m4/druntime/libraries.m4 +@@ -52,19 +52,45 @@ AC_DEFUN([DRUNTIME_LIBRARIES_ZLIB], + [ + AC_ARG_WITH(target-system-zlib, + AS_HELP_STRING([--with-target-system-zlib], +- [use installed libz (default: no)])) ++ [use installed libz (default: no)]), ++ [system_zlib=yes],[system_zlib=no]) + +- system_zlib=false +- AS_IF([test "x$with_target_system_zlib" = "xyes"], [ +- AC_CHECK_LIB([z], [deflate], [ +- system_zlib=yes +- ], [ +- AC_MSG_ERROR([System zlib not found]) +- ]) +- ], [ +- AC_MSG_CHECKING([for zlib]) +- AC_MSG_RESULT([just compiled]) +- ]) ++ AC_MSG_CHECKING([for system zlib]) ++ save_LIBS=$LIBS ++ LIBS="$LIBS -lz" ++ dnl the link test is not good enough for ARM32 multilib detection, ++ dnl first check to link, then to run ++ AC_LANG_PUSH(C) ++ AC_LINK_IFELSE( ++ [AC_LANG_PROGRAM([#include ],[gzopen("none", "rb")])], ++ [ ++ AC_RUN_IFELSE([AC_LANG_SOURCE([[ ++ #include ++ int main() { ++ gzFile file = gzopen("none", "rb"); ++ return 0; ++ } ++ ]])], ++ [system_zlib_found=yes], ++ [system_zlib_found=no], ++ dnl no system zlib for cross builds ... ++ [system_zlib_found=no] ++ ) ++ ], ++ [system_zlib_found=no]) ++ if test x$system_zlib = xyes; then ++ if test x$system_zlib_found = xyes; then ++ AC_MSG_RESULT([found]) ++ else ++ LIBS=$save_LIBS ++ AC_MSG_RESULT([not found, disabled]) ++ system_zlib=no ++ fi ++ else ++ LIBS=$save_LIBS ++ AC_MSG_RESULT([not enabled]) ++ fi ++ AC_LANG_POP + + AM_CONDITIONAL([DRUNTIME_ZLIB_SYSTEM], [test "$with_target_system_zlib" = yes]) + ]) diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/libsanitizer-no-crypt.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/libsanitizer-no-crypt.diff new file mode 100644 index 0000000000..20fbd854e0 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/libsanitizer-no-crypt.diff @@ -0,0 +1,132 @@ +# DP: libsanitzer: Remove crypt and crypt_r interceptors. + +From 9b116160a1482c5c0c199f9c21d78a527d11d9ea Mon Sep 17 00:00:00 2001 +From: Fangrui Song +Date: Fri, 28 Apr 2023 09:59:17 -0700 +Subject: [PATCH] Remove crypt and crypt_r interceptors + +From Florian Weimer's D144073 + +> On GNU/Linux (glibc), the crypt and crypt_r functions are not part of the main shared object (libc.so.6), but libcrypt (with multiple possible sonames). The sanitizer libraries do not depend on libcrypt, so it can happen that during sanitizer library initialization, no real implementation will be found because the crypt, crypt_r functions are not present in the process image (yet). If its interceptors are called nevertheless, this results in a call through a null pointer when the sanitizer library attempts to forward the call to the real implementation. +> +> Many distributions have already switched to libxcrypt, a library that is separate from glibc and that can be build with sanitizers directly (avoiding the need for interceptors). This patch disables building the interceptor for glibc targets. + +Let's remove crypt and crypt_r interceptors (D68431) to fix issues with +newer glibc. + +For older glibc, msan will not know that an uninstrumented crypt_r call +initializes `data`, so there is a risk for false positives. However, with some +codebase survey, I think crypt_r uses are very few and the call sites typically +have a `memset(&data, 0, sizeof(data));` anyway. + +Fix https://github.com/google/sanitizers/issues/1365 +Related: https://bugzilla.redhat.com/show_bug.cgi?id=2169432 + +Reviewed By: #sanitizers, fweimer, thesamesam, vitalybuka + +Differential Revision: https://reviews.llvm.org/D149403 +--- + .../sanitizer_common_interceptors.inc | 37 ------------------- + .../sanitizer_platform_interceptors.h | 2 - + .../sanitizer_platform_limits_posix.cpp | 8 ---- + .../sanitizer_platform_limits_posix.h | 1 - + 4 files changed, 48 deletions(-) + +--- a/src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc ++++ b/src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc +@@ -10187,41 +10187,6 @@ INTERCEPTOR(SSIZE_T, getrandom, void *bu + #define INIT_GETRANDOM + #endif + +-#if SANITIZER_INTERCEPT_CRYPT +-INTERCEPTOR(char *, crypt, char *key, char *salt) { +- void *ctx; +- COMMON_INTERCEPTOR_ENTER(ctx, crypt, key, salt); +- COMMON_INTERCEPTOR_READ_RANGE(ctx, key, internal_strlen(key) + 1); +- COMMON_INTERCEPTOR_READ_RANGE(ctx, salt, internal_strlen(salt) + 1); +- char *res = REAL(crypt)(key, salt); +- if (res != nullptr) +- COMMON_INTERCEPTOR_INITIALIZE_RANGE(res, internal_strlen(res) + 1); +- return res; +-} +-#define INIT_CRYPT COMMON_INTERCEPT_FUNCTION(crypt); +-#else +-#define INIT_CRYPT +-#endif +- +-#if SANITIZER_INTERCEPT_CRYPT_R +-INTERCEPTOR(char *, crypt_r, char *key, char *salt, void *data) { +- void *ctx; +- COMMON_INTERCEPTOR_ENTER(ctx, crypt_r, key, salt, data); +- COMMON_INTERCEPTOR_READ_RANGE(ctx, key, internal_strlen(key) + 1); +- COMMON_INTERCEPTOR_READ_RANGE(ctx, salt, internal_strlen(salt) + 1); +- char *res = REAL(crypt_r)(key, salt, data); +- if (res != nullptr) { +- COMMON_INTERCEPTOR_WRITE_RANGE(ctx, data, +- __sanitizer::struct_crypt_data_sz); +- COMMON_INTERCEPTOR_INITIALIZE_RANGE(res, internal_strlen(res) + 1); +- } +- return res; +-} +-#define INIT_CRYPT_R COMMON_INTERCEPT_FUNCTION(crypt_r); +-#else +-#define INIT_CRYPT_R +-#endif +- + #if SANITIZER_INTERCEPT_GETENTROPY + INTERCEPTOR(int, getentropy, void *buf, SIZE_T buflen) { + void *ctx; +@@ -10772,8 +10737,6 @@ static void InitializeCommonInterceptors + INIT_GETUSERSHELL; + INIT_SL_INIT; + INIT_GETRANDOM; +- INIT_CRYPT; +- INIT_CRYPT_R; + INIT_GETENTROPY; + INIT_QSORT; + INIT_QSORT_R; +--- a/src/libsanitizer/sanitizer_common/sanitizer_platform_interceptors.h ++++ b/src/libsanitizer/sanitizer_common/sanitizer_platform_interceptors.h +@@ -571,8 +571,6 @@ + #define SANITIZER_INTERCEPT_FDEVNAME SI_FREEBSD + #define SANITIZER_INTERCEPT_GETUSERSHELL (SI_POSIX && !SI_ANDROID) + #define SANITIZER_INTERCEPT_SL_INIT (SI_FREEBSD || SI_NETBSD) +-#define SANITIZER_INTERCEPT_CRYPT (SI_POSIX && !SI_ANDROID) +-#define SANITIZER_INTERCEPT_CRYPT_R (SI_LINUX && !SI_ANDROID) + + #define SANITIZER_INTERCEPT_GETRANDOM \ + ((SI_LINUX && __GLIBC_PREREQ(2, 25)) || SI_FREEBSD) +--- a/src/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cpp ++++ b/src/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cpp +@@ -177,10 +177,6 @@ typedef struct user_fpregs elf_fpregset_ + # include "sanitizer_platform_interceptors.h" + # include "sanitizer_platform_limits_posix.h" + +-#if SANITIZER_INTERCEPT_CRYPT_R +-#include +-#endif +- + namespace __sanitizer { + unsigned struct_utsname_sz = sizeof(struct utsname); + unsigned struct_stat_sz = sizeof(struct stat); +@@ -284,10 +280,6 @@ namespace __sanitizer { + unsigned struct_statvfs64_sz = sizeof(struct statvfs64); + #endif // SANITIZER_LINUX && !SANITIZER_ANDROID + +-#if SANITIZER_INTERCEPT_CRYPT_R +- unsigned struct_crypt_data_sz = sizeof(struct crypt_data); +-#endif +- + #if SANITIZER_LINUX && !SANITIZER_ANDROID + unsigned struct_timex_sz = sizeof(struct timex); + unsigned struct_msqid_ds_sz = sizeof(struct msqid_ds); +--- a/src/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h ++++ b/src/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h +@@ -319,7 +319,6 @@ extern unsigned struct_msqid_ds_sz; + extern unsigned struct_mq_attr_sz; + extern unsigned struct_timex_sz; + extern unsigned struct_statvfs_sz; +-extern unsigned struct_crypt_data_sz; + #endif // SANITIZER_LINUX && !SANITIZER_ANDROID + + struct __sanitizer_iovec { diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/libsanitizer-timebits.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/libsanitizer-timebits.diff new file mode 100644 index 0000000000..2a7d2b27c0 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/libsanitizer-timebits.diff @@ -0,0 +1,22 @@ +# DP: Add another #undef for _TIME_BITS + +--- a/src/libsanitizer/sanitizer_common/sanitizer_procmaps_solaris.cpp ++++ b/src/libsanitizer/sanitizer_common/sanitizer_procmaps_solaris.cpp +@@ -11,6 +11,7 @@ + + // Before Solaris 11.4, doesn't work in a largefile environment. + #undef _FILE_OFFSET_BITS ++#undef _TIME_BITS + #include "sanitizer_platform.h" + #if SANITIZER_SOLARIS + # include +--- a/src/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cpp ++++ b/src/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cpp +@@ -18,6 +18,7 @@ + // depends on _FILE_OFFSET_BITS setting. + // To get this "true" dirent definition, we undefine _FILE_OFFSET_BITS below. + #undef _FILE_OFFSET_BITS ++#undef _TIME_BITS + #endif + + // Must go after undef _FILE_OFFSET_BITS. diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/libstdc++-doclink.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/libstdc++-doclink.diff new file mode 100644 index 0000000000..f209cf7efc --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/libstdc++-doclink.diff @@ -0,0 +1,61 @@ +# DP: adjust hrefs to point to the local documentation + +--- + libstdc++-v3/doc/doxygen/mainpage.html | 10 +++++----- + 1 files changed, 5 insertions(+), 5 deletions(-) + +--- a/src/libstdc++-v3/doc/doxygen/mainpage.html ++++ b/src/libstdc++-v3/doc/doxygen/mainpage.html +@@ -27,10 +27,10 @@ +

    Generated on @DATE@.

    + +

    There are two types of documentation for libstdc++. One is the +- distribution documentation, which can be read online +- here +- or offline from the file doc/html/index.html in the library source +- directory. ++ distribution documentation, which can be read ++ offline in the documentation directory ++ or ++ online. +

    + +

    The other type is the source documentation, of which this is the first page. +@@ -82,8 +82,11 @@ + +

    License, Copyright, and Other Lawyerly Verbosity

    +

    The libstdc++ documentation is released under ++ these terms ++ (read offline or + +- these terms. ++ read online. ++ ). +

    +

    Part of the generated documentation involved comments and notes from + SGI, who says we gotta say this: +--- a/src/libstdc++-v3/doc/html/api.html ++++ b/src/libstdc++-v3/doc/html/api.html +@@ -20,6 +20,8 @@ + member functions for the library classes, finding out what is in a + particular include file, looking at inheritance diagrams, etc. +

    ++The API documentation, rendered into HTML, can be viewed offline. ++

    + The API documentation, rendered into HTML, can be viewed online + for each GCC release + and +--- a/src/libstdc++-v3/doc/xml/api.xml ++++ b/src/libstdc++-v3/doc/xml/api.xml +@@ -40,6 +40,11 @@ + + + ++ The source-level documentation for this release can be viewed offline. ++ ++ ++ ++ + The API documentation, rendered into HTML, can be viewed online + for each GCC release + and diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/libstdc++-doxygen-SOURCE_DATE_EPOCH.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/libstdc++-doxygen-SOURCE_DATE_EPOCH.diff new file mode 100644 index 0000000000..1636c08277 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/libstdc++-doxygen-SOURCE_DATE_EPOCH.diff @@ -0,0 +1,13 @@ +--- gcc-13.1.0/src/libstdc++-v3/scripts/run_doxygen 2023-04-26 00:09:43.000000000 -0700 ++++ gcc-13.1.0/src/libstdc++-v3/scripts/run_doxygen.new 2023-04-30 14:34:47.513318389 -0700 +@@ -130,7 +130,9 @@ + latex_cmd= + enabled_sections= + generate_tagfile= +-DATEtext=`date '+%Y-%m-%d'` ++DATE_FMT="+%Y-%m-%d" ++SOURCE_DATE_EPOCH="${SOURCE_DATE_EPOCH:-$(date +%s)}" ++DATEtext=`date -u -d "@$SOURCE_DATE_EPOCH" "$DATE_FMT" 2>/dev/null || date -u -r "$SOURCE_DATE_EPOCH" "$DATE_FMT" 2>/dev/null || date -u "$DATE_FMT"` + + # Show how this script is called. + echo run_doxygen $* diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/libstdc++-hurd.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/libstdc++-hurd.diff new file mode 100644 index 0000000000..278d83a273 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/libstdc++-hurd.diff @@ -0,0 +1,48 @@ +This is notably needed because in glibc 2.34, the move of pthread functions +into libc.so happened for Linux only, not GNU/Hurd. + +The pthread_self() function can also always be used fine as it is on +GNU/Hurd. + +libstdc++-v3/ChangeLog: + + * config/os/gnu-linux/os_defines.h [!__linux__] + (_GLIBCXX_NATIVE_THREAD_ID, _GLIBCXX_GTHREAD_USE_WEAK): Do not define. + +--- a/src/libstdc++-v3/config/os/gnu-linux/os_defines.h ++++ b/src/libstdc++-v3/config/os/gnu-linux/os_defines.h +@@ -60,22 +60,24 @@ + # define _GLIBCXX_HAVE_FLOAT128_MATH 1 + #endif + +-#if __GLIBC_PREREQ(2, 27) +-// Since glibc 2.27 pthread_self() is usable without linking to libpthread. +-# define _GLIBCXX_NATIVE_THREAD_ID pthread_self() +-#else ++#ifdef __linux__ ++# if __GLIBC_PREREQ(2, 27) ++// Since glibc 2.27 Linux' pthread_self() is usable without linking to libpthread. ++# define _GLIBCXX_NATIVE_THREAD_ID pthread_self() ++# else + // Before then it was in libc.so.6 but not libc.a, and always returns 0, + // which breaks the invariant this_thread::get_id() != thread::id{}. + // So only use it if we know the libpthread version is available. + // Otherwise use (__gthread_t)1 as the ID of the main (and only) thread. +-# define _GLIBCXX_NATIVE_THREAD_ID \ +- (__gthread_active_p() ? __gthread_self() : (__gthread_t)1) +-#endif ++# define _GLIBCXX_NATIVE_THREAD_ID \ ++ (__gthread_active_p() ? __gthread_self() : (__gthread_t)1) ++# endif + +-#if __GLIBC_PREREQ(2, 34) +-// Since glibc 2.34 all pthreads functions are usable without linking to ++# if __GLIBC_PREREQ(2, 34) ++// Since glibc 2.34 all Linux pthreads functions are usable without linking to + // libpthread. +-# define _GLIBCXX_GTHREAD_USE_WEAK 0 ++# define _GLIBCXX_GTHREAD_USE_WEAK 0 ++# endif + #endif + + #endif diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/libstdc++-man-3cxx.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/libstdc++-man-3cxx.diff new file mode 100644 index 0000000000..26651a8a11 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/libstdc++-man-3cxx.diff @@ -0,0 +1,63 @@ +# DP: Install libstdc++ man pages with suffix .3cxx instead of .3 + +--- a/src/libstdc++-v3/doc/doxygen/user.cfg.in ++++ b/src/libstdc++-v3/doc/doxygen/user.cfg.in +@@ -2146,7 +2146,7 @@ MAN_OUTPUT = man + # The default value is: .3. + # This tag requires that the tag GENERATE_MAN is set to YES. + +-MAN_EXTENSION = .3 ++MAN_EXTENSION = .3cxx + + # The MAN_SUBDIR tag determines the name of the directory created within + # MAN_OUTPUT in which the man pages are placed. If defaults to man followed by +--- a/src/libstdc++-v3/scripts/run_doxygen ++++ b/src/libstdc++-v3/scripts/run_doxygen +@@ -262,6 +262,9 @@ fi + if $do_man; then + echo :: + echo :: Fixing up the man pages... ++mkdir -p $outdir/man/man3 ++mv $outdir/man/man3cxx/* $outdir/man/man3/ ++rmdir $outdir/man/man3cxx + cd $outdir/man/man3 + + # File names with embedded spaces (EVIL!) need to be....? renamed or removed? +@@ -291,7 +294,7 @@ cxxflags="-Og -g -std=gnu++23" + $gxx $cppflags $cxxflags ${srcdir}/doc/doxygen/stdheader.cc -o ./stdheader || exit 1 + # Doxygen outputs something like "\fC#include \fP" and + # we want that internal header to be replaced with something like . +-problematic=`grep -E -l '#include <.*h>' [a-z]*.3` ++problematic=`grep -E -l '#include <.*h>' [a-z]*.3 [a-z]*.3cxx` + for f in $problematic; do + # this is also slow, but safe and easy to debug + oldh=`sed -n '/fC#include .*/\1/p' $f` +@@ -303,7 +306,7 @@ rm stdheader + # Some of the pages for generated modules have text that confuses certain + # implementations of man(1), e.g. on GNU/Linux. We need to have another + # top-level *roff tag to /stop/ the .SH NAME entry. +-problematic=`grep -E --files-without-match '^\.SH SYNOPSIS' [A-Z]*.3` ++problematic=`grep -E --files-without-match '^\.SH SYNOPSIS' [A-Z]*.3cxx` + #problematic='Containers.3 Sequences.3 Assoc_containers.3 Iterator_types.3' + + for f in $problematic; do +@@ -317,7 +320,7 @@ a\ + done + + # Also, break this (generated) line up. It's ugly as sin. +-problematic=`grep -l '[^^]Definition at line' *.3` ++problematic=`grep -l '[^^]Definition at line' *.3 *.3cxx` + for f in $problematic; do + sed 's/Definition at line/\ + .PP\ +@@ -435,8 +438,8 @@ for f in ios streambuf istream ostream i + istringstream ostringstream stringstream filebuf ifstream \ + ofstream fstream string + do +- echo ".so man3/std::basic_${f}.3" > std::${f}.3 +- echo ".so man3/std::basic_${f}.3" > std::w${f}.3 ++ echo ".so man3/std::basic_${f}.3cxx" > std::${f}.3cxx ++ echo ".so man3/std::basic_${f}.3cxx" > std::w${f}.3cxx + done + + echo :: diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/libstdc++-no-testsuite.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/libstdc++-no-testsuite.diff new file mode 100644 index 0000000000..771bf7a718 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/libstdc++-no-testsuite.diff @@ -0,0 +1,12 @@ +# DP: Don't run the libstdc++ testsuite on arm, hppa and mipsel (timeouts on the buildds) + +--- a/src/libstdc++-v3/testsuite/Makefile.in ++++ b/src/libstdc++-v3/testsuite/Makefile.in +@@ -567,6 +567,7 @@ + + # Run the testsuite in normal mode. + check-DEJAGNU $(check_DEJAGNU_normal_targets): check-DEJAGNU%: site.exp ++ case "$(target)" in arm*|hppa*|mipsel*) exit 0;; esac; \ + $(if $*,@)AR="$(AR)"; export AR; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + if [ -z "$*" ] && [ "$(filter -j, $(MFLAGS))" = "-j" ]; then \ diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/libstdc++-nothumb-check.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/libstdc++-nothumb-check.diff new file mode 100644 index 0000000000..6c665a2ebd --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/libstdc++-nothumb-check.diff @@ -0,0 +1,38 @@ +# DP: Don't run the libstdc++-v3 testsuite in thumb mode on armel + +Index: testsuite/Makefile.in +=================================================================== +--- a/src/libstdc++-v3/testsuite/Makefile.in (revision 156820) ++++ b/src/libstdc++-v3/testsuite/Makefile.in (working copy) +@@ -583,6 +583,8 @@ + srcdir=`$(am__cd) $(srcdir) && pwd`; export srcdir; \ + EXPECT=$(EXPECT); export EXPECT; \ + runtest=$(RUNTEST); \ ++ runtestflags="`echo '$(RUNTESTFLAGS)' | sed 's/,-marm/-marm/'`"; \ ++ case "$$runtestflags" in *\\{\\}) runtestflags=; esac; \ + if [ -z "$$runtest" ]; then runtest=runtest; fi; \ + tool=libstdc++; \ + dirs=; \ +@@ -590,7 +592,7 @@ + normal0) \ + if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \ + $$runtest $(AM_RUNTESTFLAGS) $(RUNTESTDEFAULTFLAGS) \ +- $(RUNTESTFLAGS) abi.exp; \ ++ $$runtestflags abi.exp; \ + else echo "WARNING: could not find \`runtest'" 1>&2; :;\ + fi; \ + dirs="`cd $$srcdir; echo [013-9][0-9]_*/* [abep]*/*`";; \ +@@ -605,11 +607,11 @@ + if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \ + if [ -n "$$dirs" ]; then \ + $$runtest $(AM_RUNTESTFLAGS) $(RUNTESTDEFAULTFLAGS) \ +- $(RUNTESTFLAGS) \ ++ $$runtestflags \ + "conformance.exp=`echo $$dirs | sed 's/ /* /g;s/$$/*/'`"; \ + else \ + $$runtest $(AM_RUNTESTFLAGS) $(RUNTESTDEFAULTFLAGS) \ +- $(RUNTESTFLAGS); \ ++ $$runtestflags; \ + fi; \ + else echo "WARNING: could not find \`runtest'" 1>&2; :;\ + fi diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/libstdc++-pic.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/libstdc++-pic.diff new file mode 100644 index 0000000000..6adac416be --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/libstdc++-pic.diff @@ -0,0 +1,91 @@ +# DP: Build and install libstdc++_pic.a library. + +--- a/src/libstdc++-v3/src/Makefile.am ++++ b/src/libstdc++-v3/src/Makefile.am +@@ -379,10 +379,12 @@ if GLIBCXX_BUILD_DEBUG + STAMP_DEBUG = build-debug + STAMP_INSTALL_DEBUG = install-debug + CLEAN_DEBUG = debug ++STAMP_INSTALL_PIC = install-pic + else + STAMP_DEBUG = + STAMP_INSTALL_DEBUG = + CLEAN_DEBUG = ++STAMP_INSTALL_PIC = + endif + + # Build a debug variant. +@@ -425,6 +427,7 @@ build-debug: stamp-debug $(debug_backtra + mv Makefile Makefile.tmp; \ + sed -e 's,all-local: all-once,all-local:,' \ + -e 's,install-data-local: install-data-once,install-data-local:,' \ ++ -e 's,install-exec-local:.*,install-exec-local:,' \ + -e '/vpath/!s,src/c,src/debug/c,' \ + < Makefile.tmp > Makefile ; \ + rm -f Makefile.tmp ; \ +@@ -435,3 +438,8 @@ build-debug: stamp-debug $(debug_backtra + install-debug: build-debug + (cd ${debugdir} && $(MAKE) CXXFLAGS='$(DEBUG_FLAGS)' \ + toolexeclibdir=$(glibcxx_toolexeclibdir)/debug install) ; ++ ++install-exec-local: $(STAMP_INSTALL_PIC) ++$(STAMP_INSTALL_PIC): ++ $(MKDIR_P) $(DESTDIR)$(toolexeclibdir) ++ $(INSTALL_DATA) .libs/libstdc++convenience.a $(DESTDIR)$(toolexeclibdir)/libstdc++_pic.a +--- a/src/libstdc++-v3/src/Makefile.in ++++ b/src/libstdc++-v3/src/Makefile.in +@@ -676,6 +676,8 @@ CXXLINK = \ + @GLIBCXX_BUILD_DEBUG_TRUE@STAMP_INSTALL_DEBUG = install-debug + @GLIBCXX_BUILD_DEBUG_FALSE@CLEAN_DEBUG = + @GLIBCXX_BUILD_DEBUG_TRUE@CLEAN_DEBUG = debug ++@GLIBCXX_BUILD_DEBUG_FALSE@STAMP_INSTALL_PIC = ++@GLIBCXX_BUILD_DEBUG_TRUE@STAMP_INSTALL_PIC = install-pic + + # Build a debug variant. + # Take care to fix all possibly-relative paths. +@@ -944,7 +946,7 @@ install-dvi: install-dvi-recursive + + install-dvi-am: + +-install-exec-am: install-toolexeclibLTLIBRARIES ++install-exec-am: install-exec-local install-toolexeclibLTLIBRARIES + + install-html: install-html-recursive + +@@ -994,11 +996,11 @@ uninstall-am: uninstall-toolexeclibLTLIB + distclean-libtool distclean-tags dvi dvi-am html html-am info \ + info-am install install-am install-data install-data-am \ + install-data-local install-dvi install-dvi-am install-exec \ +- install-exec-am install-html install-html-am install-info \ +- install-info-am install-man install-pdf install-pdf-am \ +- install-ps install-ps-am install-strip \ +- install-toolexeclibLTLIBRARIES installcheck installcheck-am \ +- installdirs installdirs-am maintainer-clean \ ++ install-exec-am install-exec-local install-html \ ++ install-html-am install-info install-info-am install-man \ ++ install-pdf install-pdf-am install-ps install-ps-am \ ++ install-strip install-toolexeclibLTLIBRARIES installcheck \ ++ installcheck-am installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am \ +@@ -1147,6 +1149,7 @@ build-debug: stamp-debug $(debug_backtra + mv Makefile Makefile.tmp; \ + sed -e 's,all-local: all-once,all-local:,' \ + -e 's,install-data-local: install-data-once,install-data-local:,' \ ++ -e 's,install-exec-local:.*,install-exec-local:,' \ + -e '/vpath/!s,src/c,src/debug/c,' \ + < Makefile.tmp > Makefile ; \ + rm -f Makefile.tmp ; \ +@@ -1158,6 +1161,11 @@ install-debug: build-debug + (cd ${debugdir} && $(MAKE) CXXFLAGS='$(DEBUG_FLAGS)' \ + toolexeclibdir=$(glibcxx_toolexeclibdir)/debug install) ; + ++install-exec-local: $(STAMP_INSTALL_PIC) ++$(STAMP_INSTALL_PIC): ++ $(MKDIR_P) $(DESTDIR)$(toolexeclibdir) ++ $(INSTALL_DATA) .libs/libstdc++convenience.a $(DESTDIR)$(toolexeclibdir)/libstdc++_pic.a ++ + # Tell versions [3.59,3.63) of GNU make to not export all variables. + # Otherwise a system limit (for SysV at least) may be exceeded. + .NOEXPORT: diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/libstdc++-pythondir.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/libstdc++-pythondir.diff new file mode 100644 index 0000000000..325020c3f1 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/libstdc++-pythondir.diff @@ -0,0 +1,22 @@ +--- a/src/libstdc++-v3/python/Makefile.am ++++ b/src/libstdc++-v3/python/Makefile.am +@@ -26,7 +26,7 @@ include $(top_srcdir)/fragment.am + if ENABLE_PYTHONDIR + pythondir = $(prefix)/$(python_mod_dir) + else +-pythondir = $(datadir)/gcc-$(gcc_version)/python ++pythondir = $(datadir)/gcc/python + endif + + if GLIBCXX_BUILD_DEBUG +--- a/src/libstdc++-v3/python/Makefile.in ++++ b/src/libstdc++-v3/python/Makefile.in +@@ -409,7 +409,7 @@ WARN_CXXFLAGS = \ + + # -I/-D flags to pass when compiling. + AM_CPPFLAGS = $(GLIBCXX_INCLUDES) $(CPPFLAGS) +-@ENABLE_PYTHONDIR_FALSE@pythondir = $(datadir)/gcc-$(gcc_version)/python ++@ENABLE_PYTHONDIR_FALSE@pythondir = $(datadir)/gcc/python + @ENABLE_PYTHONDIR_TRUE@pythondir = $(prefix)/$(python_mod_dir) + @GLIBCXX_BUILD_DEBUG_FALSE@debug_gdb_py = + @GLIBCXX_BUILD_DEBUG_TRUE@debug_gdb_py = YES diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/libstdc++-test-installed.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/libstdc++-test-installed.diff new file mode 100644 index 0000000000..1ea88255d6 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/libstdc++-test-installed.diff @@ -0,0 +1,76 @@ +# DP: Add support to run the libstdc++-v3 testsuite using the +# DP: installed shared libraries. + +--- a/src/libstdc++-v3/testsuite/lib/libstdc++.exp ++++ b/src/libstdc++-v3/testsuite/lib/libstdc++.exp +@@ -37,6 +37,12 @@ + # the last thing before testing begins. This can be defined in, e.g., + # ~/.dejagnurc or $DEJAGNU. + ++set test_installed 0 ++if [info exists env(TEST_INSTALLED)] { ++ verbose -log "test installed libstdc++-v3" ++ set test_installed 1 ++} ++ + proc load_gcc_lib { filename } { + global srcdir loaded_libs + +@@ -101,6 +107,7 @@ proc libstdc++_init { testfile } { + global tool_timeout + global DEFAULT_CXXFLAGS + global STATIC_LIBCXXFLAGS ++ global test_installed + + # We set LC_ALL and LANG to C so that we get the same error + # messages as expected. +@@ -120,6 +127,9 @@ proc libstdc++_init { testfile } { + + set blddir [lookfor_file [get_multilibs] libstdc++-v3] + set flags_file "${blddir}/scripts/testsuite_flags" ++ if {$test_installed} { ++ set flags_file "${blddir}/scripts/testsuite_flags.installed" ++ } + set shlib_ext [get_shlib_extension] + v3track flags_file 2 + +@@ -151,7 +161,11 @@ proc libstdc++_init { testfile } { + + # Locate libgcc.a so we don't need to account for different values of + # SHLIB_EXT on different platforms +- set gccdir [lookfor_file $tool_root_dir gcc/libgcc.a] ++ if {$test_installed} { ++ set gccdir "" ++ } else { ++ set gccdir [lookfor_file $tool_root_dir gcc/libgcc.a] ++ } + if {$gccdir != ""} { + set gccdir [file dirname $gccdir] + append ld_library_path_tmp ":${gccdir}" +@@ -171,7 +185,11 @@ proc libstdc++_init { testfile } { + + # Locate libgomp. This is only required for parallel mode. + set v3-libgomp 0 +- set libgompdir [lookfor_file $blddir/../libgomp .libs/libgomp.$shlib_ext] ++ if {$test_installed} { ++ set libgompdir "" ++ } else { ++ set libgompdir [lookfor_file $blddir/../libgomp .libs/libgomp.$shlib_ext] ++ } + if {$libgompdir != ""} { + set v3-libgomp 1 + set libgompdir [file dirname $libgompdir] +@@ -193,7 +211,12 @@ proc libstdc++_init { testfile } { + + # Locate libstdc++ shared library. (ie libstdc++.so.) + set v3-sharedlib 0 +- set sharedlibdir [lookfor_file $blddir src/.libs/libstdc++.$shlib_ext] ++ if {$test_installed} { ++ set sharedlibdir "" ++ set v3-sharedlib 1 ++ } else { ++ set sharedlibdir [lookfor_file $blddir src/.libs/libstdc++.$shlib_ext] ++ } + if {$sharedlibdir != ""} { + if { ([string match "*-*-gnu*" $target_triplet] + || [string match "*-*-linux*" $target_triplet] diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/musl-ssp.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/musl-ssp.diff new file mode 100644 index 0000000000..f3468d3e62 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/musl-ssp.diff @@ -0,0 +1,21 @@ +See https://git.alpinelinux.org/aports/commit/?id=d307f133de1f8a9993ab0d6fd51176b9373df4c3 +and https://www.openwall.com/lists/musl/2014/11/05/3 + +--- a/src/gcc/gcc.cc ++++ b/src/gcc/gcc.cc +@@ -1085,8 +1085,15 @@ proper position among the other output f + + #ifndef LINK_SSP_SPEC + #ifdef TARGET_LIBC_PROVIDES_SSP ++#if DEFAULT_LIBC == LIBC_MUSL ++/* When linking without -fstack-protector-something but including objects that ++ were built with -fstack-protector-something, calls to __stack_chk_fail_local ++ can be emitted. Thus -lssp_nonshared must be linked unconditionally. */ ++#define LINK_SSP_SPEC "-lssp_nonshared" ++#else + #define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \ + "|fstack-protector-strong|fstack-protector-explicit:}" ++#endif + #else + #define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \ + "|fstack-protector-strong|fstack-protector-explicit" \ diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/newlib-amdgcn-locks.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/newlib-amdgcn-locks.diff new file mode 100644 index 0000000000..59a767370f --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/newlib-amdgcn-locks.diff @@ -0,0 +1,303 @@ +# DP: newlib: amdgcn: Implement proper locks + +--- a/newlib-4.4.0.20231231/newlib/Makefile.in ++++ b/newlib-4.4.0.20231231/newlib/Makefile.in +@@ -520,7 +520,8 @@ check_PROGRAMS = + + @HAVE_LIBC_SYS_AMDGCN_DIR_TRUE@am__append_43 = \ + @HAVE_LIBC_SYS_AMDGCN_DIR_TRUE@ libc/sys/amdgcn/close.c libc/sys/amdgcn/fstat.c libc/sys/amdgcn/isatty.c libc/sys/amdgcn/lseek.c libc/sys/amdgcn/read.c libc/sys/amdgcn/write.c \ +-@HAVE_LIBC_SYS_AMDGCN_DIR_TRUE@ libc/sys/amdgcn/fcntl.c libc/sys/amdgcn/getpid.c libc/sys/amdgcn/kill.c libc/sys/amdgcn/open.c libc/sys/amdgcn/raise.c libc/sys/amdgcn/stat.c libc/sys/amdgcn/unlink.c ++@HAVE_LIBC_SYS_AMDGCN_DIR_TRUE@ libc/sys/amdgcn/fcntl.c libc/sys/amdgcn/getpid.c libc/sys/amdgcn/kill.c libc/sys/amdgcn/open.c libc/sys/amdgcn/raise.c libc/sys/amdgcn/stat.c \ ++@HAVE_LIBC_SYS_AMDGCN_DIR_TRUE@ libc/sys/amdgcn/unlink.c libc/sys/amdgcn/lock.c + + @HAVE_LIBC_SYS_ARM_DIR_TRUE@am__append_44 = libc/sys/arm/access.c libc/sys/arm/aeabi_atexit.c libc/sys/arm/sysconf.c + @HAVE_LIBC_SYS_ARM_DIR_TRUE@@MAY_SUPPLY_SYSCALLS_TRUE@am__append_45 = libc/sys/arm/libcfunc.c libc/sys/arm/trap.S libc/sys/arm/syscalls.c +@@ -1578,7 +1579,8 @@ am__objects_51 = libc/ssp/libc_a-chk_fai + @HAVE_LIBC_SYS_AMDGCN_DIR_TRUE@ libc/sys/amdgcn/libc_a-open.$(OBJEXT) \ + @HAVE_LIBC_SYS_AMDGCN_DIR_TRUE@ libc/sys/amdgcn/libc_a-raise.$(OBJEXT) \ + @HAVE_LIBC_SYS_AMDGCN_DIR_TRUE@ libc/sys/amdgcn/libc_a-stat.$(OBJEXT) \ +-@HAVE_LIBC_SYS_AMDGCN_DIR_TRUE@ libc/sys/amdgcn/libc_a-unlink.$(OBJEXT) ++@HAVE_LIBC_SYS_AMDGCN_DIR_TRUE@ libc/sys/amdgcn/libc_a-unlink.$(OBJEXT) \ ++@HAVE_LIBC_SYS_AMDGCN_DIR_TRUE@ libc/sys/amdgcn/libc_a-lock.$(OBJEXT) + @HAVE_LIBC_SYS_ARM_DIR_TRUE@am__objects_55 = libc/sys/arm/libc_a-access.$(OBJEXT) \ + @HAVE_LIBC_SYS_ARM_DIR_TRUE@ libc/sys/arm/libc_a-aeabi_atexit.$(OBJEXT) \ + @HAVE_LIBC_SYS_ARM_DIR_TRUE@ libc/sys/arm/libc_a-sysconf.$(OBJEXT) +@@ -6975,6 +6977,9 @@ libc/sys/amdgcn/libc_a-stat.$(OBJEXT): + libc/sys/amdgcn/libc_a-unlink.$(OBJEXT): \ + libc/sys/amdgcn/$(am__dirstamp) \ + libc/sys/amdgcn/$(DEPDIR)/$(am__dirstamp) ++libc/sys/amdgcn/libc_a-lock.$(OBJEXT): \ ++ libc/sys/amdgcn/$(am__dirstamp) \ ++ libc/sys/amdgcn/$(DEPDIR)/$(am__dirstamp) + libc/sys/arm/$(am__dirstamp): + @$(MKDIR_P) libc/sys/arm + @: > libc/sys/arm/$(am__dirstamp) +@@ -13279,6 +13284,7 @@ distclean-compile: + @AMDEP_TRUE@@am__include@ @am__quote@libc/sys/amdgcn/$(DEPDIR)/libc_a-getpid.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@libc/sys/amdgcn/$(DEPDIR)/libc_a-isatty.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@libc/sys/amdgcn/$(DEPDIR)/libc_a-kill.Po@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@libc/sys/amdgcn/$(DEPDIR)/libc_a-lock.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@libc/sys/amdgcn/$(DEPDIR)/libc_a-lseek.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@libc/sys/amdgcn/$(DEPDIR)/libc_a-open.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@libc/sys/amdgcn/$(DEPDIR)/libc_a-raise.Po@am__quote@ +@@ -30074,6 +30080,20 @@ libc/sys/amdgcn/libc_a-unlink.obj: libc/ + @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libc_a_CPPFLAGS) $(CPPFLAGS) $(libc_a_CFLAGS) $(CFLAGS) -c -o libc/sys/amdgcn/libc_a-unlink.obj `if test -f 'libc/sys/amdgcn/unlink.c'; then $(CYGPATH_W) 'libc/sys/amdgcn/unlink.c'; else $(CYGPATH_W) '$(srcdir)/libc/sys/amdgcn/unlink.c'; fi` + ++libc/sys/amdgcn/libc_a-lock.o: libc/sys/amdgcn/lock.c ++@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libc_a_CPPFLAGS) $(CPPFLAGS) $(libc_a_CFLAGS) $(CFLAGS) -MT libc/sys/amdgcn/libc_a-lock.o -MD -MP -MF libc/sys/amdgcn/$(DEPDIR)/libc_a-lock.Tpo -c -o libc/sys/amdgcn/libc_a-lock.o `test -f 'libc/sys/amdgcn/lock.c' || echo '$(srcdir)/'`libc/sys/amdgcn/lock.c ++@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libc/sys/amdgcn/$(DEPDIR)/libc_a-lock.Tpo libc/sys/amdgcn/$(DEPDIR)/libc_a-lock.Po ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libc/sys/amdgcn/lock.c' object='libc/sys/amdgcn/libc_a-lock.o' libtool=no @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libc_a_CPPFLAGS) $(CPPFLAGS) $(libc_a_CFLAGS) $(CFLAGS) -c -o libc/sys/amdgcn/libc_a-lock.o `test -f 'libc/sys/amdgcn/lock.c' || echo '$(srcdir)/'`libc/sys/amdgcn/lock.c ++ ++libc/sys/amdgcn/libc_a-lock.obj: libc/sys/amdgcn/lock.c ++@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libc_a_CPPFLAGS) $(CPPFLAGS) $(libc_a_CFLAGS) $(CFLAGS) -MT libc/sys/amdgcn/libc_a-lock.obj -MD -MP -MF libc/sys/amdgcn/$(DEPDIR)/libc_a-lock.Tpo -c -o libc/sys/amdgcn/libc_a-lock.obj `if test -f 'libc/sys/amdgcn/lock.c'; then $(CYGPATH_W) 'libc/sys/amdgcn/lock.c'; else $(CYGPATH_W) '$(srcdir)/libc/sys/amdgcn/lock.c'; fi` ++@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libc/sys/amdgcn/$(DEPDIR)/libc_a-lock.Tpo libc/sys/amdgcn/$(DEPDIR)/libc_a-lock.Po ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libc/sys/amdgcn/lock.c' object='libc/sys/amdgcn/libc_a-lock.obj' libtool=no @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libc_a_CPPFLAGS) $(CPPFLAGS) $(libc_a_CFLAGS) $(CFLAGS) -c -o libc/sys/amdgcn/libc_a-lock.obj `if test -f 'libc/sys/amdgcn/lock.c'; then $(CYGPATH_W) 'libc/sys/amdgcn/lock.c'; else $(CYGPATH_W) '$(srcdir)/libc/sys/amdgcn/lock.c'; fi` ++ + libc/sys/arm/libc_a-access.o: libc/sys/arm/access.c + @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libc_a_CPPFLAGS) $(CPPFLAGS) $(libc_a_CFLAGS) $(CFLAGS) -MT libc/sys/arm/libc_a-access.o -MD -MP -MF libc/sys/arm/$(DEPDIR)/libc_a-access.Tpo -c -o libc/sys/arm/libc_a-access.o `test -f 'libc/sys/arm/access.c' || echo '$(srcdir)/'`libc/sys/arm/access.c + @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libc/sys/arm/$(DEPDIR)/libc_a-access.Tpo libc/sys/arm/$(DEPDIR)/libc_a-access.Po +--- a/newlib-4.4.0.20231231/newlib/libc/sys/amdgcn/Makefile.inc ++++ b/newlib-4.4.0.20231231/newlib/libc/sys/amdgcn/Makefile.inc +@@ -1,3 +1,4 @@ + libc_a_SOURCES += \ + %D%/close.c %D%/fstat.c %D%/isatty.c %D%/lseek.c %D%/read.c %D%/write.c \ +- %D%/fcntl.c %D%/getpid.c %D%/kill.c %D%/open.c %D%/raise.c %D%/stat.c %D%/unlink.c ++ %D%/fcntl.c %D%/getpid.c %D%/kill.c %D%/open.c %D%/raise.c %D%/stat.c \ ++ %D%/unlink.c %D%/lock.c +--- /dev/null ++++ b/newlib-4.4.0.20231231/newlib/libc/sys/amdgcn/include/sys/lock.h +@@ -0,0 +1,39 @@ ++#ifndef __SYS_LOCK_H__ ++#define __SYS_LOCK_H__ ++ ++#include ++#include <_ansi.h> ++ ++typedef unsigned int _LOCK_T; ++typedef unsigned int _LOCK_RECURSIVE_T; ++ ++#define __LOCK_INIT(CLASS,LOCK) CLASS _LOCK_T LOCK = 0; ++#define __LOCK_INIT_RECURSIVE(CLASS,LOCK) __LOCK_INIT(CLASS,LOCK) ++ ++#define __lock_init(LOCK) LOCK = 0 ++#define __lock_init_recursive(LOCK) LOCK = 0 ++#define __lock_close(LOCK) ((void)0) ++#define __lock_close_recursive(LOCK) ((void) 0) ++#define __lock_acquire(LOCK) __gcn_lock_acquire (&LOCK) ++#define __lock_acquire_recursive(LOCK) \ ++ __gcn_lock_acquire_recursive (&LOCK) ++#define __lock_try_acquire(LOCK) __gcn_try_lock_acquire (&LOCK) ++#define __lock_try_acquire_recursive(LOCK) \ ++ __gcn_lock_try_acquire_recursive (&LOCK) ++#define __lock_release(LOCK) __gcn_lock_release (&LOCK) ++#define __lock_release_recursive(LOCK) \ ++ __gcn_lock_release_recursive (&LOCK) ++ ++ ++int __gcn_try_lock_acquire (_LOCK_T *lock_ptr); ++void __gcn_lock_acquire (_LOCK_T *lock_ptr); ++void __gcn_lock_release (_LOCK_T *lock_ptr); ++int __gcn_lock_try_acquire_recursive (_LOCK_T *lock_ptr); ++void __gcn_lock_acquire_recursive (_LOCK_T *lock_ptr); ++void __gcn_lock_release_recursive (_LOCK_T *lock_ptr); ++ ++#ifdef __cplusplus ++} ++#endif ++ ++#endif /* __SYS_LOCK_H__ */ +--- /dev/null ++++ b/newlib-4.4.0.20231231/newlib/libc/sys/amdgcn/lock.c +@@ -0,0 +1,187 @@ ++/* ++ * Support file for amdgcn in newlib. ++ * Copyright (c) 2024 BayLibre. ++ * ++ * The authors hereby grant permission to use, copy, modify, distribute, ++ * and license this software and its documentation for any purpose, provided ++ * that existing copyright notices are retained in all copies and that this ++ * notice is included verbatim in any distributions. No written agreement, ++ * license, or royalty fee is required for any of the authorized uses. ++ * Modifications to this software may be copyrighted by their authors ++ * and need not follow the licensing terms described here, provided that ++ * the new terms are clearly indicated on the first page of each file where ++ * they apply. ++ */ ++ ++/* Lock routines for AMD GPU devices. ++ ++ The lock is a 32-bit int: ++ - bits 0-3: wavefront id ++ - bits 4-23: workgroup id (+1, so never zero) ++ - bits 24-31: recursive lock count. ++ ++ The purpose of the "relaxed" loads and stores being "atomic" here is ++ mostly just to ensure we punch through the caches consistently. ++ ++ Non-recursive locks may be unlocked by any thread. It's an error to ++ attempt to unlock a recursive lock from the wrong thread. ++ ++ The DEBUG statements here use sprintf and write to avoid taking locks ++ themselves. */ ++ ++#include ++#include ++ ++#define DEBUG 0 ++ ++#if DEBUG ++extern void write(int, char *, int); ++#endif ++ ++static unsigned ++__gcn_thread_id () ++{ ++ /* Dim(0) is the workgroup ID; range 0 to maybe thousands. ++ Dim(1) is the wavefront ID; range 0 to 15. */ ++ return (((__builtin_gcn_dim_pos (0) + 1) << 4) ++ + __builtin_gcn_dim_pos (1)); ++} ++ ++static int ++__gcn_lock_acquire_int (_LOCK_T *lock_ptr, int _try) ++{ ++ int id = __gcn_thread_id (); ++ ++#if DEBUG ++ char buf[1000]; ++ __builtin_sprintf (buf,"acquire:%p(%d) lock_value:0x%x id:0x%x", lock_ptr, ++ _try, *lock_ptr, id); ++ write (1, buf, __builtin_strlen(buf)); ++#endif ++ ++ int expected = 0; ++ while (!__atomic_compare_exchange_n (lock_ptr, &expected, id, 0, ++ __ATOMIC_ACQUIRE, __ATOMIC_RELAXED)) ++ { ++ /* Lock *not* acquired. */ ++ if (_try) ++ return 0; ++ else ++ { ++ asm ("s_sleep 64"); ++ expected = 0; ++ } ++ } ++ ++#if DEBUG ++ __builtin_sprintf (buf,"acquired:%p(%d) lock_value:0x%x id:0x%x", lock_ptr, ++ _try, *lock_ptr, id); ++ write (1, buf, __builtin_strlen(buf)); ++#endif ++ ++ return 1; ++} ++ ++int ++__gcn_try_lock_acquire (_LOCK_T *lock_ptr) ++{ ++ return __gcn_lock_acquire_int (lock_ptr, 1); ++} ++ ++void ++__gcn_lock_acquire (_LOCK_T *lock_ptr) ++{ ++ __gcn_lock_acquire_int (lock_ptr, 0); ++} ++ ++static int ++__gcn_lock_acquire_recursive_int (_LOCK_T *lock_ptr, int _try) ++{ ++ int id = __gcn_thread_id (); ++ ++#if DEBUG ++ char buf[1000]; ++ __builtin_sprintf (buf,"acquire recursive:%p(%d) lock_value:0x%x id:0x%x", ++ lock_ptr, _try, *lock_ptr, id); ++ write (1, buf, __builtin_strlen(buf)); ++#endif ++ ++ unsigned int lock_value = __atomic_load_n (lock_ptr, __ATOMIC_RELAXED); ++ if ((lock_value & 0xffffff) == id) ++ { ++ /* This thread already holds the lock. ++ Increment the recursion counter and update the lock. */ ++ int count = lock_value >> 24; ++ lock_value = ((count + 1) << 24) | id; ++ __atomic_store_n (lock_ptr, lock_value, __ATOMIC_RELAXED); ++ ++#if DEBUG ++ __builtin_sprintf (buf, ++ "increment recursive:%p(%d) lock_value:0x%x id:0x%x", ++ lock_ptr, _try, *lock_ptr, id); ++ write (1, buf, __builtin_strlen(buf)); ++#endif ++ ++ return 1; ++ } ++ else ++ return __gcn_lock_acquire_int (lock_ptr, _try); ++} ++ ++int ++__gcn_lock_try_acquire_recursive (_LOCK_T *lock_ptr) ++{ ++ return __gcn_lock_acquire_recursive_int (lock_ptr, 1); ++} ++ ++void ++__gcn_lock_acquire_recursive (_LOCK_T *lock_ptr) ++{ ++ __gcn_lock_acquire_recursive_int (lock_ptr, 0); ++} ++ ++void ++__gcn_lock_release (_LOCK_T *lock_ptr) ++{ ++#if DEBUG ++ char buf[1000]; ++ __builtin_sprintf (buf,"release:%p lock_value:0x%x id:0x%x", lock_ptr, ++ *lock_ptr, __gcn_thread_id()); ++ write (1, buf, __builtin_strlen(buf)); ++#endif ++ ++ __atomic_store_n (lock_ptr, 0, __ATOMIC_RELEASE); ++} ++ ++void ++__gcn_lock_release_recursive (_LOCK_T *lock_ptr) ++{ ++ int id = __gcn_thread_id (); ++ unsigned int lock_value = __atomic_load_n (lock_ptr, __ATOMIC_RELAXED); ++ ++#if DEBUG ++ char buf[1000]; ++ __builtin_sprintf (buf, "release recursive:%p lock_value:0x%x id:0x%x", ++ lock_ptr, lock_value, id); ++ write (1, buf, __builtin_strlen(buf)); ++#endif ++ ++ /* It is an error to call this function from the wrong thread. */ ++ assert ((lock_value & 0xffffff) == id); ++ ++ /* Decrement or release the lock. */ ++ int count = lock_value >> 24; ++ if (count > 0) ++ { ++ lock_value = ((count - 1) << 24) | id; ++ __atomic_store_n (lock_ptr, lock_value, __ATOMIC_RELAXED); ++ ++#if DEBUG ++ __builtin_sprintf (buf, "decrement recursive:%p lock_value:0x%x id:0x%x", ++ lock_ptr, *lock_ptr, id); ++ write (1, buf, __builtin_strlen(buf)); ++#endif ++ } ++ else ++ __gcn_lock_release (lock_ptr); ++} diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/note-gnu-stack.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/note-gnu-stack.diff new file mode 100644 index 0000000000..b1aec35f00 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/note-gnu-stack.diff @@ -0,0 +1,125 @@ +# DP: Add .note.GNU-stack sections for gcc's crt files, libffi and boehm-gc +# DP: Taken from FC. + +gcc/ + +2004-09-20 Jakub Jelinek + + * config/rs6000/ppc-asm.h: Add .note.GNU-stack section also + on ppc64-linux. + + * config/ia64/lib1funcs.asm: Add .note.GNU-stack section on + ia64-linux. + * config/ia64/crtbegin.asm: Likewise. + * config/ia64/crtend.asm: Likewise. + * config/ia64/crti.asm: Likewise. + * config/ia64/crtn.asm: Likewise. + +2004-05-14 Jakub Jelinek + + * config/ia64/linux.h (TARGET_ASM_FILE_END): Define. + +libffi/ + +2007-05-11 Daniel Jacobowitz + + * src/arm/sysv.S: Fix ARM comment marker. + +2005-02-08 Jakub Jelinek + + * src/alpha/osf.S: Add .note.GNU-stack on Linux. + * src/s390/sysv.S: Likewise. + * src/powerpc/linux64.S: Likewise. + * src/powerpc/linux64_closure.S: Likewise. + * src/powerpc/ppc_closure.S: Likewise. + * src/powerpc/sysv.S: Likewise. + * src/x86/unix64.S: Likewise. + * src/x86/sysv.S: Likewise. + * src/sparc/v8.S: Likewise. + * src/sparc/v9.S: Likewise. + * src/m68k/sysv.S: Likewise. + * src/ia64/unix.S: Likewise. + * src/arm/sysv.S: Likewise. + +--- + gcc/config/ia64/linux.h | 3 +++ + gcc/config/rs6000/ppc-asm.h | 2 +- + libgcc/config/ia64/crtbegin.S | 4 ++++ + libgcc/config/ia64/crtend.S | 4 ++++ + libgcc/config/ia64/crti.S | 4 ++++ + libgcc/config/ia64/crtn.S | 4 ++++ + libgcc/config/ia64/lib1funcs.S | 4 ++++ + 9 files changed, 39 insertions(+), 13 deletions(-) + +--- a/src/libgcc/config/ia64/crtbegin.S ++++ b/src/libgcc/config/ia64/crtbegin.S +@@ -185,3 +185,7 @@ __do_global_dtors_aux: + .weak __cxa_finalize + #endif + .weak _Jv_RegisterClasses ++ ++#ifdef __linux__ ++.section .note.GNU-stack; .previous ++#endif +--- a/src/libgcc/config/ia64/crtend.S ++++ b/src/libgcc/config/ia64/crtend.S +@@ -114,3 +114,7 @@ __do_global_ctors_aux: + + br.ret.sptk.many rp + .endp __do_global_ctors_aux ++ ++#ifdef __linux__ ++.section .note.GNU-stack; .previous ++#endif +--- a/src/libgcc/config/ia64/crti.S ++++ b/src/libgcc/config/ia64/crti.S +@@ -51,3 +51,7 @@ _fini: + .body + + # end of crti.S ++ ++#ifdef __linux__ ++.section .note.GNU-stack; .previous ++#endif +--- a/src/libgcc/config/ia64/crtn.S ++++ b/src/libgcc/config/ia64/crtn.S +@@ -41,3 +41,7 @@ + br.ret.sptk.many b0 + + # end of crtn.S ++ ++#ifdef __linux__ ++.section .note.GNU-stack; .previous ++#endif +--- a/src/libgcc/config/ia64/lib1funcs.S ++++ b/src/libgcc/config/ia64/lib1funcs.S +@@ -793,3 +793,7 @@ __floattitf: + .endp __floattitf + #endif + #endif ++ ++#ifdef __linux__ ++.section .note.GNU-stack; .previous ++#endif +--- a/src/gcc/config/ia64/linux.h ++++ b/src/gcc/config/ia64/linux.h +@@ -79,5 +79,8 @@ do { \ + #undef TARGET_INIT_LIBFUNCS + #define TARGET_INIT_LIBFUNCS ia64_soft_fp_init_libfuncs + ++#undef TARGET_ASM_FILE_END ++#define TARGET_ASM_FILE_END file_end_indicate_exec_stack ++ + /* Define this to be nonzero if static stack checking is supported. */ + #define STACK_CHECK_STATIC_BUILTIN 1 +--- a/src/gcc/config/rs6000/ppc-asm.h ++++ b/src/gcc/config/rs6000/ppc-asm.h +@@ -384,7 +384,7 @@ GLUE(.L,name): \ + #endif + #endif + +-#if defined __linux__ && !defined __powerpc64__ ++#if defined __linux__ + .section .note.GNU-stack + .previous + #endif diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/pr100067-revert.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/pr100067-revert.diff new file mode 100644 index 0000000000..66ac838e84 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/pr100067-revert.diff @@ -0,0 +1,117 @@ +# DP: Revert the fix for PR target/100067, breaking the ARM multilib build + +--- a/src/gcc/config/arm/arm.cc ++++ b/src/gcc/config/arm/arm.cc +@@ -3298,22 +3298,21 @@ arm_configure_build_target (struct arm_b + bitmap_xor (isa_delta, cpu_isa, target->isa); + /* Ignore any bits that are quirk bits. */ + bitmap_and_compl (isa_delta, isa_delta, isa_quirkbits); +- /* If the user (or the default configuration) has specified a +- specific FPU, then ignore any bits that depend on the FPU +- configuration. Do similarly if using the soft-float +- ABI. */ +- if (opts->x_arm_fpu_index != TARGET_FPU_auto +- || arm_float_abi == ARM_FLOAT_ABI_SOFT) ++ /* Ignore (for now) any bits that might be set by -mfpu. */ ++ bitmap_and_compl (isa_delta, isa_delta, isa_all_fpubits_internal); ++ ++ /* And if the target ISA lacks floating point, ignore any ++ extensions that depend on that. */ ++ if (!bitmap_bit_p (target->isa, isa_bit_vfpv2)) + bitmap_and_compl (isa_delta, isa_delta, isa_all_fpbits); + + if (!bitmap_empty_p (isa_delta)) + { + if (warn_compatible) + warning (0, "switch %<-mcpu=%s%> conflicts " +- "with switch %<-march=%s%>", +- opts->x_arm_cpu_string, +- opts->x_arm_arch_string); +- ++ "with %<-march=%s%> switch", ++ arm_selected_cpu->common.name, ++ arm_selected_arch->common.name); + /* -march wins for code generation. + -mcpu wins for default tuning. */ + if (!arm_selected_tune) +@@ -3464,10 +3463,6 @@ arm_configure_build_target (struct arm_b + auto_sbitmap fpu_bits (isa_num_bits); + + arm_initialize_isa (fpu_bits, arm_selected_fpu->isa_bits); +- /* This should clear out ALL bits relating to the FPU/simd +- extensions, to avoid potentially invalid combinations later on +- that we can't match. At present we only clear out those bits +- that can be set by -mfpu. This should be fixed in GCC-12. */ + bitmap_and_compl (target->isa, target->isa, isa_all_fpubits_internal); + bitmap_ior (target->isa, target->isa, fpu_bits); + } +@@ -3978,7 +3973,7 @@ arm_options_perform_arch_sanity_checks ( + arm_pcs_default = ARM_PCS_AAPCS_VFP; + if (!bitmap_bit_p (arm_active_target.isa, isa_bit_vfpv2) + && !bitmap_bit_p (arm_active_target.isa, isa_bit_mve)) +- error ("%<-mfloat-abi=hard%>: selected architecture lacks an FPU"); ++ error ("%<-mfloat-abi=hard%>: selected processor lacks an FPU"); + } + else + arm_pcs_default = ARM_PCS_AAPCS; +--- a/src/libgomp/testsuite/libgomp.fortran/alloc-1.F90 ++++ b/src/libgomp/testsuite/libgomp.fortran/alloc-1.F90 +@@ -139,13 +139,12 @@ + cp = omp_alloc (ONEoFIVE, & + & omp_null_allocator) + if (mod (transfer (cp, intptr), 32_c_intptr_t) /= 0) stop 17 +- call c_f_pointer (cp, p, [ONEoFIVE & ++ call c_f_pointer (cq, q, [ONEoFIVE & + & / c_sizeof (i)]) + p(1) = 5 + p(ONEoFIVE / c_sizeof (i)) = 6 + cq = omp_alloc (768_c_size_t, omp_null_allocator) + if (mod (transfer (cq, intptr), 128_c_intptr_t) /= 0) stop 18 +- call c_f_pointer (cq, q, [768 / c_sizeof (i)]) + q(1) = 7 + q(768 / c_sizeof (i)) = 8 + if (c_associated (omp_alloc (768_c_size_t, omp_null_allocator))) & +--- a/src/gcc/testsuite/g++.target/arm/arm.exp ++++ b/src/gcc/testsuite/g++.target/arm/arm.exp +@@ -35,7 +35,7 @@ if ![info exists DEFAULT_CXXFLAGS] then + + global dg_runtest_extra_prunes + set dg_runtest_extra_prunes "" +-lappend dg_runtest_extra_prunes "warning: switch '-m(cpu|arch)=.*' conflicts with switch '-m(cpu|arch)=.*'" ++lappend dg_runtest_extra_prunes "warning: switch '-m(cpu|arch)=.*' conflicts with '-m(cpu|arch)=.*' switch" + + # Initialize `dg'. + dg-init +--- a/src/gcc/testsuite/g++.target/arm/mve.exp ++++ b/src/gcc/testsuite/g++.target/arm/mve.exp +@@ -33,7 +33,7 @@ if ![info exists DEFAULT_CXXFLAGS] then + # This variable should only apply to tests called in this exp file. + global dg_runtest_extra_prunes + set dg_runtest_extra_prunes "" +-lappend dg_runtest_extra_prunes "warning: switch '-m(cpu|arch)=.*' conflicts with switch '-m(cpu|arch)=.*'" ++lappend dg_runtest_extra_prunes "warning: switch -m(cpu|arch)=.* conflicts with -m(cpu|arch)=.* switch" + + set save-dg-do-what-default ${dg-do-what-default} + set dg-do-what-default "assemble" +--- a/src/gcc/testsuite/gcc.target/arm/arm.exp ++++ b/src/gcc/testsuite/gcc.target/arm/arm.exp +@@ -33,7 +33,7 @@ if ![info exists DEFAULT_CFLAGS] then { + # This variable should only apply to tests called in this exp file. + global dg_runtest_extra_prunes + set dg_runtest_extra_prunes "" +-lappend dg_runtest_extra_prunes "warning: switch '-m(cpu|arch)=.*' conflicts with switch '-m(cpu|arch)=.*'" ++lappend dg_runtest_extra_prunes "warning: switch '-m(cpu|arch)=.*' conflicts with '-m(cpu|arch)=.*' switch" + + # Initialize `dg'. + dg-init +--- a/src/gcc/testsuite/gcc.target/arm/mve/mve.exp ++++ b/src/gcc/testsuite/gcc.target/arm/mve/mve.exp +@@ -33,7 +33,7 @@ if ![info exists DEFAULT_CFLAGS] then { + # This variable should only apply to tests called in this exp file. + global dg_runtest_extra_prunes + set dg_runtest_extra_prunes "" +-lappend dg_runtest_extra_prunes "warning: switch '-m(cpu|arch)=.*' conflicts with switch '-m(cpu|arch)=.*'" ++lappend dg_runtest_extra_prunes "warning: switch -m(cpu|arch)=.* conflicts with -m(cpu|arch)=.* switch" + + set dg-do-what-default "assemble" + diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/pr104290-followup.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/pr104290-followup.diff new file mode 100644 index 0000000000..abc8468479 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/pr104290-followup.diff @@ -0,0 +1,14 @@ +# DP: Follow-up patch for PR go/104290 (Hurd) + +--- a/src/gcc/config/gnu.h 2022-02-06 11:59:41.000000000 +0100 ++++ b/src/gcc/config/gnu.h 2022-02-06 12:00:19.000000000 +0100 +@@ -19,6 +19,9 @@ + along with GCC. If not, see . + */ + ++#define OPTION_GLIBC_P(opts) (DEFAULT_LIBC == LIBC_GLIBC) ++#define OPTION_GLIBC OPTION_GLIBC_P (&global_options) ++ + #undef GNU_USER_TARGET_OS_CPP_BUILTINS + #define GNU_USER_TARGET_OS_CPP_BUILTINS() \ + do { \ diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/pr107475.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/pr107475.diff new file mode 100644 index 0000000000..8fbce84df9 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/pr107475.diff @@ -0,0 +1,10 @@ +--- a/src/gcc/ada/Makefile.rtl ++++ b/src/gcc/ada/Makefile.rtl +@@ -2584,6 +2584,7 @@ ifeq ($(strip $(filter-out %x32 linux%,$(target_cpu) $(target_os))),) + EXTRA_GNATRTL_TASKING_OBJS=s-linux.o a-exetim.o + EH_MECHANISM=-gcc + THREADSLIB=-lpthread -lrt ++ MISCLIB = -ldl + GNATLIB_SHARED=gnatlib-shared-dual + GMEM_LIB = gmemlib + LIBRARY_VERSION := $(LIB_VERSION) diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/pr110934.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/pr110934.diff new file mode 100644 index 0000000000..eec6ac8e49 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/pr110934.diff @@ -0,0 +1,121 @@ +# DP: Fix PR target/110934 (m68k), taken from the trunk + +From f1dea0fed946ba40bd6bbe40ad1386aa9303418c Mon Sep 17 00:00:00 2001 +From: Mikael Pettersson +Date: Fri, 19 Jan 2024 16:23:34 -0700 +Subject: [PATCH] [PATCH] Avoid ICE on m68k -fzero-call-used-regs -fpic + [PR110934] + +PR110934 is a problem on m68k where -fzero-call-used-regs -fpic ICEs +when clearing an FP register. + +The generic code generates an XFmode move of zero to that register, +which becomes an XFmode load from initialized data, which due to -fpic +uses a non-constant address, which the backend rejects. The +zero-call-used-regs pass runs very late, after register allocation and +frame layout, and at that point we can't allow new uses of the PIC +register or new pseudos. + +To clear an FP register on m68k it's enough to do the move in SFmode, +but the generic code can't be told to do that, so this patch updates +m68k to use its own TARGET_ZERO_CALL_USED_REGS. + +Bootstrapped and regression tested on m68k-linux-gnu. + +Ok for master? (I don't have commit rights.) + +gcc/ + + PR target/110934 + * config/m68k/m68k.cc (m68k_zero_call_used_regs): New function. + (TARGET_ZERO_CALL_USED_REGS): Define. + +gcc/testsuite/ + + PR target/110934 + * gcc.target/m68k/pr110934.c: New test. +--- + gcc/config/m68k/m68k.cc | 46 ++++++++++++++++++++++++ + gcc/testsuite/gcc.target/m68k/pr110934.c | 9 +++++ + 2 files changed, 55 insertions(+) + create mode 100644 gcc/testsuite/gcc.target/m68k/pr110934.c + +--- a/src/gcc/config/m68k/m68k.cc ++++ b/src/gcc/config/m68k/m68k.cc +@@ -196,6 +196,7 @@ static bool m68k_modes_tieable_p (machin + static machine_mode m68k_promote_function_mode (const_tree, machine_mode, + int *, const_tree, int); + static void m68k_asm_final_postscan_insn (FILE *, rtx_insn *insn, rtx [], int); ++static HARD_REG_SET m68k_zero_call_used_regs (HARD_REG_SET); + + /* Initialize the GCC target structure. */ + +@@ -360,6 +361,9 @@ static void m68k_asm_final_postscan_insn + #undef TARGET_ASM_FINAL_POSTSCAN_INSN + #define TARGET_ASM_FINAL_POSTSCAN_INSN m68k_asm_final_postscan_insn + ++#undef TARGET_ZERO_CALL_USED_REGS ++#define TARGET_ZERO_CALL_USED_REGS m68k_zero_call_used_regs ++ + static const struct attribute_spec m68k_attribute_table[] = + { + /* { name, min_len, max_len, decl_req, type_req, fn_type_req, +@@ -7166,4 +7170,46 @@ m68k_promote_function_mode (const_tree t + return mode; + } + ++/* Implement TARGET_ZERO_CALL_USED_REGS. */ ++ ++static HARD_REG_SET ++m68k_zero_call_used_regs (HARD_REG_SET need_zeroed_hardregs) ++{ ++ rtx zero_fpreg = NULL_RTX; ++ ++ for (unsigned int regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++) ++ if (TEST_HARD_REG_BIT (need_zeroed_hardregs, regno)) ++ { ++ rtx reg, zero; ++ ++ if (INT_REGNO_P (regno)) ++ { ++ reg = regno_reg_rtx[regno]; ++ zero = CONST0_RTX (SImode); ++ } ++ else if (FP_REGNO_P (regno)) ++ { ++ reg = gen_raw_REG (SFmode, regno); ++ if (zero_fpreg == NULL_RTX) ++ { ++ /* On the 040/060 clearing an FP reg loads a large ++ immediate. To reduce code size use the first ++ cleared FP reg to clear remaining ones. Don't do ++ this on cores which use fmovecr. */ ++ zero = CONST0_RTX (SFmode); ++ if (TUNE_68040_60) ++ zero_fpreg = reg; ++ } ++ else ++ zero = zero_fpreg; ++ } ++ else ++ gcc_unreachable (); ++ ++ emit_move_insn (reg, zero); ++ } ++ ++ return need_zeroed_hardregs; ++} ++ + #include "gt-m68k.h" +--- /dev/null ++++ b/src/gcc/testsuite/gcc.target/m68k/pr110934.c +@@ -0,0 +1,9 @@ ++/* { dg-do compile } */ ++/* { do-options "-fzero-call-used-regs=used -fpic -O2" } */ ++ ++extern double clobber_fp0 (void); ++ ++void foo (void) ++{ ++ clobber_fp0 (); ++} diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/pr113030.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/pr113030.diff new file mode 100644 index 0000000000..49e323c1e7 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/pr113030.diff @@ -0,0 +1,58 @@ +# DP: Fix PR target/113030, taken from the trunk + +From 41caf6b0d603408a829b37f7f7fb09d64d814d48 Mon Sep 17 00:00:00 2001 +From: Andrew Pinski +Date: Sat, 20 Jan 2024 23:12:31 -0800 +Subject: [PATCH] arm: Fix parsecpu.awk for aliases [PR113030] + +So the problem here is the 2 functions check_cpu and check_arch use +the wrong variable to check if an alias is valid for that cpu/arch. +check_cpu uses cpu_optaliases instead of cpu_opt_alias. cpu_optaliases +is an array of index'ed by the cpuname that contains all of the valid aliases +for that cpu but cpu_opt_alias is an double index array which is index'ed +by cpuname and the alias which provides what is the alias for that option. +Similar thing happens for check_arch and arch_optaliases vs arch_optaliases. + +Tested by running: +``` +awk -f config/arm/parsecpu.awk -v cmd="chkarch armv7-a+simd" config/arm/arm-cpus.in +awk -f config/arm/parsecpu.awk -v cmd="chkarch armv7-a+neon" config/arm/arm-cpus.in +awk -f config/arm/parsecpu.awk -v cmd="chkarch armv7-a+neon-vfpv3" config/arm/arm-cpus.in +``` +And they don't return error back. + +gcc/ChangeLog: + + PR target/113030 + * config/arm/parsecpu.awk (check_cpu): Use cpu_opt_alias + instead of cpu_optaliases. + (check_arch): Use arch_opt_alias instead of arch_optaliases. + +Signed-off-by: Andrew Pinski +--- + gcc/config/arm/parsecpu.awk | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/src/gcc/config/arm/parsecpu.awk ++++ b/src/gcc/config/arm/parsecpu.awk +@@ -529,7 +529,7 @@ function check_cpu (name) { + + for (n = 2; n <= exts; n++) { + if (!((cpu_name, extensions[n]) in cpu_opt_remove) \ +- && !((cpu_name, extensions[n]) in cpu_optaliases)) { ++ && !((cpu_name, extensions[n]) in cpu_opt_alias)) { + return "error" + } + } +@@ -552,7 +552,7 @@ function check_arch (name) { + + for (n = 2; n <= exts; n++) { + if (!((extensions[1], extensions[n]) in arch_opt_remove) \ +- && !((extensions[1], extensions[n]) in arch_optaliases)) { ++ && !((extensions[1], extensions[n]) in arch_opt_alias)) { + return "error" + } + } +-- +2.39.3 + diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/pr11897.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/pr11897.diff new file mode 100644 index 0000000000..8ec8a8edcb --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/pr11897.diff @@ -0,0 +1,64 @@ +From: Richard Sandiford +Date: Wed, 5 Mar 2025 08:25:55 +0000 +Subject: [PATCH] Fix folding of BIT_NOT_EXPR for POLY_INT_CST [PR118976] + +There was an embarrassing typo in the folding of BIT_NOT_EXPR for +POLY_INT_CSTs: it used - rather than ~ on the poly_int. Not sure +how that happened, but it might have been due to the way that +~x is implemented as -1 - x internally. + +gcc/ + PR tree-optimization/118976 + * fold-const.cc (const_unop): Use ~ rather than - for BIT_NOT_EXPR. + * config/aarch64/aarch64.cc (aarch64_test_sve_folding): New function. + (aarch64_run_selftests): Run it. + +(cherry picked from commit 78380fd7f743e23dfdf013d68a2f0347e1511550) + +Bug-Ubuntu: https://launchpad.net/bugs/2101084 +Origin: upstream, https://gcc.gnu.org/g:7995713012fcc0e0e098157d87fe5ff9d85c820b + +diff --git a/src/gcc/config/aarch64/aarch64.cc b/src/gcc/config/aarch64/aarch64.cc +index a18355e8c96..0a98f005b71 100644 +--- a/src/gcc/config/aarch64/aarch64.cc ++++ b/src/gcc/config/aarch64/aarch64.cc +@@ -27639,6 +27639,16 @@ aarch64_test_fractional_cost () + ASSERT_EQ (cf (1, 2).as_double (), 0.5); + } + ++/* Test SVE arithmetic folding. */ ++ ++static void ++aarch64_test_sve_folding () ++{ ++ tree res = fold_unary (BIT_NOT_EXPR, ssizetype, ++ ssize_int (poly_int64 (1, 1))); ++ ASSERT_TRUE (operand_equal_p (res, ssize_int (poly_int64 (-2, -1)))); ++} ++ + /* Run all target-specific selftests. */ + + static void +@@ -27646,6 +27656,7 @@ aarch64_run_selftests (void) + { + aarch64_test_loading_full_dump (); + aarch64_test_fractional_cost (); ++ aarch64_test_sve_folding (); + } + + } // namespace selftest +diff --git a/src/gcc/fold-const.cc b/src/gcc/fold-const.cc +index 8215cbef991..b5a83f6c5f3 100644 +--- a/src/gcc/fold-const.cc ++++ b/src/gcc/fold-const.cc +@@ -1828,7 +1828,7 @@ const_unop (enum tree_code code, tree type, tree arg0) + if (TREE_CODE (arg0) == INTEGER_CST) + return fold_not_const (arg0, type); + else if (POLY_INT_CST_P (arg0)) +- return wide_int_to_tree (type, -poly_int_cst_value (arg0)); ++ return wide_int_to_tree (type, ~poly_int_cst_value (arg0)); + /* Perform BIT_NOT_EXPR on each element individually. */ + else if (TREE_CODE (arg0) == VECTOR_CST) + { +-- +2.51.0 diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/pr39491.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/pr39491.diff new file mode 100644 index 0000000000..4c518206e3 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/pr39491.diff @@ -0,0 +1,132 @@ +# DP: Proposed patch for PR libstdc++/39491. + +2009-04-16 Benjamin Kosnik + + * src/math_stubs_long_double.cc (__signbitl): Add for hppa linux only. + +Index: a/src/libstdc++-v3/src/math_stubs_long_double.cc +=================================================================== +--- a/src/libstdc++-v3/src/math_stubs_long_double.cc (revision 146216) ++++ b/src/libstdc++-v3/src/math_stubs_long_double.cc (working copy) +@@ -213,4 +221,111 @@ + return tanh((double) x); + } + #endif ++ ++ // From libmath/signbitl.c ++ // XXX ABI mistakenly exported ++#if defined (__hppa__) && defined (__linux__) ++# include ++# include ++ ++typedef unsigned int U_int32_t __attribute ((mode (SI))); ++typedef int Int32_t __attribute ((mode (SI))); ++typedef unsigned int U_int64_t __attribute ((mode (DI))); ++typedef int Int64_t __attribute ((mode (DI))); ++ ++#if BYTE_ORDER == BIG_ENDIAN ++typedef union ++{ ++ long double value; ++ struct ++ { ++ unsigned int sign_exponent:16; ++ unsigned int empty:16; ++ U_int32_t msw; ++ U_int32_t lsw; ++ } parts; ++} ieee_long_double_shape_type; ++#endif ++#if BYTE_ORDER == LITTLE_ENDIAN ++typedef union ++{ ++ long double value; ++ struct ++ { ++ U_int32_t lsw; ++ U_int32_t msw; ++ unsigned int sign_exponent:16; ++ unsigned int empty:16; ++ } parts; ++} ieee_long_double_shape_type; ++#endif ++ ++/* Get int from the exponent of a long double. */ ++#define GET_LDOUBLE_EXP(exp,d) \ ++do { \ ++ ieee_long_double_shape_type ge_u; \ ++ ge_u.value = (d); \ ++ (exp) = ge_u.parts.sign_exponent; \ ++} while (0) ++ ++#if BYTE_ORDER == BIG_ENDIAN ++typedef union ++{ ++ long double value; ++ struct ++ { ++ U_int64_t msw; ++ U_int64_t lsw; ++ } parts64; ++ struct ++ { ++ U_int32_t w0, w1, w2, w3; ++ } parts32; ++} ieee_quad_double_shape_type; ++#endif ++ ++#if BYTE_ORDER == LITTLE_ENDIAN ++typedef union ++{ ++ long double value; ++ struct ++ { ++ U_int64_t lsw; ++ U_int64_t msw; ++ } parts64; ++ struct ++ { ++ U_int32_t w3, w2, w1, w0; ++ } parts32; ++} ieee_quad_double_shape_type; ++#endif ++ ++/* Get most significant 64 bit int from a quad long double. */ ++#define GET_LDOUBLE_MSW64(msw,d) \ ++do { \ ++ ieee_quad_double_shape_type qw_u; \ ++ qw_u.value = (d); \ ++ (msw) = qw_u.parts64.msw; \ ++} while (0) ++ ++int ++__signbitl (long double x) ++{ ++#if LDBL_MANT_DIG == 113 ++ Int64_t msw; ++ ++ GET_LDOUBLE_MSW64 (msw, x); ++ return msw < 0; ++#else ++ Int32_t e; ++ ++ GET_LDOUBLE_EXP (e, x); ++ return e & 0x8000; ++#endif ++} ++#endif ++ ++#ifndef _GLIBCXX_HAVE___SIGNBITL ++ ++#endif + } // extern "C" +--- a/src/libstdc++-v3/config/abi/pre/gnu.ver~ 2009-04-10 01:23:07.000000000 +0200 ++++ b/src/libstdc++-v3/config/abi/pre/gnu.ver 2009-04-21 16:24:24.000000000 +0200 +@@ -635,6 +635,7 @@ + sqrtf; + sqrtl; + copysignf; ++ __signbitl; + + # GLIBCXX_ABI compatibility only. + # std::string diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/pr66368.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/pr66368.diff new file mode 100644 index 0000000000..c06133c63f --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/pr66368.diff @@ -0,0 +1,22 @@ +# DP: PR go/66368, build libgo with -fno-stack-protector + +--- a/src/libgo/Makefile.am ++++ b/src/libgo/Makefile.am +@@ -47,6 +47,7 @@ AM_CPPFLAGS = -I $(srcdir)/runtime $(LIB + ACLOCAL_AMFLAGS = -I ./config -I ../config + + AM_CFLAGS = -fexceptions -fnon-call-exceptions \ ++ -fno-stack-protector \ + $(SPLIT_STACK) $(WARN_CFLAGS) \ + $(STRINGOPS_FLAG) $(HWCAP_CFLAGS) $(OSCFLAGS) \ + -I $(srcdir)/../libgcc -I $(srcdir)/../libbacktrace \ +--- a/src/libgo/Makefile.in ++++ b/src/libgo/Makefile.in +@@ -563,6 +563,7 @@ WARN_CFLAGS = $(WARN_FLAGS) $(WERROR) + AM_CPPFLAGS = -I $(srcdir)/runtime $(LIBFFIINCS) $(PTHREAD_CFLAGS) + ACLOCAL_AMFLAGS = -I ./config -I ../config + AM_CFLAGS = -fexceptions -fnon-call-exceptions \ ++ -fno-stack-protector \ + $(SPLIT_STACK) $(WARN_CFLAGS) \ + $(STRINGOPS_FLAG) $(HWCAP_CFLAGS) $(OSCFLAGS) \ + -I $(srcdir)/../libgcc -I $(srcdir)/../libbacktrace \ diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/pr67590.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/pr67590.diff new file mode 100644 index 0000000000..0b3adfabd0 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/pr67590.diff @@ -0,0 +1,36 @@ +# DP: Fix PR67590, setting objdump macro. + +--- a/src/libcc1/configure.ac ++++ b/src/libcc1/configure.ac +@@ -74,6 +74,31 @@ if test "$GXX" = yes; then + fi + AC_SUBST(libsuffix) + ++# Figure out what objdump we will be using. ++AS_VAR_SET_IF(gcc_cv_objdump,, [ ++if test -f $gcc_cv_binutils_srcdir/configure.ac \ ++ && test -f ../binutils/Makefile \ ++ && test x$build = x$host; then ++ # Single tree build which includes binutils. ++ gcc_cv_objdump=../binutils/objdump$build_exeext ++elif test -x objdump$build_exeext; then ++ gcc_cv_objdump=./objdump$build_exeext ++elif ( set dummy $OBJDUMP_FOR_TARGET; test -x $[2] ); then ++ gcc_cv_objdump="$OBJDUMP_FOR_TARGET" ++else ++ AC_PATH_PROG(gcc_cv_objdump, $OBJDUMP_FOR_TARGET) ++fi]) ++ ++AC_MSG_CHECKING(what objdump to use) ++if test "$gcc_cv_objdump" = ../binutils/objdump$build_exeext; then ++ # Single tree build which includes binutils. ++ AC_MSG_RESULT(newly built objdump) ++elif test x$gcc_cv_objdump = x; then ++ AC_MSG_RESULT(not found) ++else ++ AC_MSG_RESULT($gcc_cv_objdump) ++fi ++ + dnl Test for -lsocket and -lnsl. Copied from libgo/configure.ac. + AC_CACHE_CHECK([for socket libraries], libcc1_cv_lib_sockets, + [libcc1_cv_lib_sockets= diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/pr67899.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/pr67899.diff new file mode 100644 index 0000000000..0f2ebd0052 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/pr67899.diff @@ -0,0 +1,31 @@ +# DP: Proposed patch for PR sanitizer/67899 + +Index: b/src/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h +=================================================================== +--- a/src/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h ++++ b/src/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h +@@ -606,11 +606,10 @@ namespace __sanitizer { + #else + __sanitizer_sigset_t sa_mask; + #ifndef __mips__ +-#if defined(__sparc__) +- unsigned long sa_flags; +-#else +- int sa_flags; ++#if defined(__sparc__) && defined(__arch64__) ++ int __pad; + #endif ++ int sa_flags; + #endif + #endif + #if SANITIZER_LINUX +@@ -640,7 +639,8 @@ namespace __sanitizer { + void (*handler)(int signo); + void (*sigaction)(int signo, void *info, void *ctx); + }; +- unsigned long sa_flags; ++ int __pad; ++ int sa_flags; + void (*sa_restorer)(void); + __sanitizer_kernel_sigset_t sa_mask; + }; diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/pr79724-revert.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/pr79724-revert.diff new file mode 100644 index 0000000000..1bfbc0ef2e --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/pr79724-revert.diff @@ -0,0 +1,24 @@ +# DP: Revert PR ada/79724, handling of suffixes (conflicts with local ada-gcc-name patch) + +--- a/src/gcc/ada/osint.adb ++++ b/src/gcc/ada/osint.adb +@@ -2277,6 +2277,8 @@ package body Osint is + + Find_Program_Name; + ++ Start_Of_Suffix := Name_Len + 1; ++ + -- Find the target prefix if any, for the cross compilation case. + -- For instance in "powerpc-elf-gcc" the target prefix is + -- "powerpc-elf-" +@@ -2300,7 +2302,9 @@ package body Osint is + end if; + end loop; + +- Start_Of_Suffix := End_Of_Prefix + Prog'Length + 1; ++ if End_Of_Prefix > 1 then ++ Start_Of_Suffix := End_Of_Prefix + Prog'Length + 1; ++ end if; + + -- Create the new program name + diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/pr81829.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/pr81829.diff new file mode 100644 index 0000000000..472e3d037a --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/pr81829.diff @@ -0,0 +1,308 @@ +From f8029ed6d3dd444ee2608146118f2189cf9ef0d8 Mon Sep 17 00:00:00 2001 +From: marxin +Date: Mon, 14 Aug 2017 13:56:32 +0200 +Subject: [PATCH] Fix file find utils and add unit tests (PR driver/81829). + +gcc/ChangeLog: + +2017-08-14 Martin Liska + + PR driver/81829 + * file-find.c (do_add_prefix): Always append DIR_SEPARATOR + at the end of a prefix. + (remove_prefix): Properly remove elements and accept also + path without a trailing DIR_SEPARATOR. + (purge): New function. + (file_find_verify_prefix_creation): Likewise. + (file_find_verify_prefix_add): Likewise. + (file_find_verify_prefix_removal): Likewise. + (file_find_c_tests): Likewise. + * selftest-run-tests.c (selftest::run_tests): Add new + file_find_c_tests. + * selftest.h (file_find_c_tests): Likewise. +--- + gcc/file-find.c | 182 ++++++++++++++++++++++++++++++++++++++++++----- + gcc/gcc-ar.c | 19 +++-- + gcc/selftest-run-tests.c | 1 + + gcc/selftest.h | 1 + + 4 files changed, 179 insertions(+), 24 deletions(-) + +Index: b/src/gcc/file-find.c +=================================================================== +--- a/src/gcc/file-find.c ++++ b/src/gcc/file-find.c +@@ -21,6 +21,7 @@ along with GCC; see the file COPYING3. + #include "system.h" + #include "filenames.h" + #include "file-find.h" ++#include "selftest.h" + + static bool debug = false; + +@@ -126,11 +127,22 @@ do_add_prefix (struct path_prefix *ppref + /* Keep track of the longest prefix. */ + + len = strlen (prefix); ++ bool append_separator = !IS_DIR_SEPARATOR (prefix[len - 1]); ++ if (append_separator) ++ len++; ++ + if (len > pprefix->max_len) + pprefix->max_len = len; + + pl = XNEW (struct prefix_list); +- pl->prefix = xstrdup (prefix); ++ char *dup = XCNEWVEC (char, len + 1); ++ memcpy (dup, prefix, append_separator ? len - 1 : len); ++ if (append_separator) ++ { ++ dup[len - 1] = DIR_SEPARATOR; ++ dup[len] = '\0'; ++ } ++ pl->prefix = dup; + + if (*prev) + pl->next = *prev; +@@ -212,34 +224,170 @@ prefix_from_string (const char *p, struc + void + remove_prefix (const char *prefix, struct path_prefix *pprefix) + { +- struct prefix_list *remove, **prev, **remove_prev = NULL; ++ char *dup = NULL; + int max_len = 0; ++ size_t len = strlen (prefix); ++ if (prefix[len - 1] != DIR_SEPARATOR) ++ { ++ char *dup = XNEWVEC (char, len + 2); ++ memcpy (dup, prefix, len); ++ dup[len] = DIR_SEPARATOR; ++ dup[len + 1] = '\0'; ++ prefix = dup; ++ } + + if (pprefix->plist) + { +- prev = &pprefix->plist; +- for (struct prefix_list *pl = pprefix->plist; pl->next; pl = pl->next) ++ prefix_list *prev = NULL; ++ for (struct prefix_list *pl = pprefix->plist; pl;) + { + if (strcmp (prefix, pl->prefix) == 0) + { +- remove = pl; +- remove_prev = prev; +- continue; ++ if (prev == NULL) ++ pprefix->plist = pl->next; ++ else ++ prev->next = pl->next; ++ ++ prefix_list *remove = pl; ++ free (remove); ++ pl = pl->next; + } ++ else ++ { ++ prev = pl; + +- int l = strlen (pl->prefix); +- if (l > max_len) +- max_len = l; ++ int l = strlen (pl->prefix); ++ if (l > max_len) ++ max_len = l; + +- prev = &pl; +- } +- +- if (remove_prev) +- { +- *remove_prev = remove->next; +- free (remove); ++ pl = pl->next; ++ } + } + + pprefix->max_len = max_len; + } ++ ++ if (dup) ++ free (dup); ++} ++ ++#if CHECKING_P ++ ++namespace selftest { ++ ++/* Encode '#' and '_' to path and dir separators in order to test portability ++ of the test-cases. */ ++ ++static char * ++purge (const char *input) ++{ ++ char *s = xstrdup (input); ++ for (char *c = s; *c != '\0'; c++) ++ switch (*c) ++ { ++ case '/': ++ case ':': ++ *c = 'a'; /* Poison default string values. */ ++ break; ++ case '_': ++ *c = PATH_SEPARATOR; ++ break; ++ case '#': ++ *c = DIR_SEPARATOR; ++ break; ++ default: ++ break; ++ } ++ ++ return s; ++} ++ ++const char *env1 = purge ("#home#user#bin_#home#user#bin_#bin_#usr#bin"); ++const char *env2 = purge ("#root_#root_#root"); ++ ++/* Verify creation of prefix. */ ++ ++static void ++file_find_verify_prefix_creation (void) ++{ ++ path_prefix prefix; ++ memset (&prefix, 0, sizeof (prefix)); ++ prefix_from_string (env1, &prefix); ++ ++ ASSERT_EQ (15, prefix.max_len); ++ ++ /* All prefixes end with DIR_SEPARATOR. */ ++ ASSERT_STREQ (purge ("#home#user#bin#"), prefix.plist->prefix); ++ ASSERT_STREQ (purge ("#home#user#bin#"), prefix.plist->next->prefix); ++ ASSERT_STREQ (purge ("#bin#"), prefix.plist->next->next->prefix); ++ ASSERT_STREQ (purge ("#usr#bin#"), prefix.plist->next->next->next->prefix); ++ ASSERT_EQ (NULL, prefix.plist->next->next->next->next); ++} ++ ++/* Verify adding a prefix. */ ++ ++static void ++file_find_verify_prefix_add (void) ++{ ++ path_prefix prefix; ++ memset (&prefix, 0, sizeof (prefix)); ++ prefix_from_string (env1, &prefix); ++ ++ add_prefix (&prefix, purge ("#root")); ++ ASSERT_STREQ (purge ("#home#user#bin#"), prefix.plist->prefix); ++ ASSERT_STREQ (purge ("#root#"), ++ prefix.plist->next->next->next->next->prefix); ++ ++ add_prefix_begin (&prefix, purge ("#var")); ++ ASSERT_STREQ (purge ("#var#"), prefix.plist->prefix); ++} ++ ++/* Verify adding a prefix. */ ++ ++static void ++file_find_verify_prefix_removal (void) ++{ ++ path_prefix prefix; ++ memset (&prefix, 0, sizeof (prefix)); ++ prefix_from_string (env1, &prefix); ++ ++ /* All occurences of a prefix should be removed. */ ++ remove_prefix (purge ("#home#user#bin"), &prefix); ++ ++ ASSERT_EQ (9, prefix.max_len); ++ ASSERT_STREQ (purge ("#bin#"), prefix.plist->prefix); ++ ASSERT_STREQ (purge ("#usr#bin#"), prefix.plist->next->prefix); ++ ASSERT_EQ (NULL, prefix.plist->next->next); ++ ++ remove_prefix (purge ("#usr#bin#"), &prefix); ++ ASSERT_EQ (5, prefix.max_len); ++ ASSERT_STREQ (purge ("#bin#"), prefix.plist->prefix); ++ ASSERT_EQ (NULL, prefix.plist->next); ++ ++ remove_prefix (purge ("#dev#random#"), &prefix); ++ remove_prefix (purge ("#bi#"), &prefix); ++ ++ remove_prefix (purge ("#bin#"), &prefix); ++ ASSERT_EQ (NULL, prefix.plist); ++ ASSERT_EQ (0, prefix.max_len); ++ ++ memset (&prefix, 0, sizeof (prefix)); ++ prefix_from_string (env2, &prefix); ++ ASSERT_EQ (6, prefix.max_len); ++ ++ remove_prefix (purge ("#root#"), &prefix); ++ ASSERT_EQ (NULL, prefix.plist); ++ ASSERT_EQ (0, prefix.max_len); + } ++ ++/* Run all of the selftests within this file. */ ++ ++void file_find_c_tests () ++{ ++ file_find_verify_prefix_creation (); ++ file_find_verify_prefix_add (); ++ file_find_verify_prefix_removal (); ++} ++ ++} // namespace selftest ++#endif /* CHECKING_P */ +Index: b/src/gcc/gcc-ar.c +=================================================================== +--- a/src/gcc/gcc-ar.c ++++ b/src/gcc/gcc-ar.c +@@ -194,15 +194,20 @@ main (int ac, char **av) + #ifdef CROSS_DIRECTORY_STRUCTURE + real_exe_name = concat (target_machine, "-", PERSONALITY, NULL); + #endif +- /* Do not search original location in the same folder. */ +- char *exe_folder = lrealpath (av[0]); +- exe_folder[strlen (exe_folder) - strlen (lbasename (exe_folder))] = '\0'; +- char *location = concat (exe_folder, PERSONALITY, NULL); ++ char *wrapper_file = lrealpath (av[0]); ++ exe_name = lrealpath (find_a_file (&path, real_exe_name, X_OK)); + +- if (access (location, X_OK) == 0) +- remove_prefix (exe_folder, &path); ++ /* If the exe_name points to the wrapper, remove folder of the wrapper ++ from prefix and try search again. */ ++ if (strcmp (exe_name, wrapper_file) == 0) ++ { ++ char *exe_folder = wrapper_file; ++ exe_folder[strlen (exe_folder) - strlen (lbasename (exe_folder))] = '\0'; ++ remove_prefix (exe_folder, &path); ++ ++ exe_name = find_a_file (&path, real_exe_name, X_OK); ++ } + +- exe_name = find_a_file (&path, real_exe_name, X_OK); + if (!exe_name) + { + fprintf (stderr, "%s: Cannot find binary '%s'\n", av[0], +Index: b/src/gcc/selftest-run-tests.c +=================================================================== +--- a/src/gcc/selftest-run-tests.c ++++ b/src/gcc/selftest-run-tests.c +@@ -66,6 +66,7 @@ selftest::run_tests () + sreal_c_tests (); + fibonacci_heap_c_tests (); + typed_splay_tree_c_tests (); ++ file_find_c_tests (); + + /* Mid-level data structures. */ + input_c_tests (); +Index: b/src/gcc/selftest.h +=================================================================== +--- a/src/gcc/selftest.h ++++ b/src/gcc/selftest.h +@@ -196,6 +196,7 @@ extern void tree_c_tests (); + extern void tree_cfg_c_tests (); + extern void vec_c_tests (); + extern void wide_int_cc_tests (); ++extern void file_find_c_tests (); + + extern int num_passes; + diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/pr87808.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/pr87808.diff new file mode 100644 index 0000000000..7f9e7d0819 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/pr87808.diff @@ -0,0 +1,56 @@ +# DP: Fix PR jit/87808. + +--- a/src/gcc/jit/Make-lang.in ++++ b/src/gcc/jit/Make-lang.in +@@ -136,6 +136,9 @@ ifneq (,$(findstring mingw,$(target))) + jit_OBJS += jit/jit-w32.o + endif + ++CFLAGS-jit/jit-playback.o += \ ++ -DFALLBACK_GCC_EXEC_PREFIX=\"$(libdir)/gcc/$(target_subdir)/$(version)\" ++ + # Use strict warnings for this front end. + jit-warn = $(STRICT_WARN) + +--- a/src/gcc/jit/jit-playback.cc ++++ b/src/gcc/jit/jit-playback.cc +@@ -41,6 +41,7 @@ along with GCC; see the file COPYING3. + #include "gcc.h" + #include "diagnostic.h" + #include "stmt.h" ++#include "file-find.h" + + #include "jit-playback.h" + #include "jit-result.h" +@@ -3058,7 +3059,31 @@ void + playback::context:: + invoke_embedded_driver (const vec *argvec) + { ++ static char* gcc_driver_file = NULL; ++ + JIT_LOG_SCOPE (get_logger ()); ++ ++ /* process_command(), uses make_relative_prefix(), searches PATH ++ for the external driver, which might not be found. In this case ++ fall back to the configured default. */ ++#ifdef FALLBACK_GCC_EXEC_PREFIX ++ if (gcc_driver_file == NULL && ::getenv ("GCC_EXEC_PREFIX") == NULL) ++ { ++ struct path_prefix path = { 0, 0, "exec" }; ++ ++ prefix_from_env ("PATH", &path); ++ gcc_driver_file = find_a_file (&path, gcc_driver_name, X_OK); ++ if (gcc_driver_file == NULL) ++ { ++ char *str = concat ("GCC_EXEC_PREFIX=", ++ FALLBACK_GCC_EXEC_PREFIX, NULL); ++ ::putenv (str); ++ log ("gcc driver %s not found, using fallback GCC_EXEC_PREFIX=%s", ++ gcc_driver_name, FALLBACK_GCC_EXEC_PREFIX); ++ } ++ } ++#endif ++ + driver d (true, /* can_finalize */ + false); /* debug */ + int result = d.main (argvec->length (), diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/pr88552.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/pr88552.diff new file mode 100644 index 0000000000..5a41f5b70a --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/pr88552.diff @@ -0,0 +1,52 @@ +From ff8f45d20f9ea6acc99442ad29212d177f58e8fe Mon Sep 17 00:00:00 2001 +From: Harald Anlauf +Date: Thu, 1 Jun 2023 23:04:30 +0200 +Subject: [PATCH] Fortran: force error on bad KIND specifier [PR88552] + +gcc/fortran/ChangeLog: + + PR fortran/88552 + * decl.cc (gfc_match_kind_spec): Use error path on missing right + parenthesis. + (gfc_match_decl_type_spec): Use error return when an error occurred + during matching a KIND specifier. + +gcc/testsuite/ChangeLog: + + PR fortran/88552 + * gfortran.dg/pr88552.f90: New test. +--- + gcc/fortran/decl.cc | 4 ++++ + gcc/testsuite/gfortran.dg/pr88552.f90 | 6 ++++++ + 2 files changed, 10 insertions(+) + create mode 100644 gcc/testsuite/gfortran.dg/pr88552.f90 + +--- a/src/gcc/fortran/decl.cc ++++ b/src/gcc/fortran/decl.cc +@@ -3383,6 +3383,7 @@ close_brackets: + else + gfc_error ("Missing right parenthesis at %C"); + m = MATCH_ERROR; ++ goto no_match; + } + else + /* All tests passed. */ +@@ -4720,6 +4721,9 @@ get_kind: + } + + m = gfc_match_kind_spec (ts, false); ++ if (m == MATCH_ERROR) ++ return MATCH_ERROR; ++ + if (m == MATCH_NO && ts->type != BT_CHARACTER) + { + m = gfc_match_old_kind_spec (ts); +--- /dev/null ++++ b/src/gcc/testsuite/gfortran.dg/pr88552.f90 +@@ -0,0 +1,6 @@ ++! { dg-do compile } ++! PR fortran/88552 ++! Contributed by G.Steinmetz ++ ++integer(len((c)) :: n ! { dg-error "must be CHARACTER" } ++end diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/pr94253.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/pr94253.diff new file mode 100644 index 0000000000..ed28ad78f1 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/pr94253.diff @@ -0,0 +1,48 @@ +commit 50e1e417b5cc68a6fd280e0a67c5c4eba524b70b +Author: Richard Sandiford +Date: Sun Mar 22 18:51:48 2020 +0000 + + rs6000: Allow FPRs to change between SDmode and DDmode [PR94254] + + g:497498c878d48754318e486428e2aa30854020b9 caused lra to cycle + on some SDmode reloads for power6. As explained in more detail + in the PR comments, the problem was a conflict between two target + hooks: rs6000_secondary_memory_needed_mode required SDmode FPR + reloads to use DDmode memory (rightly, since using SDmode memory + wouldn't make progress) but rs6000_can_change_mode_class didn't + allow FPRs to change from SDmode to DDmode. Previously lra + ignored that and changed the mode anyway. + + From what Segher says, it sounds like the "from_size < 8 || to_size < 8" + check is mostly there for SF<->64-bit subregs, and that SDmode is stored + in the way that target-independent code expects. This patch therefore + allows SD<->DD changes. + + I wondered about checking for SD<->64-bit changes instead, but that + seemed like an unnecessary generalisation for this stage. + + 2020-03-23 Richard Sandiford + + gcc/ + PR target/94254 + * config/rs6000/rs6000.c (rs6000_can_change_mode_class): Allow + FPRs to change between SDmode and DDmode. + +--- a/src/gcc/config/rs6000/rs6000.cc ++++ b/src/gcc/config/rs6000/rs6000.cc +@@ -13399,6 +13399,15 @@ rs6000_can_change_mode_class (machine_mo + || (to == SDmode && from == DDmode)) + return true; + ++ /* Allow SD<->DD changes, since SDmode values are stored in ++ the low half of the DDmode, just like target-independent ++ code expects. We need to allow at least SD->DD since ++ rs6000_secondary_memory_needed_mode asks for that change ++ to be made for SD reloads. */ ++ if ((to == DDmode && from == SDmode) ++ || (to == SDmode && from == DDmode)) ++ return true; ++ + if (from_size < 8 || to_size < 8) + return false; + diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/pr99832-distro.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/pr99832-distro.diff new file mode 100644 index 0000000000..f608c7cda9 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/pr99832-distro.diff @@ -0,0 +1,46 @@ +# DP: PR libstdc++/99832, std::chrono::system_clock::{from,to}_time_t: +# DP: Add ABI tag for timet64. + +--- a/src/libstdc++-v3/config/os/gnu-linux/os_defines.h ++++ b/src/libstdc++-v3/config/os/gnu-linux/os_defines.h +@@ -80,6 +80,13 @@ + // libpthread. + # define _GLIBCXX_GTHREAD_USE_WEAK 0 + # endif ++ ++# if defined(_TIME_BITS) ++# if _TIME_BITS == 64 ++# undef _GLIBCXX_TIME_BITS64_ABI_TAG ++# define _GLIBCXX_TIME_BITS64_ABI_TAG [[__gnu__::__abi_tag__("__time64")]] ++# endif ++# endif + #endif // __linux__ + + #endif +--- a/src/libstdc++-v3/include/bits/c++config ++++ b/src/libstdc++-v3/include/bits/c++config +@@ -883,4 +883,6 @@ namespace __gnu_cxx + #endif // __has_include + #endif // C++17 + ++#define _GLIBCXX_TIME_BITS64_ABI_TAG ++ + // End of prewritten config; the settings discovered at configure time follow. +--- a/src/libstdc++-v3/include/bits/chrono.h ++++ b/src/libstdc++-v3/include/bits/chrono.h +@@ -1239,6 +1239,7 @@ _GLIBCXX_BEGIN_INLINE_ABI_NAMESPACE(_V2) + now() noexcept; + + // Map to C API ++ _GLIBCXX_TIME_BITS64_ABI_TAG + static std::time_t + to_time_t(const time_point& __t) noexcept + { +@@ -1246,6 +1247,7 @@ _GLIBCXX_BEGIN_INLINE_ABI_NAMESPACE(_V2) + (__t.time_since_epoch()).count()); + } + ++ _GLIBCXX_TIME_BITS64_ABI_TAG + static time_point + from_time_t(std::time_t __t) noexcept + { diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/rename-info-files.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/rename-info-files.diff new file mode 100644 index 0000000000..39d81c30b0 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/rename-info-files.diff @@ -0,0 +1,661 @@ +# DP: Allow transformations on info file names. Reference the +# DP: transformed info file names in the texinfo files. + + +2004-02-17 Matthias Klose + +gcc/ChangeLog: + * Makefile.in: Allow transformations on info file names. + Define MAKEINFODEFS, macros to pass transformated info file + names to makeinfo. + * doc/cpp.texi: Use macros defined in MAKEINFODEFS for references. + * doc/cppinternals.texi: Likewise. + * doc/extend.texi: Likewise. + * doc/gcc.texi: Likewise. + * doc/gccint.texi: Likewise. + * doc/invoke.texi: Likewise. + * doc/libgcc.texi: Likewise. + * doc/makefile.texi: Likewise. + * doc/passes.texi: Likewise. + * doc/sourcebuild.texi: Likewise. + * doc/standards.texi: Likewise. + * doc/trouble.texi: Likewise. + +gcc/fortran/ChangeLog: + * Make-lang.in: Allow transformations on info file names. + Pass macros of transformated info file defined in MAKEINFODEFS + names to makeinfo. + * gfortran.texi: Use macros defined in MAKEINFODEFS for references. + +--- a/src/gcc/fortran/gfortran.texi ++++ b/src/gcc/fortran/gfortran.texi +@@ -101,7 +101,7 @@ Texts being (a) (see below), and with th + @ifinfo + @dircategory Software development + @direntry +-* gfortran: (gfortran). The GNU Fortran Compiler. ++* @value{fngfortran}: (@value{fngfortran}). The GNU Fortran Compiler. + @end direntry + This file documents the use and the internals of + the GNU Fortran compiler, (@command{gfortran}). +--- a/src/gcc/fortran/Make-lang.in ++++ b/src/gcc/fortran/Make-lang.in +@@ -116,7 +116,9 @@ fortran.tags: force + cd $(srcdir)/fortran; $(ETAGS) -o TAGS.sub *.cc *.h; \ + $(ETAGS) --include TAGS.sub --include ../TAGS.sub + +-fortran.info: doc/gfortran.info doc/gfc-internals.info ++INFO_FORTRAN_NAME = $(shell echo gfortran|sed '$(program_transform_name)') ++INFO_FORTRAN_I_NAME = $(shell echo gfc-internals|sed '$(program_transform_name)') ++fortran.info: doc/$(INFO_FORTRAN_NAME).info doc/$(INFO_FORTRAN_I_NAME).info + + F95_DVIFILES = doc/gfortran.dvi + +@@ -199,10 +201,10 @@ GFORTRAN_TEXI = \ + $(srcdir)/doc/include/gcc-common.texi \ + gcc-vers.texi + +-doc/gfortran.info: $(GFORTRAN_TEXI) ++doc/$(INFO_FORTRAN_NAME).info: $(GFORTRAN_TEXI) + if [ x$(BUILD_INFO) = xinfo ]; then \ + rm -f doc/gfortran.info-*; \ +- $(MAKEINFO) -I $(srcdir)/doc/include -I $(srcdir)/fortran \ ++ $(MAKEINFO) $(MAKEINFODEFS) -I $(srcdir)/doc/include -I $(srcdir)/fortran \ + -o $@ $<; \ + else true; fi + +@@ -230,7 +232,7 @@ GFC_INTERNALS_TEXI = \ + $(srcdir)/doc/include/gcc-common.texi \ + gcc-vers.texi + +-doc/gfc-internals.info: $(GFC_INTERNALS_TEXI) ++doc/$(INFO_FORTRAN_I_NAME).info: $(GFC_INTERNALS_TEXI) + if [ x$(BUILD_INFO) = xinfo ]; then \ + rm -f doc/gfc-internals.info-*; \ + $(MAKEINFO) -I $(srcdir)/doc/include -I $(srcdir)/fortran \ +@@ -267,7 +269,7 @@ fortran.install-common: install-finclude + + fortran.install-plugin: + +-fortran.install-info: $(DESTDIR)$(infodir)/gfortran.info ++fortran.install-info: $(DESTDIR)$(infodir)/$(INFO_FORTRAN_NAME).info + + fortran.install-man: $(DESTDIR)$(man1dir)/$(GFORTRAN_INSTALL_NAME)$(man1ext) + +@@ -285,7 +287,7 @@ fortran.uninstall: + rm -rf $(DESTDIR)$(bindir)/$(GFORTRAN_INSTALL_NAME)$(exeext); \ + rm -rf $(DESTDIR)$(man1dir)/$(GFORTRAN_INSTALL_NAME)$(man1ext); \ + rm -rf $(DESTDIR)$(bindir)/$(GFORTRAN_TARGET_INSTALL_NAME)$(exeext); \ +- rm -rf $(DESTDIR)$(infodir)/gfortran.info* ++ rm -rf $(DESTDIR)$(infodir)/$(INFO_FORTRAN_NAME).info* + + # + # Clean hooks: +--- a/src/gcc/Makefile.in ++++ b/src/gcc/Makefile.in +@@ -3335,8 +3335,31 @@ install-no-fixedincludes: + + doc: $(BUILD_INFO) $(GENERATED_MANPAGES) + +-INFOFILES = doc/cpp.info doc/gcc.info doc/gccint.info \ +- doc/gccinstall.info doc/cppinternals.info ++INFO_CPP_NAME = $(shell echo cpp|sed '$(program_transform_name)') ++INFO_GCC_NAME = $(shell echo gcc|sed '$(program_transform_name)') ++INFO_GXX_NAME = $(shell echo g++|sed '$(program_transform_name)') ++INFO_GCCINT_NAME = $(shell echo gccint|sed '$(program_transform_name)') ++INFO_GCCINSTALL_NAME = $(shell echo gccinstall|sed '$(program_transform_name)') ++INFO_CPPINT_NAME = $(shell echo cppinternals|sed '$(program_transform_name)') ++ ++INFO_FORTRAN_NAME = $(shell echo gfortran|sed '$(program_transform_name)') ++INFO_GCCGO_NAME = $(shell echo gccgo|sed '$(program_transform_name)') ++ ++INFOFILES = doc/$(INFO_CPP_NAME).info doc/$(INFO_GCC_NAME).info \ ++ doc/$(INFO_GCCINT_NAME).info \ ++ doc/$(INFO_GCCINSTALL_NAME).info doc/$(INFO_CPPINT_NAME).info ++ ++MAKEINFODEFS = -D 'fncpp $(INFO_CPP_NAME)' \ ++ -D 'fngcc $(INFO_GCC_NAME)' \ ++ -D 'fngcov $(INFO_GCC_NAME)' \ ++ -D 'fngcovtool $(INFO_GCC_NAME)' \ ++ -D 'fngcovdump $(INFO_GCC_NAME)' \ ++ -D 'fngxx $(INFO_GXX_NAME)' \ ++ -D 'fngccint $(INFO_GCCINT_NAME)' \ ++ -D 'fngccinstall $(INFO_GCCINSTALL_NAME)' \ ++ -D 'fncppint $(INFO_CPPINT_NAME)' \ ++ -D 'fngfortran $(INFO_FORTRAN_NAME)' \ ++ -D 'fngccgo $(INFO_GCCGO_NAME)' + + info: $(INFOFILES) lang.info @GENINSRC@ srcinfo lang.srcinfo + +@@ -3384,7 +3407,20 @@ gcc-vers.texi: $(BASEVER) $(DEVPHASE) + if [ -n "$(PKGVERSION)" ]; then \ + echo "@set VERSION_PACKAGE $(PKGVERSION)" >> $@T; \ + fi +- echo "@set BUGURL $(BUGURL_TEXI)" >> $@T; \ ++ echo "@set BUGURL $(BUGURL_TEXI)" >> $@T ++ ( \ ++ echo '@set fncpp $(INFO_CPP_NAME)'; \ ++ echo '@set fngcc $(INFO_GCC_NAME)'; \ ++ echo '@set fngcov $(INFO_GCC_NAME)'; \ ++ echo '@set fngcovtool $(INFO_GCC_NAME)'; \ ++ echo '@set fngcovdump $(INFO_GCC_NAME)'; \ ++ echo '@set fngxx $(INFO_GXX_NAME)'; \ ++ echo '@set fngccint $(INFO_GCCINT_NAME)'; \ ++ echo '@set fngccinstall $(INFO_GCCINSTALL_NAME)'; \ ++ echo '@set fncppint $(INFO_CPPINT_NAME)'; \ ++ echo '@set fngfortran $(INFO_FORTRAN_NAME)'; \ ++ echo '@set fngccgo $(INFO_GCCGO_NAME)'; \ ++ ) >> $@T + mv -f $@T $@ + + +@@ -3392,21 +3428,41 @@ gcc-vers.texi: $(BASEVER) $(DEVPHASE) + # patterns. To use them, put each of the specific targets with its + # specific dependencies but no build commands. + +-doc/cpp.info: $(TEXI_CPP_FILES) +-doc/gcc.info: $(TEXI_GCC_FILES) +-doc/gccint.info: $(TEXI_GCCINT_FILES) +-doc/cppinternals.info: $(TEXI_CPPINT_FILES) +- ++# Generic entry to handle info files, which are not renamed (currently Ada) + doc/%.info: %.texi + if [ x$(BUILD_INFO) = xinfo ]; then \ + $(MAKEINFO) $(MAKEINFOFLAGS) -I . -I $(gcc_docdir) \ + -I $(gcc_docdir)/include -o $@ $<; \ + fi + ++doc/$(INFO_CPP_NAME).info: $(TEXI_CPP_FILES) ++ if [ x$(BUILD_INFO) = xinfo ]; then \ ++ $(MAKEINFO) $(MAKEINFOFLAGS) $(MAKEINFODEFS) -I $(gcc_docdir) \ ++ -I $(gcc_docdir)/include -o $@ $<; \ ++ fi ++ ++doc/$(INFO_GCC_NAME).info: $(TEXI_GCC_FILES) ++ if [ x$(BUILD_INFO) = xinfo ]; then \ ++ $(MAKEINFO) $(MAKEINFOFLAGS) $(MAKEINFODEFS) -I $(gcc_docdir) \ ++ -I $(gcc_docdir)/include -o $@ $<; \ ++ fi ++ ++doc/$(INFO_GCCINT_NAME).info: $(TEXI_GCCINT_FILES) ++ if [ x$(BUILD_INFO) = xinfo ]; then \ ++ $(MAKEINFO) $(MAKEINFOFLAGS) $(MAKEINFODEFS) -I $(gcc_docdir) \ ++ -I $(gcc_docdir)/include -o $@ $<; \ ++ fi ++ ++doc/$(INFO_CPPINT_NAME).info: $(TEXI_CPPINT_FILES) ++ if [ x$(BUILD_INFO) = xinfo ]; then \ ++ $(MAKEINFO) $(MAKEINFOFLAGS) $(MAKEINFODEFS) -I $(gcc_docdir) \ ++ -I $(gcc_docdir)/include -o $@ $<; \ ++ fi ++ + # Duplicate entry to handle renaming of gccinstall.info +-doc/gccinstall.info: $(TEXI_GCCINSTALL_FILES) ++doc/$(INFO_GCCINSTALL_NAME).info: $(TEXI_GCCINSTALL_FILES) + if [ x$(BUILD_INFO) = xinfo ]; then \ +- $(MAKEINFO) $(MAKEINFOFLAGS) -I $(gcc_docdir) \ ++ $(MAKEINFO) $(MAKEINFOFLAGS) $(MAKEINFODEFS) -I $(gcc_docdir) \ + -I $(gcc_docdir)/include -o $@ $<; \ + fi + +@@ -3810,11 +3866,11 @@ install-driver: installdirs xgcc$(exeext + # $(INSTALL_DATA) might be a relative pathname, so we can't cd into srcdir + # to do the install. + install-info:: doc installdirs \ +- $(DESTDIR)$(infodir)/cpp.info \ +- $(DESTDIR)$(infodir)/gcc.info \ +- $(DESTDIR)$(infodir)/cppinternals.info \ +- $(DESTDIR)$(infodir)/gccinstall.info \ +- $(DESTDIR)$(infodir)/gccint.info \ ++ $(DESTDIR)$(infodir)/$(INFO_CPP_NAME).info \ ++ $(DESTDIR)$(infodir)/$(INFO_GCC_NAME).info \ ++ $(DESTDIR)$(infodir)/$(INFO_CPPINT_NAME).info \ ++ $(DESTDIR)$(infodir)/$(INFO_GCCINSTALL_NAME).info \ ++ $(DESTDIR)$(infodir)/$(INFO_GCCINT_NAME).info \ + lang.install-info + + $(DESTDIR)$(infodir)/%.info: doc/%.info installdirs +@@ -4053,8 +4109,11 @@ uninstall: lang.uninstall + -rm -rf $(DESTDIR)$(bindir)/$(GCOV_INSTALL_NAME)$(exeext) + -rm -rf $(DESTDIR)$(man1dir)/$(GCC_INSTALL_NAME)$(man1ext) + -rm -rf $(DESTDIR)$(man1dir)/cpp$(man1ext) +- -rm -f $(DESTDIR)$(infodir)/cpp.info* $(DESTDIR)$(infodir)/gcc.info* +- -rm -f $(DESTDIR)$(infodir)/cppinternals.info* $(DESTDIR)$(infodir)/gccint.info* ++ -rm -f $(DESTDIR)$(infodir)/$(INFO_CPP_NAME).info* ++ -rm -f $(DESTDIR)$(infodir)/$(INFO_GCC_NAME).info* ++ -rm -f $(DESTDIR)$(infodir)/$(INFO_CPPINT_NAME).info* ++ -rm -f $(DESTDIR)$(infodir)/$(INFO_GCCINT_NAME).info* ++ -rm -f $(DESTDIR)$(infodir)/$(INFO_GCCINSTALL_NAME).info* + for i in ar nm ranlib ; do \ + install_name=`echo gcc-$$i|sed '$(program_transform_name)'`$(exeext) ;\ + target_install_name=$(target_noncanonical)-`echo gcc-$$i|sed '$(program_transform_name)'`$(exeext) ; \ +--- a/src/gcc/ada/gnat-style.texi ++++ b/src/gcc/ada/gnat-style.texi +@@ -12,7 +12,7 @@ + @finalout + @dircategory GNU Ada Tools + @direntry +-* gnat-style: (gnat-style.info). gnat-style ++* gnat-style: (gnat-style-13). GNAT Coding Style + @end direntry + + @c %**end of header +--- a/src/gcc/ada/gnat_rm.texi ++++ b/src/gcc/ada/gnat_rm.texi +@@ -12,7 +12,7 @@ + @finalout + @dircategory GNU Ada Tools + @direntry +-* gnat_rm: (gnat_rm.info). gnat_rm ++* GNAT Reference Manual: (gnat_rm-13). Reference Manual for GNU Ada tools. + @end direntry + + @c %**end of header +--- a/src/gcc/doc/invoke.texi ++++ b/src/gcc/doc/invoke.texi +@@ -17737,7 +17737,7 @@ One of the standard libraries bypassed b + @option{-nodefaultlibs} is @file{libgcc.a}, a library of internal subroutines + which GCC uses to overcome shortcomings of particular machines, or special + needs for some languages. +-(@xref{Interface,,Interfacing to GCC Output,gccint,GNU Compiler ++(@xref{Interface,,Interfacing to GCC Output,@value{fngccint},GNU Compiler + Collection (GCC) Internals}, + for more discussion of @file{libgcc.a}.) + In most cases, you need @file{libgcc.a} even when you want to avoid +@@ -17746,7 +17746,7 @@ or @option{-nodefaultlibs} you should us + This ensures that you have no unresolved references to internal GCC + library subroutines. + (An example of such an internal subroutine is @code{__main}, used to ensure C++ +-constructors are called; @pxref{Collect2,,@code{collect2}, gccint, ++constructors are called; @pxref{Collect2,,@code{collect2}, @value{fngccint}, + GNU Compiler Collection (GCC) Internals}.) + + @opindex nostdlib++ +@@ -35202,7 +35202,7 @@ Note that you can also specify places to + @option{-B}, @option{-I} and @option{-L} (@pxref{Directory Options}). These + take precedence over places specified using environment variables, which + in turn take precedence over those specified by the configuration of GCC@. +-@xref{Driver,, Controlling the Compilation Driver @file{gcc}, gccint, ++@xref{Driver,, Controlling the Compilation Driver @file{gcc}, @value{fngccint}, + GNU Compiler Collection (GCC) Internals}. + + @table @env +@@ -35382,7 +35382,7 @@ the headers it contains change. + + A precompiled header file is searched for when @code{#include} is + seen in the compilation. As it searches for the included file +-(@pxref{Search Path,,Search Path,cpp,The C Preprocessor}) the ++(@pxref{Search Path,,Search Path,@value{fncpp},The C Preprocessor}) the + compiler looks for a precompiled header in each directory just before it + looks for the include file in that directory. The name searched for is + the name specified in the @code{#include} with @samp{.gch} appended. If +--- a/src/gcc/doc/extend.texi ++++ b/src/gcc/doc/extend.texi +@@ -24639,7 +24639,7 @@ want to write code that checks whether t + test for the GNU compiler the same way as for C programs: check for a + predefined macro @code{__GNUC__}. You can also use @code{__GNUG__} to + test specifically for GNU C++ (@pxref{Common Predefined Macros,, +-Predefined Macros,cpp,The GNU C Preprocessor}). ++Predefined Macros,@value{fncpp},The GNU C Preprocessor}). + + @menu + * C++ Volatiles:: What constitutes an access to a volatile object. +--- a/src/gcc/doc/standards.texi ++++ b/src/gcc/doc/standards.texi +@@ -332,5 +332,5 @@ specification, described at @uref{https: + GNAT Reference Manual}, for information on standard + conformance and compatibility of the Ada compiler. + +-@xref{Standards,,Standards, gfortran, The GNU Fortran Compiler}, for details ++@xref{Standards,,Standards, @value{fngfortran}, The GNU Fortran Compiler}, for details + of standards supported by GNU Fortran. +--- a/src/gcc/doc/libgcc.texi ++++ b/src/gcc/doc/libgcc.texi +@@ -24,7 +24,7 @@ that needs them. + GCC will also generate calls to C library routines, such as + @code{memcpy} and @code{memset}, in some cases. The set of routines + that GCC may possibly use is documented in @ref{Other +-Builtins,,,gcc, Using the GNU Compiler Collection (GCC)}. ++Builtins,,,@value{fngcc}, Using the GNU Compiler Collection (GCC)}. + + These routines take arguments and return values of a specific machine + mode, not a specific C type. @xref{Machine Modes}, for an explanation +--- a/src/gcc/doc/gccint.texi ++++ b/src/gcc/doc/gccint.texi +@@ -49,7 +49,7 @@ Texts being (a) (see below), and with th + @ifnottex + @dircategory Software development + @direntry +-* gccint: (gccint). Internals of the GNU Compiler Collection. ++* @value{fngccint}: (@value{fngccint}). Internals of the GNU Compiler Collection. + @end direntry + This file documents the internals of the GNU compilers. + @sp 1 +@@ -81,7 +81,7 @@ write front ends for new languages. It + @value{VERSION_PACKAGE} + @end ifset + version @value{version-GCC}. The use of the GNU compilers is documented in a +-separate manual. @xref{Top,, Introduction, gcc, Using the GNU ++separate manual. @xref{Top,, Introduction, @value{fngcc}, Using the GNU + Compiler Collection (GCC)}. + + This manual is mainly a reference manual rather than a tutorial. It +--- a/src/gcc/doc/cpp.texi ++++ b/src/gcc/doc/cpp.texi +@@ -50,7 +50,7 @@ This manual contains no Invariant Sectio + @ifinfo + @dircategory Software development + @direntry +-* Cpp: (cpp). The GNU C preprocessor. ++* @value{fncpp}: (@value{fncpp}). The GNU C preprocessor. + @end direntry + @end ifinfo + +--- a/src/gcc/doc/gcc.texi ++++ b/src/gcc/doc/gcc.texi +@@ -135,7 +135,7 @@ version @value{version-GCC}. + The internals of the GNU compilers, including how to port them to new + targets and some information about how to write front ends for new + languages, are documented in a separate manual. @xref{Top,, +-Introduction, gccint, GNU Compiler Collection (GCC) Internals}. ++Introduction, @value{fngccint}, GNU Compiler Collection (GCC) Internals}. + + @menu + * G++ and GCC:: You can compile C or C++ programs. +--- a/src/gcc/doc/install.texi ++++ b/src/gcc/doc/install.texi +@@ -89,7 +89,7 @@ Free Documentation License}''. + @end ifinfo + @dircategory Software development + @direntry +-* gccinstall: (gccinstall). Installing the GNU Compiler Collection. ++* @value{fngccinstall}: (@value{fngccinstall}). Installing the GNU Compiler Collection. + @end direntry + + @c Part 3 Titlepage and Copyright +--- a/src/gcc/doc/cppinternals.texi ++++ b/src/gcc/doc/cppinternals.texi +@@ -7,7 +7,7 @@ + @ifinfo + @dircategory Software development + @direntry +-* Cpplib: (cppinternals). Cpplib internals. ++* @value{fncppint}: (@value{fncppint}). Cpplib internals. + @end direntry + @end ifinfo + +--- a/src/libgomp/libgomp.texi ++++ b/src/libgomp/libgomp.texi +@@ -31,7 +31,7 @@ texts being (a) (see below), and with th + @ifinfo + @dircategory GNU Libraries + @direntry +-* libgomp: (libgomp). GNU Offloading and Multi Processing Runtime Library. ++* @value{fnlibgomp}: (@value{fnlibgomp}). GNU Offloading and Multi Processing Runtime Library. + @end direntry + + This manual documents libgomp, the GNU Offloading and Multi Processing +--- a/src/libgomp/Makefile.in ++++ b/src/libgomp/Makefile.in +@@ -613,7 +613,8 @@ info_TEXINFOS = libgomp.texi + + # AM_CONDITIONAL on configure check ACX_CHECK_PROG_VER([MAKEINFO]) + @BUILD_INFO_TRUE@STAMP_BUILD_INFO = stamp-build-info +-CLEANFILES = $(STAMP_GENINSRC) $(STAMP_BUILD_INFO) ++INFO_LIBGOMP_NAME = $(shell echo libgomp|sed '$(program_transform_name)') ++CLEANFILES = $(STAMP_GENINSRC) $(STAMP_BUILD_INFO) $(INFO_LIBGOMP_NAME).info + MAINTAINERCLEANFILES = $(srcdir)/libgomp.info + MULTISRCTOP = + MULTIBUILDTOP = +@@ -1393,15 +1394,16 @@ env.lo: libgomp_f.h + env.o: libgomp_f.h + + all-local: $(STAMP_GENINSRC) +- +-stamp-geninsrc: libgomp.info +- cp -p $(top_builddir)/libgomp.info $(srcdir)/libgomp.info ++stamp-geninsrc: $(INFO_LIBGOMP_NAME).info ++ cp -p $(top_builddir)/$(INFO_LIBGOMP_NAME).info $(srcdir)/libgomp.info + @touch $@ + +-libgomp.info: $(STAMP_BUILD_INFO) ++libgomp.info: $(INFO_LIBGOMP_NAME).info ++ [ "$(INFO_LIBGOMP_NAME).info" = libgomp.info ] || cp $(INFO_LIBGOMP_NAME).info libgomp.info ++$(INFO_LIBGOMP_NAME).info: $(STAMP_BUILD_INFO) + + stamp-build-info: libgomp.texi +- $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) -o libgomp.info $(srcdir)/libgomp.texi ++ $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -D 'fnlibgomp $(INFO_LIBGOMP_NAME)' -I $(srcdir) -o $(INFO_LIBGOMP_NAME).info $(srcdir)/libgomp.texi + @touch $@ + + # target overrides +--- a/src/libgomp/Makefile.am ++++ b/src/libgomp/Makefile.am +@@ -129,14 +129,16 @@ endif + + all-local: $(STAMP_GENINSRC) + +-stamp-geninsrc: libgomp.info +- cp -p $(top_builddir)/libgomp.info $(srcdir)/libgomp.info ++stamp-geninsrc: $(INFO_LIBGOMP_NAME).info ++ cp -p $(top_builddir)/$(INFO_LIBGOMP_NAME).info $(srcdir)/libgomp.info + @touch $@ + +-libgomp.info: $(STAMP_BUILD_INFO) ++libgomp.info: $(INFO_LIBGOMP_NAME).info ++ [ "$(INFO_LIBGOMP_NAME).info = libgomp.info ] || cp $(INFO_LIBGOMP_NAME).info libgomp.info ++$(INFO_LIBGOMP_NAME).info: $(STAMP_BUILD_INFO) + + stamp-build-info: libgomp.texi +- $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) -o libgomp.info $(srcdir)/libgomp.texi ++ $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -D 'fnlibgomp $(INFO_LIBGOMP_NAME)' -I $(srcdir) -o $(INFO_LIBGOMP_NAME).info $(srcdir)/libgomp.texi + @touch $@ + + +--- a/src/libitm/libitm.texi ++++ b/src/libitm/libitm.texi +@@ -20,7 +20,7 @@ Free Documentation License''. + @ifinfo + @dircategory GNU Libraries + @direntry +-* libitm: (libitm). GNU Transactional Memory Library ++* @value{fnlibitm}: (@value{fnlibitm}). GNU Transactional Memory Library + @end direntry + + This manual documents the GNU Transactional Memory Library. +--- a/src/libitm/Makefile.am ++++ b/src/libitm/Makefile.am +@@ -107,14 +107,17 @@ endif + + all-local: $(STAMP_GENINSRC) + +-stamp-geninsrc: libitm.info +- cp -p $(top_builddir)/libitm.info $(srcdir)/libitm.info ++INFO_LIBITM_NAME = $(shell echo libitm|sed '$(program_transform_name)') ++stamp-geninsrc: $(INFO_LIBITM_NAME).info ++ cp -p $(top_builddir)/$(INFO_LIBITM_NAME).info $(srcdir)/libitm.info + @touch $@ + +-libitm.info: $(STAMP_BUILD_INFO) ++libitm.info: $(INFO_LIBITM_NAME).info ++ [ $(INFO_LIBITM_NAME).info = libitm.info ] || cp $(INFO_LIBITM_NAME).info libitm.info ++$(INFO_LIBITM_NAME).info: $(STAMP_BUILD_INFO) + + stamp-build-info: libitm.texi +- $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) -o libitm.info $(srcdir)/libitm.texi ++ $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) -D 'fnlibitm $(INFO_LIBITM_NAME)'-o $(INFO_LIBITM_NAME).info $(srcdir)/libitm.texi + @touch $@ + + +--- a/src/libitm/Makefile.in ++++ b/src/libitm/Makefile.in +@@ -1186,14 +1186,17 @@ vpath % $(strip $(search_path)) + + all-local: $(STAMP_GENINSRC) + +-stamp-geninsrc: libitm.info +- cp -p $(top_builddir)/libitm.info $(srcdir)/libitm.info ++INFO_LIBITM_NAME = $(shell echo libitm|sed '$(program_transform_name)') ++stamp-geninsrc: $(INFO_LIBITM_NAME).info ++ cp -p $(top_builddir)/$(INFO_LIBITM_NAME).info $(srcdir)/libitm.info + @touch $@ + +-libitm.info: $(STAMP_BUILD_INFO) ++libitm.info: $(INFO_LIBITM_NAME).info ++ [ $(INFO_LIBITM_NAME).info = libitm.info ] || cp $(INFO_LIBITM_NAME).info libitm.info ++$(INFO_LIBITM_NAME).info: $(STAMP_BUILD_INFO) + + stamp-build-info: libitm.texi +- $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) -o libitm.info $(srcdir)/libitm.texi ++ $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) -D 'fnlibitm $(INFO_LIBITM_NAME)' -o $(INFO_LIBITM_NAME).info $(srcdir)/libitm.texi + @touch $@ + + # GNU Make needs to see an explicit $(MAKE) variable in the command it +--- a/src/gcc/go/Make-lang.in ++++ b/src/gcc/go/Make-lang.in +@@ -95,10 +95,11 @@ GO_TEXI_FILES = \ + $(gcc_docdir)/include/gcc-common.texi \ + gcc-vers.texi + +-doc/gccgo.info: $(GO_TEXI_FILES) ++INFO_GCCGO_NAME = $(shell echo gccgo|sed '$(program_transform_name)') ++doc/$(INFO_GCCGO_NAME).info: $(GO_TEXI_FILES) + if test "x$(BUILD_INFO)" = xinfo; then \ +- rm -f doc/gccgo.info*; \ +- $(MAKEINFO) $(MAKEINFOFLAGS) -I $(gcc_docdir) \ ++ rm -f doc/$(INFO_GCCGO_NAME).info*; \ ++ $(MAKEINFO) $(MAKEINFOFLAGS) $(MAKEINFODEFS) -I $(gcc_docdir) \ + -I $(gcc_docdir)/include -o $@ $<; \ + else true; fi + +@@ -124,7 +125,7 @@ gccgo.pod: go/gccgo.texi + go.all.cross: gccgo-cross$(exeext) + go.start.encap: gccgo$(exeext) + go.rest.encap: +-go.info: doc/gccgo.info ++go.info: doc/$(INFO_GCCGO_NAME).info + go.dvi: doc/gccgo.dvi + go.pdf: doc/gccgo.pdf + go.html: $(build_htmldir)/go/index.html +@@ -163,7 +164,7 @@ go.install-common: installdirs + + go.install-plugin: + +-go.install-info: $(DESTDIR)$(infodir)/gccgo.info ++go.install-info: $(DESTDIR)$(infodir)/$(INFO_GCCGO_NAME).info + + go.install-pdf: doc/gccgo.pdf + @$(NORMAL_INSTALL) +@@ -203,7 +204,7 @@ go.uninstall: + rm -rf $(DESTDIR)$(bindir)/$(GCCGO_INSTALL_NAME)$(exeext) + rm -rf $(DESTDIR)$(man1dir)/$(GCCGO_INSTALL_NAME)$(man1ext) + rm -rf $(DESTDIR)$(bindir)/$(GCCGO_TARGET_INSTALL_NAME)$(exeext) +- rm -rf $(DESTDIR)$(infodir)/gccgo.info* ++ rm -rf $(DESTDIR)$(infodir)/$(INFO_GCCGO_NAME).info* + + # Clean hooks. + +--- a/src/gcc/go/gccgo.texi ++++ b/src/gcc/go/gccgo.texi +@@ -50,7 +50,7 @@ man page gfdl(7). + @format + @dircategory Software development + @direntry +-* Gccgo: (gccgo). A GCC-based compiler for the Go language ++* @value{fngccgo}: (@value{fngccgo}). A GCC-based compiler for the Go language + @end direntry + @end format + +@@ -124,7 +124,7 @@ and the Info entries for @file{gccgo} an + + The @command{gccgo} command is a frontend to @command{gcc} and + supports many of the same options. @xref{Option Summary, , Option +-Summary, gcc, Using the GNU Compiler Collection (GCC)}. This manual ++Summary, @value{fngcc}, Using the GNU Compiler Collection (GCC)}. This manual + only documents the options specific to @command{gccgo}. + + The @command{gccgo} command may be used to compile Go source code into +--- a/src/libquadmath/libquadmath.texi ++++ b/src/libquadmath/libquadmath.texi +@@ -25,7 +25,7 @@ copy and modify this GNU manual. + @ifinfo + @dircategory GNU Libraries + @direntry +-* libquadmath: (libquadmath). GCC Quad-Precision Math Library ++* @value{fnlibquadmath}: (@value{fnlibquadmath}). GCC Quad-Precision Math Library + @end direntry + + This manual documents the GCC Quad-Precision Math Library API. +--- a/src/libquadmath/Makefile.am ++++ b/src/libquadmath/Makefile.am +@@ -134,16 +134,18 @@ STAMP_BUILD_INFO = + endif + + +-stamp-geninsrc: libquadmath.info +- cp -p $(top_builddir)/libquadmath.info $(srcdir)/libquadmath.info ++INFO_LIBQMATH_NAME = $(shell echo libquadmath|sed '$(program_transform_name)') ++ ++stamp-geninsrc: $(INFO_LIBQMATH_NAME).info ++ cp -p $(top_builddir)/$(INFO_LIBQMATH_NAME).info $(srcdir)/libquadmath.info + @touch $@ + + stamp-build-info: libquadmath.texi $(libquadmath_TEXINFOS) +- $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) -o libquadmath.info $(srcdir)/libquadmath.texi ++ $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) -o $(INFO_LIBQMATH_NAME).info $(srcdir)/libquadmath.texi + @touch $@ + +-CLEANFILES = $(STAMP_GENINSRC) $(STAMP_BUILD_INFO) +-MAINTAINERCLEANFILES = $(srcdir)/libquadmath.info ++CLEANFILES = $(STAMP_GENINSRC) $(STAMP_BUILD_INFO) $(INFO_LIBQMATH_NAME).info ++MAINTAINERCLEANFILES = $(srcdir)/$(INFO_LIBQMATH_NAME).info + + endif BUILD_LIBQUADMATH + +--- a/src/libquadmath/Makefile.in ++++ b/src/libquadmath/Makefile.in +@@ -283,7 +283,8 @@ AM_V_texidevnull = $(am__v_texidevnull_@ + am__v_texidevnull_ = $(am__v_texidevnull_@AM_DEFAULT_V@) + am__v_texidevnull_0 = > /dev/null + am__v_texidevnull_1 = +-INFO_DEPS = libquadmath.info ++INFO_LIBQMATH_NAME = $(shell echo libquadmath|sed '$(program_transform_name)') ++INFO_DEPS = $(INFO_LIBQMATH_NAME).info + am__TEXINFO_TEX_DIR = $(srcdir)/../gcc/doc/include + DVIS = libquadmath.dvi + PDFS = libquadmath.pdf +@@ -552,8 +553,8 @@ AUTOMAKE_OPTIONS = foreign info-in-build + + # AM_CONDITIONAL on configure check ACX_CHECK_PROG_VER([MAKEINFO]) + @BUILD_INFO_TRUE@@BUILD_LIBQUADMATH_TRUE@STAMP_BUILD_INFO = stamp-build-info +-@BUILD_LIBQUADMATH_TRUE@CLEANFILES = $(STAMP_GENINSRC) $(STAMP_BUILD_INFO) +-@BUILD_LIBQUADMATH_TRUE@MAINTAINERCLEANFILES = $(srcdir)/libquadmath.info ++@BUILD_LIBQUADMATH_TRUE@CLEANFILES = $(STAMP_GENINSRC) $(STAMP_BUILD_INFO) $(INFO_LIBQMATH_NAME).info ++@BUILD_LIBQUADMATH_TRUE@MAINTAINERCLEANFILES = $(srcdir)/$(INFO_LIBQMATH_NAME).info + + # Automake Documentation: + # If your package has Texinfo files in many directories, you can use the +@@ -1434,19 +1435,19 @@ uninstall-am: uninstall-dvi-am uninstall + @BUILD_LIBQUADMATH_TRUE@@LIBQUAD_USE_SYMVER_SUN_TRUE@@LIBQUAD_USE_SYMVER_TRUE@ sed 's,\([^/ ]*\)\.l\([ao]\),.libs/\1.\2,g'` \ + @BUILD_LIBQUADMATH_TRUE@@LIBQUAD_USE_SYMVER_SUN_TRUE@@LIBQUAD_USE_SYMVER_TRUE@ > $@ || (rm -f $@ ; exit 1) + +-@BUILD_LIBQUADMATH_TRUE@stamp-geninsrc: libquadmath.info +-@BUILD_LIBQUADMATH_TRUE@ cp -p $(top_builddir)/libquadmath.info $(srcdir)/libquadmath.info ++@BUILD_LIBQUADMATH_TRUE@stamp-geninsrc: $(INFO_LIBQMATH_NAME).info ++@BUILD_LIBQUADMATH_TRUE@ cp -p $(top_builddir)/$(INFO_LIBQMATH_NAME).info $(srcdir)/$(INFO_LIBQMATH_NAME).info + @BUILD_LIBQUADMATH_TRUE@ @touch $@ + + @BUILD_LIBQUADMATH_TRUE@stamp-build-info: libquadmath.texi $(libquadmath_TEXINFOS) +-@BUILD_LIBQUADMATH_TRUE@ $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) -o libquadmath.info $(srcdir)/libquadmath.texi ++@BUILD_LIBQUADMATH_TRUE@ $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) -o $(INFO_LIBQMATH_NAME).info $(srcdir)/libquadmath.texi + @BUILD_LIBQUADMATH_TRUE@ @touch $@ + + all-local: $(ALL_LOCAL_DEPS) + + # Unconditionally override this target, so that automake's definition + # does not wrongly interfere. +-libquadmath.info: $(STAMP_BUILD_INFO) ++$(INFO_LIBQMATH_NAME).info: $(STAMP_BUILD_INFO) + + libquadmath-vers.texi: + echo "@set BUGURL $(REPORT_BUGS_TEXI)" > $@ diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/rust-enabled.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/rust-enabled.diff new file mode 100644 index 0000000000..d0972fa1cb --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/rust-enabled.diff @@ -0,0 +1,23 @@ +# DP: Explicitely enable rust, too late to be removed from 23.04 + +--- a/src/configure.ac ++++ b/src/configure.ac +@@ -2150,18 +2150,6 @@ if test -d ${srcdir}/gcc; then + ;; + esac + +- # Disable Rust for GCC 13 release. +- case ${add_this_lang}:${language} in +- yes:rust) +- # Specifically requested language; tell them. +- AC_MSG_ERROR([Rust is not supported in GCC 13 release]) +- ;; +- *:rust) +- # Silently disable. +- add_this_lang=unsupported +- ;; +- esac +- + # Disable jit if -enable-host-shared not specified + # but not if building for Mingw. All code in Windows + # is position independent code (PIC). diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/skip-bootstrap-multilib.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/skip-bootstrap-multilib.diff new file mode 100644 index 0000000000..a07b8c169a --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/skip-bootstrap-multilib.diff @@ -0,0 +1,22 @@ +# DP: Skip non-default multilib and libstdc++-v3 debug builds in bootstrap builds + +--- a/src/config-ml.in ++++ b/src/config-ml.in +@@ -492,6 +492,17 @@ esac + # Tests like `if [ -n "$multidirs" ]' require it. + multidirs=`echo "$multidirs" | sed -e 's/^[ ][ ]*//' -e 's/[ ][ ]*$//' -e 's/[ ][ ]*/ /g'` + ++# stage1 and stage2 builds of the non-default multilib configurations ++# are not needed; skip these to save some build time. ++if [ -f ../../stage_final ] && [ -f ../../stage_current ]; then ++ stage_final=`cat ../../stage_final` ++ stage_current=`cat ../../stage_current` ++ if [ "$stage_current" != "$stage_final" ]; then ++ echo "Skip `basename $ml_realsrcdir` non-default multilibs for bootstrap stage $stage_current" ++ multidirs= ++ fi ++fi ++ + # Add code to library's top level makefile to handle building the multilib + # subdirs. + diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/sparc64-biarch-long-double-128.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/sparc64-biarch-long-double-128.diff new file mode 100644 index 0000000000..a57da82df2 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/sparc64-biarch-long-double-128.diff @@ -0,0 +1,33 @@ +# DP: Fix --with-long-double-128 for sparc32 when defaulting to 64-bit. + +On sparc, the --with-long-double-128 option doesn't change anything for +a 64-bit compiler, as it always default to 128-bit long doubles. For +a 32/64-bit compiler defaulting to 32-bit this correctly control the +size of long double of the 32-bit compiler, however for a 32/64-bit +compiler defaulting to 64-bit, the built-in specs force the +-mlong-double-64 option. This makes the option useless in this case. + +The patch below fixes that by removing the -mlong-double-64 from the +built-in spec, using the default instead. + +Changelog gcc/ + +2013-12-04 Aurelien Jarno + + * config/sparc/linux64.h (CC1_SPEC): When defaulting to 64-bit, + don't force -mlong-double-64 when -m32 or -mv8plus is given. + +--- a/src/gcc/config/sparc/linux64.h ++++ b/src/gcc/config/sparc/linux64.h +@@ -160,9 +160,9 @@ extern const char *host_detect_local_cpu + #else + #define CC1_SPEC GNU_USER_TARGET_CC1_SPEC ASAN_CC1_SPEC \ + "%{m32:%{m64:%emay not use both -m32 and -m64}} \ +-%{m32:-mptr32 -mno-stack-bias %{!mlong-double-128:-mlong-double-64} \ ++%{m32:-mptr32 -mno-stack-bias \ + %{!mcpu*:-mcpu=cypress}} \ +-%{mv8plus:-mptr32 -mno-stack-bias %{!mlong-double-128:-mlong-double-64} \ ++%{mv8plus:-mptr32 -mno-stack-bias \ + %{!mcpu*:-mcpu=v9}} \ + %{!m32:%{!mcpu*:-mcpu=ultrasparc}} \ + %{!mno-vis:%{!m32:%{!mcpu=v9:-mvis}}}" diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/sys-auxv-header.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/sys-auxv-header.diff new file mode 100644 index 0000000000..9f988dbca7 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/sys-auxv-header.diff @@ -0,0 +1,40 @@ +# DP: Check for the sys/auxv.h header file. + +--- a/src/gcc/configure.ac ++++ b/src/gcc/configure.ac +@@ -1339,6 +1339,7 @@ AC_HEADER_TIOCGWINSZ + AC_CHECK_HEADERS(limits.h stddef.h string.h strings.h stdlib.h time.h iconv.h \ + fcntl.h ftw.h unistd.h sys/auxv.h sys/file.h sys/time.h sys/mman.h \ + sys/resource.h sys/param.h sys/times.h sys/stat.h sys/locking.h \ ++ sys/auxv.h \ + direct.h malloc.h langinfo.h ldfcn.h locale.h wchar.h) + + # Check for thread headers. +--- a/src/gcc/config.in ++++ b/src/gcc/config.in +@@ -1975,6 +1975,12 @@ + #endif + + ++/* Define to 1 if you have the header file. */ ++#ifndef USED_FOR_TARGET ++#undef HAVE_SYS_AUXV_H ++#endif ++ ++ + /* Define to 1 if you have the header file. */ + #ifndef USED_FOR_TARGET + #undef HAVE_SYS_FILE_H +--- a/src/gcc/config/rs6000/driver-rs6000.cc ++++ b/src/gcc/config/rs6000/driver-rs6000.cc +@@ -35,6 +35,10 @@ along with GCC; see the file COPYING3. + # include + #endif + ++#ifdef HAVE_SYS_AUXV_H ++# include ++#endif ++ + #if defined (__APPLE__) || (__FreeBSD__) + # include + # include diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/t-libunwind-elf-Wl-z-defs.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/t-libunwind-elf-Wl-z-defs.diff new file mode 100644 index 0000000000..082d4d5152 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/t-libunwind-elf-Wl-z-defs.diff @@ -0,0 +1,13 @@ +# DP: strip -z,defs from linker options for internal libunwind. + +--- a/src/libgcc/config/t-libunwind-elf ++++ b/src/libgcc/config/t-libunwind-elf +@@ -31,7 +31,7 @@ SHLIBUNWIND_SONAME = @shlib_base_name@.s + + SHLIBUNWIND_LINK = $(CC) $(LIBGCC2_CFLAGS) -shared \ + -nodefaultlibs -Wl,-h,$(SHLIBUNWIND_SONAME) \ +- -Wl,-z,text -Wl,-z,defs -o $(SHLIB_DIR)/$(SHLIBUNWIND_SONAME).tmp \ ++ -Wl,-z,text -o $(SHLIB_DIR)/$(SHLIBUNWIND_SONAME).tmp \ + @multilib_flags@ $(SHLIB_OBJS) -lc && \ + rm -f $(SHLIB_DIR)/$(SHLIB_SOLINK) && \ + if [ -f $(SHLIB_DIR)/$(SHLIBUNWIND_SONAME) ]; then \ diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/testsuite-glibc-warnings.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/testsuite-glibc-warnings.diff new file mode 100644 index 0000000000..b1353f0ada --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/testsuite-glibc-warnings.diff @@ -0,0 +1,18 @@ +# DP: fix testcases that triggered -Wunused-result with glibc +# DP: Author: Steve Beattie +--- + src/gcc/testsuite/c-c++-common/cilk-plus/AN/comma_exp.c | 2 +- + src/gcc/testsuite/c-c++-common/tsan/fd_pipe_race.c | 1 + + 2 files changed, 2 insertions(+), 1 deletion(-) + +Index: b/src/gcc/testsuite/c-c++-common/tsan/fd_pipe_race.c +=================================================================== +--- a/src/gcc/testsuite/c-c++-common/tsan/fd_pipe_race.c ++++ b/src/gcc/testsuite/c-c++-common/tsan/fd_pipe_race.c +@@ -1,5 +1,5 @@ + /* { dg-shouldfail "tsan" } */ +-/* { dg-additional-options "-ldl" } */ ++/* { dg-additional-options "-Wno-unused-result -ldl" } */ + + #include + #include diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/testsuite-hardening-format.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/testsuite-hardening-format.diff new file mode 100644 index 0000000000..b968027680 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/testsuite-hardening-format.diff @@ -0,0 +1,304 @@ +#! /bin/sh -e + +# All lines beginning with `# DPATCH:' are a description of the patch. +# DP: Description: use -Wno-format on tests that cannot be adjusted other ways. +# DP: Author: Kees Cook +# DP: Ubuntu: https://bugs.launchpad.net/bugs/344502 + +dir= +if [ $# -eq 3 -a "$2" = '-d' ]; then + pdir="-d $3" + dir="$3/" +elif [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi +case "$1" in + -patch) + patch $pdir -f --no-backup-if-mismatch -p1 < $0 + #cd ${dir}gcc && autoconf + ;; + -unpatch) + patch $pdir -f --no-backup-if-mismatch -R -p1 < $0 + #rm ${dir}gcc/configure + ;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +esac +exit 0 + +--- + src/gcc/testsuite/c-c++-common/torture/vector-compare-1.c | 1 + + src/gcc/testsuite/g++.dg/abi/pragma-pack1.C | 2 ++ + src/gcc/testsuite/g++.dg/abi/regparm1.C | 1 + + src/gcc/testsuite/g++.dg/cpp0x/constexpr-tuple.C | 1 + + src/gcc/testsuite/g++.dg/torture/pr51436.C | 1 + + src/gcc/testsuite/g++.old-deja/g++.law/weak.C | 2 +- + src/gcc/testsuite/g++.old-deja/g++.other/std1.C | 1 + + src/gcc/testsuite/gcc.c-torture/execute/vfprintf-chk-1.x | 5 +++++ + src/gcc/testsuite/gcc.c-torture/execute/vprintf-chk-1.x | 5 +++++ + src/gcc/testsuite/gcc.dg/charset/builtin2.c | 2 +- + src/gcc/testsuite/gcc.dg/format/format.exp | 2 +- + src/gcc/testsuite/gcc.dg/ipa/ipa-sra-1.c | 2 +- + src/gcc/testsuite/gcc.dg/lto/20090218-2_0.c | 2 ++ + src/gcc/testsuite/gcc.dg/pr30473.c | 2 +- + src/gcc/testsuite/gcc.dg/pr38902.c | 2 +- + src/gcc/testsuite/gcc.dg/pr59418.c | 2 +- + src/gcc/testsuite/gcc.dg/torture/tls/tls-test.c | 2 +- + src/gcc/testsuite/gcc.dg/tree-ssa/builtin-fprintf-1.c | 2 +- + src/gcc/testsuite/gcc.dg/tree-ssa/builtin-fprintf-chk-1.c | 2 +- + src/gcc/testsuite/gcc.dg/tree-ssa/builtin-printf-1.c | 2 +- + src/gcc/testsuite/gcc.dg/tree-ssa/builtin-printf-chk-1.c | 2 +- + src/gcc/testsuite/gcc.dg/tree-ssa/builtin-vfprintf-1.c | 2 +- + src/gcc/testsuite/gcc.dg/tree-ssa/builtin-vfprintf-chk-1.c | 2 +- + src/gcc/testsuite/gcc.dg/tree-ssa/builtin-vprintf-1.c | 2 +- + src/gcc/testsuite/gcc.dg/tree-ssa/builtin-vprintf-chk-1.c | 2 +- + src/gcc/testsuite/gcc.dg/tree-ssa/isolate-4.c | 2 +- + src/gcc/testsuite/objc.dg/torture/strings/const-str-3.m | 2 +- + 28 files changed, 40 insertions(+), 18 deletions(-) + +--- /dev/null ++++ b/src/gcc/testsuite/gcc.c-torture/execute/vfprintf-chk-1.x +@@ -0,0 +1,5 @@ ++# Implement "/* { dg-options "-U_FORITFY_SOURCE" } */", due to ++# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20567 ++ ++set additional_flags "-U_FORTIFY_SOURCE" ++return 0 +--- /dev/null ++++ b/src/gcc/testsuite/gcc.c-torture/execute/vprintf-chk-1.x +@@ -0,0 +1,5 @@ ++# Implement "/* { dg-options "-U_FORITFY_SOURCE" } */", due to ++# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20567 ++ ++set additional_flags "-U_FORTIFY_SOURCE" ++return 0 +--- a/src/gcc/testsuite/gcc.dg/charset/builtin2.c ++++ b/src/gcc/testsuite/gcc.dg/charset/builtin2.c +@@ -3,7 +3,7 @@ + + /* { dg-do compile } */ + /* { dg-require-iconv "IBM1047" } */ +-/* { dg-options "-O2 -fexec-charset=IBM1047" } */ ++/* { dg-options "-O2 -fexec-charset=IBM1047 -Wno-format" } */ + /* { dg-final { scan-assembler-not "printf" } } */ + /* { dg-final { scan-assembler-not "fprintf" } } */ + /* { dg-final { scan-assembler-not "sprintf" } } */ +--- a/src/gcc/testsuite/gcc.dg/format/format.exp ++++ b/src/gcc/testsuite/gcc.dg/format/format.exp +@@ -26,7 +26,7 @@ load_lib gcc-dg.exp + load_lib torture-options.exp + + torture-init +-set-torture-options [list { } { -DWIDE } ] ++set-torture-options [list { -Wformat=0 } { -DWIDE -Wformat=0 } ] + + dg-init + gcc-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\]]] "" "" +--- a/src/gcc/testsuite/gcc.dg/pr30473.c ++++ b/src/gcc/testsuite/gcc.dg/pr30473.c +@@ -1,7 +1,7 @@ + /* PR middle-end/30473 */ + /* Make sure this doesn't ICE. */ + /* { dg-do compile } */ +-/* { dg-options "-O2" } */ ++/* { dg-options "-O2 -Wno-format" } */ + + extern int sprintf (char *, const char *, ...); + +--- a/src/gcc/testsuite/gcc.dg/pr38902.c ++++ b/src/gcc/testsuite/gcc.dg/pr38902.c +@@ -1,6 +1,6 @@ + /* PR target/38902 */ + /* { dg-do run } */ +-/* { dg-options "-O2 -fstack-protector" } */ ++/* { dg-options "-O2 -fstack-protector -Wno-format" } */ + /* { dg-require-effective-target fstack_protector } */ + + #ifdef DEBUG +--- a/src/gcc/testsuite/gcc.dg/pr59418.c ++++ b/src/gcc/testsuite/gcc.dg/pr59418.c +@@ -2,7 +2,7 @@ + /* Reported by Ryan Mansfield */ + + /* { dg-do compile } */ +-/* { dg-options "-Os -g" } */ ++/* { dg-options "-Os -g -Wno-format-zero-length" } */ + /* { dg-options "-march=armv7-a+fp -mfloat-abi=hard -Os -g" { target { arm*-*-* && { ! arm_thumb1 } } } } */ + + extern int printf (const char *__format, ...); +--- a/src/gcc/testsuite/gcc.dg/ipa/ipa-sra-1.c ++++ b/src/gcc/testsuite/gcc.dg/ipa/ipa-sra-1.c +@@ -1,5 +1,5 @@ + /* { dg-do run } */ +-/* { dg-options "-O2 -fipa-sra -fdump-ipa-sra-details" } */ ++/* { dg-options "-O2 -fipa-sra -fdump-ipa-sra-details -Wformat=0" } */ + + struct bovid + { +--- a/src/gcc/testsuite/gcc.dg/lto/20090218-2_0.c ++++ b/src/gcc/testsuite/gcc.dg/lto/20090218-2_0.c +@@ -1,3 +1,5 @@ ++/* { dg-lto-options "-Wno-nonnull" } */ ++ + void set_mem_alias_set (); + void emit_push_insn () { + set_mem_alias_set (); +--- a/src/gcc/testsuite/c-c++-common/torture/vector-compare-1.c ++++ b/src/gcc/testsuite/c-c++-common/torture/vector-compare-1.c +@@ -1,4 +1,5 @@ + /* { dg-do run } */ ++/* { dg-options "-Wformat=0" } */ + #define vector(elcount, type) \ + __attribute__((vector_size((elcount)*sizeof(type)))) type + +--- a/src/gcc/testsuite/gcc.dg/tree-ssa/builtin-vprintf-chk-1.c ++++ b/src/gcc/testsuite/gcc.dg/tree-ssa/builtin-vprintf-chk-1.c +@@ -1,5 +1,5 @@ + /* { dg-do compile } */ +-/* { dg-options "-O2 -fdump-tree-fab1" } */ ++/* { dg-options "-O2 -fdump-tree-fab1 -Wno-format-zero-length" } */ + + #include + +--- a/src/gcc/testsuite/gcc.dg/tree-ssa/builtin-vprintf-1.c ++++ b/src/gcc/testsuite/gcc.dg/tree-ssa/builtin-vprintf-1.c +@@ -1,5 +1,5 @@ + /* { dg-do compile } */ +-/* { dg-options "-O2 -fdump-tree-fab1" } */ ++/* { dg-options "-O2 -fdump-tree-fab1 -Wno-format-zero-length" } */ + + #include + +--- a/src/gcc/testsuite/gcc.dg/tree-ssa/builtin-printf-1.c ++++ b/src/gcc/testsuite/gcc.dg/tree-ssa/builtin-printf-1.c +@@ -1,5 +1,5 @@ + /* { dg-do compile } */ +-/* { dg-options "-O2 -fdump-tree-fab1" } */ ++/* { dg-options "-O2 -fdump-tree-fab1 -Wno-format-zero-length" } */ + + extern int printf (const char *, ...); + volatile int vi0, vi1, vi2, vi3, vi4, vi5, vi6, vi7, vi8, vi9, via; +--- a/src/gcc/testsuite/gcc.dg/tree-ssa/builtin-printf-chk-1.c ++++ b/src/gcc/testsuite/gcc.dg/tree-ssa/builtin-printf-chk-1.c +@@ -1,5 +1,5 @@ + /* { dg-do compile } */ +-/* { dg-options "-O2 -fdump-tree-fab1" } */ ++/* { dg-options "-O2 -fdump-tree-fab1 -Wno-format-zero-length" } */ + + extern int __printf_chk (int, const char *, ...); + volatile int vi0, vi1, vi2, vi3, vi4, vi5, vi6, vi7, vi8, vi9, via; +--- a/src/gcc/testsuite/gcc.dg/tree-ssa/builtin-fprintf-1.c ++++ b/src/gcc/testsuite/gcc.dg/tree-ssa/builtin-fprintf-1.c +@@ -1,5 +1,5 @@ + /* { dg-do compile } */ +-/* { dg-options "-O2 -fdump-tree-fab1" } */ ++/* { dg-options "-O2 -fdump-tree-fab1 -Wno-format-zero-length" } */ + + typedef struct { int i; } FILE; + FILE *fp; +--- a/src/gcc/testsuite/gcc.dg/tree-ssa/builtin-fprintf-chk-1.c ++++ b/src/gcc/testsuite/gcc.dg/tree-ssa/builtin-fprintf-chk-1.c +@@ -1,5 +1,5 @@ + /* { dg-do compile } */ +-/* { dg-options "-O2 -fdump-tree-fab1" } */ ++/* { dg-options "-O2 -fdump-tree-fab1 -Wno-format-zero-length" } */ + + typedef struct { int i; } FILE; + FILE *fp; +--- a/src/gcc/testsuite/gcc.dg/torture/tls/tls-test.c ++++ b/src/gcc/testsuite/gcc.dg/torture/tls/tls-test.c +@@ -1,7 +1,7 @@ + /* { dg-do run } */ + /* { dg-require-effective-target tls } */ + /* { dg-require-effective-target pthread } */ +-/* { dg-options "-pthread" } */ ++/* { dg-options "-pthread -Wformat=0" } */ + + #include + extern int printf (char *,...); +--- a/src/gcc/testsuite/objc.dg/torture/strings/const-str-3.m ++++ b/src/gcc/testsuite/objc.dg/torture/strings/const-str-3.m +@@ -2,7 +2,7 @@ + /* Developed by Markus Hitter . */ + /* { dg-do run } */ + /* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */ +-/* { dg-options "-fconstant-string-class=Foo" } */ ++/* { dg-options "-fconstant-string-class=Foo -Wno-format-security" } */ + /* { dg-options "-mno-constant-cfstrings -fconstant-string-class=Foo" { target *-*-darwin* } } */ + + #include "../../../objc-obj-c++-shared/objc-test-suite-types.h" +--- a/src/gcc/testsuite/g++.dg/abi/pragma-pack1.C ++++ b/src/gcc/testsuite/g++.dg/abi/pragma-pack1.C +@@ -1,5 +1,7 @@ + // PR c++/7046 + ++// { dg-options "-Wformat=0" } ++ + extern "C" int printf (const char *, ...); + + #pragma pack(4) +--- a/src/gcc/testsuite/g++.dg/abi/regparm1.C ++++ b/src/gcc/testsuite/g++.dg/abi/regparm1.C +@@ -1,6 +1,7 @@ + // PR c++/29911 (9381) + // { dg-do run { target i?86-*-* x86_64-*-* } } + // { dg-require-effective-target c++11 } ++// { dg-options "-Wformat=0" } + + extern "C" int printf(const char *, ...); + +--- a/src/gcc/testsuite/g++.dg/cpp0x/constexpr-tuple.C ++++ b/src/gcc/testsuite/g++.dg/cpp0x/constexpr-tuple.C +@@ -1,5 +1,6 @@ + // PR c++/53202 + // { dg-do run { target c++11 } } ++// { dg-options "-Wformat=0" } + + #include + +--- a/src/gcc/testsuite/g++.dg/torture/pr51436.C ++++ b/src/gcc/testsuite/g++.dg/torture/pr51436.C +@@ -1,4 +1,5 @@ + /* { dg-do compile } */ ++/* { dg-options "-Wno-nonnull" } */ + /* { dg-additional-options "-Wno-return-type" } */ + + typedef __SIZE_TYPE__ size_t; +--- a/src/gcc/testsuite/g++.old-deja/g++.law/weak.C ++++ b/src/gcc/testsuite/g++.old-deja/g++.law/weak.C +@@ -1,6 +1,6 @@ + // { dg-do link { target i?86-*-linux* i?86-*-gnu* x86_64-*-linux* } } + // { dg-require-effective-target static } +-// { dg-options "-static" } ++// { dg-options "-static -Wno-nonnull" } + // Bug: g++ fails to instantiate operator<<. + + // libc-5.4.xx has __IO_putc in its static C library, which can conflict +--- a/src/gcc/testsuite/g++.old-deja/g++.other/std1.C ++++ b/src/gcc/testsuite/g++.old-deja/g++.other/std1.C +@@ -1,4 +1,5 @@ + // { dg-do assemble } ++// { dg-options "-Wno-nonnull" } + // Origin: Mark Mitchell + + extern "C" int memcmp (const void * __s1, +--- a/src/gcc/testsuite/gcc.dg/tree-ssa/builtin-vfprintf-1.c ++++ b/src/gcc/testsuite/gcc.dg/tree-ssa/builtin-vfprintf-1.c +@@ -1,5 +1,5 @@ + /* { dg-do compile } */ +-/* { dg-options "-O2 -fdump-tree-fab1" } */ ++/* { dg-options "-O2 -fdump-tree-fab1 -Wno-format-zero-length" } */ + + #include + +--- a/src/gcc/testsuite/gcc.dg/tree-ssa/builtin-vfprintf-chk-1.c ++++ b/src/gcc/testsuite/gcc.dg/tree-ssa/builtin-vfprintf-chk-1.c +@@ -1,5 +1,5 @@ + /* { dg-do compile } */ +-/* { dg-options "-O2 -fdump-tree-fab1" } */ ++/* { dg-options "-O2 -fdump-tree-fab1 -Wno-format-zero-length" } */ + + #include + diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/testsuite-hardening-printf-types.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/testsuite-hardening-printf-types.diff new file mode 100644 index 0000000000..248cb5ecb7 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/testsuite-hardening-printf-types.diff @@ -0,0 +1,667 @@ +# DP: Description: adjust/standardize printf types to avoid -Wformat warnings. +# DP: Author: Kees Cook +# DP: Ubuntu: https://bugs.launchpad.net/bugs/344502 + +Index: b/src/gcc/testsuite/g++.dg/ext/align1.C +=================================================================== +--- a/src/gcc/testsuite/g++.dg/ext/align1.C ++++ b/src/gcc/testsuite/g++.dg/ext/align1.C +@@ -16,6 +16,7 @@ float f1 __attribute__ ((aligned)); + int + main (void) + { +- printf ("%d %d\n", __alignof (a1), __alignof (f1)); ++ // "%td" is not allowed by ISO C++, so use %p with a void * cast ++ printf ("%p %p\n", (void*)__alignof (a1), (void*)__alignof (f1)); + return (__alignof (a1) < __alignof (f1)); + } +Index: b/src/gcc/testsuite/g++.old-deja/g++.law/operators28.C +=================================================================== +--- a/src/gcc/testsuite/g++.old-deja/g++.law/operators28.C ++++ b/src/gcc/testsuite/g++.old-deja/g++.law/operators28.C +@@ -14,7 +14,8 @@ void* new_test::operator new(size_t sz, + { + void *p; + +- printf("%d %d %d\n", sz, count, type); ++ // ISO C++ does not support format size modifier "z", so use a cast ++ printf("%u %d %d\n", (unsigned int)sz, count, type); + + p = new char[sz * count]; + ((new_test *)p)->type = type; +Index: b/src/gcc/testsuite/gcc.dg/torture/matrix-2.c +=================================================================== +--- a/src/gcc/testsuite/gcc.dg/torture/matrix-2.c ++++ b/src/gcc/testsuite/gcc.dg/torture/matrix-2.c +@@ -42,7 +42,7 @@ main (int argc, char **argv) + } + for (i = 0; i < ARCHnodes; i++) + for (j = 0; j < 3; j++) +- printf ("%x\n",vel[i][j]); ++ printf ("%p\n",vel[i][j]); + /*if (i!=1 || j!=1)*/ + /*if (i==1 && j==1) + continue; +@@ -82,14 +82,14 @@ mem_init (void) + for (j = 0; j < 3; j++) + { + vel[i][j] = (int *) malloc (ARCHnodes1 * sizeof (int)); +- printf ("%x %d %d\n",vel[i][j], ARCHnodes1, sizeof (int)); ++ printf ("%p %d %d\n",vel[i][j], ARCHnodes1, (int)sizeof (int)); + } + } + for (i = 0; i < ARCHnodes; i++) + { + for (j = 0; j < 3; j++) + { +- printf ("%x\n",vel[i][j]); ++ printf ("%p\n",vel[i][j]); + } + } + +@@ -98,7 +98,7 @@ mem_init (void) + { + for (j = 0; j < 3; j++) + { +- printf ("%x\n",vel[i][j]); ++ printf ("%p\n",vel[i][j]); + /*for (k = 0; k < ARCHnodes1; k++) + { + vel[i][j][k] = d; +Index: b/src/gcc/testsuite/gcc.dg/packed-vla.c +=================================================================== +--- a/src/gcc/testsuite/gcc.dg/packed-vla.c ++++ b/src/gcc/testsuite/gcc.dg/packed-vla.c +@@ -18,8 +18,8 @@ int func(int levels) + int b[4]; + } __attribute__ ((__packed__)) foo; + +- printf("foo %d\n", sizeof(foo)); +- printf("bar %d\n", sizeof(bar)); ++ printf("foo %d\n", (int)sizeof(foo)); ++ printf("bar %d\n", (int)sizeof(bar)); + + if (sizeof (foo) != sizeof (bar)) + abort (); +Index: b/src/gcc/testsuite/g++.dg/opt/alias2.C +=================================================================== +--- a/src/gcc/testsuite/g++.dg/opt/alias2.C ++++ b/src/gcc/testsuite/g++.dg/opt/alias2.C +@@ -30,14 +30,14 @@ public: + + + _Deque_base::~_Deque_base() { +- printf ("bb %x %x\n", this, *_M_start._M_node); ++ printf ("bb %p %x\n", this, *_M_start._M_node); + } + + void + _Deque_base::_M_initialize_map() + { + yy = 0x123; +- printf ("aa %x %x\n", this, yy); ++ printf ("aa %p %x\n", this, yy); + + _M_start._M_node = &yy; + _M_start._M_cur = yy; +Index: b/src/gcc/testsuite/g++.old-deja/g++.abi/vbase1.C +=================================================================== +--- a/src/gcc/testsuite/g++.old-deja/g++.abi/vbase1.C ++++ b/src/gcc/testsuite/g++.old-deja/g++.abi/vbase1.C +@@ -33,7 +33,7 @@ struct VBase + void Offset () const + { + printf ("VBase\n"); +- printf (" VBase::member %d\n", &this->VBase::member - (int *)this); ++ printf (" VBase::member %d\n", (int)(&this->VBase::member - (int *)this)); + } + }; + +@@ -55,8 +55,8 @@ struct VDerived : virtual VBase + void Offset () const + { + printf ("VDerived\n"); +- printf (" VBase::member %d\n", &this->VBase::member - (int *)this); +- printf (" VDerived::member %d\n", &this->VDerived::member - (int *)this); ++ printf (" VBase::member %d\n", (int)(&this->VBase::member - (int *)this)); ++ printf (" VDerived::member %d\n", (int)(&this->VDerived::member - (int *)this)); + } + }; + struct B : virtual VBase +@@ -65,8 +65,8 @@ struct B : virtual VBase + void Offset () const + { + printf ("B\n"); +- printf (" VBase::member %d\n", &this->VBase::member - (int *)this); +- printf (" B::member %d\n", &this->B::member - (int *)this); ++ printf (" VBase::member %d\n", (int)(&this->VBase::member - (int *)this)); ++ printf (" B::member %d\n", (int)(&this->B::member - (int *)this)); + } + }; + struct MostDerived : B, virtual VDerived +@@ -75,10 +75,10 @@ struct MostDerived : B, virtual VDerived + void Offset () const + { + printf ("MostDerived\n"); +- printf (" VBase::member %d\n", &this->VBase::member - (int *)this); +- printf (" B::member %d\n", &this->B::member - (int *)this); +- printf (" VDerived::member %d\n", &this->VDerived::member - (int *)this); +- printf (" MostDerived::member %d\n", &this->MostDerived::member - (int *)this); ++ printf (" VBase::member %d\n", (int)(&this->VBase::member - (int *)this)); ++ printf (" B::member %d\n", (int)(&this->B::member - (int *)this)); ++ printf (" VDerived::member %d\n", (int)(&this->VDerived::member - (int *)this)); ++ printf (" MostDerived::member %d\n", (int)(&this->MostDerived::member - (int *)this)); + } + }; + +@@ -95,10 +95,10 @@ int main () + if (ctorVDerived != &dum.VDerived::member) + return 24; + +- printf (" VBase::member %d\n", &dum.VBase::member - this_); +- printf (" B::member %d\n", &dum.B::member - this_); +- printf (" VDerived::member %d\n", &dum.VDerived::member - this_); +- printf (" MostDerived::member %d\n", &dum.MostDerived::member - this_); ++ printf (" VBase::member %d\n", (int)(&dum.VBase::member - this_)); ++ printf (" B::member %d\n", (int)(&dum.B::member - this_)); ++ printf (" VDerived::member %d\n", (int)(&dum.VDerived::member - this_)); ++ printf (" MostDerived::member %d\n", (int)(&dum.MostDerived::member - this_)); + dum.MostDerived::Offset (); + dum.B::Offset (); + dum.VDerived::Offset (); +Index: b/src/gcc/testsuite/g++.old-deja/g++.brendan/template8.C +=================================================================== +--- a/src/gcc/testsuite/g++.old-deja/g++.brendan/template8.C ++++ b/src/gcc/testsuite/g++.old-deja/g++.brendan/template8.C +@@ -15,6 +15,6 @@ int main(){ + + Double_alignt<20000> heap; + +- printf(" &heap.array[0] = %d, &heap.for_alignt = %d\n", &heap.array[0], &heap.for_alignt); ++ printf(" &heap.array[0] = %p, &heap.for_alignt = %p\n", (void*)&heap.array[0], (void*)&heap.for_alignt); + + } +Index: b/src/gcc/testsuite/g++.old-deja/g++.eh/ptr1.C +=================================================================== +--- a/src/gcc/testsuite/g++.old-deja/g++.eh/ptr1.C ++++ b/src/gcc/testsuite/g++.old-deja/g++.eh/ptr1.C +@@ -16,7 +16,7 @@ int main() + } + + catch (E *&e) { +- printf ("address of e is 0x%lx\n", (__SIZE_TYPE__)e); ++ printf ("address of e is %p\n", (void *)e); + return !((__SIZE_TYPE__)e != 5 && e->x == 5); + } + return 2; +Index: b/src/gcc/testsuite/g++.old-deja/g++.jason/access23.C +=================================================================== +--- a/src/gcc/testsuite/g++.old-deja/g++.jason/access23.C ++++ b/src/gcc/testsuite/g++.old-deja/g++.jason/access23.C +@@ -42,19 +42,19 @@ public: + void DoSomething() { + PUB_A = 0; + Foo::A = 0; +- printf("%x\n",pX); ++ printf("%p\n",pX); + Foo::PUB.A = 0; +- printf("%x\n",PUB.pX); ++ printf("%p\n",PUB.pX); + B = 0; +- printf("%x\n",Foo::pY); ++ printf("%p\n",Foo::pY); + PRT_A = 0; + PRT.B = 0; +- printf("%x\n",Foo::PRT.pY); ++ printf("%p\n",Foo::PRT.pY); + PRV_A = 0; // { dg-error "" } + Foo::C = 0; // { dg-error "" } +- printf("%x\n",pZ); // { dg-error "" } ++ printf("%p\n",pZ); // { dg-error "" } + Foo::PRV.C = 0; // { dg-error "" } +- printf("%x\n",PRV.pZ); // { dg-error "" } ++ printf("%p\n",PRV.pZ); // { dg-error "" } + } + }; + +@@ -64,17 +64,17 @@ int main() + + a.PUB_A = 0; + a.A = 0; +- printf("%x\n",a.pX); ++ printf("%p\n",a.pX); + a.PRT_A = 0; // { dg-error "" } + a.B = 0; // { dg-error "" } +- printf("%x\n",a.pY); // { dg-error "" } ++ printf("%p\n",a.pY); // { dg-error "" } + a.PRV_A = 0; // { dg-error "" } + a.C = 0; // { dg-error "" } +- printf("%x\n",a.pZ); // { dg-error "" } ++ printf("%p\n",a.pZ); // { dg-error "" } + a.PUB.A = 0; +- printf("%x\n",a.PUB.pX); ++ printf("%p\n",a.PUB.pX); + a.PRT.B = 0; // { dg-error "" } +- printf("%x\n",a.PRT.pY); // { dg-error "" } ++ printf("%p\n",a.PRT.pY); // { dg-error "" } + a.PRV.C = 0; // { dg-error "" } +- printf("%x\n",a.PRV.pZ); // { dg-error "" } ++ printf("%p\n",a.PRV.pZ); // { dg-error "" } + } +Index: b/src/gcc/testsuite/g++.old-deja/g++.law/cvt8.C +=================================================================== +--- a/src/gcc/testsuite/g++.old-deja/g++.law/cvt8.C ++++ b/src/gcc/testsuite/g++.old-deja/g++.law/cvt8.C +@@ -20,12 +20,12 @@ struct B { + B::operator const A&() const { + static A a; + a.i = i; +- printf("convert B to A at %x\n", &a); ++ printf("convert B to A at %p\n", (void*)&a); + return a; + } + + void f(A &a) { // { dg-message "" } in passing argument +- printf("A at %x is %d\n", &a, a.i); ++ printf("A at %p is %d\n", (void*)&a, a.i); + } + + int main() { +Index: b/src/gcc/testsuite/g++.old-deja/g++.mike/net35.C +=================================================================== +--- a/src/gcc/testsuite/g++.old-deja/g++.mike/net35.C ++++ b/src/gcc/testsuite/g++.old-deja/g++.mike/net35.C +@@ -17,10 +17,10 @@ public: + + int main() { + C c; +- printf("&c.x = %x\n", &c.x); +- printf("&c.B1::x = %x\n", &c.B1::x); +- printf("&c.B2::x = %x\n", &c.B2::x); +- printf("&c.A::x = %x\n", &c.A::x); ++ printf("&c.x = %p\n", (void*)&c.x); ++ printf("&c.B1::x = %p\n", (void*)&c.B1::x); ++ printf("&c.B2::x = %p\n", (void*)&c.B2::x); ++ printf("&c.A::x = %p\n", (void*)&c.A::x); + if (&c.x != &c.B1::x + || &c.x != &c.B2::x + || &c.x != &c.A::x) +Index: b/src/gcc/testsuite/g++.old-deja/g++.mike/offset1.C +=================================================================== +--- a/src/gcc/testsuite/g++.old-deja/g++.mike/offset1.C ++++ b/src/gcc/testsuite/g++.old-deja/g++.mike/offset1.C +@@ -6,7 +6,7 @@ int fail = 0; + class Foo { + public: + virtual void setName() { +- printf("Foo at %x\n", this); ++ printf("Foo at %p\n", (void*)this); + if (vp != (void*)this) + fail = 1; + } +@@ -15,7 +15,7 @@ public: + class Bar : public Foo { + public: + virtual void init(int argc, char **argv) { +- printf("Bar's Foo at %x\n", (Foo*)this); ++ printf("Bar's Foo at %p\n", (void*)(Foo*)this); + vp = (void*)(Foo*)this; + setName(); + } +Index: b/src/gcc/testsuite/g++.old-deja/g++.mike/p12306.C +=================================================================== +--- a/src/gcc/testsuite/g++.old-deja/g++.mike/p12306.C ++++ b/src/gcc/testsuite/g++.old-deja/g++.mike/p12306.C +@@ -18,7 +18,7 @@ public: + if (ptr2 != &(*this).slist) + fail = 6; + +- if (0) printf("at %x %x\n", (RWSlistIterator*)this, &(*this).slist); ++ if (0) printf("at %p %p\n", (void*)(RWSlistIterator*)this, (void*)&(*this).slist); + } + }; + +@@ -54,14 +54,14 @@ Sim_Event_Manager::Sim_Event_Manager () + void Sim_Event_Manager::post_event () { + ptr1 = (RWSlistIterator*)&last_posted_event_position_; + ptr2 = &((RWSlistIterator*)&last_posted_event_position_)->slist; +- if (0) printf("at %x %x\n", (RWSlistIterator*)&last_posted_event_position_, +- &((RWSlistIterator*)&last_posted_event_position_)->slist); ++ if (0) printf("at %p %p\n", (void*)(RWSlistIterator*)&last_posted_event_position_, ++ (void*)&((RWSlistIterator*)&last_posted_event_position_)->slist); + if (ptr1 != (RWSlistIterator*)&last_posted_event_position_) + fail = 1; + if (ptr2 != &((RWSlistIterator&)last_posted_event_position_).slist) + fail = 2; +- if (0) printf("at %x ?%x\n", (RWSlistIterator*)&last_posted_event_position_, +- &((RWSlistIterator&)last_posted_event_position_).slist); ++ if (0) printf("at %p ?%p\n", (void*)(RWSlistIterator*)&last_posted_event_position_, ++ (void*)&((RWSlistIterator&)last_posted_event_position_).slist); + if (ptr1 != (RWSlistIterator*)&last_posted_event_position_) + fail = 3; + if (ptr2 != &((RWSlistIterator&)last_posted_event_position_).slist) +Index: b/src/gcc/testsuite/g++.old-deja/g++.mike/p3579.C +=================================================================== +--- a/src/gcc/testsuite/g++.old-deja/g++.mike/p3579.C ++++ b/src/gcc/testsuite/g++.old-deja/g++.mike/p3579.C +@@ -7,26 +7,26 @@ int num_x; + + class Y { + public: +- Y () { printf("Y() this: %x\n", this); } +- ~Y () { printf("~Y() this: %x\n", this); } ++ Y () { printf("Y() this: %p\n", (void*)this); } ++ ~Y () { printf("~Y() this: %p\n", (void*)this); } + }; + + class X { + public: + X () { + ++num_x; +- printf("X() this: %x\n", this); ++ printf("X() this: %p\n", (void*)this); + Y y; + *this = (X) y; + } + +- X (const Y & yy) { printf("X(const Y&) this: %x\n", this); ++num_x; } ++ X (const Y & yy) { printf("X(const Y&) this: %p\n", (void*)this); ++num_x; } + X & operator = (const X & xx) { +- printf("X.op=(X&) this: %x\n", this); ++ printf("X.op=(X&) this: %p\n", (void*)this); + return *this; + } + +- ~X () { printf("~X() this: %x\n", this); --num_x; } ++ ~X () { printf("~X() this: %p\n", (void*)this); --num_x; } + }; + + int main (int, char **) { +Index: b/src/gcc/testsuite/g++.old-deja/g++.mike/p3708a.C +=================================================================== +--- a/src/gcc/testsuite/g++.old-deja/g++.mike/p3708a.C ++++ b/src/gcc/testsuite/g++.old-deja/g++.mike/p3708a.C +@@ -38,7 +38,7 @@ public: + virtual void xx(int doit) { + --num; + if (ptr != this) +- printf("FAIL\n%x != %x\n", ptr, this); ++ printf("FAIL\n%p != %p\n", ptr, (void*)this); + printf ("C is destructed.\n"); + B::xx (0); + if (doit) A::xx (1); +Index: b/src/gcc/testsuite/g++.old-deja/g++.mike/p3708b.C +=================================================================== +--- a/src/gcc/testsuite/g++.old-deja/g++.mike/p3708b.C ++++ b/src/gcc/testsuite/g++.old-deja/g++.mike/p3708b.C +@@ -48,7 +48,7 @@ public: + virtual void xx(int doit) { + --num; + if (ptr != this) { +- printf("FAIL\n%x != %x\n", ptr, this); ++ printf("FAIL\n%p != %p\n", ptr, (void*)this); + exit(1); + } + printf ("D is destructed.\n"); +Index: b/src/gcc/testsuite/g++.old-deja/g++.mike/p3708.C +=================================================================== +--- a/src/gcc/testsuite/g++.old-deja/g++.mike/p3708.C ++++ b/src/gcc/testsuite/g++.old-deja/g++.mike/p3708.C +@@ -38,7 +38,7 @@ public: + virtual void xx(int doit) { + --num; + if (ptr != this) +- printf("FAIL\n%x != %x\n", ptr, this); ++ printf("FAIL\n%p != %p\n", ptr, (void*)this); + printf ("C is destructed.\n"); + B::xx (0); + if (doit) A::xx (1); +Index: b/src/gcc/testsuite/g++.old-deja/g++.mike/p646.C +=================================================================== +--- a/src/gcc/testsuite/g++.old-deja/g++.mike/p646.C ++++ b/src/gcc/testsuite/g++.old-deja/g++.mike/p646.C +@@ -35,20 +35,20 @@ int foo::si = 0; + foo::foo () + { + si++; +- printf ("new foo @ 0x%x; now %d foos\n", this, si); ++ printf ("new foo @ %p; now %d foos\n", (void*)this, si); + } + + foo::foo (const foo &other) + { + si++; +- printf ("another foo @ 0x%x; now %d foos\n", this, si); ++ printf ("another foo @ %p; now %d foos\n", (void*)this, si); + *this = other; + } + + foo::~foo () + { + si--; +- printf ("deleted foo @ 0x%x; now %d foos\n", this, si); ++ printf ("deleted foo @ %p; now %d foos\n", (void*)this, si); + } + + int +Index: b/src/gcc/testsuite/g++.old-deja/g++.mike/p710.C +=================================================================== +--- a/src/gcc/testsuite/g++.old-deja/g++.mike/p710.C ++++ b/src/gcc/testsuite/g++.old-deja/g++.mike/p710.C +@@ -30,7 +30,7 @@ class B + virtual ~B() {} + void operator delete(void*,size_t s) + { +- printf("B::delete() %d\n",s); ++ printf("B::delete() %u\n",(unsigned int)s); + } + void operator delete(void*){} + }; +Index: b/src/gcc/testsuite/g++.old-deja/g++.mike/p789a.C +=================================================================== +--- a/src/gcc/testsuite/g++.old-deja/g++.mike/p789a.C ++++ b/src/gcc/testsuite/g++.old-deja/g++.mike/p789a.C +@@ -13,10 +13,10 @@ struct foo + int x; + foo () { + x = count++; +- printf("this %d = %x\n", x, (void *)this); ++ printf("this %d = %p\n", x, (void *)this); + } + virtual ~foo () { +- printf("this %d = %x\n", x, (void *)this); ++ printf("this %d = %p\n", x, (void *)this); + --count; + } + }; +@@ -31,7 +31,7 @@ int main () + { + for (int j = 0; j < 3; j++) + { +- printf("&a[%d][%d] = %x\n", i, j, (void *)&array[i][j]); ++ printf("&a[%d][%d] = %p\n", i, j, (void *)&array[i][j]); + } + } + // The count should be nine, if not, fail the test. +Index: b/src/gcc/testsuite/g++.old-deja/g++.mike/pmf2.C +=================================================================== +--- a/src/gcc/testsuite/g++.old-deja/g++.mike/pmf2.C ++++ b/src/gcc/testsuite/g++.old-deja/g++.mike/pmf2.C +@@ -42,7 +42,7 @@ B_table b; + bar jar; + + int main() { +- printf("ptr to B_table=%x, ptr to A_table=%x\n",&b,(A_table*)&b); ++ printf("ptr to B_table=%p, ptr to A_table=%p\n",(void*)&b,(void*)(A_table*)&b); + B_table::B_ti_fn z = &B_table::func1; + int j = 1; + jar.call_fn_fn1(j,(void *)&z); +Index: b/src/gcc/testsuite/g++.old-deja/g++.mike/temp.C +=================================================================== +--- a/src/gcc/testsuite/g++.old-deja/g++.mike/temp.C ++++ b/src/gcc/testsuite/g++.old-deja/g++.mike/temp.C +@@ -7,11 +7,11 @@ class T { + public: + T() { + i = 1; +- printf("T() at %x\n", this); ++ printf("T() at %p\n", (void*)this); + } + T(const T& o) { + i = o.i; +- printf("T(const T&) at %x <-- %x\n", this, &o); ++ printf("T(const T&) at %p <-- %p\n", (void*)this, (void*)&o); + } + T operator +(const T& o) { + T r; +@@ -21,7 +21,7 @@ public: + operator int () { + return i; + } +- ~T() { printf("~T() at %x\n", this); } ++ ~T() { printf("~T() at %p\n", (void*)this); } + } s, b; + + int foo() { return getenv("TEST") == 0; } +Index: b/src/gcc/testsuite/g++.old-deja/g++.other/temporary1.C +=================================================================== +--- a/src/gcc/testsuite/g++.old-deja/g++.other/temporary1.C ++++ b/src/gcc/testsuite/g++.old-deja/g++.other/temporary1.C +@@ -5,16 +5,16 @@ int c, d; + class Foo + { + public: +- Foo() { printf("Foo() 0x%08lx\n", (__SIZE_TYPE__)this); ++c; } +- Foo(Foo const &) { printf("Foo(Foo const &) 0x%08lx\n", (__SIZE_TYPE__)this); } +- ~Foo() { printf("~Foo() 0x%08lx\n", (__SIZE_TYPE__)this); ++d; } ++ Foo() { printf("Foo() %p\n", (void*)this); ++c; } ++ Foo(Foo const &) { printf("Foo(Foo const &) %p\n", (void*)this); } ++ ~Foo() { printf("~Foo() %p\n", (void*)this); ++d; } + }; + + // Bar creates constructs a temporary Foo() as a default + class Bar + { + public: +- Bar(Foo const & = Foo()) { printf("Bar(Foo const &) 0x%08lx\n", (__SIZE_TYPE__)this); } ++ Bar(Foo const & = Foo()) { printf("Bar(Foo const &) %p\n", (void*)this); } + }; + + void fakeRef(Bar *) +Index: b/src/gcc/testsuite/g++.old-deja/g++.other/virtual8.C +=================================================================== +--- a/src/gcc/testsuite/g++.old-deja/g++.other/virtual8.C ++++ b/src/gcc/testsuite/g++.old-deja/g++.other/virtual8.C +@@ -4,7 +4,7 @@ extern "C" int printf (const char*, ...) + struct A + { + virtual void f () { +- printf ("%x\n", this); ++ printf ("%p\n", (void*)this); + } + }; + +Index: b/src/gcc/testsuite/g++.old-deja/g++.pt/memtemp23.C +=================================================================== +--- a/src/gcc/testsuite/g++.old-deja/g++.pt/memtemp23.C ++++ b/src/gcc/testsuite/g++.old-deja/g++.pt/memtemp23.C +@@ -13,7 +13,7 @@ struct S + + template + void f(U u) +- { printf ("In S::f(U)\nsizeof(U) == %d\n", sizeof(u)); } ++ { printf ("In S::f(U)\nsizeof(U) == %d\n", (int)sizeof(u)); } + + int c[16]; + }; +Index: b/src/gcc/testsuite/g++.old-deja/g++.pt/memtemp24.C +=================================================================== +--- a/src/gcc/testsuite/g++.old-deja/g++.pt/memtemp24.C ++++ b/src/gcc/testsuite/g++.old-deja/g++.pt/memtemp24.C +@@ -13,7 +13,7 @@ struct S + + template + void f(U u) +- { printf ("In S::f(U)\nsizeof(U) == %d\n", sizeof(u)); } ++ { printf ("In S::f(U)\nsizeof(U) == %d\n", (int)sizeof(u)); } + + int c[16]; + }; +Index: b/src/gcc/testsuite/g++.old-deja/g++.pt/memtemp25.C +=================================================================== +--- a/src/gcc/testsuite/g++.old-deja/g++.pt/memtemp25.C ++++ b/src/gcc/testsuite/g++.old-deja/g++.pt/memtemp25.C +@@ -6,7 +6,7 @@ template + struct S + { + template +- void f(U u) { printf ("%d\n", sizeof (U)); } ++ void f(U u) { printf ("%d\n", (int)sizeof (U)); } + + int i[4]; + }; +Index: b/src/gcc/testsuite/g++.old-deja/g++.pt/memtemp26.C +=================================================================== +--- a/src/gcc/testsuite/g++.old-deja/g++.pt/memtemp26.C ++++ b/src/gcc/testsuite/g++.old-deja/g++.pt/memtemp26.C +@@ -16,7 +16,7 @@ template + template + void S::f(U u) + { +- printf ("%d\n", sizeof (U)); ++ printf ("%d\n", (int)sizeof (U)); + } + + +Index: b/src/gcc/testsuite/g++.old-deja/g++.pt/t39.C +=================================================================== +--- a/src/gcc/testsuite/g++.old-deja/g++.pt/t39.C ++++ b/src/gcc/testsuite/g++.old-deja/g++.pt/t39.C +@@ -10,9 +10,9 @@ struct frob { + + template + void frob::print () { +- printf ("this = %08x\n", this); +- printf (" ptr = %08x\n", ptr); +- printf (" values = %x %x %x ...\n", ptr[0], ptr[1], ptr[2]); ++ printf ("this = %p\n", (void*)this); ++ printf (" ptr = %p\n", (void*)ptr); ++ printf (" values = %x %x %x ...\n", (int)ptr[0], (int)ptr[1], (int)ptr[2]); + } + + static int x[10]; +Index: b/src/gcc/testsuite/g++.old-deja/g++.robertl/eb17.C +=================================================================== +--- a/src/gcc/testsuite/g++.old-deja/g++.robertl/eb17.C ++++ b/src/gcc/testsuite/g++.old-deja/g++.robertl/eb17.C +@@ -44,15 +44,15 @@ int main() + A * a = new B; + B * b = dynamic_cast(a); + +- printf("%p\n",b); // (*2*) ++ printf("%p\n",(void*)b); // (*2*) + b->print(); + + a = b; +- printf("%p\n",a); ++ printf("%p\n",(void*)a); + a->print(); + + a = a->clone(); +- printf("%p\n",a); ++ printf("%p\n",(void*)a); + a->print(); // (*1*) + + return 0; +Index: b/src/gcc/testsuite/gcc.dg/pch/inline-4.c +=================================================================== +--- a/src/gcc/testsuite/gcc.dg/pch/inline-4.c ++++ b/src/gcc/testsuite/gcc.dg/pch/inline-4.c +@@ -1,6 +1,6 @@ + #include "inline-4.h" + extern int printf (const char *, ...); + int main(void) { +- printf (getstring()); ++ printf ("%s", getstring()); + return 0; + } diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/testsuite-hardening-updates.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/testsuite-hardening-updates.diff new file mode 100644 index 0000000000..112a3b871d --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/testsuite-hardening-updates.diff @@ -0,0 +1,84 @@ +# DP: Fix some gcc and g++ testcases to pass with hardening defaults + +--- + src/gcc/testsuite/c-c++-common/asan/strncpy-overflow-1.c | 2 +- + src/gcc/testsuite/g++.dg/asan/asan_test.C | 2 +- + src/gcc/testsuite/g++.dg/asan/interception-malloc-test-1.C | 2 +- + src/gcc/testsuite/g++.dg/fstack-protector-strong.C | 2 +- + src/gcc/testsuite/gcc.c-torture/execute/memset-1.c | 1 - + src/gcc/testsuite/gcc.c-torture/execute/memset-1.x | 5 +++++ + src/gcc/testsuite/gcc.dg/fstack-protector-strong.c | 2 +- + src/gcc/testsuite/gcc.dg/stack-usage-1.c | 2 +- + src/gcc/testsuite/gcc.dg/superblock.c | 2 +- + src/gcc/testsuite/gcc.target/i386/sw-1.c | 2 +- + 11 files changed, 14 insertions(+), 10 deletions(-) + +--- a/src/gcc/testsuite/g++.dg/asan/asan_test.C ++++ b/src/gcc/testsuite/g++.dg/asan/asan_test.C +@@ -2,7 +2,7 @@ + // { dg-skip-if "" { *-*-* } { "*" } { "-O2" } } + // { dg-skip-if "" { *-*-* } { "-flto" } { "" } } + // { dg-additional-sources "asan_globals_test-wrapper.cc" } +-// { dg-options "-std=c++11 -fsanitize=address -fno-builtin -Wall -Werror -Wno-alloc-size-larger-than -Wno-array-bounds -Wno-stringop-overflow -Wno-stringop-overread -g -DASAN_UAR=0 -DASAN_HAS_EXCEPTIONS=1 -DASAN_HAS_BLACKLIST=0 -DSANITIZER_USE_DEJAGNU_GTEST=1 -lasan -lpthread" } ++// { dg-options "-std=c++11 -fsanitize=address -fno-builtin -Wall -Werror -Wno-alloc-size-larger-than -Wno-array-bounds -Wno-stringop-overflow -Wno-stringop-overread -Wno-unused-result -g -DASAN_UAR=0 -DASAN_HAS_EXCEPTIONS=1 -DASAN_HAS_BLACKLIST=0 -DSANITIZER_USE_DEJAGNU_GTEST=1 -lasan -lpthread" } + // { dg-additional-options "-ldl" { target { ! *-*-freebsd* } } } + // { dg-additional-options "-DASAN_NEEDS_SEGV=1" { target { ! arm*-*-* } } } + // { dg-additional-options "-DASAN_LOW_MEMORY=1 -DASAN_NEEDS_SEGV=0" { target arm*-*-* } } +--- a/src/gcc/testsuite/g++.dg/asan/interception-malloc-test-1.C ++++ b/src/gcc/testsuite/g++.dg/asan/interception-malloc-test-1.C +@@ -1,7 +1,7 @@ + // ASan interceptor can be accessed with __interceptor_ prefix. + + // { dg-do run { target *-*-linux* *-*-freebsd* } } +-// { dg-options "-fno-builtin-free" } ++// { dg-options "-fno-builtin-free -Wno-unused-result" } + // { dg-additional-options "-D__NO_INLINE__" { target { *-*-linux-gnu *-*-freebsd* } } } + // { dg-shouldfail "asan" } + +--- a/src/gcc/testsuite/gcc.c-torture/execute/memset-1.c ++++ b/src/gcc/testsuite/gcc.c-torture/execute/memset-1.c +@@ -1,3 +1,5 @@ ++/* { dg-prune-output ".*warning: memset used with constant zero length parameter.*" } */ ++ + /* Copyright (C) 2002 Free Software Foundation. + + Test memset with various combinations of pointer alignments and lengths to +--- a/src/gcc/testsuite/c-c++-common/asan/strncpy-overflow-1.c ++++ b/src/gcc/testsuite/c-c++-common/asan/strncpy-overflow-1.c +@@ -1,5 +1,5 @@ + /* { dg-do run } */ +-/* { dg-options "-fno-builtin-malloc -fno-builtin-strncpy" } */ ++/* { dg-options "-fno-builtin-malloc -fno-builtin-strncpy -U_FORTIFY_SOURCE" } */ + /* { dg-additional-options "-D_FORTIFY_SOURCE=0 -gdwarf-3" { target *-*-darwin* } } */ + /* { dg-shouldfail "asan" } */ + +--- a/src/gcc/testsuite/gcc.dg/fstack-protector-strong.c ++++ b/src/gcc/testsuite/gcc.dg/fstack-protector-strong.c +@@ -1,7 +1,7 @@ + /* Test that stack protection is done on chosen functions. */ + + /* { dg-do compile { target i?86-*-* x86_64-*-* rs6000-*-* s390x-*-* } } */ +-/* { dg-options "-O2 -fstack-protector-strong" } */ ++/* { dg-options "-O2 -fstack-protector-strong -U_FORTIFY_SOURCE" } */ + + /* This test checks the presence of __stack_chk_fail function in assembler. + * Compiler generates _stack_chk_fail_local (wrapper) calls instead for PIC. +--- a/src/gcc/testsuite/g++.dg/fstack-protector-strong.C ++++ b/src/gcc/testsuite/g++.dg/fstack-protector-strong.C +@@ -1,7 +1,7 @@ + /* Test that stack protection is done on chosen functions. */ + + /* { dg-do compile { target i?86-*-* x86_64-*-* } } */ +-/* { dg-options "-O2 -fstack-protector-strong" } */ ++/* { dg-options "-O2 -fstack-protector-strong -U_FORTIFY_SOURCE" } */ + + /* This test checks the presence of __stack_chk_fail function in assembler. + * Compiler generates _stack_chk_fail_local (wrapper) calls instead for PIC. +--- /dev/null ++++ b/src/gcc/testsuite/gcc.c-torture/execute/memset-1.x +@@ -0,0 +1,5 @@ ++# Implement "/* { dg-options "-U_FORITFY_SOURCE" } */", due to ++# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20567 ++ ++set additional_flags "-U_FORTIFY_SOURCE" ++return 0 diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/toplevel-add-gprofng.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/toplevel-add-gprofng.diff new file mode 100644 index 0000000000..7079ac924e --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/toplevel-add-gprofng.diff @@ -0,0 +1,930 @@ +--- a/src/Makefile.def ++++ b/src/Makefile.def +@@ -72,6 +72,7 @@ host_modules= { module= isl; lib_path=.l + no_install= true; }; + host_modules= { module= gold; bootstrap=true; }; + host_modules= { module= gprof; }; ++host_modules= { module= gprofng; }; + // intl acts on 'host_shared' directly, and does not support --with-pic. + host_modules= { module= intl; bootstrap=true; }; + host_modules= { module= tcl; +@@ -510,6 +511,16 @@ dependencies = { module=all-gprof; on=al + dependencies = { module=all-gprof; on=all-opcodes; }; + dependencies = { module=all-gprof; on=all-intl; }; + dependencies = { module=all-gprof; on=all-gas; }; ++ ++dependencies = { module=configure-gprofng; on=configure-intl; }; ++dependencies = { module=all-gprofng; on=all-libiberty; }; ++dependencies = { module=all-gprofng; on=all-bfd; }; ++dependencies = { module=all-gprofng; on=all-opcodes; }; ++dependencies = { module=all-gprofng; on=all-intl; }; ++dependencies = { module=all-gprofng; on=all-gas; }; ++dependencies = { module=install-gprofng; on=install-opcodes; }; ++dependencies = { module=install-gprofng; on=install-bfd; }; ++ + dependencies = { module=configure-ld; on=configure-intl; }; + dependencies = { module=all-ld; on=all-libiberty; }; + dependencies = { module=all-ld; on=all-bfd; }; +--- a/src/Makefile.in ++++ b/src/Makefile.in +@@ -1084,6 +1084,7 @@ configure-host: \ + maybe-configure-isl \ + maybe-configure-gold \ + maybe-configure-gprof \ ++ maybe-configure-gprofng \ + maybe-configure-intl \ + maybe-configure-tcl \ + maybe-configure-itcl \ +@@ -1237,6 +1238,7 @@ all-host: maybe-all-isl + all-host: maybe-all-gold + @endif gold-no-bootstrap + all-host: maybe-all-gprof ++all-host: maybe-all-gprofng + @if intl-no-bootstrap + all-host: maybe-all-intl + @endif intl-no-bootstrap +@@ -1376,6 +1378,7 @@ info-host: maybe-info-mpc + info-host: maybe-info-isl + info-host: maybe-info-gold + info-host: maybe-info-gprof ++info-host: maybe-info-gprofng + info-host: maybe-info-intl + info-host: maybe-info-tcl + info-host: maybe-info-itcl +@@ -1466,6 +1469,7 @@ dvi-host: maybe-dvi-mpc + dvi-host: maybe-dvi-isl + dvi-host: maybe-dvi-gold + dvi-host: maybe-dvi-gprof ++dvi-host: maybe-dvi-gprofng + dvi-host: maybe-dvi-intl + dvi-host: maybe-dvi-tcl + dvi-host: maybe-dvi-itcl +@@ -1556,6 +1560,7 @@ pdf-host: maybe-pdf-mpc + pdf-host: maybe-pdf-isl + pdf-host: maybe-pdf-gold + pdf-host: maybe-pdf-gprof ++pdf-host: maybe-pdf-gprofng + pdf-host: maybe-pdf-intl + pdf-host: maybe-pdf-tcl + pdf-host: maybe-pdf-itcl +@@ -1646,6 +1651,7 @@ html-host: maybe-html-mpc + html-host: maybe-html-isl + html-host: maybe-html-gold + html-host: maybe-html-gprof ++html-host: maybe-html-gprofng + html-host: maybe-html-intl + html-host: maybe-html-tcl + html-host: maybe-html-itcl +@@ -1736,6 +1742,7 @@ TAGS-host: maybe-TAGS-mpc + TAGS-host: maybe-TAGS-isl + TAGS-host: maybe-TAGS-gold + TAGS-host: maybe-TAGS-gprof ++TAGS-host: maybe-TAGS-gprofng + TAGS-host: maybe-TAGS-intl + TAGS-host: maybe-TAGS-tcl + TAGS-host: maybe-TAGS-itcl +@@ -1826,6 +1833,7 @@ install-info-host: maybe-install-info-mp + install-info-host: maybe-install-info-isl + install-info-host: maybe-install-info-gold + install-info-host: maybe-install-info-gprof ++install-info-host: maybe-install-info-gprofng + install-info-host: maybe-install-info-intl + install-info-host: maybe-install-info-tcl + install-info-host: maybe-install-info-itcl +@@ -1916,6 +1924,7 @@ install-dvi-host: maybe-install-dvi-mpc + install-dvi-host: maybe-install-dvi-isl + install-dvi-host: maybe-install-dvi-gold + install-dvi-host: maybe-install-dvi-gprof ++install-dvi-host: maybe-install-dvi-gprofng + install-dvi-host: maybe-install-dvi-intl + install-dvi-host: maybe-install-dvi-tcl + install-dvi-host: maybe-install-dvi-itcl +@@ -2006,6 +2015,7 @@ install-pdf-host: maybe-install-pdf-mpc + install-pdf-host: maybe-install-pdf-isl + install-pdf-host: maybe-install-pdf-gold + install-pdf-host: maybe-install-pdf-gprof ++install-pdf-host: maybe-install-pdf-gprofng + install-pdf-host: maybe-install-pdf-intl + install-pdf-host: maybe-install-pdf-tcl + install-pdf-host: maybe-install-pdf-itcl +@@ -2096,6 +2106,7 @@ install-html-host: maybe-install-html-mp + install-html-host: maybe-install-html-isl + install-html-host: maybe-install-html-gold + install-html-host: maybe-install-html-gprof ++install-html-host: maybe-install-html-gprofng + install-html-host: maybe-install-html-intl + install-html-host: maybe-install-html-tcl + install-html-host: maybe-install-html-itcl +@@ -2186,6 +2197,7 @@ installcheck-host: maybe-installcheck-mp + installcheck-host: maybe-installcheck-isl + installcheck-host: maybe-installcheck-gold + installcheck-host: maybe-installcheck-gprof ++installcheck-host: maybe-installcheck-gprofng + installcheck-host: maybe-installcheck-intl + installcheck-host: maybe-installcheck-tcl + installcheck-host: maybe-installcheck-itcl +@@ -2276,6 +2288,7 @@ mostlyclean-host: maybe-mostlyclean-mpc + mostlyclean-host: maybe-mostlyclean-isl + mostlyclean-host: maybe-mostlyclean-gold + mostlyclean-host: maybe-mostlyclean-gprof ++mostlyclean-host: maybe-mostlyclean-gprofng + mostlyclean-host: maybe-mostlyclean-intl + mostlyclean-host: maybe-mostlyclean-tcl + mostlyclean-host: maybe-mostlyclean-itcl +@@ -2366,6 +2379,7 @@ clean-host: maybe-clean-mpc + clean-host: maybe-clean-isl + clean-host: maybe-clean-gold + clean-host: maybe-clean-gprof ++clean-host: maybe-clean-gprofng + clean-host: maybe-clean-intl + clean-host: maybe-clean-tcl + clean-host: maybe-clean-itcl +@@ -2456,6 +2470,7 @@ distclean-host: maybe-distclean-mpc + distclean-host: maybe-distclean-isl + distclean-host: maybe-distclean-gold + distclean-host: maybe-distclean-gprof ++distclean-host: maybe-distclean-gprofng + distclean-host: maybe-distclean-intl + distclean-host: maybe-distclean-tcl + distclean-host: maybe-distclean-itcl +@@ -2546,6 +2561,7 @@ maintainer-clean-host: maybe-maintainer- + maintainer-clean-host: maybe-maintainer-clean-isl + maintainer-clean-host: maybe-maintainer-clean-gold + maintainer-clean-host: maybe-maintainer-clean-gprof ++maintainer-clean-host: maybe-maintainer-clean-gprofng + maintainer-clean-host: maybe-maintainer-clean-intl + maintainer-clean-host: maybe-maintainer-clean-tcl + maintainer-clean-host: maybe-maintainer-clean-itcl +@@ -2694,6 +2710,7 @@ check-host: \ + maybe-check-isl \ + maybe-check-gold \ + maybe-check-gprof \ ++ maybe-check-gprofng \ + maybe-check-intl \ + maybe-check-tcl \ + maybe-check-itcl \ +@@ -2831,6 +2848,7 @@ install-host-nogcc: \ + maybe-install-isl \ + maybe-install-gold \ + maybe-install-gprof \ ++ maybe-install-gprofng \ + maybe-install-intl \ + maybe-install-tcl \ + maybe-install-itcl \ +@@ -2886,6 +2904,7 @@ install-host: \ + maybe-install-isl \ + maybe-install-gold \ + maybe-install-gprof \ ++ maybe-install-gprofng \ + maybe-install-intl \ + maybe-install-tcl \ + maybe-install-itcl \ +@@ -2996,6 +3015,7 @@ install-strip-host: \ + maybe-install-strip-isl \ + maybe-install-strip-gold \ + maybe-install-strip-gprof \ ++ maybe-install-strip-gprofng \ + maybe-install-strip-intl \ + maybe-install-strip-tcl \ + maybe-install-strip-itcl \ +@@ -19287,6 +19307,474 @@ maintainer-clean-gprof: + + + ++.PHONY: configure-gprofng maybe-configure-gprofng ++maybe-configure-gprofng: ++@if gcc-bootstrap ++configure-gprofng: stage_current ++@endif gcc-bootstrap ++@if gprofng ++maybe-configure-gprofng: configure-gprofng ++configure-gprofng: ++ @: $(MAKE); $(unstage) ++ @r=`${PWD_COMMAND}`; export r; \ ++ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ ++ test ! -f $(HOST_SUBDIR)/gprofng/Makefile || exit 0; \ ++ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gprofng; \ ++ $(HOST_EXPORTS) \ ++ echo Configuring in $(HOST_SUBDIR)/gprofng; \ ++ cd "$(HOST_SUBDIR)/gprofng" || exit 1; \ ++ case $(srcdir) in \ ++ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ ++ *) topdir=`echo $(HOST_SUBDIR)/gprofng/ | \ ++ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \ ++ esac; \ ++ module_srcdir=gprofng; \ ++ $(SHELL) \ ++ $$s/$$module_srcdir/configure \ ++ --srcdir=$${topdir}/$$module_srcdir \ ++ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ ++ --target=${target_alias} \ ++ || exit 1 ++@endif gprofng ++ ++ ++ ++ ++ ++.PHONY: all-gprofng maybe-all-gprofng ++maybe-all-gprofng: ++@if gcc-bootstrap ++all-gprofng: stage_current ++@endif gcc-bootstrap ++@if gprofng ++TARGET-gprofng=all ++maybe-all-gprofng: all-gprofng ++all-gprofng: configure-gprofng ++ @: $(MAKE); $(unstage) ++ @r=`${PWD_COMMAND}`; export r; \ ++ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ ++ $(HOST_EXPORTS) \ ++ (cd $(HOST_SUBDIR)/gprofng && \ ++ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(STAGE1_FLAGS_TO_PASS) \ ++ $(TARGET-gprofng)) ++@endif gprofng ++ ++ ++ ++ ++.PHONY: check-gprofng maybe-check-gprofng ++maybe-check-gprofng: ++@if gprofng ++maybe-check-gprofng: check-gprofng ++ ++check-gprofng: ++ @: $(MAKE); $(unstage) ++ @r=`${PWD_COMMAND}`; export r; \ ++ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ ++ $(HOST_EXPORTS) \ ++ (cd $(HOST_SUBDIR)/gprofng && \ ++ $(MAKE) $(FLAGS_TO_PASS) check) ++ ++@endif gprofng ++ ++.PHONY: install-gprofng maybe-install-gprofng ++maybe-install-gprofng: ++@if gprofng ++maybe-install-gprofng: install-gprofng ++ ++install-gprofng: installdirs ++ @: $(MAKE); $(unstage) ++ @r=`${PWD_COMMAND}`; export r; \ ++ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ ++ $(HOST_EXPORTS) \ ++ (cd $(HOST_SUBDIR)/gprofng && \ ++ $(MAKE) $(FLAGS_TO_PASS) install) ++ ++@endif gprofng ++ ++.PHONY: install-strip-gprofng maybe-install-strip-gprofng ++maybe-install-strip-gprofng: ++@if gprofng ++maybe-install-strip-gprofng: install-strip-gprofng ++ ++install-strip-gprofng: installdirs ++ @: $(MAKE); $(unstage) ++ @r=`${PWD_COMMAND}`; export r; \ ++ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ ++ $(HOST_EXPORTS) \ ++ (cd $(HOST_SUBDIR)/gprofng && \ ++ $(MAKE) $(FLAGS_TO_PASS) install-strip) ++ ++@endif gprofng ++ ++# Other targets (info, dvi, pdf, etc.) ++ ++.PHONY: maybe-info-gprofng info-gprofng ++maybe-info-gprofng: ++@if gprofng ++maybe-info-gprofng: info-gprofng ++ ++info-gprofng: \ ++ configure-gprofng ++ @: $(MAKE); $(unstage) ++ @[ -f ./gprofng/Makefile ] || exit 0; \ ++ r=`${PWD_COMMAND}`; export r; \ ++ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ ++ $(HOST_EXPORTS) \ ++ for flag in $(EXTRA_HOST_FLAGS) ; do \ ++ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ ++ done; \ ++ echo "Doing info in gprofng"; \ ++ (cd $(HOST_SUBDIR)/gprofng && \ ++ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ ++ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ ++ "RANLIB=$${RANLIB}" \ ++ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ ++ info) \ ++ || exit 1 ++ ++@endif gprofng ++ ++.PHONY: maybe-dvi-gprofng dvi-gprofng ++maybe-dvi-gprofng: ++@if gprofng ++maybe-dvi-gprofng: dvi-gprofng ++ ++dvi-gprofng: \ ++ configure-gprofng ++ @: $(MAKE); $(unstage) ++ @[ -f ./gprofng/Makefile ] || exit 0; \ ++ r=`${PWD_COMMAND}`; export r; \ ++ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ ++ $(HOST_EXPORTS) \ ++ for flag in $(EXTRA_HOST_FLAGS) ; do \ ++ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ ++ done; \ ++ echo "Doing dvi in gprofng"; \ ++ (cd $(HOST_SUBDIR)/gprofng && \ ++ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ ++ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ ++ "RANLIB=$${RANLIB}" \ ++ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ ++ dvi) \ ++ || exit 1 ++ ++@endif gprofng ++ ++.PHONY: maybe-pdf-gprofng pdf-gprofng ++maybe-pdf-gprofng: ++@if gprofng ++maybe-pdf-gprofng: pdf-gprofng ++ ++pdf-gprofng: \ ++ configure-gprofng ++ @: $(MAKE); $(unstage) ++ @[ -f ./gprofng/Makefile ] || exit 0; \ ++ r=`${PWD_COMMAND}`; export r; \ ++ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ ++ $(HOST_EXPORTS) \ ++ for flag in $(EXTRA_HOST_FLAGS) ; do \ ++ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ ++ done; \ ++ echo "Doing pdf in gprofng"; \ ++ (cd $(HOST_SUBDIR)/gprofng && \ ++ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ ++ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ ++ "RANLIB=$${RANLIB}" \ ++ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ ++ pdf) \ ++ || exit 1 ++ ++@endif gprofng ++ ++.PHONY: maybe-html-gprofng html-gprofng ++maybe-html-gprofng: ++@if gprofng ++maybe-html-gprofng: html-gprofng ++ ++html-gprofng: \ ++ configure-gprofng ++ @: $(MAKE); $(unstage) ++ @[ -f ./gprofng/Makefile ] || exit 0; \ ++ r=`${PWD_COMMAND}`; export r; \ ++ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ ++ $(HOST_EXPORTS) \ ++ for flag in $(EXTRA_HOST_FLAGS) ; do \ ++ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ ++ done; \ ++ echo "Doing html in gprofng"; \ ++ (cd $(HOST_SUBDIR)/gprofng && \ ++ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ ++ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ ++ "RANLIB=$${RANLIB}" \ ++ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ ++ html) \ ++ || exit 1 ++ ++@endif gprofng ++ ++.PHONY: maybe-TAGS-gprofng TAGS-gprofng ++maybe-TAGS-gprofng: ++@if gprofng ++maybe-TAGS-gprofng: TAGS-gprofng ++ ++TAGS-gprofng: \ ++ configure-gprofng ++ @: $(MAKE); $(unstage) ++ @[ -f ./gprofng/Makefile ] || exit 0; \ ++ r=`${PWD_COMMAND}`; export r; \ ++ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ ++ $(HOST_EXPORTS) \ ++ for flag in $(EXTRA_HOST_FLAGS) ; do \ ++ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ ++ done; \ ++ echo "Doing TAGS in gprofng"; \ ++ (cd $(HOST_SUBDIR)/gprofng && \ ++ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ ++ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ ++ "RANLIB=$${RANLIB}" \ ++ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ ++ TAGS) \ ++ || exit 1 ++ ++@endif gprofng ++ ++.PHONY: maybe-install-info-gprofng install-info-gprofng ++maybe-install-info-gprofng: ++@if gprofng ++maybe-install-info-gprofng: install-info-gprofng ++ ++install-info-gprofng: \ ++ configure-gprofng \ ++ info-gprofng ++ @: $(MAKE); $(unstage) ++ @[ -f ./gprofng/Makefile ] || exit 0; \ ++ r=`${PWD_COMMAND}`; export r; \ ++ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ ++ $(HOST_EXPORTS) \ ++ for flag in $(EXTRA_HOST_FLAGS) ; do \ ++ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ ++ done; \ ++ echo "Doing install-info in gprofng"; \ ++ (cd $(HOST_SUBDIR)/gprofng && \ ++ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ ++ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ ++ "RANLIB=$${RANLIB}" \ ++ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ ++ install-info) \ ++ || exit 1 ++ ++@endif gprofng ++ ++.PHONY: maybe-install-dvi-gprofng install-dvi-gprofng ++maybe-install-dvi-gprofng: ++@if gprofng ++maybe-install-dvi-gprofng: install-dvi-gprofng ++ ++install-dvi-gprofng: \ ++ configure-gprofng \ ++ dvi-gprofng ++ @: $(MAKE); $(unstage) ++ @[ -f ./gprofng/Makefile ] || exit 0; \ ++ r=`${PWD_COMMAND}`; export r; \ ++ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ ++ $(HOST_EXPORTS) \ ++ for flag in $(EXTRA_HOST_FLAGS) ; do \ ++ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ ++ done; \ ++ echo "Doing install-dvi in gprofng"; \ ++ (cd $(HOST_SUBDIR)/gprofng && \ ++ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ ++ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ ++ "RANLIB=$${RANLIB}" \ ++ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ ++ install-dvi) \ ++ || exit 1 ++ ++@endif gprofng ++ ++.PHONY: maybe-install-pdf-gprofng install-pdf-gprofng ++maybe-install-pdf-gprofng: ++@if gprofng ++maybe-install-pdf-gprofng: install-pdf-gprofng ++ ++install-pdf-gprofng: \ ++ configure-gprofng \ ++ pdf-gprofng ++ @: $(MAKE); $(unstage) ++ @[ -f ./gprofng/Makefile ] || exit 0; \ ++ r=`${PWD_COMMAND}`; export r; \ ++ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ ++ $(HOST_EXPORTS) \ ++ for flag in $(EXTRA_HOST_FLAGS) ; do \ ++ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ ++ done; \ ++ echo "Doing install-pdf in gprofng"; \ ++ (cd $(HOST_SUBDIR)/gprofng && \ ++ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ ++ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ ++ "RANLIB=$${RANLIB}" \ ++ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ ++ install-pdf) \ ++ || exit 1 ++ ++@endif gprofng ++ ++.PHONY: maybe-install-html-gprofng install-html-gprofng ++maybe-install-html-gprofng: ++@if gprofng ++maybe-install-html-gprofng: install-html-gprofng ++ ++install-html-gprofng: \ ++ configure-gprofng \ ++ html-gprofng ++ @: $(MAKE); $(unstage) ++ @[ -f ./gprofng/Makefile ] || exit 0; \ ++ r=`${PWD_COMMAND}`; export r; \ ++ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ ++ $(HOST_EXPORTS) \ ++ for flag in $(EXTRA_HOST_FLAGS) ; do \ ++ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ ++ done; \ ++ echo "Doing install-html in gprofng"; \ ++ (cd $(HOST_SUBDIR)/gprofng && \ ++ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ ++ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ ++ "RANLIB=$${RANLIB}" \ ++ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ ++ install-html) \ ++ || exit 1 ++ ++@endif gprofng ++ ++.PHONY: maybe-installcheck-gprofng installcheck-gprofng ++maybe-installcheck-gprofng: ++@if gprofng ++maybe-installcheck-gprofng: installcheck-gprofng ++ ++installcheck-gprofng: \ ++ configure-gprofng ++ @: $(MAKE); $(unstage) ++ @[ -f ./gprofng/Makefile ] || exit 0; \ ++ r=`${PWD_COMMAND}`; export r; \ ++ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ ++ $(HOST_EXPORTS) \ ++ for flag in $(EXTRA_HOST_FLAGS) ; do \ ++ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ ++ done; \ ++ echo "Doing installcheck in gprofng"; \ ++ (cd $(HOST_SUBDIR)/gprofng && \ ++ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ ++ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ ++ "RANLIB=$${RANLIB}" \ ++ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ ++ installcheck) \ ++ || exit 1 ++ ++@endif gprofng ++ ++.PHONY: maybe-mostlyclean-gprofng mostlyclean-gprofng ++maybe-mostlyclean-gprofng: ++@if gprofng ++maybe-mostlyclean-gprofng: mostlyclean-gprofng ++ ++mostlyclean-gprofng: ++ @: $(MAKE); $(unstage) ++ @[ -f ./gprofng/Makefile ] || exit 0; \ ++ r=`${PWD_COMMAND}`; export r; \ ++ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ ++ $(HOST_EXPORTS) \ ++ for flag in $(EXTRA_HOST_FLAGS) ; do \ ++ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ ++ done; \ ++ echo "Doing mostlyclean in gprofng"; \ ++ (cd $(HOST_SUBDIR)/gprofng && \ ++ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ ++ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ ++ "RANLIB=$${RANLIB}" \ ++ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ ++ mostlyclean) \ ++ || exit 1 ++ ++@endif gprofng ++ ++.PHONY: maybe-clean-gprofng clean-gprofng ++maybe-clean-gprofng: ++@if gprofng ++maybe-clean-gprofng: clean-gprofng ++ ++clean-gprofng: ++ @: $(MAKE); $(unstage) ++ @[ -f ./gprofng/Makefile ] || exit 0; \ ++ r=`${PWD_COMMAND}`; export r; \ ++ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ ++ $(HOST_EXPORTS) \ ++ for flag in $(EXTRA_HOST_FLAGS) ; do \ ++ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ ++ done; \ ++ echo "Doing clean in gprofng"; \ ++ (cd $(HOST_SUBDIR)/gprofng && \ ++ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ ++ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ ++ "RANLIB=$${RANLIB}" \ ++ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ ++ clean) \ ++ || exit 1 ++ ++@endif gprofng ++ ++.PHONY: maybe-distclean-gprofng distclean-gprofng ++maybe-distclean-gprofng: ++@if gprofng ++maybe-distclean-gprofng: distclean-gprofng ++ ++distclean-gprofng: ++ @: $(MAKE); $(unstage) ++ @[ -f ./gprofng/Makefile ] || exit 0; \ ++ r=`${PWD_COMMAND}`; export r; \ ++ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ ++ $(HOST_EXPORTS) \ ++ for flag in $(EXTRA_HOST_FLAGS) ; do \ ++ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ ++ done; \ ++ echo "Doing distclean in gprofng"; \ ++ (cd $(HOST_SUBDIR)/gprofng && \ ++ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ ++ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ ++ "RANLIB=$${RANLIB}" \ ++ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ ++ distclean) \ ++ || exit 1 ++ ++@endif gprofng ++ ++.PHONY: maybe-maintainer-clean-gprofng maintainer-clean-gprofng ++maybe-maintainer-clean-gprofng: ++@if gprofng ++maybe-maintainer-clean-gprofng: maintainer-clean-gprofng ++ ++maintainer-clean-gprofng: ++ @: $(MAKE); $(unstage) ++ @[ -f ./gprofng/Makefile ] || exit 0; \ ++ r=`${PWD_COMMAND}`; export r; \ ++ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ ++ $(HOST_EXPORTS) \ ++ for flag in $(EXTRA_HOST_FLAGS) ; do \ ++ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ ++ done; \ ++ echo "Doing maintainer-clean in gprofng"; \ ++ (cd $(HOST_SUBDIR)/gprofng && \ ++ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ ++ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ ++ "RANLIB=$${RANLIB}" \ ++ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ ++ maintainer-clean) \ ++ || exit 1 ++ ++@endif gprofng ++ ++ ++ + .PHONY: configure-intl maybe-configure-intl + maybe-configure-intl: + @if gcc-bootstrap +@@ -66049,6 +66537,8 @@ all-stagetrain-gas: maybe-all-stagetrain + all-stagefeedback-gas: maybe-all-stagefeedback-intl + all-stageautoprofile-gas: maybe-all-stageautoprofile-intl + all-stageautofeedback-gas: maybe-all-stageautofeedback-intl ++install-gprofng: maybe-install-opcodes ++install-gprofng: maybe-install-bfd + configure-ld: maybe-configure-intl + configure-stage1-ld: maybe-configure-stage1-intl + configure-stage2-ld: maybe-configure-stage2-intl +@@ -66489,6 +66979,7 @@ configure-gdb: stage_last + configure-gdbserver: stage_last + configure-gdbsupport: stage_last + configure-gprof: stage_last ++configure-gprofng: stage_last + configure-sid: stage_last + configure-sim: stage_last + configure-fastjar: stage_last +@@ -66523,6 +67014,12 @@ all-gprof: maybe-all-bfd + all-gprof: maybe-all-opcodes + all-gprof: maybe-all-intl + all-gprof: maybe-all-gas ++configure-gprofng: maybe-configure-intl ++all-gprofng: maybe-all-libiberty ++all-gprofng: maybe-all-bfd ++all-gprofng: maybe-all-opcodes ++all-gprofng: maybe-all-intl ++all-gprofng: maybe-all-gas + all-sid: maybe-all-libiberty + all-sid: maybe-all-bfd + all-sid: maybe-all-opcodes +--- a/src/configure.ac ++++ b/src/configure.ac +@@ -401,6 +401,20 @@ case "${ENABLE_LD}" in + ;; + esac + ++AC_ARG_ENABLE(gprofng, ++[AS_HELP_STRING([[--enable-gprofng[=ARG]]], ++ [build gprofng @<:@ARG={yes,no}@:>@])], ++enable_gprofng=$enableval, ++enable_gprofng=yes) ++if test "$enable_gprofng" = "yes"; then ++ case "${target}" in ++ x86_64-*-linux* | i?86-*-linux* | aarch64-*-linux*) ++ configdirs="$configdirs gprofng" ++ ;; ++ esac ++fi ++ ++ + # PR gas/19109 + # Decide the default method for compressing debug sections. + # Provide a configure time option to override our default. +--- /dev/null ++++ b/src/include/collectorAPI.h +@@ -0,0 +1,73 @@ ++/* Copyright (C) 2021-2023 Free Software Foundation, Inc. ++ Contributed by Oracle. ++ ++ This file is part of GNU Binutils. ++ ++ This program is free software; you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as published by ++ the Free Software Foundation; either version 3, or (at your option) ++ any later version. ++ ++ This program is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ GNU General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License ++ along with this program; if not, write to the Free Software ++ Foundation, 51 Franklin Street - Fifth Floor, Boston, ++ MA 02110-1301, USA. */ ++ ++#ifndef _COLLECTORAPI_H ++#define _COLLECTORAPI_H ++ ++/* This file contains function prototypes for the user-callable API ++ routines in libcollector. */ ++ ++#include ++ ++#ifdef __cplusplus ++extern "C" ++{ ++#endif ++ /* Routine to record a sample in the experiment. */ ++ extern void collector_sample (const char *name); ++ ++ /* Routine to suspend data collection during an experiment. */ ++ extern void collector_pause (void); ++ ++ /* Routine to resume data collection during an experiment. */ ++ extern void collector_resume (void); ++ ++ /* Routine to suspend per-thread data collection during an experiment. */ ++ extern void collector_thread_pause (pthread_t tid); ++ ++ /* Routine to resume per-thread data collection during an experiment. */ ++ extern void collector_thread_resume (pthread_t tid); ++ ++ /* Routine to close the experiment, and stop all data collection. */ ++ extern void collector_terminate_expt (void); ++ ++ typedef struct ++ { ++ unsigned int offset; ++ unsigned int lineno; ++ } Lineno; ++ ++ /* Routines to let libcollector know about dynamically loaded functions. */ ++ extern void collector_func_load (const char *name, const char *alias, ++ const char *sourcename, void *vaddr, ++ int size, int lntsize, Lineno *lntable); ++ ++ extern void collector_func_unload (void *vaddr); ++ ++#ifdef NEED_COLLECTOR_MODULE ++ extern void collector_module_load (const char *modulename, void *vaddr); ++ extern void collector_module_unload (void *vaddr); ++#endif ++ ++#ifdef __cplusplus ++} ++#endif ++ ++#endif /* _COLLECTORAPI_H */ +--- /dev/null ++++ b/src/include/libcollector.h +@@ -0,0 +1,89 @@ ++/* Copyright (C) 2021-2023 Free Software Foundation, Inc. ++ Contributed by Oracle. ++ ++ This file is part of GNU Binutils. ++ ++ This program is free software; you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as published by ++ the Free Software Foundation; either version 3, or (at your option) ++ any later version. ++ ++ This program is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ GNU General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License ++ along with this program; if not, write to the Free Software ++ Foundation, 51 Franklin Street - Fifth Floor, Boston, ++ MA 02110-1301, USA. */ ++ ++#ifndef _LIBCOLLECTOR_H ++#define _LIBCOLLECTOR_H ++ ++typedef struct ++{ ++ unsigned int offset; ++ unsigned int lineno; ++} Lineno; ++ ++#ifdef __cplusplus ++extern "C" ++{ ++#endif ++ ++ /* This file contains function prototypes for the user-callable API ++ routines in libcollector for C and C++ codes. */ ++ ++ /* Routine to record a sample in the experiment. */ ++ void collector_sample (char *name); ++ ++ /* Routine to suspend data collection during an experiment. */ ++ void collector_pause (void); ++ ++ /* Routine to resume data collection during an experiment. */ ++ void collector_resume (void); ++ ++ /* Routine to suspend per-thread data collection during an experiment. */ ++ void collector_thread_pause (unsigned int tid); ++ ++ /* Routine to resume per-thread data collection during an experiment. */ ++ void collector_thread_resume (unsigned int tid); ++ ++ /* Routine to close the experiment, and stop all data collection. */ ++ void collector_terminate_expt (void); ++ ++ /* Routines to let libcollector know about a dynamically loaded function. */ ++ void collector_func_load (char *name, char *alias, char *sourcename, ++ void *vaddr, int size, int lntsize, Lineno *lntable); ++ void collector_func_unload (void *vaddr); ++ ++ /* Define the weak symbols for the API. */ ++ void collector_sample () __attribute__ ((weak)); ++ void collector_pause () __attribute__ ((weak)); ++ void collector_resume () __attribute__ ((weak)); ++ void collector_thread_pause () __attribute__ ((weak)); ++ void collector_thread_resume () __attribute__ ((weak)); ++ void collector_terminate_expt () __attribute__ ((weak)); ++ void collector_func_load () __attribute__ ((weak)); ++ void collector_func_unload () __attribute__ ((weak)); ++ ++#ifdef __cplusplus ++} ++#endif ++ ++/* Define the macros that actually get inserted in the caller's code. */ ++#define collector_sample(x) (collector_sample ? collector_sample(x), 0 : 0) ++#define collector_pause() (collector_pause ? collector_pause(), 0 : 0) ++#define collector_resume() (collector_resume ? collector_resume(),0 : 0 ++#define collector_thread_pause(tid) \ ++ (collector_thread_pause ? collector_thread_pause(tid), 0 : 0) ++#define collector_thread_resume(tid) \ ++ (collector_thread_resume ? collector_thread_resume(tid), 0 : 0) ++#define collector_terminate_expt() \ ++ (collector_terminate_expt ? collector_terminate_expt(), 0 : 0) ++#define collector_func_load(x0,x1,x2,x3,x4,x5,x6) \ ++ collector_func_load ? collector_func_load(x0,x1,x2,x3,x4,x5,x6), 0 : 0) ++#define collector_func_unload(x) \ ++ (collector_func_unload ? collector_func_unload(x), 0 : 0) ++#endif /* _LIBCOLLECTOR_H */ +--- /dev/null ++++ b/src/include/libfcollector.h +@@ -0,0 +1,42 @@ ++! Copyright (C) 2021-2023 Free Software Foundation, Inc. ++! Contributed by Oracle. ++! ++! This file is part of GNU Binutils. ++! ++! This program is free software; you can redistribute it and/or modify ++! it under the terms of the GNU General Public License as published by ++! the Free Software Foundation; either version 3, or (at your option) ++! any later version. ++! ++! This program is distributed in the hope that it will be useful, ++! but WITHOUT ANY WARRANTY; without even the implied warranty of ++! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++! GNU General Public License for more details. ++! ++! You should have received a copy of the GNU General Public License ++! along with this program; if not, write to the Free Software ++! Foundation, 51 Franklin Street - Fifth Floor, Boston, ++! MA 02110-1301, USA. ++! ++! Developer Sampling Collector interface include file ++ ++ interface ++ ++ ! Routine to record a sample in the experiment. ++ subroutine collector_sample(name) ++ character(len=*), intent(in) :: name ++ end subroutine ++ ++ ! Routine to suspend data collection during an experiment. ++ subroutine collector_pause() ++ end subroutine ++ ++ ! Routine to resume data collection during an experiment. ++ subroutine collector_resume() ++ end subroutine ++ ++ ! Routine to stop all data collection and close the experiment. ++ subroutine collector_terminate_expt() ++ end subroutine ++ ++ end interface diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/toplevel-add-libsframe.diff b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/toplevel-add-libsframe.diff new file mode 100644 index 0000000000..66b67249e9 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/patches/toplevel-add-libsframe.diff @@ -0,0 +1,56 @@ +--- a/src/Makefile.def ++++ b/src/Makefile.def +@@ -458,11 +458,14 @@ dependencies = { module=all-gdbsupport; + dependencies = { module=all-gdbsupport; on=all-intl; }; + + // Host modules specific to binutils. ++// build libsframe before bfd for encoder/decoder support for linking ++// SFrame sections + dependencies = { module=configure-bfd; on=configure-libiberty; hard=true; }; + dependencies = { module=configure-bfd; on=configure-intl; }; + dependencies = { module=all-bfd; on=all-libiberty; }; + dependencies = { module=all-bfd; on=all-intl; }; + dependencies = { module=all-bfd; on=all-zlib; }; ++dependencies = { module=all-bfd; on=all-libsframe; }; + dependencies = { module=configure-opcodes; on=configure-libiberty; hard=true; }; + dependencies = { module=all-opcodes; on=all-libiberty; }; + +@@ -495,6 +498,10 @@ dependencies = { module=install-strip-li + dependencies = { module=install-strip-ld; on=install-strip-bfd; }; + dependencies = { module=install-strip-ld; on=install-strip-libctf; }; + ++// libbfd depends on libsframe ++dependencies = { module=install-bfd; on=install-libsframe; }; ++dependencies = { module=install-strip-bfd; on=install-strip-libsframe; }; ++ + // libopcodes depends on libbfd + dependencies = { module=configure-opcodes; on=configure-bfd; hard=true; }; + dependencies = { module=install-opcodes; on=install-bfd; }; +--- a/src/Makefile.in ++++ b/src/Makefile.in +@@ -66337,6 +66337,16 @@ all-stagetrain-bfd: maybe-all-stagetrain + all-stagefeedback-bfd: maybe-all-stagefeedback-zlib + all-stageautoprofile-bfd: maybe-all-stageautoprofile-zlib + all-stageautofeedback-bfd: maybe-all-stageautofeedback-zlib ++all-bfd: maybe-all-libsframe ++all-stage1-bfd: maybe-all-stage1-libsframe ++all-stage2-bfd: maybe-all-stage2-libsframe ++all-stage3-bfd: maybe-all-stage3-libsframe ++all-stage4-bfd: maybe-all-stage4-libsframe ++all-stageprofile-bfd: maybe-all-stageprofile-libsframe ++all-stagetrain-bfd: maybe-all-stagetrain-libsframe ++all-stagefeedback-bfd: maybe-all-stagefeedback-libsframe ++all-stageautoprofile-bfd: maybe-all-stageautoprofile-libsframe ++all-stageautofeedback-bfd: maybe-all-stageautofeedback-libsframe + configure-opcodes: configure-libiberty + configure-stage1-opcodes: configure-stage1-libiberty + configure-stage2-opcodes: configure-stage2-libiberty +@@ -66475,6 +66485,8 @@ install-ld: maybe-install-libctf + install-strip-libctf: maybe-install-strip-bfd + install-strip-ld: maybe-install-strip-bfd + install-strip-ld: maybe-install-strip-libctf ++install-bfd: maybe-install-libsframe ++install-strip-bfd: maybe-install-strip-libsframe + configure-opcodes: configure-bfd + configure-stage1-opcodes: configure-stage1-bfd + configure-stage2-opcodes: configure-stage2-bfd diff --git a/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/rules.patch b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/rules.patch new file mode 100644 index 0000000000..4e64d8cca9 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/source-artifacts/gcc-debian-patch-inputs/debian/rules.patch @@ -0,0 +1,425 @@ +# -*- makefile -*- +# rules to patch the unpacked files in the source directory +# --------------------------------------------------------------------------- +# various rules to unpack addons and (un)apply patches. +# - patch / apply-patches +# - unpatch / reverse-patches + +.NOTPARALLEL: + +patchdir ?= debian/patches +series_file ?= $(patchdir)/series + +# which patches should be applied? + +debian_patches = \ + git-updates \ + +# git-updates \ + +ifneq ($(GFDL_INVARIANT_FREE),yes) + debian_patches += \ + rename-info-files \ + +# git-doc-updates \ + +else +endif +debian_patches += \ + gcc-gfdl-build + +# libstdc++-pic \ + +debian_patches += \ + gcc-textdomain \ + gcc-distro-specs \ + gcc-driver-extra-langs \ + gcc-hash-style-gnu \ + libstdc++-doclink \ + libstdc++-man-3cxx \ + libstdc++-test-installed \ + libstdc++-doxygen-SOURCE_DATE_EPOCH \ + alpha-no-ev4-directive \ + note-gnu-stack \ + libgomp-omp_h-multilib \ + libgo-testsuite \ + libgo-cleanfiles \ + gcc-target-include-asm \ + libgo-revert-timeout-exp \ + libgo-setcontext-config \ + gcc-auto-build \ + libitm-no-fortify-source \ + sparc64-biarch-long-double-128 \ + pr66368 \ + pr67590 \ + libffi-race-condition \ + cuda-float128 \ + t-libunwind-elf-Wl-z-defs \ + gcc-force-cross-layout \ + gcc-search-prefixed-as-ld \ + kfreebsd-decimal-float \ + pr87808 \ + pr94253 \ + gcc-arm-disable-guality-tests \ + musl-ssp \ + pr79724-revert \ + pr104290-followup \ + arc-stddef \ + pr107475 \ + gccrs-bootstrap-mipsel \ + pr88552 \ + hppa64-libgcov-fallback \ + toplevel-add-gprofng \ + toplevel-add-libsframe \ + libiberty-sha1-1 \ + libiberty-sha1-2 \ + pr113030 \ + libsanitizer-timebits \ + asan-allocator-base \ + gcc-vhdl \ + pr110934 \ + 0001-Ada-remove-conversions-with-C-struct-timeval-from-GN \ + 0002-Ada-remove-C-conversions-with-C-struct-timespec-from \ + 0003-Ada-remove-conversions-with-C-time_t-from-System.OS_ \ + 0003-Ada-define-time_t-timeval-timespec-C-types-in-a-sing \ + 0005-Ada-import-nanosleep-from-System.OS_Primitives.Timed_ \ + 0006-Ada-select-64-bits-time-functions-from-GNU-libc-when- \ + pr11897 \ + +ifneq (,$(newlib_tarball)) + debian_patches += newlib-amdgcn-locks +endif + +# with glibc (>= 2.31) +ifeq (,$(filter $(distrelease),wheezy jessie stretch buster precise xenial bionic)) + debian_patches += libsanitizer-no-crypt +endif + +ifneq (,$(filter $(distrelease),lunar)) + debian_patches += rust-enabled +endif + +ifneq (,$(filter $(distrelease),precise xenial bionic focal groovy hirsute)) + debian_patches += pr100067-revert +endif + +ifneq (,$(filter $(distrelease), jessie stretch buster bullseye precise trusty xenial bionic focal groovy hirsute)) + debian_patches += dwarf5-revert-default + ifneq ($(GFDL_INVARIANT_FREE),yes) + debian_patches += dwarf5-revert-default-doc + endif +endif + +ifeq (,$(filter $(distrelease),$(no_timet64_distreleases))) + debian_patches += pr99832-distro +endif + +# TODO: +# pr81829 \ + +# $(if $(filter yes, $(DEB_CROSS)),,gcc-print-file-name) \ +# libstdc++-nothumb-check \ + +hardening_patches = +ifneq (,$(filter $(derivative),Ubuntu)) + ifneq (,$(findstring gcc-13, $(PKGSOURCE))) + hardening_patches += \ + gcc-distro-specs-ubuntu-doc \ + testsuite-hardening-format \ + testsuite-hardening-printf-types \ + testsuite-hardening-updates \ + testsuite-glibc-warnings + endif +else ifneq (,$(filter $(derivative),Debian)) + ifneq (,$(findstring gcc-13, $(PKGSOURCE))) +# ifneq ($(with_pie),yes) +# hardening_patches += \ +# ignore-pie-specs-when-not-enabled +# endif + endif +endif + +# FIXME 4.5: Drop and adjust symbols files +ifneq (,$(findstring 4.4, $(PKGSOURCE))) + debian_patches += pr39491 +endif + +# Patches for non-core languages. + +ifeq ($(GFDL_INVARIANT_FREE),yes) + debian_patches += gm2-texinfo +endif + +# Most of the time, it would be safe to apply them whether the +# language is selected or not. But when working on a new GCC version, +# it is convenient to concentrate on core languages, and refresh them +# later when working on the specific language. +ifeq ($(with_ada),yes) + debian_patches += ada-gcc-name + debian_patches += ada-verbose + ifeq ($(biarch64),yes) + debian_patches += ada-nobiarch-check + endif + debian_patches += ada-link-lib + debian_patches += ada-gnattools-cross + ifeq ($(with_gnatsjlj),yes) + debian_patches += ada-sjlj + endif + debian_patches += ada-lib-info-source-date-epoch + # FIXME: debian_patches += ada-749574 + debian_patches += ada-perl-shebang +endif + +# FIXME: still relevant? +# gdc-multiarch + +ifeq ($(GFDL_INVARIANT_FREE),yes) + debian_patches += gdc-texinfo +endif +ifeq (,$(filter $(DEB_TARGET_ARCH),amd64 i386 armhf)) + debian_patches += disable-gdc-tests +endif + +debian_patches += alpha-ieee +ifneq ($(GFDL_INVARIANT_FREE),yes) + debian_patches += alpha-ieee-doc +endif + +# all patches below this line are applied for gcc-snapshot builds as well + +ifneq (,$(findstring gcc-snapshot, $(PKGSOURCE))) + debian_patches = +endif + +debian_patches += \ + sys-auxv-header \ + gdc-dynamic-link-phobos \ + ia64-disable-selective-scheduling \ + libstdc++-pythondir \ + gcc-verbose-lto-link \ + +ifeq ($(with_ada),yes) + ifeq ($(DEB_TARGET_ARCH),armel) + debian_patches += ada-armel-libatomic + endif + debian_patches += \ + ada-kfreebsd +endif + +ifeq ($(with_ibm_branch),yes) + debian_patches += ibm-branch +endif + +ifeq ($(with_softfloat),yes) + debian_patches += arm-multilib-soft-float +else ifeq ($(multilib),yes) + ifneq (,$(biarchhfarchs)$(biarchsfarchs)) + ifneq (,$(filter $(distrelease), precise)) + debian_patches += arm-multilib-softfp$(if $(filter yes,$(DEB_CROSS)),-cross) + else + debian_patches += arm-multilib-soft$(if $(filter yes,$(DEB_CROSS)),-cross) + endif + endif +endif +ifneq (,$(filter $(distrelease), precise trusty xenial bionic focal groovy hirsute)) + debian_patches += arm-multilib-defaults +endif + +ifeq ($(DEB_CROSS),yes) + debian_patches += cross-fixes + debian_patches += cross-install-location +endif + +debian_patches += hurd-amd64 +debian_patches += hurd-multiarch +debian_patches += hurd-multilib-multiarch +ifeq ($(DEB_TARGET_ARCH_OS),hurd) + debian_patches += hurd-changes + # FIXME: #1005297, PR 104660 + debian_patches += libgo-hurd-hack +endif + +debian_patches += gcc-ice-dump +debian_patches += gcc-ice-apport +debian_patches += skip-bootstrap-multilib +debian_patches += libffi-ro-eh_frame_sect + +# sigaction on sparc changed between glibc 2.19 and 2.21 +ifeq (,$(filter 2.1%, $(shell dpkg-query -l libc-bin | awk '/^.i/ {print $$3}'))) + # keep it, gets remove in GCC from time to time + #debian_patches += pr67899 +endif + +debian_patches += gcc-multiarch +debian_patches += config-ml +ifneq ($(single_package),yes) + ifeq ($(with_multiarch_cxxheaders),yes) + debian_patches += g++-multiarch-incdir + debian_patches += canonical-cpppath + endif +endif +ifneq (,$(filter $(build_type), build-cross cross-build-cross)) + debian_patches += cross-no-locale-include + debian_patches += cross-biarch +endif +debian_patches += gcc-multilib-multiarch + +ifneq ($(trunk_build),yes) +ifneq (,$(filter $(derivative),Ubuntu)) + debian_patches += gcc-as-needed + ifeq (,$(filter $(distrelease), precise trusty xenial)) + debian_patches += gcc-as-needed-gold + endif +else # Debian + ifeq (,$(filter $(distrelease), jessie stretch)) + debian_patches += gcc-as-needed gcc-as-needed-gold + endif +endif +endif + +debian_patches += libgomp-kfreebsd-testsuite +debian_patches += go-testsuite + +# don't remove, this is regularly overwritten, see PR sanitizer/63958. +#debian_patches += libasan-sparc + +series_stamp = $(stampdir)/02-series-stamp +series: $(series_stamp) +$(series_stamp): + echo $(strip $(addsuffix .diff,$(debian_patches))) \ + | sed -r 's/ +/ /g' | tr " " "\n" > $(series_file) +ifneq (,$(strip $(hardening_patches))) + ifneq ($(trunk_build),yes) + echo $(strip $(addsuffix .diff,$(hardening_patches))) \ + | sed -r 's/ +/ /g' | tr " " "\n" >> $(series_file) + endif +endif + sed -r 's/(.)$$/\1 -p1/' -i $(series_file) + touch $@ + +autoconf_files = $(shell lsdiff --no-filename $(foreach patch,$(debian_patches),$(patchdir)/$(patch).diff) \ + | sed -rn '/(configure\.ac|acinclude.m4)$$/s:[^/]+/src/:src/:p' | sort -u) +autoconf_dirs = $(sort $(dir $(autoconf_files))) + +automake_files = $(addprefix ./, $(filter-out none, \ + $(shell lsdiff --no-filename $(foreach patch,$(debian_patches),$(patchdir)/$(patch).diff) \ + | sed -rn '/Makefile\.(am|in)$$/s:[^/]+/src/:src/:p' | sort -u))) + +autoconf_version = 2.69 +ifneq (,$(filter $(distrelease),stretch buster trusty xenial bionic focal groovy)) + autoconf_version = +endif +ifeq ($(trunk_build),yes) + # The actual version depends on the build-dependencies set by + # variable AUTO_BUILD_DEP in rules.conf. Here, we assume the + # correct version is installed. + #autoconf_version = +endif + +# FIXME: the auto* stuff is done every time for every subdir, which +# leads to build errors. Idea: record the auto* calls in the patch +# files (AUTO

    ) and run them separately, +# maybe only once per directory). +$(patch_stamp): $(unpack_stamp) $(series_stamp) + sync + QUILT_PATCHES=$(patchdir) QUILT_PATCH_OPTS='-E' \ + quilt --quiltrc /dev/null push -a || test $$? = 2 + + : # only needed when we have changes, and currently fails with autogen 5.18 + : #cd $(srcdir)/fixincludes && ./genfixes + + sync + echo -n $(autoconf_dirs) | xargs -d ' ' -L 1 -P $(USE_CPUS) -I{} \ + sh -c 'echo "Running autoconf$(autoconf_version) in {}..." ; \ + cd $(CURDIR)/{} && rm -f configure && \ + AUTOM4TE=/usr/bin/autom4te$(autoconf_version) autoconf$(autoconf_version)' + + for i in $(debian_patches) $(hardening_patches); do \ + echo -e "\n$$i:" >> pxxx; \ + sed -n 's/^# *DP: */ /p' $(patchdir)/$$i.diff >> pxxx; \ + done +# -$(srcdir)/move-if-change pxxx $@ + + : # generate the distro-defaults.h header + rm -f $(srcdir)/gcc/distro-defaults.h + ( \ + echo '/* distro specific configuration injected by the distro build. */'; \ + echo ''; \ + echo '#ifndef ACCEL_COMPILER' \ + ) >> $(srcdir)/gcc/distro-defaults.h +ifeq ($(with_async_unwind),yes) + echo '#define DIST_DEFAULT_ASYNC_UNWIND 1' \ + >> $(srcdir)/gcc/distro-defaults.h +endif +ifeq ($(with_ssp)-$(with_ssp_default),yes-yes) + echo '#define DIST_DEFAULT_SSP 1' \ + >> $(srcdir)/gcc/distro-defaults.h + ifeq (,$(filter $(distrelease), precise trusty)) + echo '#define DIST_DEFAULT_SSP_STRONG 1' \ + >> $(srcdir)/gcc/distro-defaults.h + endif + echo '#define DIST_DEFAULT_FORMAT_SECURITY 1' \ + >> $(srcdir)/gcc/distro-defaults.h +endif +ifneq (,$(filter $(derivative),Ubuntu)) + ifneq (,$(filter $(distrelease),lucid precise trusty xenial bionic focal jammy kinetic lunar mantic)) + ( \ + echo '#define DIST_DEFAULT_FORTIFY_SOURCE 2'; \ + echo '#define DIST_DEFAULT_FORTIFY_SOURCE_S "2"' \ + ) >> $(srcdir)/gcc/distro-defaults.h + else + ( \ + echo '#define DIST_DEFAULT_FORTIFY_SOURCE 3'; \ + echo '#define DIST_DEFAULT_FORTIFY_SOURCE_S "3"' \ + ) >> $(srcdir)/gcc/distro-defaults.h + endif + echo '#define DIST_DEFAULT_RELRO 1' \ + >> $(srcdir)/gcc/distro-defaults.h + echo '#define DIST_DEFAULT_BIND_NOW 1' \ + >> $(srcdir)/gcc/distro-defaults.h + ifeq ($(with_stack_clash),yes) + echo '#define DIST_DEFAULT_STACK_CLASH 1' \ + >> $(srcdir)/gcc/distro-defaults.h + endif + ifeq ($(with_cf_protection),yes) + echo '#define DIST_DEFAULT_CF_PROTECTION 1' \ + >> $(srcdir)/gcc/distro-defaults.h + endif +else ifneq (,$(filter $(derivative),Debian)) + ifneq (,$(findstring gcc-13, $(PKGSOURCE))) + endif +endif +ifeq ($(with_timet64),yes) + echo '#define DIST_DEFAULT_TIMET64 1' \ + >> $(srcdir)/gcc/distro-defaults.h +endif +ifneq (,$(filter $(derivative),Ubuntu)) + ifeq (,$(filter $(distrelease),lucid precise trusty xenial bionic focal jammy kinetic lunar mantic)) + echo '#define DIST_DEFAULT_PKG_METADATA_SPEC 1' \ + >> $(srcdir)/gcc/distro-defaults.h + endif +else ifneq (,$(filter $(derivative),Debian)) + ifeq (,$(filter $(distrelease),lenny squeeze wheezy jessie stretch buster bookworm)) + echo '#define DIST_DEFAULT_PKG_METADATA_SPEC 1' \ + >> $(srcdir)/gcc/distro-defaults.h + endif +endif + echo '#endif' \ + >> $(srcdir)/gcc/distro-defaults.h + + mv pxxx $@ + +unpatch: + QUILT_PATCHES=$(patchdir) \ + quilt --quiltrc /dev/null pop -a -R || test $$? = 2 + rm -rf .pc + +update-patches: $(series_stamp) + export QUILT_PATCHES=$(patchdir); \ + quilt pop -a; \ + export QUILT_REFRESH_ARGS="--no-timestamps --no-index -pab"; \ + export QUILT_DIFF_ARGS="--no-timestamps --no-index -pab"; \ + while quilt push; do quilt refresh --no-timestamps --no-index -pab; done + +patch: $(patch_stamp) +.PHONY: patch series quilt autotools diff --git a/research/h25-c05-v03-input-constructors/tests/c05_elf_edges_test_v1.py b/research/h25-c05-v03-input-constructors/tests/c05_elf_edges_test_v1.py new file mode 100644 index 0000000000..7a9e139300 --- /dev/null +++ b/research/h25-c05-v03-input-constructors/tests/c05_elf_edges_test_v1.py @@ -0,0 +1,261 @@ +"""Independent small byte fixtures; no native tools or archived code imports.""" +import hashlib +import importlib.util +from pathlib import Path +import struct +import unittest + +MODULE = Path(__file__).resolve().parents[1] / "implementation/c05_elf_edges_v1.py" +SPEC = importlib.util.spec_from_file_location("new_c05_elf_edges", MODULE) +elf = importlib.util.module_from_spec(SPEC) +SPEC.loader.exec_module(elf) + +BASE = 0x400000 +DYNAMIC = 0x200 +INTERP = 0x380 +STRTAB = 0x400 +ORIGIN = "/fixture/subject.so" + + +def fixture(tags=None, interpreter=b"/lib64/ld-linux-x86-64.so.2"): + """Pack directly from ELF64 structure layouts, without parser helpers.""" + raw = bytearray(2048) + parts = (b"libalpha.so", b"libbeta.so", b"$ORIGIN/lib::/opt/lib", b"/extra", + b"subject.so", b"$PLATFORM/audit.so") + strings, offsets = bytearray(b"\0"), {} + for part in parts: + offsets[part.decode("ascii")] = len(strings) + strings += part + b"\0" + if tags is None: + tags = [(1, offsets["libalpha.so"]), (1, offsets["libbeta.so"]), + (1, offsets["libalpha.so"])] + entries = [(5, BASE + STRTAB), (10, len(strings))] + list(tags) + [(0, 0), (0, 0)] + raw[:16] = b"\x7fELF\x02\x01\x01" + b"\0" * 9 + struct.pack_into("',root_lines[root_entry-1]), + (ROOT_PATH,one_call(source_function(root_tree,'_entry'),'_EXEC'), + '_entry',' _EXEC(code, driver_namespace)'), + (DRIVER_PATH,driver_entry,'',lines[driver_entry-1])] + if function!='_v03_original_input_prefix': + call = one_call(prefix,function) + frames.append((DRIVER_PATH,call,'_v03_original_input_prefix',lines[call-1])) + frames.append((DRIVER_PATH,terminal,function,lines[terminal-1])) + stack = traceback.StackSummary.from_list(frames) + raw = ('Traceback (most recent call last):\n'+''.join(stack.format())+ + 'RuntimeError: '+message+'\n').encode() + return raw,terminal + + +class NewConstructorControls(unittest.TestCase): + def test_source_identity_and_retained_regions(self): + self.assertEqual(hashlib.sha256(SOURCE).hexdigest(), + 'cdb1479253358508088f8aa0e1e92e6c75ffcc127e54552698598a02de061254') + self.assertEqual(hashlib.sha256(ROOT_BYTES).hexdigest(),constructor.ROOT_SHA) + tail = b'try:\n _variant_main()\nexcept BaseException as _variant_error:\n _VARIANT_TERMINAL_ERROR[0] = _variant_error\n raise\n' + self.assertEqual(GENERATED[:len(SOURCE)-len(tail)],SOURCE[:-len(tail)]) + old,new = ast.parse(SOURCE),ast.parse(GENERATED) + original = source_function(old,'_variant_main') + cut = next(i for i,n in enumerate(original.body) if isinstance(n,ast.Assign) + and any(isinstance(t,ast.Name) and t.id=='builds' for t in n.targets)) + prefix = source_function(new,'_v03_original_input_prefix') + self.assertEqual([ast.dump(n) for n in prefix.body[:-1]], + [ast.dump(n) for n in original.body[:cut]]) + self.assertIsInstance(prefix.body[-1],ast.Return) + gates = {n.targets[0].id:ast.literal_eval(n.value) for n in new.body + if isinstance(n,ast.Assign) and isinstance(n.targets[0],ast.Name) + and n.targets[0].id in constructor.GATES} + self.assertEqual(gates,dict.fromkeys(constructor.GATES)) + self.assertLess(len(GENERATED),262145) + + def test_generator_refuses_changed_original(self): + for raw in (SOURCE[:-1],b'X'+SOURCE[1:],SOURCE.decode(),b''): + with self.assertRaises(ValueError):constructor.build_control_driver(raw) + + def test_launch_is_data_and_preserves_startup(self): + for mode in ('normal','optimized'): + launch = constructor.genuine_launch(STAGE,'/tmp/v03-output','gen-1', + 'a'*64,mode,GENERATED) + self.assertEqual(launch['env'],ENV) + self.assertEqual(launch['cwd'],STAGE) + self.assertEqual(launch['command'][:5],['/usr/bin/python3.12','-S','-s','-P','-B']) + self.assertEqual('-O' in launch['command'],mode=='optimized') + self.assertFalse(launch['source_admitted']);self.assertFalse(launch['execution_admitted']) + self.assertNotIn('-I',launch['command']);self.assertNotIn('-E',launch['command']) + for path in ('relative','/a/../b','/a//b','/a\x00b'): + with self.assertRaises(ValueError):constructor.genuine_launch(path,'/tmp/out','g','a'*64,'normal',GENERATED) + + def test_all_proposed_case_data_against_independent_predicates(self): + for raw,(h,n) in zip(PAYLOADS,EXPECTED_PINS): + self.assertEqual((hashlib.sha256(raw).hexdigest(),len(raw)),(h,n)) + specs = fixtures.case_specs();self.assertEqual(len(specs),89);self.assertEqual(len(set(specs)),89) + counts = {'negative':0,'positive':0,'earlier':0} + for spec in specs: + case = fixtures.construct_case(baseline(),PAYLOADS,STAGE,spec) + self.assertEqual(independent_data_classification(case),case['parent_expectation']['message']) + if not case['parent_expectation']['v03_discriminator']:counts['earlier']+=1 + elif case['parent_expectation']['message'] is None:counts['positive']+=1 + else:counts['negative']+=1 + self.assertFalse(case['c05_completeness_established_here']) + self.assertFalse(case['source_admitted']);self.assertFalse(case['execution_admitted']) + self.assertEqual(counts,{'negative':68,'positive':20,'earlier':1}) + + def test_actual_fresh_mode_and_byte_fixture_only(self): + root = Path(tempfile.mkdtemp(prefix='v03-constructor-',dir='/tmp')) + for which,spec in enumerate((('physical-mode',1,-1,''),('physical-byte',4,-1,''))): + stage = str(root/str(which)) + case = fixtures.construct_case(baseline(stage),PAYLOADS,stage,spec) + for path,raw,mode in case['physical_files']: + p = Path(path);p.parent.mkdir(parents=True,exist_ok=True) + fd = os.open(p,os.O_WRONLY|os.O_CREAT|os.O_EXCL|os.O_NOFOLLOW,0o600) + try: + offset=0 + while offset
    Option FlagsDescription
    -std ++ ++ Select the C++ standard, and whether to use the base standard ++ or GNU dialect. ++
    + -fno-exceptions + See exception-free dialect
    + -fno-rtti +--- a/src/libstdc++-v3/doc/xml/faq.xml ++++ b/src/libstdc++-v3/doc/xml/faq.xml +@@ -91,7 +91,7 @@ + The libstdc++ project is contributed to by several developers + all over the world, in the same way as GCC or the Linux kernel. + The current maintainers are listed in the +- MAINTAINERS ++ MAINTAINERS + file (look for "c++ runtime libs"). + + +--- a/src/libstdc++-v3/doc/xml/manual/allocator.xml ++++ b/src/libstdc++-v3/doc/xml/manual/allocator.xml +@@ -184,8 +184,8 @@ + Over multiple iterations, various STL container + objects have elements inserted to some maximum amount. A variety + of allocators are tested. +- Test source for sequence +- and associative ++ Test source for sequence ++ and associative + containers. + + +@@ -200,7 +200,7 @@ + on a per-thread basis, as well as measuring thread contention + for memory resources. + Test source +- here. ++ here. + + + +@@ -210,9 +210,9 @@ + + + Test source for +- sequence ++ sequence + and +- associative ++ associative + containers. + + +--- a/src/libstdc++-v3/doc/xml/manual/mt_allocator.xml ++++ b/src/libstdc++-v3/doc/xml/manual/mt_allocator.xml +@@ -307,9 +307,9 @@ that uses it is fully constructed. For most (but not all) STL + containers, this works, as an instance of the allocator is constructed + as part of a container's constructor. However, this assumption is + implementation-specific, and subject to change. For an example of a +-pool that frees memory, see the following +- +- example. ++pool that frees memory, see the ++ ext/mt_allocator/deallocate_local-6.cc ++ example. + + + +--- a/src/libstdc++-v3/doc/xml/manual/status_cxx1998.xml ++++ b/src/libstdc++-v3/doc/xml/manual/status_cxx1998.xml +@@ -19,7 +19,7 @@ This status table is based on the table of contents of ISO/IEC 14882:2003. + + + This section describes the C++ support in +-the GCC 13 release series, not in any particular release. ++the GCC 13 release series. + + + +--- a/src/libstdc++-v3/doc/xml/manual/status_cxx2011.xml ++++ b/src/libstdc++-v3/doc/xml/manual/status_cxx2011.xml +@@ -35,7 +35,7 @@ This status table is based on the table of contents of ISO/IEC 14882:2011. + + + This section describes the C++11 support in +-the GCC 13 release series, not in any particular release. ++the GCC 13 release series. + + + +--- a/src/libstdc++-v3/doc/xml/manual/status_cxx2014.xml ++++ b/src/libstdc++-v3/doc/xml/manual/status_cxx2014.xml +@@ -30,7 +30,7 @@ since C++11 and the implementation is complete. + + + This section describes the C++14 and library TS support in +-the GCC 13 release series, not in any particular release. ++the GCC 13 release series. + + + +--- a/src/libstdc++-v3/doc/xml/manual/status_cxx2017.xml ++++ b/src/libstdc++-v3/doc/xml/manual/status_cxx2017.xml +@@ -24,7 +24,7 @@ since that release. + + + This section describes the C++17 and library TS support in +-the GCC 13 release series, not in any particular release. ++the GCC 13 release series. + + + +--- a/src/libstdc++-v3/doc/xml/manual/status_cxx2020.xml ++++ b/src/libstdc++-v3/doc/xml/manual/status_cxx2020.xml +@@ -21,7 +21,7 @@ presence of the required flag. + + + This section describes the C++20 and library TS support in +-the GCC 13 release series, not in any particular release. ++the GCC 13 release series. + + + +--- a/src/libstdc++-v3/doc/xml/manual/status_cxx2023.xml ++++ b/src/libstdc++-v3/doc/xml/manual/status_cxx2023.xml +@@ -21,7 +21,7 @@ presence of the required flag. + + + This section describes the C++23 and library TS support in +-the GCC 13 release series, not in any particular release. ++the GCC 13 release series. + + + +--- a/src/libstdc++-v3/doc/xml/manual/status_cxxtr1.xml ++++ b/src/libstdc++-v3/doc/xml/manual/status_cxxtr1.xml +@@ -23,7 +23,7 @@ In this implementation the header names are prefixed by + + + This page describes the TR1 support in +-the GCC 13 release series, not in any particular release. ++the GCC 13 release series. + + + +--- a/src/libstdc++-v3/doc/xml/manual/status_cxxtr24733.xml ++++ b/src/libstdc++-v3/doc/xml/manual/status_cxxtr24733.xml +@@ -18,7 +18,7 @@ decimal floating-point arithmetic". + + + This page describes the TR 24733 support in +-the GCC 13 release series, not in any particular release. ++the GCC 13 release series. + + + +--- a/src/libstdc++-v3/doc/xml/manual/using.xml ++++ b/src/libstdc++-v3/doc/xml/manual/using.xml +@@ -7,7 +7,7 @@ + + + The set of features available in the GNU C++ library is shaped by +- several GCC ++ several GCC + Command Options. Options that impact libstdc++ are + enumerated and detailed in the table below. + +@@ -37,35 +37,12 @@ + +