Skip to content

feat(libSceLibreSsl): implement ASN.1 integer and string helpers - #10005

Merged
oneandonlydean merged 5 commits into
boykopovar:mainfrom
AZLisme:feat/libressl-asn1-helpers
Oct 25, 2026
Merged

oneandonlydean merged 5 commits into
boykopovar:mainfrom
AZLisme:feat/libressl-asn1-helpers

Conversation

@AZLisme

@AZLisme AZLisme commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

What

Implement five missing libSceLibreSsl exports: ASN1_INTEGER_get, ASN1_STRING_data, ASN1_STRING_length, ASN1_STRING_type, and ASN1_STRING_to_UTF8. The integer accessor uses a 64-bit guest long; string accessors preserve the supplied pointer, length and tag. Conversion supports every string tag accepted by the pinned implementation, including embedded NULs, and returns a separately allocated, terminated UTF-8 buffer through guest libc and its application allocator.

Signatures, the 24-byte guest string layout and behavior follow LibreSSL 2.5.4 ASN.1 sources, including asn1.h, a_int.c, asn1_lib.c, a_strex.c, a_mbstr.c and a_utf8.c. Firmware 13.40 reports this version in discussion #8981; console behavior was not independently measured. Nonpositive integer lengths return zero for valid INTEGER tags, as 2.5.4 does.

Malformed encodings and allocation failure still throw until ASN.1 error-queue reporting is implemented; these are recorded in docs/dev/debt/libSceLibreSsl.md. The regression suite keeps successful conversions, argument validation and successful allocator/free ownership coverage without requiring those unfinished error paths to throw. The integer accessor handles the full representable signed range, including negative magnitude 2^63, without signed overflow; larger unrepresentable values remain recorded as debt.

The five exports now have their sole declarations in include/Api.hpp, reached through libSceLibreSsl.hpp. The implementation and tests share its Asn1String record; local export declarations and duplicate layouts are removed. The former int function(void) declarations were unknown-signature placeholders for throwing stubs. The implemented API requires the pinned source’s arguments, pointer returns and 64-bit guest long, so those public declarations are corrected rather than retained. Guest libc allocation/free declarations also come from its canonical header.

Tested

Local Arch Linux x86-64, GCC 16.2.1, CMake 4.4.4, Ninja, Release with BUILD_TESTING=ON: exact head 6098cf2e6463f0a1726c121b5e3616d450c38246, rebased onto dc15ed65375228a0f69c41d7770c4c118adb38f2. Rebuilt the actual runtime libraries and nine focused executables. ctest --test-dir build -R 'libressl|crypto_memcmp' --output-on-failure: 10/10 passed, including both ASN.1 registrations and main's error-queue regression. ctest --test-dir build -R '^public_headers' -j2 --output-on-failure: 65/65 passed. Conventions and whitespace checks pass.

Coverage includes supported conversion tags and Unicode boundaries, embedded NULs, input preservation, accessors, signed integer limits including INT64_MIN, legacy nonpositive lengths, argument validation and successful application allocation followed by guest free. The overlap scanner and manual name/NID audits found no duplicate implementation. The latest refresh checked all 18 listed PR heads, including new ENGINE/init PR #10878 and the updated EC-helper PR #10395; neither duplicates these helpers or introduces a prerequisite.

Full Linux/Windows run 40155070561, attempt 2 is successful for exact head 6098cf2e6463f0a1726c121b5e3616d450c38246 merged onto main 52a8bed576e5c54a7f443728cdf663a080f8f9ed. The fresh Linux checkout/merge log independently verifies both commits.

  • Linux retry: 2,124 passed, 89 expected skips and zero failures. Its workflow skip checker ran and accepted every skip. guest_floating_point passed.
  • Windows original execution: 1,516 passed, 789 expected skips and zero failures; its skip checker accepted every skip. Attempt 2 carries this successful execution forward; Windows did not rerun.
  • All 10 LibreSSL/crypto tests and 65 public-header checks passed on both platforms.

The first Linux attempt failed the intermittent guest_floating_point assertion, which also reproduced on an isolated build of the exact base without this PR's changes. The base-reproduction evidence remains recorded; the successful retry does not establish or fix its underlying cause. The ASN.1 patch is unchanged.

Earlier run 40151824506 passed both configured platform suites for previous head 454f66248dd919868c706aa599af34fe039b5f1c; it does not qualify this rebase. macOS, PS5 and titles were not tested. No GPU code changed.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes

Overlap and rebase coordination

