Skip to content

fix: preserve escaped mapped pointers in the V3 buffer example - #31

Merged
antono3 merged 2 commits into
masterfrom
fix/v3-mapped-byte-store
Oct 30, 2026
Merged

antono3 merged 2 commits into
masterfrom
fix/v3-mapped-byte-store

Conversation

@antono3

@antono3 antono3 commented Oct 30, 2026

Copy link
Copy Markdown
Collaborator

Summary

Pass mapped pointer values into a small byte-store helper rather than casting heap-promoted voidptr locals in place. This avoids the compiler bug reported with a dependency-free single-file example in vlang/v#31481. Add a CPU-only regression verifying byte writes and pointer identity for escaped pointer slots.

Verification

  • Current V3 bfc309e17e7e8fd23f4c1e2444b8d8646ec13ddf and TinyCC: both buffer-example test files pass.
  • The original native buffer example reproducibly fails with pointer difference 533 instead of 512. The patch completes on GTX 1060 with validation enabled: shared mappings, dedicated image, live budgets, upload-ring wrap and fenced GPU copy/readback (21,22,23).
  • The helper changes only this example; allocator library API, dependency pins, version and generated bindings are unchanged.
  • Cross-platform and sanitizer CI must pass before merge.

@antono3
antono3 merged commit d6eb0e7 into master Oct 30, 2026
5 checks passed
@antono3
antono3 deleted the fix/v3-mapped-byte-store branch October 30, 2026 22:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant