I managed to come up with a much simpler solution and hence a much
simpler patch, which is not linux specific and does not require /proc or
any other file parsing.

It turns out the upstream fix to mysql was on the right track, but must
have been working on a BSD system or at least something similar.  On BSD
setjmp saves signal context.  On SysV (and linux too it seems), it does
not.  This causes it to break.  By switching the code to using sigsetjmp
and siglongjmp instead, and passing the argument to explicitly save the
signal context, the problem disappears and my 486 works great.  I
verified with some debuging that it does in fact correctly detect that
my 486 does not have cpuid, and that my athlon does have cpuid.

This should be applied to mysql 5.whichever to fix 486 (and other
cpuid-less cpu) support in Etch, and Sid too for that matter.  After all
Etch is supposed to support 486s and without this fix, it does not in
many cases.  It is also a very simple change and should not cause any
new problems.  I would think that this qualifies as release critical.

--
Len Sorensen

--- mysql-dfsg-5.0-5.0.36.ori/extra/yassl/taocrypt/src/misc.cpp 2007-02-20 
12:49:38.000000000 -0500
+++ mysql-dfsg-5.0-5.0.36/extra/yassl/taocrypt/src/misc.cpp     2007-04-05 
12:29:34.000000000 -0400
@@ -167,10 +167,10 @@
 #ifdef TAOCRYPT_X86ASM_AVAILABLE
 
 #ifndef _MSC_VER
-    static jmp_buf s_env;
+    static sigjmp_buf s_env;
     static void SigIllHandler(int)
     {
-        longjmp(s_env, 1);
+        siglongjmp(s_env, 1);
     }
 #endif
 
@@ -199,7 +199,7 @@
         return false;
 
     bool result = true;
-    if (setjmp(s_env))
+    if (sigsetjmp(s_env,1))
         result = false;
     else 
         __asm__ __volatile


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to