void-packages/srcpkgs/iverilog/patches/lxt2.patch
Đoàn Trần Công Danh 986c0a7d5e srcpkgs/i*: convert patches to -Np1
```sh
git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" |
while read template; do
	for p in ${template%/template}/patches/*; do
		sed -i '
			\,^[+-][+-][+-] /dev/null,b
			/^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b
			s,^[*][*][*] ,&a/,
			/^--- /{
				s,\(^--- \)\(./\)*,\1a/,
				s,[.][Oo][Rr][Ii][Gg]\([	/]\),\1,
				s/[.][Oo][Rr][Ii][Gg]$//
				s/[.]patched[.]\([^.]\)/.\1/
				h
			}
			/^+++ -/{
				g
				s/^--- a/+++ b/
				b
			}
			s,\(^+++ \)\(./\)*,\1b/,
		' "$p"
	done
	sed -i '/^patch_args=/d' $template
done
```
2021-06-20 13:17:29 +07:00

15 lines
529 B
Diff

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.
--- a/vpi/sys_lxt2.c 2020-05-13 00:25:45.070186668 +0200
+++ b/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;