Spurious redefinition warning when INTERPRETED-FUNCTION turns to compiled

Bug #1042405 reported by Douglas Katzman
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
Fix Released
Low
Unassigned

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))

Revision history for this message
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)))))))))

Revision history for this message
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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.