From bc516ca0ee4ccf436a8b2268aeb022e5bca616c2 Mon Sep 17 00:00:00 2001 From: Johannes Date: Tue, 12 May 2020 22:02:13 +0200 Subject: [PATCH] iverilog: fix crash in lxt2 dump. --- srcpkgs/iverilog/patches/lxt2.patch | 15 +++++++++++++++ srcpkgs/iverilog/template | 4 ++-- 2 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 srcpkgs/iverilog/patches/lxt2.patch diff --git a/srcpkgs/iverilog/patches/lxt2.patch b/srcpkgs/iverilog/patches/lxt2.patch new file mode 100644 index 0000000000..ae1918a713 --- /dev/null +++ b/srcpkgs/iverilog/patches/lxt2.patch @@ -0,0 +1,15 @@ +vcd_work_terminate() calls pthread_join() on a static thread. +Do not call vcd_work_terminate() in close_dumpfile() because it was already +called before, leading to a second call to pthread_join() on the same pthread, +which is undefined behaviour. + +--- vpi/sys_lxt2.c.orig 2020-05-13 00:25:45.070186668 +0200 ++++ vpi/sys_lxt2.c 2020-05-13 00:26:09.721185704 +0200 +@@ -472,7 +472,6 @@ + + static void *close_dumpfile(void) + { +- vcd_work_terminate(); + lxt2_wr_close(dump_file); + dump_file = NULL; + return NULL; diff --git a/srcpkgs/iverilog/template b/srcpkgs/iverilog/template index 971cf2a8e1..44f1c8e0ae 100644 --- a/srcpkgs/iverilog/template +++ b/srcpkgs/iverilog/template @@ -1,13 +1,13 @@ # Template file for 'iverilog' pkgname=iverilog version=10.3 -revision=1 +revision=2 wrksrc="${pkgname}-${version/./_}" build_style=gnu-configure hostmakedepends="automake flex gperf" makedepends="readline-devel zlib-devel" short_desc="Verilog simulation and synthesis tool" -maintainer="Orphaned " +maintainer="Johannes " license="GPL-2.0-or-later, LGPL-2.1-or-later" homepage="http://iverilog.icarus.com/" distfiles="https://github.com/steveicarus/iverilog/archive/v${version/./_}.tar.gz"