[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] Cross compiling freemint





Some traces in extract_size() should show us what happens... And why it happens only for Maanke.
Actually, it happens not only to him. I guess the reason is hypview build was disabled for a long time, I was sure it works for me too and -- it does not! So Alan, better check by yourself, too :)

Anyway, patch is pretty trivial, see attachment. Since stack size could be also negative, I guess the code was meant as check for upper boundary for negative numbers (as (2^32)/2 - 1 = 0x7fffffff is for positive ones) but for some reason it was done in that strange way.

--
MiKRO / Mystic Bytes
http://mikro.atari.org
? Makefile
? arconv
? cnm
? csize
? flags
? mintbin
? stack
? symex
Index: stack.c
===================================================================
RCS file: /mint/mintbin/src/stack.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 stack.c
--- stack.c	27 Oct 2008 16:50:30 -0000	1.1.1.1
+++ stack.c	18 May 2011 12:31:25 -0000
@@ -443,7 +443,7 @@
   /* Sanity check for 64-bit machines.  */
   if (sizeof (long) > 4
       && ((*size) > 0x7fffffff
-	  || (*size) < 0xffffffff))
+	  || (*size) < -0x80000000L))
     {
       error (EXIT_SUCCESS, 0, _("\
 stack size ``%s'' out of range: overflow in number"), optarg);