null instruction ptr bugcheck in regexp
Hello!
I am using boost regexp to do string/expression match. I got several dump files that have the same call stack when the crash happends. What my code does is copying user buffer (containing string to be mached) to an internal allocated buffer and then call boost regexp functions.
From the following result of windbg's "analyze", can you tell what cause the null intrstrucation ptr? I check the memory that contains the string to macht and didn't find any wrong.
Also, btw, where can I find boost pdb?
Thank you.
====================================================
FAULTING_IP:
+0
00000000 ?? ???
EXCEPTION_RECORD: ffffffff -- (.exr 0xffffffffffffffff)
ExceptionAddress: 00000000
ExceptionCode: c0000005 (Access violation)
ExceptionFlags: 00000000
NumberParameters: 2
Parameter[0]: 00000000
Parameter[1]: 00000000
Attempt to read from address 00000000
PROCESS_NAME: nlca_service.exe
ERROR_CODE: (NTSTATUS) 0xc0000005 - The instruction at "0x%08lx" referenced memory at "0x%08lx". The memory could not be "%s".
EXCEPTION_CODE: (NTSTATUS) 0xc0000005 - The instruction at "0x%08lx" referenced memory at "0x%08lx". The memory could not be "%s".
EXCEPTION_PARAMETER1: 00000000
EXCEPTION_PARAMETER2: 00000000
READ_ADDRESS: 00000000
FOLLOWUP_IP:
nlca_framework+4578a
1004578a 84c0 test al,al
FAILED_INSTRUCTION_ADDRESS:
+0
00000000 ?? ???
NTGLOBALFLAG: 0
APPLICATION_VERIFIER_FLAGS: 0
FAULTING_THREAD: 00000574
BUGCHECK_STR: APPLICATION_FAULT_NULL_INSTRUCTION_PTR_INJECTED_CRASH
PRIMARY_PROBLEM_CLASS: NULL_INSTRUCTION_PTR
DEFAULT_BUCKET_ID: NULL_INSTRUCTION_PTR
LAST_CONTROL_TRANSFER: from 1004578a to 00000000
STACK_TEXT:
WARNING: Frame IP not in any known module. Following frames may be wrong.
0134fd08 1004578a 0134fde8 00000001 10036e74 0x0
0134fd14 10036e74 00000008 0134fde8 00000002 nlca_framework!boost::re_detail::perl_matcher
Heidi Zhou wrote:
What my code does is copying user buffer (containing string to be mached) to an internal allocated buffer and then call boost regexp functions.
In general, it's useful to post the smallest possible complete C++ source file that exhibits the problem, along with your platform, compiler and Boost version. However -- just as a guess -- you might check the lifespan of your internal buffer relative to your use of regexp results. The string searched by regexp functions must persist as long as you continue using their search results.
participants (2)
-
Heidi Zhou
-
Nat Goodspeed