diff options
author | Maxime Dénès <mail@maximedenes.fr> | 2018-05-31 10:15:52 +0200 |
---|---|---|
committer | Maxime Dénès <mail@maximedenes.fr> | 2018-05-31 10:15:52 +0200 |
commit | 25787ae37961e8bdb2932b46d653006d25b09301 (patch) | |
tree | 82e632d14fed2246d834847e3fac97c81092b112 /kernel | |
parent | 3440a9fcc0690b66ff57a693b61dd6ccb13582c0 (diff) |
Fix #4714: Stack overflow with native compute
Values containing (retroknowledge-based) matchine integers were not
recognized as literals.
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/nativelambda.ml | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/kernel/nativelambda.ml b/kernel/nativelambda.ml index 8b61ed0c5..6db75c89a 100644 --- a/kernel/nativelambda.ml +++ b/kernel/nativelambda.ml @@ -296,15 +296,17 @@ let is_value lc = match lc with | Lval _ -> true | Lmakeblock(_,_,_,args) when Array.is_empty args -> true + | Luint (UintVal _) -> true | _ -> false - + let get_value lc = match lc with | Lval v -> v - | Lmakeblock(_,_,tag,args) when Array.is_empty args -> + | Lmakeblock(_,_,tag,args) when Array.is_empty args -> Nativevalues.mk_int tag + | Luint (UintVal i) -> Nativevalues.mk_uint i | _ -> raise Not_found - + let make_args start _end = Array.init (start - _end + 1) (fun i -> Lrel (Anonymous, start - i)) |