Subject: | Symbol mismatch when used in Apache mod_perl |
Date: | Fri, 05 Dec 2014 11:38:42 -0500 |
To: | bug-Crypt-ScryptKDF [...] rt.cpan.org |
From: | Sylvain Falardeau <sylvainf [...] xsoli.com> |
I tested the package in a simple script and everything worked fine.
Then when I tried running it under mod_perl, it SIGSEGV. I used GDB on
Apache's process to try to understand why and the stack trace pointed to
one of the SHA function used in the package. But the trace pointed one
with the same name in libcrypto.
I then renamed all the exported functions in sha256.c to use scryptkdf_
as a prefix and searched and replace them in the code. It fixed the SIGSEGV.
Instead of renaming the SHA functions, I suggest you make them static
and merge the code of sha256.c with the main scrypt functions.
--
Sylvain Falardeau