From 10c190f076b92bf3df9077ec4ff6d211db98dbc5 Mon Sep 17 00:00:00 2001 From: Anirudh Mangipudi Date: Thu, 6 Feb 2014 11:16:55 +0530 Subject: Bug#14211271 ISSUES WITH SSL ON DEBIAN WHEEZY I386 AND KFREEBSD-I386 Problem: It was reported that on Debian and KFreeBSD platforms, i386 architecture machines certain SSL tests are failing. main.ssl_connect rpl.rpl_heartbeat_ssl rpl.rpl_ssl1 rpl.rpl_ssl main.ssl_cipher, main.func_encrypt were the tests that were reportedly failing (crashing). The reason for the crashes are said to be due to the assembly code of yaSSL. Solution: There was initially a workaround suggested i.e., to enable -DTAOCRYPT_DISABLE_X86ASM flag which would prevent the crash, but at an expense of 4X reduction of speed. Since this was unacceptable, the fix was the functions using assembly, now input variables from the function call using extended inline assembly on GCC instead of relying on direct assembly code. --- extra/yassl/taocrypt/include/misc.hpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'extra/yassl/taocrypt/include/misc.hpp') diff --git a/extra/yassl/taocrypt/include/misc.hpp b/extra/yassl/taocrypt/include/misc.hpp index 1382d3690fb..f68abbda8da 100644 --- a/extra/yassl/taocrypt/include/misc.hpp +++ b/extra/yassl/taocrypt/include/misc.hpp @@ -124,15 +124,22 @@ void CleanUp(); // no gas on these systems ?, disable for now -#if defined(__sun__) || defined (__APPLE__) +#if defined(__sun__) + #undef TAOCRYPT_DISABLE_X86ASM #define TAOCRYPT_DISABLE_X86ASM #endif // icc problem with -03 and integer, disable for now #if defined(__INTEL_COMPILER) + #undef TAOCRYPT_DISABLE_X86ASM #define TAOCRYPT_DISABLE_X86ASM #endif +// indpedent of build system, unless ia32 asm is enabled disable it +#if !defined(TAOCRYPT_ENABLE_X86ASM) + #undef TAOCRYPT_DISABLE_X86ASM + #define TAOCRYPT_DISABLE_X86ASM +#endif // Turn on ia32 ASM for Big Integer // CodeWarrior defines _MSC_VER -- cgit v1.2.1