Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3966228
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T03:34:21+00:00 2026-05-20T03:34:21+00:00

We have a test case that crashes our big MFC-based app with a heap

  • 0

We have a test case that crashes our big MFC-based app with a heap corruption error.

I turned on the page heap using App Verifier for the DLL in question (turning the heap on for the entire process isn’t workable for other reasons, unfortunately.) The verifier didn’t give us any more information than we already had; it triggered at the same point as the original crash.

Right now I have two competing theories. Which theory do you think is more likely to be correct, and what would your next steps be?

  1. This is indeed heap corruption. The verifier isn’t catching the original damage because it’s happening in another DLL. We should try to activate the verifier for more DLLs and determine what code is damaging the heap.
  2. The heap is fine; the problem is that we are treating a stack address as a heap address. We should study the code in this callstack further to figure out what’s going wrong.

I’m leaning #2 because the parameter to free() looks like a stack address, but so far nobody has proposed an explanation for how this is possible.

Here’s a snippet of the call stack. MyString is a simple wrapper around CString. MyAppDll is the DLL that’s set to use the page heap.

msvcr90.dll!free(void * pBlock=0x000000000012d6e8)  Line 110
mfc90u.dll!ATL::CStringT > >::~CStringT > >()  Line 1011 + 0x1e bytes
MyStringDll.dll!MyString::~MyString()  Line 59
MyAppDll.dll!doStuffWithLotsOfStringInlining(MyClass* input=0x000000000012d6d0)  Line 863 + 0x26 bytes

Here are the registers inside the free() stack frame:

RAX = 0000000000000000 RBX = 000000000012D6E8 RCX = 0000000000000000 
RDX = 0000000000000000 RSI = 000000000012D6D0 RDI = 00000000253C1090 
R8  = 0000000000000000 R9  = 0000000000000000 R10 = 0000000000000000 
R11 = 0000000000000000 R12 = 000000000012D7D0 R13 = 000007FFFFC04CE0 
R14 = 0000000025196600 R15 = 0000000000000000 RIP = 00000000725BC7BC 
RSP = 000000000012D570 RBP = 000007FFF3670900 EFL = 00000000 

And here’s the app verifier message:

VERIFIER STOP 0000000000000010: pid 0x1778: Corrupted start stamp for heap block. 

    00000000083B1000 : Heap handle used in the call.
    000000006DD394E8 : Heap block involved in the operation.
    54D32858A8747589 : Size of the heap block.
    000000005E33BA8D : Corrupted stamp value.
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T03:34:22+00:00Added an answer on May 20, 2026 at 3:34 am

    I think your string or users of it is/are overflowing/underflowing the string’s buffer somewhere, probably against a field which is next to the string pointer, which you then try to free.

    Your RSP is 12D570, which is 94 quads (ints) away from what you are trying to free, so somewhere between there, something bad is happening with buffers.

    Verify that you are not doing any unsafe string ops and that you are correctly reading the documentation for passing buffers/strings into the DLLs you are using.

    You probably need more code in your question if you want a more exact answer.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Selenium test case that enters dates into a date selector made
We have over 800 MB of test case resource files that are Excel format.
I have a Boost unit test case which causes the object under test to
I have recorded a very simple test case Using the Selenium IDE integrated with
I've tryed mylyn but i cant find that feature, if anyone have test mantis
I have a test environment for a database that I want to reload with
I have a test web service replicating a live web service that hasn't been
I have a C++ application that executes test cases. It is possible that some
I have a new web app that is packaged as a WAR as part
I currently have a unittest.TestCase that looks like.. class test_appletrailer(unittest.TestCase): def setup(self): self.all_trailers =

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.