From 3a04bf6c4216ee9f532ff217da229f24e0fbf8e5 Mon Sep 17 00:00:00 2001 From: Damien Doligez Date: Tue, 12 Nov 2024 15:57:43 +0100 Subject: [PATCH 1/2] change magic number for fingerprint files Signed-off-by: Damien Doligez --- src/backend/fpfile.ml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/backend/fpfile.ml b/src/backend/fpfile.ml index 2b81d0d5..8dfe71ea 100644 --- a/src/backend/fpfile.ml +++ b/src/backend/fpfile.ml @@ -153,8 +153,8 @@ open V13 let fptbl = ref (Hashtbl.create 500 : V13.tbl) -let old_magic_number = 20101013 -let magic_number = 20210223 +let old_magic_numbers = [20101013; 20210223] +let magic_number = 20241112 let write_fp_table oc = output_value oc magic_number; @@ -568,7 +568,7 @@ let load_fingerprints_aux file = if Sys.file_exists file then begin let ic = open_in_bin file in let magic = Marshal.from_channel ic in - if magic = old_magic_number then + if List.mem magic old_magic_numbers then raise(FpFileOlderMagicNumber); if magic <> magic_number then raise(FpFileCorrupted); let v = Marshal.from_channel ic in From 9dc2ea3aa31a257570d7b061fd12d2e81b010936 Mon Sep 17 00:00:00 2001 From: Damien Doligez Date: Tue, 19 Nov 2024 16:31:38 +0100 Subject: [PATCH 2/2] update comment --- src/backend/fpfile.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/fpfile.ml b/src/backend/fpfile.ml index 8dfe71ea..684fc225 100644 --- a/src/backend/fpfile.ml +++ b/src/backend/fpfile.ml @@ -126,7 +126,7 @@ module V13 = struct (* The key is the MD5 converted to hex. *) (* File format: - - magic number as a marshalled integer = 20101013 + - magic number as a marshalled integer = 20241112 - Fpver13 of tbl - any number of (Digest.t, sti list) pairs *)