CALL-NEXT-METHOD with no arguments does not conform to CLHS

Bug #1734771 reported by Alastair Bridgewater on 2017-11-27
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

Found in and re-confirmed in

Mutating :AROUND method arguments and then calling CALL-NEXT-METHOD without arguments uses the mutated arguments, not the original arguments, which is forbidden by CLHS Local Function CALL-NEXT-METHOD, description paragraph four.

LOADable example attached.

tags: added: ansi pcl

Apparently this only happens when mutating arguments specialized to T, because WALK-METHOD-LAMBDA doesn't detect them as being SETQd, because they don't have %CLASS declarations, because their specializers aren't TYPEP (AND SYMBOL (NOT (EQL T))). Changing (AND SYMBOL (NOT (EQL T))) to SYMBOL on line 853 (or thereabouts) of pcl/boot.lisp "fixes" this, and causes no new failures in the test suite, but I don't know why T is specifically excluded here in the first place, and thus if there is any downside to making this change.

I can go no further: I have a possible fix, but not enough knowledge to be able to evaluate it for appropriateness.

Partial fix in 91ac516e23778a4b0b416f5d7c51c15ddffc129c, along with a (failing) test case for EQL-specialized parameters. And, having found that EQL-specialized parameters still fail, I would also expect parameters with custom specializers to fail here as well.

Full, and far more robust, fix in e283e84a85326834d57e8b130f44bfcd1a27595b.

Changed in sbcl:
status: New → Fix Committed
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

Bug attachments