p11_library_mutex problems on W32
LRN
lrn1986 at gmail.com
Mon Apr 1 11:14:44 PDT 2013
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
p11-kit.exe crashed on me.
Tried to debug it, discovered that it crashes in p11_lock().
Debugged it further.
Turns out, the value gdb prints for &p11_library_mutex changes
depending on which part of the code it's in. It's one value inside
tool.c and any code called from the .exe file, and another in code
called from DllMain.
Then i've noticed that p11_library_mutex is not even exported, because
it doesn't match -export-symbols-regex. Renamed it to
p11_kit_library_mutex. Now it's exported, but p11-kit.exe doesn't
import it.
At this point i gave up and hacked a function-based interface to
p11_library_mutex. Then set a break point at p11_kit_library_mutex()
function i wrote - and discovered that even with functional interface
it has two versions of that function - one from the .exe, the other -
from the .dll (and, accordingly, breakpoint was set in 2 locations).
Looked up how p11-kit is linked and (oh, the horror!) discovered that
it's linked to libp11-library.a (statically, obviously). The very file
that does all these mutex-related things. And libp11-kit is linked to
it too. Statically. Which is how they get two versions of everything.
So...what to do? And what was your intention, exactly?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (MingW32)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iQEcBAEBAgAGBQJRWc6TAAoJEOs4Jb6SI2Cw1IIH/2Dxk4cR0FDOhR9WpRhPjr0o
0tU9+7z6AIVD9SMph8g/arFk4bXnQvqDDJIICs1M5FRmew/iVczKIMJJ/PO6nUZ0
VBCWnn4dt7f6s/bvII/1VBmdo0+x1E/DTb59S3vS754ci1oczvc8F61cqo/6LjYn
MJ+v2HmITUlQWz7Jr0rB86v8lMuiib/wfEAF6kuy/Q47Cg+qaAy7g6FScfEssN+7
ThU/qIS6mmXib+YF2/rPK5bJY3YdVTWF066nEXsBKmrHWZ0Tx4KBHXhGX2v2KaUi
EYLqQaOwrOcfHqRZRKSwR3xvvJOk9CZlVpPS80SItgRJE97hC+bfjuANJINhoZk=
=joR/
-----END PGP SIGNATURE-----
More information about the p11-glue
mailing list