wasmtime icon indicating copy to clipboard operation
wasmtime copied to clipboard

isle: panic when rule for non-multi internal constructor calls a multi extern

Open meithecatte opened this issue 2 years ago • 2 comments

Consider the following code:

(type u64 (primitive u64))
(decl multi meow (u64) u64)
(extern extractor meow meow)
;; Note: not `multi nyaa`
(decl nyaa (u64) u64)
(rule (nyaa (meow x)) x)

This makes islec panic with the following message:

thread 'main' panicked at 'assertion failed: !block.steps.iter().any(|c| matches!(c.check, ControlFlow :: Loop { .. }))', cranelift/isle/isle/src/codegen.rs:421:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Not sure if that's the standard of error messages we hold islec to.

meithecatte avatar Jul 20 '23 23:07 meithecatte

Hah, whoops. That not only should have been caught in an earlier stage, but I left a TODO comment saying so:

https://github.com/bytecodealliance/wasmtime/blob/c9a9c2c1919858057ef51b91dc92216cf13ea477/cranelift/isle/isle/src/sema.rs#L2008

jameysharp avatar Jul 21 '23 17:07 jameysharp

Subscribe to Label Action

cc @cfallin, @fitzgen

This issue or pull request has been labeled: "isle"

Thus the following users have been cc'd because of the following labels:

  • cfallin: isle
  • fitzgen: isle

To subscribe or unsubscribe from this label, edit the .github/subscribe-to-label.json configuration file.

Learn more.

github-actions[bot] avatar May 12 '24 22:05 github-actions[bot]