From a6396b6b12c1674a99c099a80e3afc80e6ee2987 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edwin=20T=C3=B6r=C3=B6k?= Date: Fri, 13 Sep 2024 13:53:38 +0100 Subject: [PATCH] CA-399172: fix potential crash in Uri.of_string MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Using Lazy from a multithreaded program should raise Lazy.Undefined. However due to bugs in the OCaml runtime this was actually crashing. Update to angstrom 0.16.1 which no longer uses Lazy and avoids this crash. This was initially discovered: * https://github.com/mirage/ocaml-uri/issues/178 Fixed in Angstrom: * https://github.com/inhabitedtype/angstrom/pull/229 Runtime bug reported with potential fix from maintainers: * https://github.com/ocaml/ocaml/issues/13430 * https://github.com/ocaml/ocaml/pull/13434 There are various other usages of Lazy, but I couldn't get those to crash yet, so lets fix the known crash for now, and audit/fix the rest next. Signed-off-by: Edwin Török --- .../{angstrom.0.16.0 => angstrom.0.16.1}/opam | 42 +++++++++---------- 1 file changed, 20 insertions(+), 22 deletions(-) rename packages/upstream/{angstrom.0.16.0 => angstrom.0.16.1}/opam (78%) diff --git a/packages/upstream/angstrom.0.16.0/opam b/packages/upstream/angstrom.0.16.1/opam similarity index 78% rename from packages/upstream/angstrom.0.16.0/opam rename to packages/upstream/angstrom.0.16.1/opam index b54870c0..45a52452 100644 --- a/packages/upstream/angstrom.0.16.0/opam +++ b/packages/upstream/angstrom.0.16.1/opam @@ -1,20 +1,15 @@ opam-version: "2.0" -name: "angstrom" -version: "0.16.0" -synopsis: "Parser combinators built for speed and memory-efficiency" -description: """\ -Angstrom is a parser-combinator library that makes it easy to write efficient, -expressive, and reusable parsers suitable for high-performance applications. It -exposes monadic and applicative interfaces for composition, and supports -incremental input through buffered and unbuffered interfaces. Both interfaces -give the user total control over the blocking behavior of their application, -with the unbuffered interface enabling zero-copy IO. Parsers are backtracking by -default and support unbounded lookahead.""" maintainer: "Spiros Eliopoulos " -authors: "Spiros Eliopoulos " -license: "BSD-3-Clause" +authors: [ "Spiros Eliopoulos " ] +license: "BSD-3-clause" homepage: "https://github.com/inhabitedtype/angstrom" bug-reports: "https://github.com/inhabitedtype/angstrom/issues" +dev-repo: "git+https://github.com/inhabitedtype/angstrom.git" +build: [ + ["dune" "subst"] {dev} + ["dune" "build" "-p" name "-j" jobs] + ["dune" "runtest" "-p" name "-j" jobs] {with-test} +] depends: [ "ocaml" {>= "4.04.0"} "dune" {>= "1.8"} @@ -23,16 +18,19 @@ depends: [ "ppx_let" {with-test & >= "v0.14.0"} "ocaml-syntax-shims" {build} ] -build: [ - ["dune" "subst"] {dev} - ["dune" "build" "-p" name "-j" jobs] - ["dune" "runtest" "-p" name "-j" jobs] {with-test} -] -dev-repo: "git+https://github.com/inhabitedtype/angstrom.git" +synopsis: "Parser combinators built for speed and memory-efficiency" +description: """ +Angstrom is a parser-combinator library that makes it easy to write efficient, +expressive, and reusable parsers suitable for high-performance applications. It +exposes monadic and applicative interfaces for composition, and supports +incremental input through buffered and unbuffered interfaces. Both interfaces +give the user total control over the blocking behavior of their application, +with the unbuffered interface enabling zero-copy IO. Parsers are backtracking by +default and support unbounded lookahead.""" url { - src: "https://github.com/inhabitedtype/angstrom/archive/0.16.0.tar.gz" + src: "https://github.com/inhabitedtype/angstrom/archive/0.16.1.tar.gz" checksum: [ - "sha256=47810bd31306d57c0ac83eb3f95b1cb6f8bdda99457aa6e6bcd02f6ddb8410f0" - "md5=58ebc718a920c31ec3eb38f4aa1bea51" + "md5=a9e096b4b2b8e4e3bb17d472bbccaad0" + "sha256=143536fb4d049574c539b9990840615e078ed3dd94e1d24888293f68349a100b" ] }