Comments (10)
Thanks for reporting!
Might be related: #405
There is work being done to split methods that are too large. In the meantime could you try: -XX:-DontCompileHugeMethods
That seemed to work for me when the compiled method was on the edge of being too big.
from chicory.
You could also try some running wasm-opt
and other post processing optimizers on the resulting module. Some things may not be runnable until we can split methods though.
from chicory.
I think it's in the same category as #405. I interpreted the error as ASM saying, "I can't generate your class bytecode because it is invalid." It seems to me that this step would come before the decision to natively compile the methods (e.g. rendering the DontCompileHugeMethods JVM arg irrelevant), is that correct or am I misunderstanding?
I've tried wasm-opt, but the output wasms from various optimization levels are always unstable / crashy.
from chicory.
Yes, definitely a different error and earlier in the process. I'm unsure if the method splitting work would address this const pool issue. @electrum is working on this and he would know.
from chicory.
The -XX:-DontCompileHugeMethods
flag is to allow the JVM JIT to work for large methods. The error here is that the WASM method is to large to convert to a single JVM method. So these aren't really related (other than that method splitting might prevent the need for that JVM flag).
from chicory.
If you could provide a reproduction, possibly based on #450, that would be helpful to ensure that the method splitting will work for this. What does your original method look like?
from chicory.
The constant pool issue might require splitting the methods across multiple classes, as you suggest. It's hard to say what might be required without seeing an example of the WASM input. I'm not sure if there is a good generic solution to this problem, as it is easy to construct pathological cases given the much larger WASM limits compared to JVM bytecode.
from chicory.
I can't supply the specific WASM, but I'll try to take a closer look at the class file that is attempting to be generated and try to get a grasp of what is going on there.
from chicory.
Seeing what is in the constant pool would be helpful.
from chicory.
@heroicefforts Could you send us a dump of the constant pool? You could obfuscate it if necessary.
from chicory.
Related Issues (20)
- Review the numbers we show in the test badge
- Enable all `assert_invalid` tests HOT 3
- Exception passthrough HOT 4
- `runtime.Module` should not be mutable
- Host Functions not very composable HOT 9
- Alternative method for single returns HOT 11
- Openssf Scorecard results
- Fix the WASI testsuite
- Validate interpreter handling of stack unwinds HOT 1
- Investigate handling of type IDs HOT 1
- AOT Engine error: `Method too large` HOT 10
- Review Machine runtime checks
- Wasm version HOT 3
- Version 1.0 API HOT 1
- [CI] Macos runner are exceeding the java heap usage HOT 1
- `WasiExitException` should not be wrapped by `WASMMachineException`
- Make it possible to memoize and `Instance` and execute it with different `HostImport`s HOT 1
- Introduce Host Modules HOT 2
- Introduce the Store
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 chicory.