On 6/21/2011 8:29 AM, Ludovic Rousseau wrote:
> Hello,
>
> I try to debug a PKCS#11 program using pkcs11-spy.
> The problem is that for an unknown reason the C_Initialize() from the
> spy is calling istelf instead of the C_Initialize from OpenSC.
>
> After some 261418 calls the program crashes because of a stack
> exhaustion of something similar.
>
> With another program the pkcs11-spy works great. So the problem is not
> general :-(
IS PKCS11SPY set in the environment to point to the real opensc-pkcs11.so
>
>
> It looks like the C_Initialize symbol used by C_GetFunctionList() from
> OpenSC is resolved using the C_Initialize from the spy and not the
> C_Initialize from OpenSC.
>
> If I rename the function C_Initialize into C_InitializeX in
> src/pkcs11/pkcs11-global.c and use C_InitializeX to initialize
> pkcs11_function_list it works but I get the problem on the next
> PKCS#11 call, C_GetSlotList in my case.
>
> The program exposing the problem is a C++ one. But maybe that is not related.
> Anyone having the same problem?
>
> Any idea how to solve this?
Your other note says you tried -B symbolic,
On Solaris I had to modify the libtool to use -B direct -z defs
to avoid similar situations.
--- libtool~ Wed Aug 25 11:28:39 2010
+++ libtool Wed Aug 25 13:15:43 2010
@@ -218,7 +218,7 @@
postuninstall_cmds=""
# Commands used to build a loadable module (assumed same as above if empty)
-module_cmds=""
+module_cmds="$archive_cmds \${wl}-B \${wl}direct \${wl}-z \${wl}defs"
module_expsym_cmds=""
# Commands to strip libraries.
>
> Thanks
>
--
Douglas E. Engert <[email protected]>
Argonne National Laboratory
9700 South Cass Avenue
Argonne, Illinois 60439
(630) 252-5444
_______________________________________________
opensc-devel mailing list
[email protected]
http://www.opensc-project.org/mailman/listinfo/opensc-devel