- (when gc
- #!-gencgc (gc)
- ;; Do a destructive non-conservative GC, and then save a core.
- ;; A normal GC will leave huge amounts of storage unreclaimed
- ;; (over 50% on x86). This needs to be done by a single function
- ;; since the GC will invalidate the stack.
- #!+gencgc (gc-and-save (unix-namestring core-file-name nil)
- (if executable 1 0)))
- (without-gcing
- (save (unix-namestring core-file-name nil)
- (get-lisp-obj-address #'restart-lisp)
- (if executable 1 0)))))
+ (let ((name (native-namestring
+ (physicalize-pathname core-file-name)
+ :as-file t)))
+ (when gc
+ #!-gencgc (gc)
+ ;; Do a destructive non-conservative GC, and then save a core.
+ ;; A normal GC will leave huge amounts of storage unreclaimed
+ ;; (over 50% on x86). This needs to be done by a single function
+ ;; since the GC will invalidate the stack.
+ #!+gencgc (gc-and-save name
+ (foreign-bool executable)
+ (foreign-bool save-runtime-options)))
+ (without-gcing
+ (save name
+ (get-lisp-obj-address #'restart-lisp)
+ (foreign-bool executable)
+ (foreign-bool save-runtime-options))))))