https://github.com/mit-plv/fiat-crypto
Revision 135cab8f0bca00cda9f0dfa00073881e7e3f5a58 authored by Samuel Gruetter on 08 December 2021, 05:39:00 UTC, committed by Samuel Gruetter on 08 December 2021, 05:39:00 UTC
"exp_5789...", while caller (montladder) used "fe25519_inv" to call it To find in which phase the compilation fails, one can debug as follows: Goal compile (compile_ext_call (funname_env:=SortedListString.map)) (map.of_list (skipn 2 funcs)) = None. Proof. unfold compile, compose_phases. match goal with | |- match ?x with _ => _ end = None => let x' := eval vm_compute in x in change_no_check x with x' end. cbv beta iota. match goal with | |- match ?x with _ => _ end = None => let x' := eval vm_compute in x in change_no_check x with x' end. cbv beta iota. match goal with | |- match ?x with _ => _ end = None => let x' := eval vm_compute in x in change_no_check x with x' end. cbv beta iota. cbv [LowerPipeline.riscvPhase]. match goal with | |- match ?x with _ => _ end = None => let x' := eval vm_compute in x in change_no_check x with x' end. This shows that everything goes well until `riscvPhase`, which calls `compiler.FitsStack.stack_usage`, which returns `None`, which should only happen if there's a stackalloc whose number of bytes is not divisible by bytes_per_word, or if a function calls a non-existent function, which was the problem here.
1 parent 3c3d1f7
Tip revision: 135cab8f0bca00cda9f0dfa00073881e7e3f5a58 authored by Samuel Gruetter on 08 December 2021, 05:39:00 UTC
compiler returned None because fe25519_inv was misnamed
compiler returned None because fe25519_inv was misnamed
Tip revision: 135cab8
File | Mode | Size |
---|---|---|
.github | ||
coqprime @ d4bcfa8 | ||
etc | ||
fiat-amd64 | ||
fiat-bedrock2 | ||
fiat-c | ||
fiat-go | ||
fiat-java | ||
fiat-json | ||
fiat-rust | ||
fiat-zig | ||
inversion | ||
output-tests | ||
rewriter @ dbc67ab | ||
rupicola @ a323ae4 | ||
src | ||
.dir-locals.el | -rw-r--r-- | 2.3 KB |
.gitattributes | -rw-r--r-- | 380 bytes |
.gitignore | -rw-r--r-- | 5.4 KB |
.gitmodules | -rw-r--r-- | 378 bytes |
.mailmap | -rw-r--r-- | 6.5 KB |
AUTHORS | -rw-r--r-- | 648 bytes |
CONTRIBUTORS | -rw-r--r-- | 1.2 KB |
COPYRIGHT | -rw-r--r-- | 375 bytes |
LICENSE-APACHE | -rw-r--r-- | 638 bytes |
LICENSE-BSD-1 | -rw-r--r-- | 1.1 KB |
LICENSE-MIT | -rw-r--r-- | 1.1 KB |
Makefile | -rw-r--r-- | 36.8 KB |
Makefile-coq.local | -rw-r--r-- | 1.5 KB |
Makefile.local.common | -rw-r--r-- | 61 bytes |
README.md | -rw-r--r-- | 38.3 KB |
_CoqProject | -rw-r--r-- | 16.0 KB |
boringssl_notes.md | -rw-r--r-- | 13.3 KB |
crypto-defects.md | -rw-r--r-- | 6.5 KB |
folkwisdom.md | -rw-r--r-- | 17.2 KB |
primes.txt | -rw-r--r-- | 1.3 KB |
Computing file changes ...