3
26
Fork
You've already forked mere
1

fixes #72

Merged
jhuntwork merged 2 commits from fixes into main 2026年06月01日 02:38:56 +02:00
  1. Remove rollback protection on unprivileged installs
  2. Unaligned pointer cast when scanning .dynamic sections
1. Remove rollback protection on unprivileged installs 2. Unaligned pointer cast when scanning .dynamic sections
mere dev build (and unprivileged mere install) aborted when installing a
dependency from a remote repo: after the package was successfully built,
verified, and admitted to the store, the install tried to write rollback
state into /mere/cache/repos/<...>/rollback_state.kdl — a root-owned path
— and failed with a FileSystem error ("failed to update rollback state").
fix: avoid unaligned pointer cast when scanning .dynamic section
All checks were successful
/ test (pull_request) Successful in 6m1s
226c1ba2d4
scanElfMetadata read the .dynamic section into a byte buffer via
allocator.alloc (1-byte aligned), then @alignCast'd each entry to
*Elf64_Dyn. @alignCast asserts the type's 8-byte alignment and panics
in safe builds when the buffer base isn't 8-byte aligned — which it
isn't guaranteed to be. This crashed `mere dev build` during package
artifact scanning (hit while packaging pixman).
Read d_tag and d_val by offset with std.mem.readInt instead, matching
how the rest of elf.zig parses ELF structures. No alignment assumption,
and endianness is explicit (native_endian, already guaranteed by the
scan's earlier endian guard).
Sign in to join this conversation.
No reviewers
Labels
Clear labels
No items
No labels
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
merelinux/mere!72
Reference in a new issue
merelinux/mere
No description provided.
Delete branch "fixes"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?