diff options
| author | Pierre-Marie Pédrot | 2021-03-25 17:23:03 +0100 |
|---|---|---|
| committer | Pierre-Marie Pédrot | 2021-03-26 12:15:39 +0100 |
| commit | 35c1d9e7add9a415d1406e6bb1eae7bd67ba5357 (patch) | |
| tree | 05ab0584788f59f5e97ffd65049a4a2e7c8eef2e /kernel/vmvalues.ml | |
| parent | 71453f1643b55679d44caee30ce5541b5aa47263 (diff) | |
Never store persistent arrays as VM structured values.
Bytecode execution of persistent arrays can modify structured values meant
to be marshalled in vo files. Some VM values are not marshallable, leading
to this anomaly.
There are further issues with the use of a hash table to store structured
values, since they rely on structural equality and hashing functions.
Persistent arrays are not safe in this context.
Fixes #14006: Coqc cannot save .vo files containing primitive arrays.
Diffstat (limited to 'kernel/vmvalues.ml')
| -rw-r--r-- | kernel/vmvalues.ml | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/kernel/vmvalues.ml b/kernel/vmvalues.ml index 9944458d6b..938d1f28f7 100644 --- a/kernel/vmvalues.ml +++ b/kernel/vmvalues.ml @@ -459,8 +459,6 @@ let val_of_int i = (Obj.magic i : values) let val_of_uint i = (Obj.magic i : structured_values) -let val_of_parray p = (Obj.magic p : structured_values) - let atom_of_proj kn v = let r = Obj.new_block proj_tag 2 in Obj.set_field r 0 (Obj.repr kn); |
