From 8d92670606f1875657a321df0e6b588cd31ef5bb Mon Sep 17 00:00:00 2001 From: Al Stone Date: Dec 07 2016 02:26:22 +0000 Subject: When Include() files are used in ASL, an extraneous free() ends up getting invoked; need to resolve this with upstream, but this patch at least allows one to continue using iasl until then. Signed-off-by: Al Stone --- diff --git a/acpica-tools.spec b/acpica-tools.spec index c9ab85f..100c058 100644 --- a/acpica-tools.spec +++ b/acpica-tools.spec @@ -35,6 +35,7 @@ Patch8: asllookup-ppc64.patch Patch9: template.patch Patch10: s390x-ptrs.patch Patch11: big-endian-v2.patch +Patch12: free.patch BuildRequires: bison patchutils flex @@ -96,6 +97,7 @@ gzip -dc %{SOURCE1} | tar -x --strip-components=1 -f - %patch9 -p1 -b .template %patch10 -p1 -b .s390x-ptrs %patch11 -p1 -b .big-endian-v2 +%patch12 -p1 -b .free cp -p %{SOURCE2} README.Fedora cp -p %{SOURCE3} iasl.1 diff --git a/free.patch b/free.patch new file mode 100644 index 0000000..5c4d291 --- /dev/null +++ b/free.patch @@ -0,0 +1,14 @@ +This prevents a segfault when an Include file does not exist. + +diff -Naur acpica-unix2-20160930/source/compiler/aslfiles.c acpica-unix2-20160930-s390/source/compiler/aslfiles.c +--- acpica-unix2-20160930/source/compiler/aslfiles.c 2016-09-30 10:43:56.000000000 -0600 ++++ acpica-unix2-20160930-s390/source/compiler/aslfiles.c 2016-12-06 18:55:08.693785207 -0700 +@@ -319,7 +319,7 @@ + if (!IncludeFile) + { + fprintf (stderr, "Could not open include file %s\n", Pathname); +- ACPI_FREE (Pathname); ++ /* ACPI_FREE (Pathname); <-- forces free() segfault */ + return (NULL); + } +