Jump to content
  • Advertisement
Sign in to follow this  
Imtiaz

C++ Dynamic Allocations issue

This topic is 3748 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey everyone, I'm debugging an application at work that has dynamic allocation issues in C++. This only occurs in release build and is seemingly nondeterministic. I managed to narrow it down to one call of the new operator where the failure occurs. Unfortunately I'm fixing legacy code here in VS6 and it appears that it is in fact throwing an exception (as opposed to null ptr) but it is not of type std::bad_alloc, only my catch all block is being hit and because of that I'm really curious of what other kind of exception can be thrown from calling new? One possibility of where the main problem may lie is that I might be dealing with a heap corruption issue, but I'm curious if that in fact can cause some other exception rather than std::bad_alloc. It can't be an access violation error because (if I'm not mistaken) that shouldn't hit my software exception handler. The other possibility is fragmentation (since this is code running at the db layer, and many small buffers are created), but then again if it were that, then the exception should really thow std::bad_alloc, but its clearly not...I wonder what this mysterious exception might be! Any suggestions, I'm trying to ascertain what my next plan of attack is (most of the battle so far has been finding the problem which is intermittent and release mode only).

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!