Repository navigation
Conversation
|
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.
|
11 tasks done
12 tasks done
12 tasks done
This was referenced Oct 21, 2026
This was referenced Oct 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Match the shipped CRT contracts for
_Thrd_id,strtok_s,asctime_sandctime_s, including the AMPR wrappers that share the bounded-string helpers. This corrects ABI and constraint behavior rather than adding title-specific fallbacks._Thrd_idreturns the fullscePthreadSelfhandle. Register a self callback alongside the existing create/join callbacks to preserve libc/kernel dependency direction; missing registration throws. The shipped export (NIDnp6xXcXEnXE, ELF VA0x4c70) calls PLT0xcab10, whose relocation namesscePthreadSelf(aI+OeCz8xrQ), and returns RAX unchanged.strtok_s(NID-vXEQdRADLI, VA0x71590) has four arguments: source, remaining-size pointer, delimiters, context pointer. Preserve its bounded scan, remaining-count/context updates, delimiter writes and error precedence, including the distinctbad argument,missing tokenandmissing delimitercallbacks.asctime_s(qPe7-h5Jnuc, VA0x71b30) andctime_s(2UFh+YKfuzk, VA0x71be0) reject zero or >=2^61 destination sizes without writing, and clear a valid destination on subsequent argument failure. Match observed field ranges and callback diagnostics, withEINVAL, null callback pointer argument and guest calling convention. Boundary years format as four digits.Evidence: REA
rea-agents@6.7.0with Ghidra 12.1.4 and JDK 21, using small PE wrappers containing unchanged code slices from the title's unwrapped libc. ELF symbols, relocations and raw instructions establish the ABI; inferred PE calling conventions do not. Unwrapped libc SHA-256:0e0a628ad9a635ab7b13a3516cf13be092e34cafb84929a7a66740347273da3e. Code-slice SHA-256: thread55b1bc8f5b303027829a07250e2fd18a97c65591fa4bfc771887084e0317f1fa, date/tokenizer page18b3cb29afc2971d652e1c7bde6c3bbf09fdb906c4eae73a19e701196da91957.The earlier local shared-handler-state refactor is excluded because #7081 addresses it. This PR preserves current main's handler storage and does not duplicate #7841's bounds-function additions or #7952's wcscpy_s work. Remaining locale/timezone, cross-SDK and console-verification limits are recorded in libc technical debt. No proprietary binaries or generated investigation files are committed.
Overlap review: #8636 implements
_Thrd_detachand explicitly leaves_Thrd_idas a throwing stub; our binary evidence resolves the width question it records. Its callback registration additions occupy adjacent lines, so this PR is a draft with #8636 listed for merge-order coordination, not a duplicate implementation. The intended order is #8636 first, then rebase these self-callback additions; no detach code is copied here. Maintainer/author agreement on that order is still pending.Manually reviewed every incomparable shared-file diff from the overlap tool: #1835/#5021/#7201 change timed waits or numeric conversion, #6879 changes wcstof, #6044 moves tests, #7081 changes shared handler/locale state, and #7648 changes errno/thread launch plumbing. Remaining shared debt-file edits in #6226, #6469, #6819, #7473, #7715, #8150 and #8520 concern unrelated entries. #7081 will need mechanical reconciliation if it lands later, but its shared-state implementation is excluded here. No other inspected PR implements the tokenizer/date contracts or
_Thrd_idfix proposed here.Tested
Windows 10 (10.0.19045), AMD Ryzen 5 7600, MinGW GCC 15.2.0, Release full-library configuration with dependencies built from source. Built the relevant library and test targets;
guest_crt,guest_ampr_threads,guest_libc_threads,guest_strings,guest_time_conversion,guest_strftimeandguest_wide_conversionpassed (7/7).The tokenizer also passed 128,253 original-versus-implementation calls across 50,000 deterministic randomized sequences. A local harness mapped only the shipped ELF's isolated tokenizer/helpers, intercepted its constraint callback, and compared return offsets, remaining counts, context offsets, complete buffers and callback count/message/pointer/error against this branch's built libc. No game initialization was invoked. The harness and proprietary input remain outside the repository.
Focused tests exercise both libc and AMPR wrappers, every date-field boundary, invalid destination sizes and write behavior, tokenizer constraints/continuations/high-byte delimiters, and stable distinct full-pointer thread identities on the main thread plus four simultaneous guest threads.
check_conventions.py --base upstream/mainpasses. The required--base origin/mainwas attempted but encounters WinError 206 because the fork's old main produces a large unrelated upstream export delta; the actual upstream PR base passes. No checker source was altered.The game, Linux runtime and retail console were not run. The isolated tokenizer comparison is direct binary execution; thread/date findings are disassembly plus host regression tests. No speed or FPS claim is made.
Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)