Re: Thunderbird crashing when C_SignInit returns other than CKR_OK

2010-12-27 Thread Matej Kurpel
On 21. 12. 2010 15:35, Marsh Ray wrote: On 12/21/2010 06:44 AM, Matej Kurpel wrote: How can I check if I am doing something bad to the heap, please? Sadly, I am not so skilled C++ programmer (well, rather a noobish one) and I mostly don't know about the inside stuff you were talking about

Re: Thunderbird crashing when C_SignInit returns other than CKR_OK

2010-12-27 Thread Nelson B Bolyard
On 2010-12-27 01:44 PDT, Matej Kurpel wrote: If I only was able to load the source code of Thunderbird in Visual Studio, that would be great. I could debug it line-by-line as usual. You can. Download and unpack the sources from

Re: Thunderbird crashing when C_SignInit returns other than CKR_OK

2010-12-27 Thread Matej Kurpel
On 27. 12. 2010 18:15, Nelson B Bolyard wrote: On 2010-12-27 01:44 PDT, Matej Kurpel wrote: If I only was able to load the source code of Thunderbird in Visual Studio, that would be great. I could debug it line-by-line as usual. You can. Download and unpack the sources from

Re: Thunderbird crashing when C_SignInit returns other than CKR_OK

2010-12-27 Thread Nelson B Bolyard
On 2010-12-27 10:39 PDT, Matej Kurpel wrote: Wow - I was able to Attach To Process... in VS2008 and then I caused the crash deliberately. Bravo. It showed me the source code and call stack, which is great. But evaluating most of the variables returned CXX0069: Error: variable needs

Re: Thunderbird crashing when C_SignInit returns other than CKR_OK

2010-12-21 Thread Matej Kurpel
On 19. 12. 2010 9:27, Nelson Bolyard wrote: On 2010-12-16 19:21 PDT, Marsh Ray wrote: On 12/16/2010 04:39 PM, Matej Kurpel wrote: ChildEBP RetAddr Args to Child 0015f130 5fa0c52b e06d7363 0001 0003 KERNELBASE!RaiseException+0x58 (FPO: [Non-Fpo]) 0015f168 5fa14f13 0015f178 5fa7aa24

Re: Thunderbird crashing when C_SignInit returns other than CKR_OK

2010-12-21 Thread Marsh Ray
On 12/21/2010 06:44 AM, Matej Kurpel wrote: How can I check if I am doing something bad to the heap, please? Sadly, I am not so skilled C++ programmer (well, rather a noobish one) and I mostly don't know about the inside stuff you were talking about here... It's OK, everybody has to debug

Re: Thunderbird crashing when C_SignInit returns other than CKR_OK

2010-12-19 Thread Nelson Bolyard
On 2010-12-16 19:21 PDT, Marsh Ray wrote: On 12/16/2010 04:39 PM, Matej Kurpel wrote: ChildEBP RetAddr Args to Child 0015f130 5fa0c52b e06d7363 0001 0003 KERNELBASE!RaiseException+0x58 (FPO: [Non-Fpo]) 0015f168 5fa14f13 0015f178 5fa7aa24 5fa5c11c MOZCRT19!_CxxThrowException+0x46

Re: Thunderbird crashing when C_SignInit returns other than CKR_OK

2010-12-19 Thread Marsh Ray
On 12/19/2010 02:27 AM, Nelson Bolyard wrote: Yes, Mozilla builds its own CRT, which is a modified version of the MSVC CRT, whose sources come only with the pay (not free) versions of MSVC. They do this in order to replace MSVC's normal heap code (malloc) with their own JEmalloc. Mozilla's

Re: Thunderbird crashing when C_SignInit returns other than CKR_OK

2010-12-19 Thread Nelson B Bolyard
On 2010-12-19 00:56 PDT, Marsh Ray wrote: On 12/19/2010 02:27 AM, Nelson Bolyard wrote: Yes, Mozilla builds its own CRT, which is a modified version of the MSVC CRT, whose sources come only with the pay (not free) versions of MSVC. They do this in order to replace MSVC's normal heap code

