Skip to content

fix(runtime): guard usage op output buffers#36020

Merged
nathanwhit merged 1 commit into
denoland:mainfrom
nathanwhit:fix/runtime-usage-output-buffers
Jul 14, 2026
Merged

fix(runtime): guard usage op output buffers#36020
nathanwhit merged 1 commit into
denoland:mainfrom
nathanwhit:fix/runtime-usage-output-buffers

Conversation

@nathanwhit

Copy link
Copy Markdown
Member

Reject undersized result buffers in runtime usage ops before writing usage values.

This makes the runtime usage helpers consistently return ordinary errors for invalid output buffers instead of indexing directly into caller-provided slices.

Validation:

  • CARGO_TARGET_DIR=/Users/nathanwhit/Documents/Code/deno5/target cargo build --bin deno
  • CARGO_TARGET_DIR=/Users/nathanwhit/Documents/Code/deno5/target cargo fmt --check

@nathanwhit
nathanwhit marked this pull request as ready for review July 13, 2026 21:22
@nathanwhit
nathanwhit merged commit 34e7d74 into denoland:main Jul 14, 2026
172 checks passed
bartlomieju pushed a commit that referenced this pull request Jul 15, 2026
Reject undersized result buffers in runtime usage ops before writing
usage values.

This makes the runtime usage helpers consistently return ordinary errors
for invalid output buffers instead of indexing directly into
caller-provided slices.

Validation:
- `CARGO_TARGET_DIR=/Users/nathanwhit/Documents/Code/deno5/target cargo
build --bin deno`
- `CARGO_TARGET_DIR=/Users/nathanwhit/Documents/Code/deno5/target cargo
fmt --check`
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.

2 participants