You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`offset` can be negative. We must check this before using it to index
into `alex_check` array.
The issue is that 'check' is unlifted, hence it's a strict binding. The
way it was written before, it was evaluated before checking that offset
was greater than or equal to 0. I've just moved the binding after the
check.
Caught with GHC's JS backend running Cabal-syntax's lexer. The JS
backend uses arrays to represent unlifted string literals, so the bug
results in out-of-bound JS array access. With the native backends the
out-of-bound array access might trigger a segfault but it is more likely
to just read some random values in the heap. That's why it went
unnoticed.
0 commit comments