Skip to content

[dart2wasm] co19/LanguageFeatures/Extension-types/superinterfaces_of_extension_type_A08_t02 crashes compiler #53812

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

Closed
sgrekhov opened this issue Oct 20, 2023 · 1 comment
Assignees
Labels
area-dart2wasm Issues for the dart2wasm compiler. crash Process exits with SIGSEGV, SIGABRT, etc. An unhandled exception is not a crash.

Comments

@sgrekhov
Copy link
Contributor

The following test crashes dart2wasm compiler

/==========================================================================================================================\
| co19/LanguageFeatures/Extension-types/superinterfaces_of_extension_type_A08_t02 is new and failed (Crash, expected Pass) |
\==========================================================================================================================/

--- Command "dart2wasm" (took 01.000431s):
DART_CONFIGURATION=ReleaseX64 CHROME_PATH=/b/s/w/ir/cache/builder/sdk/third_party/browsers/chrome/chrome/google-chrome sdk/bin/dart2wasm_developer -Dtest_runner.configuration=dart2wasm-linux-chrome --enable-experiment=inline-class /b/s/w/ir/cache/builder/sdk/tests/co19/src/LanguageFeatures/Extension-types/superinterfaces_of_extension_type_A08_t02.dart /b/s/w/ir/cache/builder/sdk/out/ReleaseX64/generated_tests/dart2wasm-linux-chrome/tests_co19_src_LanguageFeatures_Extension-types_superinterfaces_of_extension_type_A08_t02/superinterfaces_of_extension_type_A08_t02.wasm

exit code:
255

stdout:
Exception in ConstantExpression at file:///b/s/w/ir/cache/builder/sdk/tests/co19/src/LanguageFeatures/Extension-types/superinterfaces_of_extension_type_A08_t02.dart:38:9

stderr:
Unhandled exception:
Null check operator used on a null value
#0      ConstantCreator._makeInterfaceType.<anonymous closure> (package:dart2wasm/constants.dart:731)
#1      ConstantCreator.createConstant (package:dart2wasm/constants.dart:282)
#2      ConstantCreator._makeInterfaceType (package:dart2wasm/constants.dart:730)
#3      ConstantCreator.visitTypeLiteralConstant (package:dart2wasm/constants.dart:807)
#4      TypeLiteralConstant.accept (package:kernel/ast.dart:14286)
#5      ConstantCreator.ensureConstant (package:dart2wasm/constants.dart:249)
#6      ConstantCreator.visitTypeLiteralConstant (package:dart2wasm/constants.dart:813)
#7      TypeLiteralConstant.accept (package:kernel/ast.dart:14286)
#8      ConstantCreator.ensureConstant (package:dart2wasm/constants.dart:249)
#9      ConstantInstantiator.defaultConstant (package:dart2wasm/constants.dart:142)
#10     ConstantVisitorDefaultMixin.visitTypeLiteralConstant (package:kernel/visitor.dart:953)
#11     TypeLiteralConstant.accept (package:kernel/ast.dart:14286)
#12     ConstantInstantiator.instantiate (package:dart2wasm/constants.dart:126)
#13     Constants.instantiateConstant (package:dart2wasm/constants.dart:108)
#14     CodeGenerator.visitConstantExpression (package:dart2wasm/code_generator.dart:2866)
#15     ConstantExpression.accept1 (package:kernel/ast.dart:8621)
#16     CodeGenerator.wrap (package:dart2wasm/code_generator.dart:882)
#17     CodeGenerator.visitArgumentsLists (package:dart2wasm/code_generator.dart:2774)
#18     CodeGenerator._visitArguments (package:dart2wasm/code_generator.dart:2808)
#19     CodeGenerator.visitStaticInvocation (package:dart2wasm/code_generator.dart:1759)
#20     StaticInvocation.accept1 (package:kernel/ast.dart:6543)
#21     CodeGenerator.wrap (package:dart2wasm/code_generator.dart:882)
#22     CodeGenerator.visitExpressionStatement (package:dart2wasm/code_generator.dart:1358)
#23     ExpressionStatement.accept (package:kernel/ast.dart:9105)
#24     CodeGenerator.visitStatement (package:dart2wasm/code_generator.dart:893)
#25     CodeGenerator.visitBlock (package:dart2wasm/code_generator.dart:1015)
#26     Block.accept (package:kernel/ast.dart:9155)
#27     CodeGenerator.visitStatement (package:dart2wasm/code_generator.dart:893)
#28     CodeGenerator.generateBody (package:dart2wasm/code_generator.dart:578)
#29     CodeGenerator.generate (package:dart2wasm/code_generator.dart:234)
#30     Translator.translate (package:dart2wasm/translator.dart:344)
#31     compileToModule (package:dart2wasm/compile.dart:153)
<asynchronous suspension>
#32     main (package:dart2wasm/dart2wasm.dart:143)
<asynchronous suspension>
#33     main (file:///b/s/w/ir/cache/builder/sdk/pkg/dart2wasm/bin/dart2wasm.dart:7)
<asynchronous suspension>

--- Re-run this test:
python3 tools/test.py -n dart2wasm-linux-chrome co19/LanguageFeatures/Extension-types/superinterfaces_of_extension_type_A08_t02
@sgrekhov sgrekhov added crash Process exits with SIGSEGV, SIGABRT, etc. An unhandled exception is not a crash. area-dart2wasm Issues for the dart2wasm compiler. labels Oct 20, 2023
@askeksa
Copy link
Contributor

askeksa commented Oct 27, 2023

The program contains an ExtensionType (ET4 in this case) whose extensionTypeErasure points to an InterfaceType (for the class A in this case) that is not listed in the component. @johnniwinther @alexmarkov CFE or TFA bug?

@alexmarkov alexmarkov self-assigned this Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-dart2wasm Issues for the dart2wasm compiler. crash Process exits with SIGSEGV, SIGABRT, etc. An unhandled exception is not a crash.
Projects
None yet
Development

No branches or pull requests

3 participants