nbdkit/0003-ocaml-Add-valgrind-sup...

56 lines
2.4 KiB
Diff

From 661994028581a397336aee4b7a846c9b1d0e4b0e Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Sun, 19 Jun 2022 18:13:34 +0100
Subject: [PATCH] ocaml: Add valgrind suppression for OCaml 4.14 bug
==3869068== Memcheck, a memory error detector
==3869068== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==3869068== Using Valgrind-3.18.1 and LibVEX; rerun with -h for copyright info
==3869068== Command: ./test_010_import.opt
==3869068==
==3869068== Syscall param sigaltstack(ss) points to uninitialised byte(s)
==3869068== at 0x49DF24B: sigaltstack (syscall-template.S:120)
==3869068== by 0x1A1365: caml_terminate_signals (in /home/rjones/d/libnbd/ocaml/tests/test_010_import.opt)
==3869068== by 0x1C0C33: caml_startup_common (in /home/rjones/d/libnbd/ocaml/tests/test_010_import.opt)
==3869068== by 0x1C0CAE: caml_main (in /home/rjones/d/libnbd/ocaml/tests/test_010_import.opt)
==3869068== by 0x15CDC1: main (in /home/rjones/d/libnbd/ocaml/tests/test_010_import.opt)
==3869068== Address 0x1ffeffe500 is on thread 1's stack
==3869068== in frame #1, created by caml_terminate_signals (???:)
==3869068==
==3869068== Syscall param sigaltstack(ss) points to uninitialised byte(s)
==3869068== at 0x49DF24B: sigaltstack (syscall-template.S:120)
==3869068== by 0x1A1365: caml_terminate_signals (in /home/rjones/d/libnbd/ocaml/tests/test_010_import.opt)
==3869068== by 0x1B1B6F: caml_do_exit (in /home/rjones/d/libnbd/ocaml/tests/test_010_import.opt)
==3869068== by 0x15CDC8: main (in /home/rjones/d/libnbd/ocaml/tests/test_010_import.opt)
==3869068== Address 0x1ffeffe4d0 is on thread 1's stack
==3869068== in frame #1, created by caml_terminate_signals (???:)
(cherry picked from libnbd commit 73dec295f3bbdf8afbfd548eb5a776dee27b0ac0)
(cherry picked from commit e586ca637dfb7d2b4629248cb067a980ccf324f3)
---
valgrind/ocaml.suppressions | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/valgrind/ocaml.suppressions b/valgrind/ocaml.suppressions
index 8bafc885..fd289c51 100644
--- a/valgrind/ocaml.suppressions
+++ b/valgrind/ocaml.suppressions
@@ -46,3 +46,13 @@
...
fun:caml_setup_stack_overflow_detection
}
+
+# Potential bug in OCaml 4.14
+# https://github.com/ocaml/ocaml/issues/11335
+{
+ caml_terminate_signals_uninitialized_sigaltstack
+ Memcheck:Param
+ sigaltstack(ss)
+ fun:sigaltstack
+ fun:caml_terminate_signals
+}
--
2.31.1