Repository navigation
Conversation
PrivacyOnion
left a comment
There was a problem hiding this comment.
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against dc3734b0c5:
- Conventions:
tools/check_conventions.pypassed. - Build:
guest_math_testsbuilt cleanly. - CTest (
guest_math):1/1 Test #1216: guest_math ....................... Passed 0.04 sec 100% tests passed, 0 tests failed out of 1 - Code reading:
- Verified GuestMath.cpp line 4794 uses StandardExceptions instead of FE_ALL_EXCEPT in CheckTinyInverseTrigFlags, correctly masking out platform-specific non-standard FP exception flags like FE_DENORMALOPERAND (0x02 on x86_64 macOS/Darwin)
- Verified StandardExceptions definition in GuestMath.cpp encompasses the five standard IEEE 754 / C99 floating-point exception flags (FE_DIVBYZERO, FE_INEXACT, FE_INVALID, FE_OVERFLOW, FE_UNDERFLOW)
- Confirmed errno, result bits, and clear-exception preconditions remain intact and uncompromised across all tested tiny asin and atan inputs
- Checked AGENTS.md compliance: no comments added, conventions and git diff checks pass, and tests execute cleanly
Looks Good To Me
|
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) |
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed — looks good
The change limits the tiny inverse-trig test to the five standard floating-point exception flags, matching its stated cross-platform intent; I found no blocking defect.
What I ran
Reviewed head dc3734b0c5f55b8a0ebad2a9d5fa59d7e096d7db. I read the prepared description, commit list, manifest, diff, and the changed source at the relevant ranges using repo_read.py. I did not run tests or a build.
Results
| Check | Result | Note |
|---|---|---|
| Diff and changed code | passed | The comparison uses the existing standard-flags mask. |
| Build and tests | not run | No local execution. |
Findings
Blocking
None.
Non-blocking
None.
Not verified
The author reports macOS results; I did not independently run them. Linux and Windows behavior was not tested. The only changed file, core/libs/tests/GuestMath.cpp, was read at the changed function and the existing mask definition and usage sites. No files were excluded from review according to the manifest.
To get this to a good state
Nothing is required.
|
Tested Existing runs. kiwe147 ran What this run adds. A run on this PR alone, on current Code.
PR body.
Suggestion. No pin. The change is a no-op on this platform, and the mutations below show that the narrowed mask still catches wrong flags from the library. Negative control and mutations. Each change was made on the merge and run once with
Tests.
On the merge, Host:
AI-assisted: yes |
|
Confirmed on a native Intel Mac (i5-8259U, x86_64, no Rosetta, macOS 15.7.8, Apple clang 17.0.0), on
AI-assisted: yes |
ligmaSec
left a comment
There was a problem hiding this comment.
Ran the submitted tiny inverse-trigonometric fixture by itself on Linux with the pinned project libraries. It passed its result-bit, errno and standard floating-point flag checks on the tiny asin and atan cases. In the broader mixed-library fixture, execution stopped earlier at an expm1l case, so the result here is for the changed check.
AI-assisted: yes.
What
guest_mathfails on macOS since #23972 addedCheckTinyInverseTrigFlags:The check compares
std::fetestexcept(FE_ALL_EXCEPT)withFE_INEXACT. On x86_64 macOS,FE_ALL_EXCEPTis0x3fand includesFE_DENORMALOPERAND(0x02). An SSE operation on a subnormal input sets that flag, so for±denorm_minthe test reads0x22where it expects0x20. With temporary logging, the four failing cases areasinandatanof0x1p-1074and-0x1p-1074: the result bits anderrnoare as expected, the flags are0x22. glibc'sFE_ALL_EXCEPThas no such flag, so Linux passes.The file already defines
StandardExceptions, the five C exception flags, for this. The check now uses it, as #20503 did for two other tests. The library is unchanged, and the check still requires exactlyFE_INEXACTfor nonzero inputs and no flag for zeros.Tested
Apple M4, macOS 27.0.1, Apple clang (Command Line Tools), x86_64 Release build under Rosetta 2.
main0a025bd3c6with #17425 and #11049, which the macOS build needs.guest_mathmainGuestMath.cpp:4794Not run on Linux or Windows. The change only drops non-standard flags from the comparison, so a platform whose
FE_ALL_EXCEPTis the five standard flags reads the same value as before.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)