• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

kaidokert / fixed-bigint-rs / 26996777840
98%
main: 98%

Build:
Build:
LAST BUILD BRANCH: asm-grep-helper-scope
DEFAULT BRANCH: main
Ran 05 Jun 2026 05:12AM UTC
Jobs 1
Files 26
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

05 Jun 2026 05:12AM UTC coverage: 98.316%. Remained the same
26996777840

Pull #121

github

kaidokert
Cap shift amount to BIT_SIZE before usize cast on Ct path

PR #121's earlier simplification dropped explicit overflow detection
for the Ct path, relying on `const_shl_ct` / `const_shr_ct`'s barrel
saturation to produce zero for shifts >= BIT_SIZE. That works on
targets where `usize` is at least 32-bit (every priority target except
AVR), but on 16-bit-usize AVR the `bits as usize` cast truncates
before the saturation runs: `bits = 65536u32` becomes `0usize`, so
`target << 0` returns `target` instead of zero, breaking the
`ConstUnboundedShift` contract that
`tests/personality_integration.rs::shl_shr_u32_overflow_returns_zero`
guards against.

Cap `bits` to `BIT_SIZE` branchlessly before the cast. For every
priority `(T, N)` diagonal BIT_SIZE fits in u16 (max is 512), so the
capped value casts losslessly on every target including AVR.

The clamp uses a small CT-safe `const_ct_min_u32` helper —
XOR-AND-XOR select on a `black_box`-opacified mask, mirroring
`const_ct_select`'s defence against the LLVM cmov rewrite (PR #118).
The `normalize_shift_amount` dependency on the Ct path stays gone;
the new code adds a fixed-cost arithmetic clamp instead of a
branch-and-modulo.

Verified: `tests/personality_integration.rs::shl_shr_u32_overflow_returns_zero`
passes (139 + 54 = 193 tests total). ctgrind on aarch64 docker
189 positive / 4 negative tripped.
Pull Request #121: Add category ASYM: asymmetric-taint regression fixtures

2860 of 2909 relevant lines covered (98.32%)

367.57 hits per line

Jobs
ID Job ID Ran Files Coverage
1 26996777840.1 05 Jun 2026 05:12AM UTC 26
98.32
GitHub Action Run
Source Files on build 26996777840
  • Tree
  • List 26
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #26996777840
  • Pull Request #121
  • PR Base - main (#26868591246)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc