Add a debug check for a non-empty FPU stack on x86 (see #4914)
[ghc-hetmet.git] / rts / RtsStartup.c
index bc169ff..266c048 100644 (file)
@@ -345,6 +345,11 @@ hs_exit_(rtsBool wait_foreign)
     
     OnExitHook();
 
+    // sanity check
+#if defined(DEBUG)
+    checkFPUStack();
+#endif
+
     // Free the full argv storage
     freeFullProgArgv();