|
Message-ID: <70E4C3E4EEE441E484A442741433C8DF@ath64dual> Date: Wed, 28 Oct 2009 20:30:17 -0500 From: "JFoug" <jfoug@....net> To: <john-users@...ts.openwall.com> Subject: Problem with some of the MMX/SSE #defines #ifdef MMX_COEF /* Cygwin would not guarantee the alignment if these were declared static */ #define hmacmd5_crypt_key crypt_key #define hmacmd5_opad opad #define hmacmd5_ipad ipad #define hmacmd5_cursalt cursalt #define hmacmd5_dump dump char crypt_key[64*MMX_COEF] __attribute__ ((aligned(16))); unsigned char opad[PLAINTEXT_LENGTH*MMX_COEF] __attribute__ ((aligned(16))); unsigned char ipad[PLAINTEXT_LENGTH*MMX_COEF] __attribute__ ((aligned(16))); unsigned char cursalt[SALT_SIZE*MMX_COEF] __attribute__ ((aligned(16))); unsigned char dump[BINARY_SIZE*MMX_COEF] __attribute__((aligned(16))); static unsigned long total_len; #else This came from the file hmacMD5_fmt.c There is similar code in all of the SSE/MMX files (most at least). Look at the #defines. I know that they 'want' to do. That is to allow you in the code to use a variable opad without static, but to 'mangle' the name, so that global naming does not become a problem. However, the order of the #defines is way wrong to do that. I am not fixing now, but this is something which should either be fixed, or simply dropped since it obviously is not needed. #define hmacmd5_crypt_key crypt_key in the above code, should be #define crypt_key hmacmd5_crypt_key Thus, everywhere (in this file) you use crypt_key the pre processor will shove a hmacmd5_ name mangling 'wart' in front of it and that is what the compiler would see. I do not know if they are all like this, but some certainly are. Jim.
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.