Repository navigation
feat(libc): implement _Atomic_assert and daemon - #4079
Closed
Mouad-Scriptz-0 wants to merge 1 commit into
Closed
Mouad-Scriptz-0 wants to merge 1 commit into
Mouad-Scriptz-0 wants to merge 1 commit into
Conversation
Dinkumware's _Atomic_assert prints the message and location and aborts like _Assert instead of throwing. daemon continues in the calling process: it changes to / unless nochdir is set, redirects descriptors 0 to 2 to the null device unless noclose is set, and returns 0; the fork, parent exit and setsid of FreeBSD's daemon are not observable through the call itself. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
9 tasks done
Collaborator
|
Closing: neither function is reached by a title (PPSA85300 only imports |
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
tools/progress.pylists six libc exports that still throw. Two of them are already implemented by open pull requests (__powidf2in #2465,collate<wchar_t>::_Getcatin #3990) and two have unknown signatures and no importing title (sceLibcInternalBacktraceForGame,sceLibcInternalHeapErrorReportForGame, which keep their TechnicalDebt entries). This implements the remaining two.std::_Atomic_assert(const char*, const char*)prints the message and location and aborts, as_Assertdoes; Dinkumware's<atomic>calls it when an atomic's alignment or lock-freedom check fails. It was kept as a throwing dead import of Cyberpunk 2077 (PPSA04029) for the Windows loader.daemon(nochdir, noclose)continues in the calling process:chdir("/")unlessnochdir, descriptors 0 to 2 redirected to the null device unlessnoclose(_open("NUL")/_dup2on Windows), return 0. FreeBSD'sdaemonalso forks, exits the parent and callssetsid, which a title cannot observe through the call itself; TechnicalDebt records the difference. PPSA85300 (VLC 3.0) imports it and calls it only with itsdaemonoption.guest_daemonnow expects success: it checks the three redirected descriptors against/dev/null(POSIX) and the working directory/after thenochdir == 0call, restoring its own stdout and stderr in between.Tested
Fedora 44 (kernel 7.2.8, GCC 16.2.1, Ninja, Release,
BUILD_TESTING=ON), worktree onmain1342c4b:ctest -R '^guest_': 263 of 277 pass; the 14 failures are the relinker Python tests, which need the relinker binary this build did not include.guest_daemon,guest_mathandguest_collatepass.tools/check_conventions.py --base origin/mainandgit diff --checkpass.tools/pr_overlap.py --branchreports no overlap after dropping the two functions above. No title was run. Not tested on Windows.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code