anchor.diff:             (progn
                (setf new-fd (track (dup fd)))
                (setf fdopen (fdopen new-fd mode))
  -             (debug-log status "FDOPEN ~A ~A = ~A" result new-fd fd)
  -             (setf result (make-file-ptr-wrapper :raw fdopen :gc-token (make-gc-token)))
  +             (debug-log status "FDOPEN ~A = ~A" new-fd fd)
  +             (setf result (make-file-ptr-wrapper :raw fdopen))
                (finalize (file-ptr-wrapper-gc-token result)
                          (lambda () (assert nil nil "A file-ptr was leaked")))
                (setf new-fd nil)
  
positive.code:            (posix-close new-fd)))))))
  
  (defun close-file-ptr (file-ptr)
    "Close a file-ptr pointer created with `file-ptr-wrapper-for-fd'."
    (let ((file (file-ptr-wrapper-raw file-ptr)))
      (with-safe-fd-manipulation
        (debug-log status "FCLOSE ~A" file)
  
negative.code:   "This struct exists only to be garbage collected.")
  
  (defstruct file-ptr-wrapper
    "A wrapper around `file-ptr' which detects leaks."
    raw
    (gc-token (make-gc-token)))
  
  (defmethod translate-to-foreign ((value file-ptr-wrapper) (type file-ptr))
    (file-ptr-wrapper-raw value))
  
  (defun dup-fd-into-file-ptr (fd mode)
    "Create a `file-ptr-wrapper' which interacts with a dup'd version of
  the given fd.
  
  This `file-ptr-wrapper' must be closed with `close-file-ptr'.  If you
  leak the `file-ptr-wrapper' without closing it, an error will be
  signaled."
    (with-safe-fd-manipulation
      (let* (new-fd
             fdopen
  