Re: Thunderbird crashing when C_SignInit returns other than CKR_OK

2010-12-16 Thread Nelson Bolyard
On 2010-12-11 11:57 PDT, Matej Kurpel wrote: Ah, that's because I tried CKR_FUNCTION_NOT_SUPPORTED then and copied the wrong pkcs log. But that's not really the point since it crashes everytime, no matter which CKR_ return code I use (apart from CKR_OK) from the ones allowed by the pkcs11

Re: Thunderbird crashing when C_SignInit returns other than CKR_OK

2010-12-16 Thread Matej Kurpel
On 16. 12. 2010 14:02, Nelson Bolyard wrote: On 2010-12-11 11:57 PDT, Matej Kurpel wrote: Ah, that's because I tried CKR_FUNCTION_NOT_SUPPORTED then and copied the wrong pkcs log. But that's not really the point since it crashes everytime, no matter which CKR_ return code I use (apart from

Re: Thunderbird crashing when C_SignInit returns other than CKR_OK

2010-12-16 Thread Marsh Ray
On 12/16/2010 01:02 PM, Matej Kurpel wrote: (164c.1560): C++ EH exception - code e06d7363 (first chance) Nelson may know more specifics, but if I were you I would configure the debugger to break when C++ exceptions are thrown. (Debug menu - Event filters) When it break here, type kv100 to

Re: Thunderbird crashing when C_SignInit returns other than CKR_OK

2010-12-16 Thread Matej Kurpel
On 16. 12. 2010 21:59, Marsh Ray wrote: On 12/16/2010 01:02 PM, Matej Kurpel wrote: (164c.1560): C++ EH exception - code e06d7363 (first chance) Nelson may know more specifics, but if I were you I would configure the debugger to break when C++ exceptions are thrown. (Debug menu - Event

Re: Thunderbird crashing when C_SignInit returns other than CKR_OK

2010-12-16 Thread Marsh Ray
On 12/16/2010 04:39 PM, Matej Kurpel wrote: ChildEBP RetAddr Args to Child 0015f130 5fa0c52b e06d7363 0001 0003 KERNELBASE!RaiseException+0x58 (FPO: [Non-Fpo]) 0015f168 5fa14f13 0015f178 5fa7aa24 5fa5c11c MOZCRT19!_CxxThrowException+0x46 (FPO: [Non-Fpo]) (CONV: stdcall)

Re: Thunderbird crashing when C_SignInit returns other than CKR_OK

2010-12-11 Thread Nelson B Bolyard
Matej, Your message contains an obvious self-contradiction. Observe: On 2010-12-10 09:57 PDT, Matej Kurpel wrote: CK_RV CK_ENTRY C_SignInit(CK_SESSION_HANDLE hSession, CK_MECHANISM_PTR pMechanism, CK_OBJECT_HANDLE hKey) { return CKR_FUNCTION_CANCELED; } 89: C_SignInit

Re: Thunderbird crashing when C_SignInit returns other than CKR_OK

2010-12-11 Thread Matej Kurpel
On 11. 12. 2010 19:05, Nelson B Bolyard wrote: Matej, Your message contains an obvious self-contradiction. Observe: On 2010-12-10 09:57 PDT, Matej Kurpel wrote: CK_RV CK_ENTRY C_SignInit(CK_SESSION_HANDLE hSession, CK_MECHANISM_PTR pMechanism, CK_OBJECT_HANDLE hKey) { return

Thunderbird crashing when C_SignInit returns other than CKR_OK

2010-12-10 Thread Matej Kurpel
Hello, I am implementing a PKCS#11 module. I would like to implement authentication on my device (using a pin-pad) everytime a signature is requested from it. The idea is that on C_SignInit, I ask the user for the PIN and if the PIN is incorrect (or user has cancelled for whatever reason),