[armedbear-cvs] r13948 - trunk/abcl/src/org/armedbear/lisp
ehuelsmann at common-lisp.net
ehuelsmann at common-lisp.net
Sun May 27 19:57:45 UTC 2012
Author: ehuelsmann
Date: Sun May 27 12:57:44 2012
New Revision: 13948
Log:
Fix file handle leak identified by Alex Mizrahi.
Modified:
trunk/abcl/src/org/armedbear/lisp/compile-file.lisp
Modified: trunk/abcl/src/org/armedbear/lisp/compile-file.lisp
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/compile-file.lisp Thu May 24 10:50:29 2012 (r13947)
+++ trunk/abcl/src/org/armedbear/lisp/compile-file.lisp Sun May 27 12:57:44 2012 (r13948)
@@ -97,12 +97,13 @@
(unless classfile
(diag "Nil classfile argument passed to verify-load.")
(return-from verify-load nil))
- (when
- (= 0 (file-length (open classfile :direction :input)))
- ;;; TODO hook into a real ABCL compiler condition hierarchy
- (diag "Internal compiler error detected: Fasl contains ~
+ (with-open-file (cf classfile :direction :input)
+ (when
+ (= 0 (file-length cf))
+;;; TODO hook into a real ABCL compiler condition hierarchy
+ (diag "Internal compiler error detected: Fasl contains ~
zero-length jvm classfile corresponding to ~A." classfile)
- (return-from verify-load nil))
+ (return-from verify-load nil)))
#+nil
(when (or force (> *safety* *speed*))
(diag "Testing compiled bytecode by loading classfile into JVM.")
More information about the armedbear-cvs
mailing list