Open dontlaugh opened 3 months ago
This is on my work MacOS, an arm machine. The output of uname -a:
uname -a
Darwin P0KD4MVQG4 23.5.0 Darwin Kernel Version 23.5.0: Wed May 1 20:14:38 PDT 2024; root:xnu-10063.121.3~5/RELEASE_ARM64_T6020 arm64
This is oils-for-unix version 0.22.0 compiled from source.
Here is a script that segfaults.
#!/usr/bin/env ysh var WEIGHT = ${1:-} case (WEIGHT) { "-" { echo "got nothing" } (else) { echo $WEIGHT }
The missing } (closing curly brace) triggers it, as far as I can tell.
}
I reproduced this, thank you!
I just pushed a fix for this -- it was related to not handling EOF in the lookahead we do to parse case
Thanks for the report!
This is on my work MacOS, an arm machine. The output of
uname -a
:This is oils-for-unix version 0.22.0 compiled from source.
Here is a script that segfaults.
The missing
}
(closing curly brace) triggers it, as far as I can tell.