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
The following program causes Cryptol to panic when evaluated:
// Main.cry
f : [0] -> [inf][0]
f = split
main : [0]
main = (f []) @ 0
$ ~/Software/cryptol-3.2.0/bin/cryptol Main.cry -c 'main'
Loading module Cryptol
Loading module Main
cryptol: You have encountered a bug in Cryptol's implementation.
*** Please create an issue at https://github.com/GaloisInc/cryptol/issues
%< ---------------------------------------------------
Revision: 1bcb75c5be92034b7b29155ab1f5d72780838605
Branch: release-3.2.0 (uncommited files present)
Location: [Eval] fromSeq
Message: not a sequence
splitV
word:0
CallStack (from HasCallStack):
panic, called at src/Cryptol/Utils/Panic.hs:21:9 in cryptol-3.2.0-inplace:Cryptol.Utils.Panic
panic, called at src/Cryptol/Backend/Monad.hs:410:17 in cryptol-3.2.0-inplace:Cryptol.Backend.Monad
evalPanic, called at src/Cryptol/Eval/Value.hs:413:18 in cryptol-3.2.0-inplace:Cryptol.Eval.Value
%< ---------------------------------------------------
The text was updated successfully, but these errors were encountered:
Previously, `splitV` would assume that if you were splitting a value `val` into
something of type `[inf][each]`, then `val` must be a stream of type of `[inf *
each]` (i.e., of type `[inf]`). This is not true in the corner case where
`each` equals `0`, however. In that case, `val` is of type `[0]`, which is a
word, not a stream. As such, we need to ensure that we do not call `fromSeq` on
`val`, which crashes if `val` is not a stream or sequence.
Fixes#1749.
The following program causes Cryptol to panic when evaluated:
The text was updated successfully, but these errors were encountered: