Repository navigation
Conversation
|
The test body looks right ( |
PrivacyOnion
left a comment
There was a problem hiding this comment.
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against 8f2134e822:
- Conventions:
tools/check_conventions.pypassed;git diff --checkclean. - Build:
guest_uncaught_exceptions_testsbuilt cleanly. - CTest (
guest_uncaught_exceptions):1/1 Test #958: guest_uncaught_exceptions ........ Passed 0.01 sec 100% tests passed, 0 tests failed out of 1 - Code reading:
- Checked
core/libs/tests/GuestUncaughtExceptions.cpp:1-14for pointer safety, exception safety, and C++20 portability when invoking_ZSt19uncaught_exceptionsv_nid_postfix()before and inside acatch (int)handler. - Checked
core/libs/prx/libc/CMakeLists.txt:74-88target registration, linking againstlibc, unwind configuration, test timeout, and Windows DLLPATHsetup against adjacentlibctest targets. - Verified
AGENTS.mdcompliance: no code comments incore/libs/tests/GuestUncaughtExceptions.cpporcore/libs/prx/libc/CMakeLists.txt, no extra untracked files, andtools/check_conventions.pypassed. - Verified Linux build and CTest execution of
guest_uncaught_exceptionspassed.
- Checked
- Concerns:
- core/libs/prx/libc/CMakeLists.txt:79-82:
guest_uncaught_exceptions_testsis spliced betweenadd_test(NAME guest_bsearch_packed ...)andset_tests_properties(guest_bsearch_packed ...), and is missingconfigure_windows_unwind(guest_uncaught_exceptions_tests),set_tests_properties(guest_uncaught_exceptions PROPERTIES TIMEOUT ...), and theif(WIN32) set_tests_properties(guest_uncaught_exceptions PROPERTIES ENVIRONMENT_MODIFICATION "PATH=path_list_prepend:$<TARGET_FILE_DIR:libc>") endif()block that every otherlibc-linked test in this file sets. On Windows, CTest runsguest_uncaught_exceptions_tests.exewithout$<TARGET_FILE_DIR:libc>onPATH(failing to locatelibc.dllat startup) and without the Windows unwind configuration applied tolibctest executables.
- core/libs/prx/libc/CMakeLists.txt:79-82:
Requesting changes for the points above.
|
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.
|
8f2134e to
db6f88e
Compare
PrivacyOnion
left a comment
There was a problem hiding this comment.
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against db6f88ede2:
- Conventions:
tools/check_conventions.pypassed. - Build:
guest_uncaught_exceptions_testsbuilt cleanly. - CTest (
guest_uncaught_exceptions):1/1 Test #1073: guest_uncaught_exceptions ........ Passed 0.02 sec 100% tests passed, 0 tests failed out of 1 - Code reading:
- Verified core/libs/tests/GuestUncaughtExceptions.cpp:1-14 correctly tests _ZSt19uncaught_exceptionsv_nid_postfix outside and inside a catch(int) block per the C++ standard.
- Verified core/libs/prx/libc/CMakeLists.txt:89-93 adds guest_uncaught_exceptions_tests and calls configure_windows_unwind.
- Checked core/libs/prx/libc/CMakeLists.txt:89-93 target placement and test properties against neighbouring test targets (guest_bsearch_packed, guest_stream_purge).
- Verified test execution, linkage with libc, and absence of comments or technical debt violations per AGENTS.md.
- Concerns:
- core/libs/prx/libc/CMakeLists.txt:89-93: guest_uncaught_exceptions_tests is spliced between add_test(NAME guest_bsearch_packed ...) and set_tests_properties(guest_bsearch_packed ...), and guest_uncaught_exceptions is missing set_tests_properties(guest_uncaught_exceptions PROPERTIES TIMEOUT 20) and the if(WIN32) set_tests_properties(guest_uncaught_exceptions PROPERTIES ENVIRONMENT_MODIFICATION "PATH=path_list_prepend:$<TARGET_FILE_DIR:libc>") endif() block required for Windows CTest runs to locate libc.dll.
Requesting changes for the points above.
|
@MarcZX10 the test itself is right, but core/libs/prx/libc/CMakeLists.txt on db6f88e still needs the same three fixes PrivacyOnion listed:
|
|
Tested head Setup: Windows 11 Pro 10.0.26200, Ryzen 7 9800X3D, WinLibs GCC 15.2.0 r7, Release,
Whole batch: the full This is one combined tree, not a run of this PR alone. AI-assisted: yes (Claude Code) |
Give guest_uncaught_exceptions the 20s timeout and the Windows PATH environment modification that its neighbouring libc tests set, and move its block after guest_bsearch_packed's properties instead of splicing it between that test's add_test and set_tests_properties. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
|
Pushed
Verified: |
PrivacyOnion
left a comment
There was a problem hiding this comment.
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against 30deb597ec:
- Conventions:
tools/check_conventions.pypassed. - Build:
guest_uncaught_exceptions_testsbuilt cleanly. - CTest (
guest_uncaught_exceptions):1/1 Test #1139: guest_uncaught_exceptions ........ Passed 0.00 sec 100% tests passed, 0 tests failed out of 1 - Code reading:
- Verified core/libs/tests/GuestUncaughtExceptions.cpp correctly calls _ZSt19uncaught_exceptionsv_nid_postfix outside an active exception and inside a catch block, validating the C++ standard return value of 0.
- Verified core/libs/prx/libc/CMakeLists.txt:95-104 correctly links libc, includes configure_windows_unwind for the throwing test, sets TIMEOUT 20, and adds the Windows ENVIRONMENT_MODIFICATION block.
- Confirmed that the new test target guest_uncaught_exceptions_tests is properly positioned after guest_bsearch_packed's endif() block, resolving the previous splicing defect requested by maintainer oneandonlydean.
- Verified AGENTS.md conventions compliance: zero comments in code, no extraneous files added, and conventions check passed.
- Verified cross-platform safety: clean execution and test passes on Linux x86_64 and Windows 11.
Looks Good To Me
|
Windows run: Existing runs.
What this run adds.
Code.
PR body.
Suggestion. I added this case locally only to struct Probe {
int& seen;
~Probe() { seen = _ZSt19uncaught_exceptionsv_nid_postfix(); }
}; int seen = -1;
try {
Probe probe{seen};
throw 2;
} catch (int) {
}
Require(seen == 1);
Require(_ZSt19uncaught_exceptionsv_nid_postfix() == 0);Negative control and mutations. Each change ran once on the merge, against
Tests.
On the merge,
AI-assisted: yes |
ligmaSec
left a comment
There was a problem hiding this comment.
Built and ran the added GuestUncaughtExceptions fixture on Linux against the existing libc PRX. Both assertions passed. The fixture checks the zero count before the throw and after its handler has been entered.
AI-assisted: yes.
What
guest_uncaught_exceptions(core/libs/tests/GuestUncaughtExceptions.cpp), registered afterguest_bsearch_packedincore/libs/prx/libc/CMakeLists.txt. Two commits:_ZSt19uncaught_exceptionsv(std::uncaught_exceptions) returns 0 outside any exception.catchblock, where the exception is no longer uncaught.core/libs/prx/libc/src/exception/Runtime.cpp:392, which forwards to__cxa_uncaught_exceptions. No test names it, and no open or merged PR does (checked the PR titles and bodies and the test sources).intto reach thecatchblock. It checks the zero result the standard requires there; it does not exercise the count inside a destructor during unwinding, which needs a guest-side throw and is not covered here.Tested
git diff --check upstream/main...HEAD: passed.python3 tools/check_conventions.py --base upstream/main: passed.Checklist
main; no other open PR implements the same functions.mdfiles or images added to the repository