out of bounds memory access: attempted to access address: 96010253 but limit is: 2293760 and size: 4
- Dominant language
- Java
- Stars
- 1.1k
- Forks
- 71
- PR merge metrics
- No merged PRs in 30d
Description
## Issue
When I use VirtualThread in a java chicory/wasm application, then chicory `1.7.5` is reporting such an error. Is there a trick to fix such a java chicory error
```
ERROR parsing src/main/resources/application.properties: Failed to parse string
io.roastedroot.treesitter.TreeSitterException: Failed to parse string
at io.roastedroot.treesitter.TreeSitter.parseString(TreeSitter.java:128)
at io.roastedroot.treesitter.TreeSitterParser.parseString(TreeSitterParser.java:18)
at dev.snowdrop.treesitter4j.command.ParseCommand.lambda$execute$0(ParseCommand.java:125)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:545)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:328)
at java.base/java.util.concurrent.ThreadPerTaskExecutor$ThreadBoundFuture.run(ThreadPerTaskExecutor.java:323)
at java.base/java.lang.VirtualThread.run(VirtualThread.java:456)
ERROR parsing config.yaml: out of bounds memory access: attempted to access address: 1047344 but limit is: 2293760 and size: 1835272
com.dylibso.chicory.runtime.WasmRuntimeException: out of bounds memory access: attempted to access address: 1047344 but limit is: 2293760 and size: 1835272
ERROR parsing README.md: out of bounds memory access: attempted to access address: 96010253 but limit is: 2293760 and size: 4
at com.dylibso.chicory.runtime.ByteBufferMemory.checkBounds(ByteBufferMemory.java:302)
at com.dylibso.chicory.runtime.ByteBufferMemory.readBytes(ByteBufferMemory.java:364)
at com.dylibso.chicory.wasi.WasiPreview1.fdWrite(WasiPreview1.java:941)
```
Question: What is then the proper way to use concurrency, multithreads/tasks using Chicory Runtime ?
Contributor guide
Assessment
This issue has not been assessed yet.