Your message dated Sat, 7 May 2011 14:36:08 +0200
with message-id <banlktintkzky7s6bxsejd2bywquv5bo...@mail.gmail.com>
and subject line Closing #563050
has caused the Debian Bug report #563050,
regarding beast: FTBFS on some architectures (infinite loop?)
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
563050: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=563050
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Source: beast
Version: 0.7.1-5.2
Severity: serious
Tags: patch
Justification: no longer builds from source

beast failed to build from some on some architectures:

| gdk-pixbuf-csource --name=keyboard_pixstream keyboard.png >xgen-keyboard.c-temp && cp 
xgen-keyboard.c-temp keyboard.c && rm -f xgen-keyboard.c-temp
| gdk-pixbuf-csource --name=virtual_input_pixstream virtual-input.png 
>xgen-virtual-input.c-temp && cp xgen-virtual-input.c-temp virtual-input.c && 
rm -f xgen-virtual-input.c-temp
| gdk-pixbuf-csource --name=virtual_output_pixstream virtual-output.png 
>xgen-virtual-output.c-temp && cp xgen-virtual-output.c-temp virtual-output.c 
&& rm -f xgen-virtual-output.c-temp
| gdk-pixbuf-csource --name=virtual_synth_pixstream virtual-synth.png 
>xgen-virtual-synth.c-temp && cp xgen-virtual-synth.c-temp virtual-synth.c && 
rm -f xgen-virtual-synth.c-temp
| gdk-pixbuf-csource --name=waveosc_pixstream waveosc.png >xgen-waveosc.c-temp && cp 
xgen-waveosc.c-temp waveosc.c && rm -f xgen-waveosc.c-temp
| make[4]: Leaving directory `/build/buildd/beast-0.7.1/bse/icons'
| Making all in zintern
| make[4]: Entering directory `/build/buildd/beast-0.7.1/bse/zintern'
| ../../birnet/birnet-zintern -b -z wave-mono ./wave-mono.bse gus-patch 
./gus-patch.bse > xgen-bzc           \
|       && echo "static const BseZFile bse_zfiles[] = {" >> xgen-bzc            
        \
|       && for i in wave-mono gus-patch ; do                            \
|               uname=$(echo $i | tr a-z- A-Z_);                                
        \
|               echo "  { \"$i\", $uname""_SIZE, "        >>xgen-bzc;           
            \
|               echo "    $uname""_DATA, G_N_ELEMENTS ($uname""_DATA) }," 
>>xgen-bzc;       \
|       done                                                                    
        \
|       && echo "};" >> xgen-bzc                                                
        \
|       && cp xgen-bzc bse-zfile.c                                              
                \
|       && rm -f xgen-bzc
| make[2]: make[3]: make[4]: *** [all-recursive] Terminated
| *** [all-recursive] Terminated
| *** [bse-zfile.c] Terminated
| make[1]: *** [all] Terminated
| make: *** [build-stamp] Terminated
| Build killed with signal 15 after 150 minutes of inactivity

The full build log is available here:
https://buildd.debian.org/fetch.cgi?pkg=beast&arch=powerpc&ver=0.7.1-5.2&stamp=1262051092&file=log&as=raw

My theory why that happens is as follows:

glib defines an external g_atomic_pointer_get() function *and*
g_atomic_pointer_get macro. On some architectures the macro expands to
a g_atomic_pointer_get function call. Beast defines its own g_atomic_pointer_get function (it is C++ and it has a slightly different prototype, so that's allowed) with g_atomic_pointer_get macro call inside. Thus, we have an infinite recursion. Thanks to -O2's tail recursive call optimizations we end up with infinite loop rather than crash caused by stack overflow.

g_atomic_int_get() function is similarly affected.

I believe that the attached patch fixes this bug. However, it has *not* been tested on any affected architecture.

--
Jakub Wilk
Index: beast-0.7.1/birnet/birnetthreadimpl.cc
===================================================================
--- beast-0.7.1.orig/birnet/birnetthreadimpl.cc	2009-12-29 23:33:24.000000000 +0100
+++ beast-0.7.1/birnet/birnetthreadimpl.cc	2009-12-29 23:34:24.000000000 +0100
@@ -1481,22 +1481,17 @@
   abort(); /* silence compiler */
 }
 
-#ifdef g_atomic_int_get
 static int
-(g_atomic_int_get) (volatile int *atomic)
+birnet_atomic_int_get (volatile int *atomic)
 {
   return g_atomic_int_get (atomic);
 }
-#endif
 
-#ifdef g_atomic_pointer_get
 static void*
-(g_atomic_pointer_get) (void * volatile *atomic)
+birnet_atomic_pointer_get (void * volatile *atomic)
 {
   return (void*) g_atomic_pointer_get (atomic);
 }
-#endif
-
 
 static BirnetThreadTable fallback_thread_table = {
   NULL, /* mutex_chain4init */
@@ -1506,7 +1501,7 @@
   NULL, /* cond_chain4init */
   NULL, /* cond_unchain */
   (void (*) (volatile void*, volatile void*))                 g_atomic_pointer_set,
-  (void*(*) (volatile void*))                                 g_atomic_pointer_get,
+  (void*(*) (volatile void*))                                 birnet_atomic_pointer_get,
   (int  (*) (volatile void*, volatile void*, volatile void*)) g_atomic_pointer_compare_and_exchange,
   g_atomic_int_set,
   g_atomic_int_get,
@@ -1514,7 +1509,7 @@
   (void (*) (volatile  int*,  int))       g_atomic_int_add,
   (int  (*) (volatile  int*,  int))       g_atomic_int_exchange_and_add,
   (void (*) (volatile uint*, uint))       g_atomic_int_set,
-  (uint (*) (volatile uint*))             g_atomic_int_get,
+  (uint (*) (volatile uint*))             birnet_atomic_int_get,
   (int  (*) (volatile uint*, uint, uint)) g_atomic_int_compare_and_exchange,
   (void (*) (volatile uint*, uint))       g_atomic_int_add,
   (uint (*) (volatile uint*, uint))       g_atomic_int_exchange_and_add,

--- End Message ---
--- Begin Message ---
Version: 0.7.4-1

Hi,

the latest upload of beast should fix this.

Regards,

-- 
Alessio Treglia          | www.alessiotreglia.com
Debian Developer         | ales...@debian.org
Ubuntu Core Developer    | quadris...@ubuntu.com
0FEC 59A5 E18E E04F 6D40 593B 45D4 8C7C DCFC 3FD0


--- End Message ---

Reply via email to