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.
- the code consists of c , c++ routines
- memory allocated through new
- gdb doesn't show segabort or exception during debugging
how can debug problem?
if you're on linux, give valgrind try debugging.
Comments
Post a Comment