Skip to content

fix(decoder): LEB128 overflow validation and binary format checks#166

Merged
avrabe merged 1 commit intomainfrom
fix/binary-validation
Mar 17, 2026
Merged

fix(decoder): LEB128 overflow validation and binary format checks#166
avrabe merged 1 commit intomainfrom
fix/binary-validation

Conversation

@avrabe
Copy link
Collaborator

@avrabe avrabe commented Mar 17, 2026

Summary

  • LEB128 overflow validation, code body LEB128 checking
  • Custom page sizes, section cross-validation, element type validation
  • ~35 assertions fixed

Trace: skip

🤖 Generated with Claude Code

…m page sizes

- Fix LEB128 u32/u64/i32/i64 overflow validation for 5th/10th bytes
- Add validate_code_body_leb128() for instruction-level LEB128 checking
- Fix custom page size validation (only exponents 0 and 16 valid)
- Fix function/code section cross-validation for count=0
- Fix element section reference type validation
- Fix error chain propagation in WAST assert handlers

Fixes ~35 assertions: binary-leb128 (+10), binary (+10), custom-page-sizes-invalid (+15).

Trace: skip

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@avrabe avrabe merged commit c44f01e into main Mar 17, 2026
14 checks passed
@avrabe avrabe deleted the fix/binary-validation branch March 17, 2026 18:12
@github-actions
Copy link

🔍 Build Diagnostics Report

Summary

Metric Base Branch This PR Change
Errors 0 0 0
Warnings 2 2 0

🎯 Impact Analysis

Issues in Files You Modified

  • 0 new errors introduced by your changes
  • 0 new warnings introduced by your changes
  • 0 total errors in modified files
  • 0 total warnings in modified files
  • 0 files you modified

Cascading Issues (Your Changes Breaking Other Files)

  • 0 new errors in unchanged files
  • 0 new warnings in unchanged files
  • 0 unchanged files now affected

Note: "Cascading issues" are errors in files you didn't modify, caused by your changes (e.g., breaking API changes, dependency issues).

✅ No Issues Detected

Perfect! Your changes don't introduce any new errors or warnings, and don't break any existing code.


📊 Full diagnostic data available in workflow artifacts

🔧 To reproduce locally:

# Install cargo-kiln
cargo install --path cargo-kiln

# Analyze your changes
cargo-kiln build --output json --filter-severity error
cargo-kiln check --output json --filter-severity warning

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