Click here to Skip to main content
15,886,071 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: DateTimeControl date format Pin
David Crow20-Apr-10 9:27
David Crow20-Apr-10 9:27 
AnswerRe: DateTimeControl date format Pin
daveyerwin20-Apr-10 6:40
daveyerwin20-Apr-10 6:40 
QuestionHTTP header processing in C++ Pin
Fareed Rizkalla20-Apr-10 4:16
Fareed Rizkalla20-Apr-10 4:16 
QuestionRe: HTTP header processing in C++ Pin
David Crow20-Apr-10 4:42
David Crow20-Apr-10 4:42 
AnswerRe: HTTP header processing in C++ Pin
Fareed Rizkalla20-Apr-10 13:40
Fareed Rizkalla20-Apr-10 13:40 
GeneralRe: HTTP header processing in C++ Pin
Moak20-Apr-10 23:01
Moak20-Apr-10 23:01 
QuestionRe: HTTP header processing in C++ Pin
David Crow21-Apr-10 2:52
David Crow21-Apr-10 2:52 
QuestionLocal Variable changes suddenly Pin
Nxsis20-Apr-10 3:03
Nxsis20-Apr-10 3:03 
I am currently analyzing some nasty application crashes. Fortunately I can already reproduce these crashes within a few minutes and I get a dump that is supposed to be useful (note that it is a crash dump from an optimized release version). Let me outline the code where the application crashes (pseudo code):

int myNumberOfElements = myCalculation();

[...].// some other code, but no assignments or referencing to myNumber

if(myNumberOfElements < 1 || myNumberOfElements > 100000)
{
  return;
}

MyArray* pArray = AllocArray(myNumberOfElements); // dump shows that myNumberOfElements is greater than 10^9


AllocArray unfortunately belongs to a 3rd party library, but it basically calls malloc. It then crashes as it does not check accordingly if malloc succeeded. However, the root cause of this problem seems to be the large number of elements (which is definitely not the result of my calculation). Further there is only one assignment to myNumberOfElements and if used as parameter 'call by value' is used.

What do you guys think, is the dump file corrupt? Is there a way that the stack gets corrupted, causing this problem?
AnswerRe: Local Variable changes suddenly Pin
Stephen Hewitt20-Apr-10 3:12
Stephen Hewitt20-Apr-10 3:12 
GeneralRe: Local Variable changes suddenly Pin
Nxsis20-Apr-10 19:44
Nxsis20-Apr-10 19:44 
GeneralRe: Local Variable changes suddenly Pin
Stephen Hewitt21-Apr-10 0:21
Stephen Hewitt21-Apr-10 0:21 
QuestionRe: Local Variable changes suddenly Pin
David Crow20-Apr-10 3:44
David Crow20-Apr-10 3:44 
AnswerRe: Local Variable changes suddenly Pin
Nxsis20-Apr-10 19:38
Nxsis20-Apr-10 19:38 
QuestionRe: Local Variable changes suddenly Pin
David Crow21-Apr-10 2:50
David Crow21-Apr-10 2:50 
AnswerRe: Local Variable changes suddenly Pin
LintMan20-Apr-10 6:18
LintMan20-Apr-10 6:18 
GeneralRe: Local Variable changes suddenly Pin
Nxsis20-Apr-10 19:37
Nxsis20-Apr-10 19:37 
GeneralRe: Local Variable changes suddenly Pin
LintMan21-Apr-10 4:01
LintMan21-Apr-10 4:01 
GeneralRe: Local Variable changes suddenly Pin
Nxsis22-Apr-10 2:37
Nxsis22-Apr-10 2:37 
GeneralRe: Local Variable changes suddenly Pin
LintMan23-Apr-10 6:50
LintMan23-Apr-10 6:50 
QuestionWindows 7 + Mailslot [solved] Pin
Member 138094720-Apr-10 2:46
Member 138094720-Apr-10 2:46 
AnswerRe: Windows 7 + Mailslot Pin
Michel Godfroid20-Apr-10 3:31
Michel Godfroid20-Apr-10 3:31 
GeneralRe: Windows 7 + Mailslot Pin
Member 138094720-Apr-10 3:47
Member 138094720-Apr-10 3:47 
GeneralRe: Windows 7 + Mailslot Pin
Michel Godfroid20-Apr-10 5:06
Michel Godfroid20-Apr-10 5:06 
GeneralRe: Windows 7 + Mailslot Pin
Member 138094720-Apr-10 23:32
Member 138094720-Apr-10 23:32 
GeneralRe: Windows 7 + Mailslot Pin
BW0228-Mar-11 11:47
BW0228-Mar-11 11:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.