[skf] Workaround for gcc48 build failure (dyn_table_gen segfault)

Mamoru Tasaka mtasaka at fedoraproject.org
Thu Jan 10 03:04:19 UTC 2013


commit e2e3ca2532d45bc88fdee3564a2b90ee66941fd2
Author: TASAKA Mamoru <mtasaka at localhost.localdomain>
Date:   Thu Jan 10 12:03:49 2013 +0900

    Workaround for gcc48 build failure (dyn_table_gen segfault)

 skf-1.99.0-gcc48-dyntable-overflow.patch |   15 +++++++++++++++
 skf.spec                                 |   15 +++++++++++++--
 2 files changed, 28 insertions(+), 2 deletions(-)
---
diff --git a/skf-1.99.0-gcc48-dyntable-overflow.patch b/skf-1.99.0-gcc48-dyntable-overflow.patch
new file mode 100644
index 0000000..3600f77
--- /dev/null
+++ b/skf-1.99.0-gcc48-dyntable-overflow.patch
@@ -0,0 +1,15 @@
+--- skf-1.99/dyn_table.c.gcc48	2012-01-04 23:27:31.000000000 +0900
++++ skf-1.99/dyn_table.c	2013-01-10 11:15:51.106876647 +0900
+@@ -45140,7 +45140,12 @@
+     for (j=0;j<BIG5_OFFSET;j++) {  /* 8140 - */
+     	big5a_uni_byte[j] = big5uao_81_uni_byte[j];
+     };
++/* FIXME apparent buffer overflow */
++#if 0
+     for (j=0;j<HKSCS_FA_LEN;j++) {  /* fa00 - */
++#else
++    for (j=0;j<950;j++) {  /* fa00 - */ /* ???? */
++#endif
+ 	big5a_uni_byte[BIG5P_TBL_LEN+j-950] = big5uao_fa_uni_byte[j];
+     };
+     for (j=0;j<HKSCS_C6_LEN;j++) {  /* c640 - */
diff --git a/skf.spec b/skf.spec
index 5015dd1..37748d6 100644
--- a/skf.spec
+++ b/skf.spec
@@ -7,7 +7,7 @@
 %global	mainver	1.99.0
 %undefine	betaver	
 
-%global	fedoraver	1
+%global	fedoraver	2
 
 %global	enable_python3	0
 %if 0%{?fedora} >= 13
@@ -18,7 +18,7 @@
 
 Name:		skf
 Version:	%{mainver}
-Release:	%{?betaver:0.}%{fedoraver}%{?betaver:.%betaver}%{?dist}.2
+Release:	%{?betaver:0.}%{fedoraver}%{?betaver:.%betaver}%{?dist}
 Summary:	Utility binary files in Simple Kanji Filter
 
 Group:		Applications/Text
@@ -26,6 +26,11 @@ License:	BSD and MIT and UCD
 URL:		http://sourceforge.jp/projects/skf/
 Source0:	http://dl.sourceforge.jp/skf/%{repoid}/skf_%{mainver}%{?betaver}.tar.gz
 Source1:	skf-basic-test.sh
+# Workaround for gcc48 build failure (dyn_table_gen segfault)
+# Not sure this fix is correct, however the rebuilt binary is the same
+# (on F-17)
+# http://sourceforge.jp/ticket/browse.php?group_id=353&tid=30456
+Patch0:	skf-1.99.0-gcc48-dyntable-overflow.patch
 
 # common BR
 BuildRequires:	gettext
@@ -113,6 +118,9 @@ cp -p %SOURCE1 .
 
 pushd main
 
+# Patches
+%patch0 -p1 -b .gcc48
+
 ## Fixing build error
 # Fix pythonext build error on F-14+
 sed -i -e '/python_version=.*substr/s|7,-3|7,3|' configure
@@ -312,6 +320,9 @@ rm -rf %{buildroot}
 %{perl_vendorarch}/auto/skf/
 
 %changelog
+* Thu Jan 10 2013 Mamoru TASAKA <mtasaka at fedoraproject.org> - 1.99.0-2
+- Workaround for gcc48 build failure (dyn_table_gen segfault)
+
 * Sat Jul 21 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.99.0-1.2
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
 


More information about the scm-commits mailing list