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

tarantool / go-xlog / 42294698508
93%

Build:
DEFAULT BRANCH: master
Ran 06 Nov 2026 09:12PM UTC
Jobs 1
Files 43
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

06 Nov 2026 09:11PM UTC coverage: 92.913% (+1.2%) from 91.717%
42294698508

push

github

bigbes
format: state the aliasing of decoded bytes once and add Clone

Every decoder is zero-copy: BodyRaw, the raw fields of the body structs
and the FieldName and Value of an operation are sub-slices of the input.
That was said per function, in three phrasings, and not at all on some
types. A file reader gets away with it, handed a fresh region per block;
a wire consumer reuses one receive buffer, and the tuple it kept from one
row is overwritten by the next, silently.

The package doc now states the contract once, in an Aliasing section:
what aliases, why keeping it past the next reuse of the buffer is a
use-after-free in all but name, and, per type, the fields that do -
XRow.BodyRaw; DMLBody Tuple, Key, Ops, OldTuple, NewTuple and Arrow;
VyStmtBody Tuple, Key and Ops; VyRunInfo MinKey, MaxKey and Bloom;
VyPageInfo MinKey; the values of VyLogBody.Keys; Operation FieldName and
Value; the raw argument of OnUnknown; the row slices of DecodeTxBlock.
RaftBody and SynchroBody alias nothing. The per-function notes become a
pointer to it, and each aliasing field says so in the same words.

So that callers have an obvious right answer instead of hand-rolling
append([]byte(nil), ...) and missing a field, XRow, Operation and every
body struct get Clone and CloneInto, and a slice of operations
CloneOps and CloneOpsInto. Clone is a deep copy sharing no memory with
the source; it copies all the raw fields of a value into one allocation,
so a DML body clones in 2 allocs whatever it carries. CloneInto copies
into a caller-owned value and reuses the capacity of its slices: once
warm, CloneInto of an XRow, a DMLBody, the vinyl bodies and
CloneOpsInto allocate nothing. Nil stays nil and empty stays empty, so a
clone equals its source. A slice of dst sharing its array with the
source - dst is the source or a shallow copy of it, or was decoded from
the same buffer - is replaced rather than written into, and maps are
never reused, as the decoders never reuse one.

The issue al... (continued)

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

16 existing lines in 3 files now uncovered.

4313 of 4642 relevant lines covered (92.91%)

5846.82 hits per line

Coverage Regressions

Lines Coverage ∆ File
8
92.16
0.49% format/body_raft.go
6
97.2
-1.64% format/xrow.go
2
97.53
0.31% format/body_vylog.go
Jobs
ID Job ID Ran Files Coverage
1 42294698508.1 06 Nov 2026 09:12PM UTC 43
92.91
GitHub Action Run
Source Files on build 42294698508
  • Tree
  • List 43
  • Changed 8
  • Source Changed 0
  • Coverage Changed 8
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 0feca83b on github
  • Prev Build on master (#42197373739)
  • Next Build on master (#42297845678)
  • Delete
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