From f63a9c0836d08e75e355a6d4561b5ce56d00a9c4 Mon Sep 17 00:00:00 2001 From: Jeremy Dubreil Date: Tue, 3 Apr 2018 21:19:20 -0700 Subject: [PATCH] [infer][backend] the sserialization should not swallow the Sys_error when unmarshalling data from strings Summary: It feels risky to me to swallow the `Sys_error` here since this could hide deeper issues with the deserialization of summaries. This is only used with the Buck Integration for Java when extracting the summaries from the jar files. Reviewed By: sblackshear Differential Revision: D7490123 fbshipit-source-id: 68cd556 --- infer/src/base/Serialization.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/infer/src/base/Serialization.ml b/infer/src/base/Serialization.ml index 2828652a9..24e05ed86 100644 --- a/infer/src/base/Serialization.ml +++ b/infer/src/base/Serialization.ml @@ -60,7 +60,7 @@ let create_serializer (key: Key.t) : 'a serializer = else Some value in let read_from_string (str: string) : 'a option = - try read_data (Marshal.from_string str 0) "string" with Sys_error _ -> None + read_data (Marshal.from_string str 0) "string" in (* The reads happen without synchronization. The writes are synchronized with a .lock file. *)