[vorbis-dev] alloca() problem with CodeWarrior

Steve Nicolai snicolai at mac.com
Thu Mar 14 17:32:01 PST 2002



Phil,

I think you will also need the following patch if you push the 
optimization level
above 2 when you compile with CW 5.3.  I did have RC2 working with 
optimization at
4 with this patch.

This patch is against RC2, but the affected routine is unchanged from 
RC2.

Index: vorbis/lib/psy.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/lib/psy.c,v
retrieving revision 1.50
diff -u -2 -r1.50 psy.c
--- vorbis/lib/psy.c	2001/08/13 01:36:57	1.50
+++ vorbis/lib/psy.c	2001/09/04 05:52:47
@@ -502,4 +502,7 @@
  }

+#pragma push
+#pragma optimization_level 2
+
  static void seed_chase(float *seeds, int linesper, long n){
    long  *posstack=alloca(n*sizeof(long));
@@ -558,4 +561,6 @@
  }

+#pragma pop
+
  /* bleaugh, this is more complicated than it needs to be */
  static void max_seeds(vorbis_look_psy *p,

Steve

<p>On Friday, March 15, 2002, at 05:59  AM, Phil Burk wrote:

> THANK YOU Ben!
> I applied the 5.3 patch for CodeWarrior 5.0 on Mac OS 9 and it fixed the
> problem with alloca() corrupting the stack pointer.

<p>--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'vorbis-dev-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the Vorbis-dev mailing list