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

panic: Cannot use the undeclared label #2674

Closed
langston-barrett opened this issue Mar 15, 2023 · 3 comments
Closed

panic: Cannot use the undeclared label #2674

langston-barrett opened this issue Mar 15, 2023 · 3 comments
Labels
bug Something isn't working E-Medium Medium difficulty problem execution Issues or PRs related to code execution
Milestone

Comments

@langston-barrett
Copy link

langston-barrett commented Mar 15, 2023

Found with tree-splicer, reduced with treereduce.

(function(){
  ;;
  ;
  LABEL0: 
  LABEL1: 
  do {
     {
      ;
      continue LABEL0;
    }
    ;
  } while((-3.73961564302253E+18) && __loopvar0 < 3)
  ;
  ;
  ;
  ;
  ;
  ;
  ;
  ;
  ;
  ;
  ;
  ;
  ;
  ;
  ;
  ;
  ;
  ;
})();
thread 'main' panicked at 'Cannot use the undeclared label', boa_engine/src/bytecompiler/statement/continue.rs:103:23
stack backtrace:
   0: rust_begin_unwind
             at /rustc/2c8cc343237b8f7d5a3c3703e3a87f2eb2c54a74/library/std/src/panicking.rs:575:5
   1: core::panicking::panic_fmt
             at /rustc/2c8cc343237b8f7d5a3c3703e3a87f2eb2c54a74/library/core/src/panicking.rs:64:14
   2: core::panicking::panic_display
             at /rustc/2c8cc343237b8f7d5a3c3703e3a87f2eb2c54a74/library/core/src/panicking.rs:147:5
   3: core::panicking::panic_str
             at /rustc/2c8cc343237b8f7d5a3c3703e3a87f2eb2c54a74/library/core/src/panicking.rs:131:5
   4: core::option::expect_failed
             at /rustc/2c8cc343237b8f7d5a3c3703e3a87f2eb2c54a74/library/core/src/option.rs:1924:5
   5: boa_engine::bytecompiler::statement::<impl boa_engine::bytecompiler::ByteCompiler>::compile_stmt
   6: boa_engine::bytecompiler::ByteCompiler::compile_statement_list
   7: boa_engine::bytecompiler::statement::<impl boa_engine::bytecompiler::ByteCompiler>::compile_stmt
   8: boa_engine::bytecompiler::ByteCompiler::compile_statement_list
   9: boa_engine::bytecompiler::statement::<impl boa_engine::bytecompiler::ByteCompiler>::compile_stmt
  10: boa_engine::bytecompiler::statement::loop::<impl boa_engine::bytecompiler::ByteCompiler>::compile_do_while_loop
  11: boa_engine::bytecompiler::statement::<impl boa_engine::bytecompiler::ByteCompiler>::compile_stmt
  12: boa_engine::bytecompiler::statement::<impl boa_engine::bytecompiler::ByteCompiler>::compile_stmt
  13: boa_engine::bytecompiler::function::FunctionCompiler::compile
  14: boa_engine::bytecompiler::ByteCompiler::function
  15: boa_engine::bytecompiler::expression::<impl boa_engine::bytecompiler::ByteCompiler>::compile_expr_impl
  16: boa_engine::bytecompiler::ByteCompiler::call
  17: boa_engine::context::Context::compile_script
  18: boa_engine::context::Context::eval_script
  19: boa::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
@langston-barrett langston-barrett added the bug Something isn't working label Mar 15, 2023
@nekevss
Copy link
Member

nekevss commented Mar 16, 2023

Hi! Was this bug found on the v0.16 or on main?

@langston-barrett
Copy link
Author

9a34cb9

@jedel1043 jedel1043 added the execution Issues or PRs related to code execution label Mar 16, 2023
@jedel1043 jedel1043 moved this to To do in Boa pre-v1 Mar 16, 2023
@jasonwilliams jasonwilliams added the E-Medium Medium difficulty problem label Apr 12, 2023
@HalidOdat
Copy link
Member

HalidOdat commented Dec 7, 2023

This is fixed! Probably fixed when #3059 was merged, which completely removed the Continue opcode. So closing this :)

@github-project-automation github-project-automation bot moved this from To do to Done in Boa pre-v1 Dec 7, 2023
@HalidOdat HalidOdat added this to the v0.18.0 milestone Dec 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working E-Medium Medium difficulty problem execution Issues or PRs related to code execution
Projects
Status: Done
Development

No branches or pull requests

5 participants