开发者

Bug only appears when running C code inside NetBeans

Running a piece of C code from inside Netbeans 6.8 causes a Segmentation Fault. But the problem doesn't appear when running in debugging mode or from shell. Tried both in external terminal and output window of Netbeans.

The process is threaded, and uses an itimer that sends a signal, which I am masking with pthread_sig开发者_高级运维mask for threads that are irrelevant.

I saw some things about bugs hiding in debugging mode, but why could they also be hidden when running in shell?


When your program exhibits any undefined behaviour, any change in the operating environment can cause the application to behave differently. This different behaviour may or may not be a crash.

If the application is multithreaded, you may have some race conditions. Best bet is to take the core dump and investigate.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