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

Bug #1734771 reported by Alastair Bridgewater
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
Fix Released
High
Unassigned

Bug Description

Found in 1.3.8.26-2465433-dirty and re-confirmed in 1.4.1.220-f2f0f53:

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: ansi pcl
Revision history for this message
Alastair Bridgewater (alastair-bridgewater) wrote :
tags: added: ansi pcl
Revision history for this message
Alastair Bridgewater (alastair-bridgewater) wrote :

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.

Revision history for this message
Alastair Bridgewater (alastair-bridgewater) wrote :

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.

Revision history for this message
Alastair Bridgewater (alastair-bridgewater) wrote :

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  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

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