Spurious redefinition warning when INTERPRETED-FUNCTION turns to compiled

Bug #1042405 reported by Douglas Katzman on 2012-08-27
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

If a bunch of source files are loaded with sb-ext:*evaluator-mode* set to :INTERPRET, and then those same files are compiled and the fasls loaded, a firestorm of warnings ensues; the INTERESTING-FUNCTION-REDEFINITION-WARNING-P check thinks that generic functions are being "demoted" to ordinary functions.

Proposed fix:

diff --git a/src/code/condition.lisp b/src/code/condition.lisp
index ab6e942..7391bec 100644
--- a/src/code/condition.lisp
+++ b/src/code/condition.lisp
@@ -1425,7 +1425,9 @@ handled by any other handler, it will be muffled.")
      (and (typep old 'compiled-function)
           (typep new '(not compiled-function)))
      ;; FIN->Regular is interesting.
- (and (typep old 'funcallable-instance)
+ ;; except that interpreted functions becoming compiled is not interesting.
+ (and (typep old '(and funcallable-instance
+ #!+sb-eval (not sb!eval:interpreted-function)))
           (typep new '(not funcallable-instance)))
      ;; Different file or unknown location is interesting.
      (let* ((old-namestring (function-file-namestring old))

Douglas Katzman (dougk) wrote :

Additionally one of our developers discovered that the old-namestring needs to be truenameized if source paths have symlinks.

- (not (string= old-namestring new-namestring)))))))))
+ (not (string= (namestring (truename old-namestring)) new-namestring)))))))))

Douglas Katzman (dougk) wrote :

disregard the truename problem; it was due to a bug in our build

Changed in sbcl:
status: New → Fix Committed
importance: Undecided → Low
Changed in sbcl:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers