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

moonbitlang / core / 7926
88%

Build:
DEFAULT BRANCH: main
Ran 05 Nov 2026 09:50AM UTC
Jobs 1
Files 676
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 Nov 2026 09:47AM UTC coverage: 88.452% (+0.003%) from 88.449%
7926

push

github

web-flow
fix(deque): capture buf, head and len in callback-taking methods (#4751)

Follow-up to #4742, which fixed the iterators. `map`, `mapi`, `search`,
`extract_if` and `shuffle_in_place` had the same bug: they call user
code (a closure, an `Eq` impl, or `rand`) while reading the deque's
live `buf`, `head` or `len`. A callback that modifies the deque made
them:

- read slots that were never written (null dereference on wasm-gc,
  out-of-bounds memory access on wasm, TypeError on js, abort on
  native);
- give `map`/`mapi` results the live length, which can exceed the
  capacity of the result;
- leave `extract_if` with a negative length after `clear()`.

Capture `(buf, head, len)` before the first call. `extract_if` finishes
with `truncate`, as `retain` does, which only shrinks the live range.

`shuffle_in_place` also used `rand`'s result unchecked, so an
out-of-range index swapped an unwritten or vacated slot into the deque.
It now reduces the index modulo `i + 1`, as `Array::shuffle_in_place`
does, and aborts if the result is negative.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

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

25015 of 28281 relevant lines covered (88.45%)

421065.11 hits per line

Jobs
ID Job ID Ran Files Coverage
1 7926.1 05 Nov 2026 09:50AM UTC 676
88.45
GitHub Action Run
Source Files on build 7926
  • Tree
  • List 676
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 77fa39fe on github
  • Prev Build on main (#7922)
  • Next Build on main (#7932)
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