Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[test] Add a test for non-treelike behavior of stack #961

Merged
merged 1 commit into from
May 4, 2020

Commits on Feb 1, 2019

  1. Add a test for non-treelike behavior of stack

    We've recently found a bug in a WebAssembly library we've been working
    with where we're mapping WebAssembly to a tree-like IR internally. The
    way we parse into this representation, however, has a bug when the
    function isn't itself tree-like but rather exibits properties that
    exploit a stack machine. For example this isn't so straightforward to
    represent in a tree-like fashion:
    
        (import "" "a" (func $foo))
        (import "" "b" (func $foo (result i32)))
        (func (result i32)
          call $b
          call $b
          call $a
          i32.xor)
    
    The extra `call $a` in the middle is valid `WebAssembly` but needs
    special treatment when converting to a more tree-like IR format. I
    figured it'd be good to ensure there's a spec test covering this case as
    we currently pass the suite of spec tests but still contain this bug!
    alexcrichton committed Feb 1, 2019
    Configuration menu
    Copy the full SHA
    61170ba View commit details
    Browse the repository at this point in the history