No prerequisite is required. As proposed by its author, draft #10418 will follow #10005 and rebase afterward. If a shared branch lands first, rebase while preserving the union of library sources, focused tests and Windows PATH entries; remove only the five throwing declarations replaced here. Keep independent debt entries and recount remaining throwing exports from the resulting source. Rerun relevant builds, focused tests, conventions and overlap checks before updating with --force-with-lease. This rebase preserved main's AES, DES, X509 error-string, RAND/CRYPTO runtime and ERR queue implementations, regression targets and debt entries; the reconciled pending-export count is 348.

@github-actions

github-actions Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.

Pull request Conflicting files (lines on main) Same exports Same new files
PR 10071 docs/dev/debt/libSceLibreSsl.md L5, L11
PR 10078 docs/dev/debt/libSceLibreSsl.md L5, L11
PR 10395 docs/dev/debt/libSceLibreSsl.md L5, L11
PR 10484 docs/dev/debt/libSceLibreSsl.md L5-6
PR 10570 docs/dev/debt/libSceLibreSsl.md L5
PR 10571 docs/dev/debt/libSceLibreSsl.md L5
PR 10878 docs/dev/debt/libSceLibreSsl.md L5, L11

Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
PR 9446 core/libs/prx/libSceLibreSsl/CMakeLists.txt
core/libs/prx/libSceLibreSsl/Export.cpp
docs/dev/debt/libSceLibreSsl.md
PR 9448 core/libs/prx/libSceLibreSsl/CMakeLists.txt
core/libs/prx/libSceLibreSsl/Export.cpp
docs/dev/debt/libSceLibreSsl.md
PR 9535 core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 9536 core/libs/prx/libSceLibreSsl/CMakeLists.txt
core/libs/prx/libSceLibreSsl/Export.cpp
docs/dev/debt/libSceLibreSsl.md
PR 9571 core/libs/prx/libSceLibreSsl/CMakeLists.txt
core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 9745 core/libs/prx/libSceLibreSsl/CMakeLists.txt
core/libs/prx/libSceLibreSsl/Export.cpp
docs/dev/debt/libSceLibreSsl.md
PR 9870 core/libs/prx/libSceLibreSsl/CMakeLists.txt
core/libs/prx/libSceLibreSsl/Export.cpp
docs/dev/debt/libSceLibreSsl.md
PR 9949 core/libs/prx/libSceLibreSsl/CMakeLists.txt
core/libs/prx/libSceLibreSsl/Export.cpp
core/libs/prx/libSceLibreSsl/include/Api.hpp
docs/dev/debt/libSceLibreSsl.md
PR 10248 core/libs/prx/libSceLibreSsl/CMakeLists.txt
core/libs/prx/libSceLibreSsl/Export.cpp
docs/dev/debt/libSceLibreSsl.md
PR 10475 core/libs/prx/libSceLibreSsl/Export.cpp
docs/dev/debt/libSceLibreSsl.md
PR 10508 core/libs/prx/libSceLibreSsl/CMakeLists.txt
core/libs/prx/libSceLibreSsl/Export.cpp
docs/dev/debt/libSceLibreSsl.md

@MarcZX10

Copy link
Copy Markdown
Contributor

