c++ - Visual studio to gcc, code compiles well in gcc but gives std::badalloc error at runtime -


i have big code uses standard c++ libs , compiles in gcc. code written in vs c++ 6.0. code runs fine in visual studio when use gcc compiler gives no errors on compilation , when run it gives error "terminate called after throwing exception @ instance std::bad_alloc what() bad alloc" 1 more confusion is numerical simulation code, doesn't show exception while using gdb debugging , terminates doesn't show right results. using gdb doesn't terminates anywhere. thats stuck. unable diagnose bad_alloc happening.

  1. the code consists of c , c++ routines
  2. memory allocated through new
  3. gdb doesn't show segabort or exception during debugging

how can debug problem?

if you're on linux, give valgrind try debugging.


Comments

Popular posts from this blog

windows - Why does Vista not allow creation of shortcuts to "Programs" on a NonAdmin account? Not supposed to install apps from NonAdmin account? -

c++ - How do I get a multi line tooltip in MFC -

unit testing - How to mock PreferenceManager in Android? -