korlibs / korlibs/korge

WASM: Can't catch index out of bounds and divide by 0 exceptions?

Open
#2,145 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Kotlin
Stars
3k
Forks
148
Avg merge
13h 44m
Merged PRs (30d)
1

Description

https://youtrack.jetbrains.com/issue/KT-59081

https://youtrack.jetbrains.com/issue/KT-59081/WASM-Cant-catch-index-out-of-bounds-and-divide-by-0-exceptions#focus=Comments-27-9038762.0-0

> Now the OOB exceptions are not throwing in a matter of code size and code speed.
Please use `-Xwasm-enable-array-range-checks` to enable OOB checking.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reading the linked YouTrack issue KT-59081 and reproducing the behavior with and without -Xwasm-enable-array-range-checks. No repository file or test is named; done would require identifying the relevant Kotlin/WASM implementation or upstream limitation and verifying whether index-out-of-bounds and divide-by-zero exceptions can be caught.

Written by the indexing model from the issue text.

Assessment

Tech stack
kotlin, wasm
Domain
compilers
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.