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

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

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -