"Paul F. Dietz" <dietz@...> writes:
> Safe calls to functions with improper numbers of required arguments
> are supposed to signal program errors. In SBCL, this appears
> to not always work -- but sometimes does:
I think I've fixed these and some other cases in sbcl-0.9.1.35.
The weirdness arises because there are many, many code paths that
generic function calls can go through. For generic functions with
single methods that simply return one of their arguments, the generic
function itself can act as the effective method (as long as this
information is recomputed if more methods are defined, of course).
Once this has in fact been computed, the error is signalled
appropriately (as you saw) but before the dispatch function is set up,
some of the error-signalling code is of 1980s vintage.
There are many such paths through the PCL function call area, which
suggests that this is an area ripe for random testing: slot accessors,
boundps, slot-value calls, simple methods, accessor methods which have
the same slot index in several classes, generic functions whose only
method specializes on the universal class in all argument positions:
all these and more are potentially optimizeable, and I could so easily
have missed a path in this fix.
In the meantime, thank you for the report.