Comments (8)
@mkustermann I think it may make sense to run jscm test config before submitting patches. That configuration greatly increases test coverage. This issue was caused because we didn't run it when submitting.
from sdk.
+1 on adding jscm. I had no idea that not all the relevant tests were run.
This fixes the one with the stack trace: https://dart-review.googlesource.com/c/sdk/+/371743
I'm not sure where to start with the other two that just report:
Runtime error:
[object WebAssembly.Exception]
<undefined stack>
from sdk.
@mkustermann I think it may make sense to run jscm test config before submitting patches. That configuration greatly increases test coverage. This issue was caused because we didn't run it when submitting.
Ideally all CI bots also run on CQ. If we don't have resources and we had to pick, I'd pick not running JSCM because we don't have any customers of that mode atm. /cc @athomas does it increase CQ times if we add another builder?
I'm not sure where to start with the other two that just report:
You can often get the real stacks by running with D8
instead of Chrome
. So in this case, if I run
% python3 tools/test.py -n dart2wasm-linux-jscm-d8 lib/typed_data/polymorphic_unmodifiable_typed_data_test
...
stdout:
Attempt to execute code removed by Dart AOT compiler (TFA)
at Error._throwWithCurrentStackTrace (wasm://wasm/00086132:wasm-function[212]:0xa9dc)
at new NaiveUnmodifiableInt32x4List (initializer) (wasm://wasm/00086132:wasm-function[925]:0x13c74)
at NaiveUnmodifiableInt32x4List (wasm://wasm/00086132:wasm-function[924]:0x13c4d)
at JSInt32x4ArrayImpl.asUnmodifiableView (wasm://wasm/00086132:wasm-function[914]:0x13aa9)
at testInt32x4 (wasm://wasm/00086132:wasm-function[731]:0x11204)
at main (wasm://wasm/00086132:wasm-function[94]:0x8eb8)
at main tear-off trampoline (wasm://wasm/00086132:wasm-function[96]:0x8ed5)
at _invokeMain (wasm://wasm/00086132:wasm-function[99]:0x90eb)
/usr/local/google/home/kustermann/repositories/sdk-gclient4/sdk/pkg/dart2wasm/bin/run_wasm.js:343: [object WebAssembly.Exception]
}
^
Looking at the code, it may be due to this:
final class NaiveUnmodifiableInt32x4List extends NaiveInt32x4List {
NaiveUnmodifiableInt32x4List(Int32x4List list)
: super.externalStorage(unsafeCast<NaiveInt32x4List>(list)._storage);
...
}
TFA may infer that list
is always a JSInt32x4ArrayImpl
and so it knows that this unsafeCast<NaiveInt32x4List>(list)
cannot be right, so it inserts a throw.
from sdk.
Adding dart2wasm-linux-jscm-chrome to the CQ SGTM, it runs relatively quick and should mostly trigger on dart2wasm related changes.
from sdk.
Fixed by the commit referenced above. 08ca631 removes unsafe casts in the file so that we won't have this issue again.
JSCM added to the CQ tests in https://dart-review.googlesource.com/c/sdk/+/371542.
from sdk.
The test is still failing in JSCM mode (but now due to a different reason):
% tools/build.py -nvh -d0 -mrelease -ax64 dart2wasm create_sdk
...
% python3 tools/test.py -n dart2wasm-linux-jscm-chrome lib/typed_data/polymorphic_unmodifiable_typed_data_test
FAILED: dart2wasm-chrome release_x64 lib/typed_data/polymorphic_unmodifiable_typed_data_test
Expected: Pass
Actual: RuntimeError
...
Runtime error:
[object WebAssembly.Exception]
<undefined stack>
Events:
- debug "test_controller.js started"
- debug "Sending events to driver page (isFirstMessage = true, isStatusUpdate = true, isDone = false)"
- print "dart-calling-main"
- print "UnimplementedError"
- print " at Error._throwWithCurrentStackTrace (http://127.0.0.1:36223/root_build/generated_tests/dart2wasm-linux-jscm-chrome/tests_lib_typed_data_polymorphic_unmodifiable_typed_data_test/polymorphic_unmodifiable_typed_data_test.wasm:wasm-function[
212]:0xaa5f)
at JSDataViewImpl.asUnmodifiableView (http://127.0.0.1:36223/root_build/generated_tests/dart2wasm-linux-jscm-chrome/tests_lib_typed_data_polymorphic_unmodifiable_typed_data_test/polymorphic_unmodifiable_typed_data_test.wasm:wasm-function[740]:0x11
6fc)
at testByteData (http://127.0.0.1:36223/root_build/generated_tests/dart2wasm-linux-jscm-chrome/tests_lib_typed_data_polymorphic_unmodifiable_typed_data_test/polymorphic_unmodifiable_typed_data_test.wasm:wasm-function[734]:0x115de)
at main (http://127.0.0.1:36223/root_build/generated_tests/dart2wasm-linux-jscm-chrome/tests_lib_typed_data_polymorphic_unmodifiable_typed_data_test/polymorphic_unmodifiable_typed_data_test.wasm:wasm-function[94]:0x8f47)
at main tear-off trampoline (http://127.0.0.1:36223/root_build/generated_tests/dart2wasm-linux-jscm-chrome/tests_lib_typed_data_polymorphic_unmodifiable_typed_data_test/polymorphic_unmodifiable_typed_data_test.wasm:wasm-function[96]:0x8f58)
at _invokeMain (http://127.0.0.1:36223/root_build/generated_tests/dart2wasm-linux-jscm-chrome/tests_lib_typed_data_polymorphic_unmodifiable_typed_data_test/polymorphic_unmodifiable_typed_data_test.wasm:wasm-function[99]:0x916e)
at Module.invoke (http://127.0.0.1:36223/root_build/generated_tests/dart2wasm-linux-jscm-chrome/tests_lib_typed_data_polymorphic_unmodifiable_typed_data_test/polymorphic_unmodifiable_typed_data_test.mjs:558:28)
at http://127.0.0.1:36223/root_build/generated_tests/dart2wasm-linux-jscm-chrome/tests_lib_typed_data_polymorphic_unmodifiable_typed_data_test/test.html?crossOriginPort=37871:29:23"
- {
"type": "sync_exception",
"value": "[object WebAssembly.Exception]",
"timestamp": 2.15,
"stack_trace": "<undefined stack>"
}
which seems to be due to
final class JSDataViewImpl implements ByteData {
...
@override
ByteData asUnmodifiableView() => throw UnimplementedError();
}
from sdk.
I'm implemented unmodifiable JS data view view in https://dart-review.googlesource.com/c/sdk/+/372082.
from sdk.
Missing asUnmodifiableView
was implemented in 3b5065b.
from sdk.
Related Issues (20)
- [vm/core] Inlining `_GrowableList.add` bloats program too much HOT 2
- vm/dart/isolates/shared_primitives_test changing from flaky to RTE on vm-reload-linux-debug-x64 HOT 2
- [diagnostic] don't report `DUPLICATE_FIELD_NAME` if the name is invalid
- Refactoring to convert params/args between positional and named HOT 2
- Analyzer exception doesn't specify affected file HOT 2
- VM always prints "<isolate> has no debugger is attached and is paused"
- [dart2wasm] UnimplementedError when calling Flutter's Matrix4.translate with an integer argument
- `where` can't accept an async predicate HOT 6
- [Augmentations] Wrong error in the analyzer when augmenting enum member
- [Augmentations] No error in the analyzer when augmenting a function type with no augmented type
- [Augmentations] No error in analyzer for mixin and extension when augmentation is before original declaration HOT 1
- [Augmentations] Analyzer crash on co19/LanguageFeatures/Augmentation-libraries/augmenting_types_A01_t01
- [Augmentations] Analyzer error when augmenting representation variable
- [Augmentations] Omitted type bound is not inherited
- [Augmentations] No error in the analyzer if augmentation declares a different return type HOT 2
- The integer negative zero formats as "-0.0" HOT 7
- [dart2js] bug in global inference with `call` getter HOT 1
- DevTools URI opens to a white screen
- Isolate.run error run with closure HOT 4
- LateInitializationError in ResolutionVisitor.visitForEachPartsWithPattern in resolution_visitor.dart HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sdk.