x86 32-bit: an unmasked FP exception traps after interval code has returned
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 44/100
Research direction
Start with the x87 exception masking and control-word restoration paths described in the issue, then compare the Clang and GCC behavior in the linked Godbolt example. Check related issue #35 for context. Done when an unmasked overflow exception no longer traps after interval code returns on 32-bit x86.
Written by the indexing model from the issue text.
Description
On 32-bit x86, where double arithmetic runs on the x87 unit, the rounding control masks every exception while interval code runs, so the overflow below doesn't trap inside it.
But the overflow flag stays pending, and restoring the caller's control word unmasks it again, so the trap fires afterwards: in Boost's own restore (Clang), or at the caller's next x87 instruction, which has nothing to do with the interval (GCC).
Related: #35.
- Dominant language
- C++
- Stars
- 30
- Forks
- 49
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 7
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from boostorg/interval
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
Difficulty 5/5 Over a week Newbie friendliness 10/100
-
Code behaves differently if compiled with MSVC vs GCCPossibly taken @reach2sayan claimed this 35 days ago. Open
Difficulty 5/5 Over a week Newbie friendliness 25/100
All issues in boostorg/interval
Similar issues
-
Difficulty 1/5 1-3 hours Newbie friendliness 82/100
psi29a/d2decomped#691 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
CachyOS/packageinstaller#144 ·
Maintainers usually reply within 1 day
-
prio:low type:bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
NatronGitHub/Natron#1638 ·
Maintainers usually reply within 1 day
-
documentation
Difficulty 1/5 Under an hour Newbie friendliness 82/100
TomerAberbach/profiler-md#951 ·
Maintainers usually reply within 1 day
-
area:readers low-priority
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
NatronGitHub/openfx-arena#214 ·
Maintainers usually reply within 1 day