Repository navigation
Freestanding memory bounds checker - #72
Open
danieltowner wants to merge 1 commit into
Open
danieltowner wants to merge 1 commit into
danieltowner wants to merge 1 commit into
Conversation
danieltowner
force-pushed
the
freestanding_bounds_check
branch
from
November 20, 2026 17:39
3e2f61b to
2f30e1c
Compare
There was a problem hiding this comment.
🟡 Changes recommended
The new freestanding trap path and runtime-library independence remain untested; standalone freestanding coverage is needed for valid and fully masked accesses and trap termination on invalid access.
1 open issue
What changed in this PR
Updates SIMD memory bounds checking to support freestanding builds while preserving hosted exception diagnostics.
Changes:
- Uses compiler traps for freestanding bounds failures and limits string-based diagnostics to hosted builds.
- Checks selected gather/scatter indices individually, including negative indices.
- Extends tests for diagnostic messages, mixed-sign indices, and fully masked empty ranges.
| File | Description |
|---|---|
| test/TestSimdLoadStoreException.cpp | Adds diagnostic and indexed-access edge-case tests. |
| include/xvec/detail/utilities.hpp | Separates hosted and freestanding failure handling and improves bounds validation. |
Review effort: Balanced
Comment on lines
+223
to
+224
| #elif defined(__GNUC__) || defined(__clang__) | ||
| __builtin_trap(); |
danieltowner
force-pushed
the
freestanding_bounds_check
branch
2 times, most recently
from
November 21, 2026 17:34
a49c761 to
1d0c8f1
Compare
This new bounds checker works in free-standing mode as well as hosted. the dependency on std:string has been removed to avoid any need for runtime libraries.
danieltowner
force-pushed
the
freestanding_bounds_check
branch
from
November 21, 2026 17:35
1d0c8f1 to
292c7f9
Compare
This branch has not been deployed
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.

This new bounds checker works in free-standing mode as well as hosted. the dependency on std:string has been removed to avoid any need for runtime libraries.