GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Missing validation error · Issue #8785 · WebAssembly/binaryen

Missing validation error #8785

New issue
Copy link
New issue
Copy link
Open
#8978
Open
Missing validation error#8785
#8978
Copy link

Description

@mkustermann
mkustermann
opened on May 28, 2026
Issue body actions

See jj.tar.gz.

Unpack via:

% tar xvzf jj.tar.gz
...

When running with V8 we get a validation error:

% d8 $PWD/pkg/dart2wasm/bin/run_wasm.js  -- $PWD/jj.mjs $PWD/jj.wasm   
run_wasm.js:346: CompileError: WebAssembly.compile(): Compiling function #181:"main" failed: not enough arguments on the stack for drop (need 1, got 0) @+25996
  }
  ^
CompileError: WebAssembly.compile(): Compiling function #181:"main" failed: not enough arguments on the stack for drop (need 1, got 0) @+25996

1 pending unhandled Promise rejection(s) detected.

Though optimizing with wasm-opt works fine and the result runs:

% wasm-opt --enable-gc --enable-reference-types --enable-multivalue --enable-exception-handling --enable-nontrapping-float-to-int --enable-sign-ext --enable-bulk-memory --enable-threads --enable-simd '--no-inline=*<noInline>*' --traps-never-happen -g -Os --gufa -Os -Os jj.wasm -o jj.wasm  
% d8 $PWD/pkg/dart2wasm/bin/run_wasm.js  -- $PWD/jj.mjs $PWD/jj.wasm
%

Is wasm-opt not supposed to issue a validation error here as well? (even though the corresponding code is unreachable)

        local.get $reporter
        drop
        drop
        block $label2
          unreachable
        end
        drop

Activity

  1. tlively commented on May 28, 2026

    @tlively
    tlively
    on May 28, 2026
    Member
    More actions

    This is WAI for now, unfortunately. Binaryen represents that block as having bottom type internally, so this parses into valid Binaryen IR, even though it is not valid WebAssembly. A fix would involve adding an entirely new validator in the parser, since the IR does not retain enough information to detect this error.

  2. ANAMASGARD
    added a commit that references this issue on Aug 16, 2026

    Fix WebAssembly#8785: validate Wasm stack in IRBuilder without changi…

    This issue will close once commit 999c1cd is merged into the 'main' branch.
    999c1cd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402520 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.