diff --git a/libwvstreams.spec b/libwvstreams.spec index 13b3394..9ddc7bc 100644 --- a/libwvstreams.spec +++ b/libwvstreams.spec @@ -1,6 +1,6 @@ Name: libwvstreams Version: 4.6.1 -Release: 4%{?dist} +Release: 5%{?dist} Summary: WvStreams is a network programming library written in C++ Source: http://wvstreams.googlecode.com/files/wvstreams-%{version}.tar.gz #fixed multilib issue (bug #192717) @@ -16,6 +16,7 @@ Patch4: wvstreams-4.6.1-statinclude.patch Patch5: wvstreams-4.6.1-gcc.patch # fix missing unistd.h header for gcc 4.7 Patch6: wvstreams-4.6.1-gcc47.patch +Patch7: wvstreams-4.6.1-magic.patch URL: http://alumnit.ca/wiki/index.php?page=WvStreams Group: System Environment/Libraries BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -44,6 +45,7 @@ needed for developing applications which use WvStreams. %patch4 -p1 -b .statinclude %patch5 -p1 -b .gcc %patch6 -p1 -b .gcc47 +%patch7 -p1 -b .magic %build # --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) @@ -96,6 +98,9 @@ rm -rf $RPM_BUILD_ROOT %postun -p /sbin/ldconfig %changelog +* Mon Jun 04 2012 Michal Sekletar - 4.6.1-5 +- Fix crashes caused by compiler optimizations, #812651 + * Thu Jan 05 2012 Jan Synáček - 4.6.1-4 - Fix missing unistd.h header for gcc 4.7 diff --git a/wvstreams-4.6.1-magic.patch b/wvstreams-4.6.1-magic.patch new file mode 100644 index 0000000..05928a3 --- /dev/null +++ b/wvstreams-4.6.1-magic.patch @@ -0,0 +1,35 @@ +diff -up wvstreams-4.6.1/include/wvtask.h.magic wvstreams-4.6.1/include/wvtask.h +--- wvstreams-4.6.1/include/wvtask.h.magic 2008-07-14 21:11:35.000000000 +0200 ++++ wvstreams-4.6.1/include/wvtask.h 2012-06-03 17:24:47.909187849 +0200 +@@ -45,7 +45,8 @@ class WvTask + typedef void TaskFunc(void *userdata); + + static int taskcount, numtasks, numrunning; +- int magic_number, *stack_magic; ++ int volatile magic_number; ++ int *stack_magic; + WvString name; + int tid; + +@@ -84,7 +85,7 @@ class WvTaskMan + static WvTaskMan *singleton; + static int links; + +- static int magic_number; ++ static int volatile magic_number; + static WvTaskList all_tasks, free_tasks; + + static void get_stack(WvTask &task, size_t size); +diff -up wvstreams-4.6.1/utils/wvtask.cc.magic wvstreams-4.6.1/utils/wvtask.cc +--- wvstreams-4.6.1/utils/wvtask.cc.magic 2009-05-13 23:42:52.000000000 +0200 ++++ wvstreams-4.6.1/utils/wvtask.cc 2012-06-03 14:29:09.729656804 +0200 +@@ -58,7 +58,8 @@ char *alloca (); + int WvTask::taskcount, WvTask::numtasks, WvTask::numrunning; + + WvTaskMan *WvTaskMan::singleton; +-int WvTaskMan::links, WvTaskMan::magic_number; ++int WvTaskMan::links; ++int volatile WvTaskMan::magic_number; + WvTaskList WvTaskMan::all_tasks, WvTaskMan::free_tasks; + ucontext_t WvTaskMan::stackmaster_task, WvTaskMan::get_stack_return, + WvTaskMan::toplevel;