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

[Bug] issue with glimmer-vm revealed by (lack of) flag: disable_local_debug #20573

Open
NullVoxPopuli opened this issue Nov 11, 2023 · 0 comments

Comments

@NullVoxPopuli
Copy link
Contributor

NullVoxPopuli commented Nov 11, 2023

🐞 Describe the Bug

Context: https://discord.com/channels/480462759797063690/485447409296736276/1172819210330710066

🔬 Minimal Reproduction

in our own test suite, without disable_local_debug, which is present in #20561

3 failing tests appear in the default test suite.

#20561

Notes from @chancancode :

This is the Modifier opcode – in non-interactive mode, we have an early return path. However, you can see on L33219, in the normal path, there would have been a stack pop. This indicates a previous opcode has put something on the stack, expecting that to be consumed by this opcode.

So either:

  • The opcode compiler can be smarter and notice that we are in non-interactive mode and not insert the opcode paris (the one that pushes the value on the stack and this one that is exepcted to consume it) in the first place, or
  • This opcode need to pop the value from the stack to balance it out, even when we aren't going to do anything else with the modifier.
    The easy fix would be to just add the vm.stack.pop() in the early return path and the tests should pass.

Probably should look for other similar cases. DynamicModifier looks like it has the same problem (but that one needs two pops), there are just no tests for it.
Overall, if we have been accidentally running those extra checks in the test suite and only three tests fails that's probaly a pretty good sign

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

No branches or pull requests

1 participant