check runtime error(such as segmentfault etc.)