Skip to content

Commit fe88163

Browse files
rileyrclaude
andcommitted
release: v0.9.1 — pinned-Decimal bus-payload alignment fix
Version bump 0.9.0 -> 0.9.1 + the v0.9.1 CHANGELOG entry. Point release for the memory-safety fix (9b7c401): a bus-received Decimal (i128, align-16) delivered to a pinned subscriber trapped an aligned SSE access because the mailbox payload cell was only 8-aligned. Cell forced to 16-align + wire nested-struct deserialize 8->16; ASan-clean regression test; the downstream "never hold a bus Decimal" workaround is retired. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 7b83f3e commit fe88163

3 files changed

Lines changed: 29 additions & 6 deletions

File tree

CHANGELOG.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,29 @@ behavior.
66

77
---
88

9+
## v0.9.1 — pinned-Decimal bus-payload alignment fix
10+
11+
- **Fixed a segfault when a pinned bus subscriber stores or does arithmetic on a
12+
received `Decimal`.** A `Decimal` (an inline `i128`, align-16) delivered to a
13+
*pinned* subscriber landed in an 8-aligned mailbox payload cell, so an aligned
14+
SSE access (`vmovaps`) `#GP`-trapped — silent UB on ordinary type-correct code
15+
in the hot path of any bus consumer carrying money. Root cause:
16+
`lotus_bus_cell_t.payload_inline` had only the cell's natural align 8 (its
17+
widest member is a pointer), and the pinned drain hands the handler
18+
`&cell.payload_inline` directly — whereas a cooperative drain copies into a
19+
16-aligned scratch, which is why only the *pinned* path crashed. (It looked
20+
flaky because at `-O3` LLVM scalarizes individual i128 *field* ops into
21+
misalignment-tolerant paired 64-bit moves, so only a whole-struct payload copy
22+
reliably tripped the aligned `vmovaps`.) Fix: force the mailbox cell to 16-byte
23+
alignment (one struct attribute makes every cell copy 16-aligned uniformly), and
24+
bump the two nested-struct wire-deserialize allocations from 8 to 16 (a latent
25+
trap for remote/cross-process payloads carrying a nested Decimal-bearing struct).
26+
The downstream "never hold a bus-received Decimal — `to_string` it at the seam"
27+
workaround is no longer needed. Regression test: `bus_decimal_store` — three
28+
pinned-subscriber cases (`@form(vec)` push, `@form(hashmap)` cell, plain `self`
29+
field) asserting the *exact* round-tripped values + an accumulated sum, ASan-
30+
clean; SIGSEGVs on the pre-fix compiler.
31+
932
## v0.9.0 — lock-free bus, static dispatch devirtualization, native codegen
1033

1134
- **Lock-free bus messaging + static dispatch devirtualization — coordination

Cargo.lock

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ members = [
99
]
1010

1111
[workspace.package]
12-
version = "0.9.0"
12+
version = "0.9.1"
1313
edition = "2021"
1414
authors = ["the Hale authors"]
1515
license = "Apache-2.0"

0 commit comments

Comments
 (0)