I reran the overlap scan on this head. It confirms the three disclosed debt-row overlaps (#9529, #9942 and #9949) and reports that comparisons with #9033, #9041, #9047, #9446, #9448, #9571, #9745, #9870 and #9970 could not complete because those branches conflict with main in CMakeLists.txt, Export.cpp and/or the debt file. Your description says the five exports are distinct, and the scan found no same-export or new-file overlap. Could you add the agreed integration order for the shared CMake/debt hunks (and a Depends on entry if another PR must land first), or clarify how you plan to reconcile them when rebasing? This is a merge-coordination question, not a request to close the PR.

@AZLisme
AZLisme force-pushed the feat/libressl-asn1-helpers branch from 644ec92 to ef8d0ce Compare October 23, 2026 04:22
@AZLisme

AZLisme commented Oct 23, 2026

Copy link
Copy Markdown
Contributor Author

Updated the PR description under Overlap and rebase coordination with the concrete reconciliation plan. No other PR must land first, so Depends on: none remains correct; I have not claimed an integration order agreed with the other authors.

If one of the shared PRs lands first, I will rebase this branch, preserve the union of source files/test targets and Windows PATH entries, retain independent debt entries, and recount the remaining throwing exports from the resulting source. I will remove only the five throwing declarations replaced here, rerun the focused build/tests, conventions and overlap scan, and update this PR with --force-with-lease. The description also lists the nine branches the scanner could not compare and the scope of my manual export review.

I rebased onto current main (9d6adeb55) and pushed ef8d0ce5d; the implementation/test patch is unchanged. The focused LibreSSL tests passed 5/5, and conventions and whitespace checks passed.

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found a mismatch between the implementation and its own new regression. In core/libs/prx/libSceLibreSsl/src/Asn1.cpp, ASN1_INTEGER_get_nid_postfix rejects length > 8 but does not reject negative lengths. For the test case String value{-1, 2, data, 0}, the loop executes zero times, magnitude stays 0, and the function returns 0; Integers() asserts that this input returns -1. LibreSSL 2.5.4 also explicitly rejects aint->length < 0 in ASN1_INTEGER_get_int64 before decoding. Please add the negative-length check and rerun guest_libressl_asn1_tests and the focused test set; the reported 5/5 result should then be reconciled with the exact current source/head.

@MarcZX10

Copy link
Copy Markdown
Contributor

I verified the exact implementation outside the project test harness with a small ABI-compatible call using length = -1, type = V_ASN1_INTEGER: it returns 0. This matches the loop/control-flow analysis and contradicts Integers() in the PR test, which expects -1. So at least that assertion cannot pass against the fetched exact head as it stands; please check which source/head the reported focused run used.

@AZLisme

AZLisme commented Oct 23, 2026

Copy link
Copy Markdown
Contributor Author

I checked the exact reviewed head ef8d0ce5d and the pinned contract. Its regression expects 0. LibreSSL 2.5.4's function returns 0 for valid INTEGER types with negative lengths and contains no ASN1_INTEGER_get_int64. The rejecting helper is present in later LibreSSL.

I added an explicit nonpositive-length guard, expanded tests across INT32_MIN/-8/-1/0, both INTEGER signs, null/valid/inaccessible data pointers and input preservation, and documented the version difference. The guard keeps the verified 2.5.4 result of 0.

Pushed 1ba3d6defa37205b5149c33fd01ac0d0b47f7c47. Both ASN.1 registrations and the full focused set pass 5/5 at that exact head; conventions and whitespace checks pass. Independent loader tracing and dladdr verify the expected PRX. A standalone build of the unchanged 2.5.4 function matched the guest library in all 108 matrix cases; a separate 4.0.0 build differed in the expected 18 negative-length cases. The PR description now records this source/head reconciliation.

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The updated exact head 1ba3d6defa37205b5149c33fd01ac0d0b47f7c47 resolves my earlier negative-length finding. The new length <= 0 guard avoids reading invalid data for nonpositive lengths, and the expanded regression covers INT32_MIN, -8, -1 and zero with both integer tags and null/valid/inaccessible data pointers. I also verified the version distinction in the cited source: LibreSSL 2.5.4 ASN1_INTEGER_get loops zero times for a negative length and returns 0, while the later ASN1_INTEGER_get_int64 explicitly rejects negative lengths. The implementation and updated tests now match the 2.5.4 contract the PR documents.

The author reports the exact-head ASN.1 tests and focused suite passing 5/5, plus conventions and whitespace checks; the hosted conventions check now passes. I did not run the C++ test executable locally in this session. My earlier request for changes applied to the superseded head and is resolved by this update.

@AZLisme

AZLisme commented Oct 23, 2026

Copy link
Copy Markdown
Contributor Author

@oneandonlydean @adriadam10 — could either of you take a maintainer pass on this PR when you have time?

MarcZX10 has approved the current head, 1ba3d6defa37205b5149c33fd01ac0d0b47f7c47, after the ASN.1 length follow-up. The description records the pinned LibreSSL 2.5.4 contract, the focused 5/5 test results, and the reconciliation plan for shared CMake/debt changes.

Please let me know if there are any remaining merge blockers. Thank you!

@oneandonlydean

Copy link
Copy Markdown
Collaborator

@AZLisme the valid-input coverage and allocator-ownership checks look useful. Please drop the assertions that require the unimplemented error-queue paths to throw: CheckInvalidEncoding at tests/Asn1.cpp:71-76 (and its callers), and the allocation-failure assertion at line 237 plus the checks that depend on that call. Those assertions would fail when error reporting is implemented and the function starts returning the documented negative result. Keep the successful conversions, accessor/integer argument validation and successful application-allocator/free coverage, then rerun the focused tests. The production throwing paths can stay recorded as debt; this does not ask for an error-queue implementation in this PR.

@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Oct 23, 2026
@AZLisme
AZLisme force-pushed the feat/libressl-asn1-helpers branch from 1ba3d6d to d5e392e Compare October 23, 2026 10:52
@AZLisme

AZLisme commented Oct 23, 2026

Copy link
Copy Markdown
Contributor Author

Addressed in d5e392e1d9e1b94ed06550ef443a0845564e8e1e. Removed CheckInvalidEncoding and all callers, the forced allocation-failure assertion, and the checks that depended on that call. Successful conversions, accessor/integer argument validation, and the application-allocator/guest-free ownership check remain.

The ASN.1 production implementation and documented error-queue debt are unchanged. I also rebased onto current main, preserved its DES implementation/test and reconciled the shared debt count. Rebuilt the actual library and focused executables; ctest --test-dir build -R 'libressl|crypto_memcmp' --output-on-failure passes 6/6, including both ASN.1 registrations and DES. Conventions and whitespace checks pass. The PR description now reflects the retained coverage.

@AZLisme

AZLisme commented Oct 23, 2026

Copy link
Copy Markdown
Contributor Author

Rebased onto 990f45e17dc12cb5d09705e7c7adf5583117ec1c in f99296c37c6d79ad2512d858c24414094c91358b. The conflict was confined to the shared technical-debt entry; both upstream entries are preserved and the remaining unknown-export count is now 368. The ASN.1 implementation and tests are unchanged.

Rebuilt the focused executables: 7/7 tests pass, including the current DES and X509 error-string regressions. Conventions and whitespace checks pass. GitHub now reports this head as MERGEABLE, with successful checks; the needs rebase label is still waiting for the conflict-label workflow to refresh.

@github-actions github-actions Bot added needs rebase Conflicts with main, rebase needed and removed needs rebase Conflicts with main, rebase needed labels Oct 23, 2026
@AZLisme

AZLisme commented Oct 24, 2026

Copy link
Copy Markdown
Contributor Author

Rebased again and pushed 025bed330b9d45ad92a68054cefa6a53c9e5a0b1, based on 2a0e9a654f60df85362784e4197f853e91a71e1a. Resolved the export-table and debt conflicts while preserving main’s AES implementation, tests and debt entries. Only the five ASN.1 throwing stubs are removed; 352 unknown exports remain. The reviewed ASN.1 implementation and tests, including the negative 2^63 fix, are unchanged by this rebase.

Rebuilt the runtime libraries and eight focused executables: 9/9 tests pass, including AES, DES, X509, RAND/CRYPTO and both ASN.1 registrations. Local conventions, whitespace checks and hosted conventions/labels checks pass. Refreshed the overlap audit and manually checked shared/uncompared diffs by helper names and NIDs; no duplicate implementations were found.

GitHub reports this head as MERGEABLE against current main, including the subsequent USB-storage merge. The needs rebase label is still awaiting its automated refresh.

@MarcZX10 Could you re-review the signed-boundary fix on this head? @oneandonlydean Please run the required full CI and merge when you are satisfied with review and validation. The proposed sequence remains #10005 first, followed by rebasing draft #10418.

@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Oct 24, 2026
@oneandonlydean

Copy link
Copy Markdown
Collaborator

@AZLisme I checked 025bed3. The sign-dependent limit and overflow-safe negative conversion handle the requested INT64_MIN bytes, and the regression preserves the input. My standalone extraction rejects that case on the old head and passes it plus 20,000 representable signed-magnitude checks under UBSan on this head. I also counted 352 remaining throwing exports, matching the debt entry; main’s AES and runtime entries are retained without duplicate debt. This addresses the source finding from my side. MarcZX10’s change request still needs their re-review, and full Linux/Windows CI must bind this exact head; the standalone check does not replace runtime qualification.

@oneandonlydean

Copy link
Copy Markdown
Collaborator

@AZLisme The local declarations differ from main’s public headers: std::int64_t ASN1_INTEGER_get_nid_postfix(const void* value) at core/libs/prx/libSceLibreSsl/tests/Asn1.cpp:17 versus int ASN1_INTEGER_get_nid_postfix(void) at core/libs/prx/libSceLibreSsl/include/Api.hpp:49; unsigned char* ASN1_STRING_data_nid_postfix(void* value) at core/libs/prx/libSceLibreSsl/tests/Asn1.cpp:18 versus int ASN1_STRING_data_nid_postfix(void) at core/libs/prx/libSceLibreSsl/include/Api.hpp:50; int ASN1_STRING_length_nid_postfix(const void* value) at core/libs/prx/libSceLibreSsl/tests/Asn1.cpp:19 versus int ASN1_STRING_length_nid_postfix(void) at core/libs/prx/libSceLibreSsl/include/Api.hpp:51; int ASN1_STRING_to_UTF8_nid_postfix(unsigned char** output, void* value) at core/libs/prx/libSceLibreSsl/tests/Asn1.cpp:21 versus int ASN1_STRING_to_UTF8_nid_postfix(void) at core/libs/prx/libSceLibreSsl/include/Api.hpp:53; int ASN1_STRING_type_nid_postfix(void* value) at core/libs/prx/libSceLibreSsl/tests/Asn1.cpp:20 versus int ASN1_STRING_type_nid_postfix(void) at core/libs/prx/libSceLibreSsl/include/Api.hpp:54. Main now requires each exported function to be declared once, in the library's public header (checked by the public_headers tests). Could you use main’s public signatures and types throughout the implementation and tests, or explain why the public declarations need to change?

@AZLisme
AZLisme force-pushed the feat/libressl-asn1-helpers branch from 025bed3 to ce45830 Compare October 25, 2026 00:40
@AZLisme

AZLisme commented Oct 25, 2026

Copy link
Copy Markdown
Contributor Author

@oneandonlydean Addressed in ce45830442508e169b365493499e6618cc76e6fb, rebased onto 2e22b67032ea335ecad88b1acf777a29a70d851b.

The old int function(void) public declarations were unknown-signature placeholders for the throwing exports. Retaining them would lose the implemented arguments, pointer return and 64-bit guest long result. I updated those five declarations in include/Api.hpp to the pinned LibreSSL 2.5.4 signatures, using the guest-width Asn1String record (24 bytes, offsets 8/16) and the source’s const qualifiers.

Both implementation and tests now include libSceLibreSsl.hpp and use that shared public type. All local ASN.1 declarations and duplicate record definitions are removed; malloc/free also use the canonical libc header. Existing integer and conversion behavior is preserved.

Validation on Arch Linux x86-64: 65/65 public-header tests pass, verifying 368 libraries and 12,171 exports plus all header compilation batches; 9/9 focused runtime tests pass after rebuilding the libraries and eight executables. Conventions and whitespace checks pass. The refreshed overlap scan and manual shared/uncompared diff audit found no other implementation of these five helpers.

Please re-review this header integration and the earlier signed-boundary fix. A maintainer full Linux/Windows CI run must qualify this new head before merge; my local checks do not replace that qualification.

@AZLisme
AZLisme force-pushed the feat/libressl-asn1-helpers branch from ce45830 to 454f662 Compare October 25, 2026 01:04
@AZLisme

AZLisme commented Oct 25, 2026

Copy link
Copy Markdown
Contributor Author

Rebased onto current main f4aabbb122bcb5fabfe882798a9498a439de6e94 and pushed 454f66248dd919868c706aa599af34fe039b5f1c. The rebase was clean. All six PR files are byte-identical to the prior reviewed head, including the canonical public declarations and signed-boundary regression; all intervening upstream changes are retained.

Rebuilt the runtime libraries and focused executables: 9/9 runtime tests and 65/65 public-header tests pass. Conventions and whitespace checks pass. Refreshed the overlap scan and inspected all 33 other shared/uncompared diffs by helper names and NIDs; no duplicate implementations were found. GitHub reports MERGEABLE, with successful hosted conventions and labels checks.

The header integration and INT64_MIN fix are ready for re-review. Please qualify this exact head with full Linux/Windows CI and merge when satisfied. The agreed order remains #10005 before draft #10418.

@AZLisme

AZLisme commented Oct 25, 2026

Copy link
Copy Markdown
Contributor Author

Full Linux/Windows CI run 40151824506 is now successful for exact head 454f66248dd919868c706aa599af34fe039b5f1c, merged onto main 941ace5f342c24c84b0712b8db0a75e0232bc44d. I checked the platform checkout/merge logs and test results:

  • Linux: 2,121 passed, 89 expected skips, zero failures.
  • Windows: 1,513 passed, 789 expected skips, zero failures.
  • Both platforms passed all 9 LibreSSL/crypto tests, including both ASN.1 registrations, and all 65 public-header checks. Both skip checkers accepted every skip.

The PR description now includes the hosted validation and its limits. The reviewed code and public declarations are unchanged, and the PR remains mergeable.

@MarcZX10 Could you re-review the signed-boundary and canonical-header fixes on this qualified head? @oneandonlydean CI qualification is complete; please merge when satisfied with review. The agreed order remains #10005 before draft #10418.

@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Oct 25, 2026
@AZLisme
AZLisme force-pushed the feat/libressl-asn1-helpers branch from 454f662 to 6098cf2 Compare October 25, 2026 02:22
@AZLisme

AZLisme commented Oct 25, 2026

Copy link
Copy Markdown
Contributor Author

Main merged #9529 after the previous full CI run, creating a conflict in the shared LibreSSL debt file. Rebased onto dc15ed65375228a0f69c41d7770c4c118adb38f2 and pushed 6098cf2e6463f0a1726c121b5e3616d450c38246.

The conflict resolution preserves the upstream error-queue implementation, public declarations, test target and debt entry. The ASN.1 source, tests, shared record and five public signatures are byte-identical to the previously qualified head. Exactly five stubs are replaced; 348 unknown exports remain.

On the new head, 10/10 focused runtime tests pass, including the new error-queue regression, and 65/65 public-header checks pass. Conventions and whitespace checks pass. The overlap audit inspected 33 other shared/uncompared PR diffs and found no duplicate helper implementation. GitHub reports the new head as mergeable.

Run 40151824506 remains successful evidence for the previous head 454f66248dd919868c706aa599af34fe039b5f1c; it does not qualify this rebase. Please run fresh full Linux/Windows CI for 6098cf2e6463f0a1726c121b5e3616d450c38246, then merge when review and validation are satisfactory. The PR description now distinguishes the two heads.

@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Oct 25, 2026
@AZLisme

AZLisme commented Oct 25, 2026

Copy link
Copy Markdown
Contributor Author

The fresh CI run 40155070561 is not fully green: Windows passed, while Linux reported one failure in guest_floating_point: feholdexcept workers preserve the main environment.

I reproduced that same assertion locally on both this PR and an isolated build of the exact CI base 52a8bed576e5c54a7f443728cdf663a080f8f9ed, without this PR’s source changes:

  • PR 6098cf2e6463f0a1726c121b5e3616d450c38246: four passing executions, then the failure on execution 5.
  • Exact CI base: five passing executions, then the same failure on execution 6.

I used ctest --test-dir <build> -R '^guest_floating_point$' --repeat until-fail:<limit> --output-on-failure on the same machine and GCC 16.2.1, with a repetition limit of 20 for the PR and 100 for the base. The floating-point test, feholdexcept implementation, floating-point helpers and libc public header have identical blobs at the two commits. The executable links libc and host runtimes, without LibreSSL. A local diagnostic observed x87 instruction/data fields changing across the thread portion while control/status/tag and MXCSR stayed unchanged; that does not establish the full underlying cause.

All 10 LibreSSL/crypto tests and 65 public-header checks passed on both platforms. Windows finished with 1,516 passed, 789 expected skips and zero failures. Linux finished with 2,123 passed, 89 skips and this single failure; its workflow skip-check step was not run after CTest failed.

@oneandonlydean Could you retry the Linux job on unchanged head 6098cf2e6463f0a1726c121b5e3616d450c38246? I have read-only upstream access, so cannot rerun it directly. The ASN.1 patch remains unchanged; the failure reproduced on the base is recorded above. Final review and merge remain pending successful qualification.

@AZLisme

AZLisme commented Oct 25, 2026

Copy link
Copy Markdown
Contributor Author

CI run 40155070561, attempt 2 is now successful on unchanged head 6098cf2e6463f0a1726c121b5e3616d450c38246.

I checked the completed Linux retry log: it freshly checked out main 52a8bed576e5c54a7f443728cdf663a080f8f9ed and merged this exact PR head before building and testing.

  • Linux retry: 2,124 passed, 89 expected skips, zero failures. The workflow skip checker ran and accepted every skip; guest_floating_point passed.
  • Windows: its original 1,516 passed, 789 expected skips and zero failures carry forward into attempt 2. Its log is unchanged; Windows did not rerun.
  • Both platforms passed all 10 LibreSSL/crypto tests and 65 public-header checks.

The PR description now records this qualification. The earlier floating-point failure reproduced on the base remains documented above; a passing retry does not resolve its underlying cause. No source changes were needed, and GitHub currently reports the PR as mergeable.

@MarcZX10 Could you re-review the signed-boundary and canonical-header fixes? @oneandonlydean Thanks for retrying Linux; please merge when final review is satisfactory. The agreed order remains #10005 before draft #10418.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants