Incorrect "fallback" optimized constructors for compiled MAKE-INSTANCE calls
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
Fix Released
|
High
|
Unassigned |
Bug Description
What I do (from the test case in the attached patch):
;; Define a class and force the "fallback" constructor generator to be
;; used by having a HAIRY-AROUND-
;; SHARED-INITIALIZE.
(defclass bug-? () ((foo :initarg :foo :reader bug-?-foo))
(:default-
(defmethod shared-initialize :around ((instance bug-?) (slot-names t) &key)
(call-
;; Now compile a lambda containing MAKE-INSTANCE to exercise the
;; fallback constructor generator. Call the resulting compiled
;; function to trigger the bug.
(funcall (compile nil (lambda () (make-instance 'bug-? :foo t)))))
=| ERROR "Should not be evaluated"
What did I expect to happen:
An instance of BUG-? should be returned in which the FOO slot is bound to T. The code associated to the default initarg should not be evaluated.
SBCL Version: ~ 1.1.7
$ uname -a
Linux ferberit 3.5.0-28-lowlatency #32-Ubuntu SMP PREEMPT Fri Apr 26 11:05:36 UTC 2013 i686 i686 i686 GNU/Linux
*FEATURES*:
(:ALIEN-CALLBACKS :ANSI-CL :C-STACK-
:COMPARE-
:INLINE-CONSTANTS :LARGEFILE :LINKAGE-TABLE :LINUX :LITTLE-ENDIAN
:MEMORY-
:OS-PROVIDES-
:OS-PROVIDES-POLL :OS-PROVIDES-PUTWC :OS-PROVIDES-
:PACKAGE-
:SB-LDB :SB-PACKAGE-LOCKS :SB-SOURCE-
:SBCL :STACK-
:STACK-
:STACK-
Changed in sbcl: | |
status: | New → Triaged |
importance: | Undecided → High |
Changed in sbcl: | |
status: | Fix Committed → Fix Released |
The attached patch fixes the problem and does not make any other tests fail (as far as I could test).
However, it includes a small change in behavior the correctness of which I cannot completely determine: previously, default initargs did not go through QUOTE-PLIST-KEYS which they would now do.