Click here to Skip to main content
15,914,452 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: encrypt and decrypt Pin
Hamid_RT18-Jan-09 22:52
Hamid_RT18-Jan-09 22:52 
Questionarrays & speed Pin
misterMF16-Jan-09 1:03
misterMF16-Jan-09 1:03 
AnswerRe: arrays & speed Pin
Roger Stoltz16-Jan-09 1:17
Roger Stoltz16-Jan-09 1:17 
AnswerRe: arrays & speed Pin
Stuart Dootson16-Jan-09 2:17
professionalStuart Dootson16-Jan-09 2:17 
GeneralRe: arrays & speed Pin
Luc Pattyn16-Jan-09 2:32
sitebuilderLuc Pattyn16-Jan-09 2:32 
AnswerRe: arrays & speed Pin
Joe Woodbury16-Jan-09 21:35
professionalJoe Woodbury16-Jan-09 21:35 
AnswerRe: arrays & speed Pin
misterMF18-Jan-09 22:51
misterMF18-Jan-09 22:51 
QuestionHeap corruption during heavy calculation in 2 threads [modified to include url] Pin
Roger Allen16-Jan-09 0:06
Roger Allen16-Jan-09 0:06 
I have an application which is experiencing heap corruption being reported by NTDLL. It only occurs when I have a heavy calculation running simultaneously in 2 threads, which are working on different data.

The symptoms are that the area being used for strings gets corrupted. All objects only make use of the STL and/or new/delete.

Known facts:
1. There are no memory leaks (that we know of)
2. All pointers get set to NULL once freed
3. There are no shared variables between the threads (in my code anyway).
4. It does not occur in the debug build
5. Turning off all compiler optimisations does not help

I have tried setting breakpoints on memory writes to catch where these overwrites are happening and it always seems to be in the STL for either std::string or std::vector destructors.

I have updated my STL headers as per the list of bugs in the STL at Dinkumware's website (the provider of the STL for MS VC6), but this doesn't fix any bugs in the libraries provided by MS which come pre-compiled.

Any ideas on what may be the issue or things I can try and isolate the problem with? Its been 3 days of hard slog so far with very little to show for it. Dead | X|

[Edit]
We tracked down this article which seems to be directly relevant for the cause of our problem:
http://support.microsoft.com/kb/813810[^]

Although we havn't managed to test it yet were hopeful and it may be of use to others.
[/Edit]

If you vote me down, my score will only get lower

modified on Tuesday, January 20, 2009 6:02 AM

AnswerRe: Heap corruption during heavy calculation in 2 threads Pin
Code-o-mat16-Jan-09 0:46
Code-o-mat16-Jan-09 0:46 
GeneralRe: Heap corruption during heavy calculation in 2 threads Pin
Roger Allen16-Jan-09 2:33
Roger Allen16-Jan-09 2:33 
AnswerRe: Heap corruption during heavy calculation in 2 threads Pin
Roger Stoltz16-Jan-09 0:54
Roger Stoltz16-Jan-09 0:54 
GeneralRe: Heap corruption during heavy calculation in 2 threads Pin
Roger Allen16-Jan-09 2:37
Roger Allen16-Jan-09 2:37 
GeneralRe: Heap corruption during heavy calculation in 2 threads Pin
Roger Stoltz16-Jan-09 3:11
Roger Stoltz16-Jan-09 3:11 
GeneralRe: Heap corruption during heavy calculation in 2 threads Pin
Roger Allen16-Jan-09 3:15
Roger Allen16-Jan-09 3:15 
GeneralRe: Heap corruption during heavy calculation in 2 threads Pin
Roger Stoltz16-Jan-09 4:33
Roger Stoltz16-Jan-09 4:33 
GeneralRe: Heap corruption during heavy calculation in 2 threads Pin
Roger Allen16-Jan-09 5:15
Roger Allen16-Jan-09 5:15 
GeneralRe: Heap corruption during heavy calculation in 2 threads Pin
Roger Stoltz16-Jan-09 9:09
Roger Stoltz16-Jan-09 9:09 
GeneralRe: Heap corruption during heavy calculation in 2 threads Pin
Roger Allen19-Jan-09 1:23
Roger Allen19-Jan-09 1:23 
GeneralRe: Heap corruption during heavy calculation in 2 threads Pin
Roger Allen20-Jan-09 0:02
Roger Allen20-Jan-09 0:02 
AnswerRe: Heap corruption during heavy calculation in 2 threads Pin
Roger Stoltz20-Jan-09 1:19
Roger Stoltz20-Jan-09 1:19 
GeneralRe: Heap corruption during heavy calculation in 2 threads Pin
Randor 16-Jan-09 6:26
professional Randor 16-Jan-09 6:26 
GeneralRe: Heap corruption during heavy calculation in 2 threads Pin
Roger Stoltz16-Jan-09 9:04
Roger Stoltz16-Jan-09 9:04 
AnswerRe: Heap corruption during heavy calculation in 2 threads Pin
Stuart Dootson16-Jan-09 1:07
professionalStuart Dootson16-Jan-09 1:07 
GeneralRe: Heap corruption during heavy calculation in 2 threads Pin
Roger Allen16-Jan-09 2:41
Roger Allen16-Jan-09 2:41 
AnswerRe: Heap corruption during heavy calculation in 2 threads Pin
Joe Woodbury16-Jan-09 21:40
professionalJoe Woodbury16-Jan-09 21:40 

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.