fgokey / crashrpt

Automatically exported from code.google.com/p/crashrpt
0 stars 0 forks source link

V506 Pointer to local variable 'ExceptionPointers' is stored outside the scope of this variable. #213

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
V506 Pointer to local variable 'ExceptionPointers' is stored outside the scope 
of this variable. Such a pointer will become invalid. crashhandler.cpp 1288

http://www.viva64.com/en/d/0095/print/

int CCrashHandler::GenerateErrorReport(
        PCR_EXCEPTION_INFO pExceptionInfo)
{  
    crSetErrorMsg(_T("Unspecified error."));

    // Allocate memory in stack for storing exception pointers.
    EXCEPTION_RECORD ExceptionRecord;

   .............

    // Get exception pointers if they were not provided by the caller. 
    if(pExceptionInfo->pexcptrs==NULL)
    {
        GetExceptionPointers(pExceptionInfo->code, &ExceptionPointers);
        pExceptionInfo->pexcptrs = &ExceptionPointers;
    }

Original issue reported on code.google.com by Pavel.Pimenov@gmail.com on 15 Jul 2013 at 5:50

GoogleCodeExporter commented 9 years ago
I don't see a problem here, because the pointer is not used out of the scope of 
the GenerateErrorReport() method. So, I would recommend you to ignore or 
disable the warning.

Original comment by zexspect...@gmail.com on 20 Jul 2013 at 1:21