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

stillwater-sc / universal / 34864593018
86%
master: 84%

Build:
Build:
LAST BUILD BRANCH: main
DEFAULT BRANCH: master
Ran 14 Sep 2026 04:28PM UTC
Jobs 1
Files 669
Run time 2min
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

14 Sep 2026 03:48PM UTC coverage: 85.802% (-0.006%) from 85.808%
34864593018

push

github

web-flow
fix(integer): increment and decrement on the limbs, not through integer(1) (#1501)

The one-limb fast path of operator/= and operator%= for integer<32, uint32_t> and
integer<64, uint64_t> casts both operands to the native signed type and divides. For
maxneg / -1 and maxneg % -1 that overflows, and x86 raises a hardware exception: the
program dies with SIGFPE. 8- and 16-bit limbs survive because the operands promote to
int first, and wider or narrower widths go through long division. Nothing in the tree
tested it.

A divisor of -1 now takes its own branch: / negates, which wraps maxneg to itself as two's
complement does, and % gives 0.

The new static/integer/binary/arithmetic/limb_widths.cpp found it while probing #1500. It
checks IntegerNumber arithmetic against native 64-bit integers at widths that do not fill
their last limb, for every limb type, one step at a time: integer(1), flip(), ++, --,
twosComplement(), unary minus, then + - * / % and <. Failures are counted per operation,
so a platform-specific fault names the step that breaks. Its sampler draws -1 and maxneg
on purpose.

fix(integer): increment and decrement on the limbs, not through integer(1)

On MSVC, integer<nbits, uint64_t, IntegerNumber> with nbits < 64 -- one 64-bit limb the
value does not fill -- gave 0 + 1 == 0 for ++ (#1500). twosComplement() is flip() then ++,
and IntegerNumber subtraction is a += twos(b).twosComplement(), so negation, subtraction,
<, / and % all broke with it. Every negative value printed "-0", and 2^59 / 10^18 gave
quotient 1, remainder 2^59.

limb_widths.cpp, run on MSVC (CMake dispatch 34822843169, MSVC 19.51), separated the
steps. integer(1), flip(), a + b and a * b were right. ++ and -- were wrong for every
value, and twosComplement, -, <, / and % failed with them. The only difference between a
+ b, which works, and ++, which did not, is that ++ added a temporary integer(1)
constructed inside the constexpr member. gcc and clang, and MSVC with 8-, 16- and ... (continued)

11 of 11 new or added lines in 1 file covered. (100.0%)

8 existing lines in 1 file now uncovered.

43831 of 51084 relevant lines covered (85.8%)

7912770.12 hits per line

Coverage Regressions

Lines Coverage ∆ File
8
93.06
-0.52% include/sw/universal/number/cfloat/cfloat_impl.hpp
Jobs
ID Job ID Ran Files Coverage
1 34864593018.1 14 Sep 2026 04:27PM UTC 669
85.8
GitHub Action Run
Source Files on build 34864593018
  • Tree
  • List 669
  • Changed 2
  • Source Changed 1
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #34864593018
  • 5a0ac4cb on github
  • Prev Build on main (#34825475681)
  • Next Build on main (#34873878752)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc