The HyperSpec specifies that for FDEFINITION an error of type
UNDEFINED-FUNCTION should be returned when the function is not FBOUNDP
for the non-SETF case. However:
> (fboundp nil) or (fboundp 'nil)
> (fdefinition 'nil) or (fdefinition nil)
A segmentation fault occurs:
Detected access to an invalid or protected memory address.
[Condition of type SI:SEGMENTATION-VIOLATION]
For other not FBOUNDP cases than NIL an UNDEFINED-FUNCTION error is
however signaled as expected.
I noticed that ecl_fdefinition() does seem to verify for NIL, although
perhaps that SYM_FUN() with NIL is causing the segfault, it might have
to be investigated further if other SYM_FUN() callers could also be
affected if so, I guess. For instance:
> (symbol-function nil) or (symbol-function 'nil)
Also cause a segmentation fault (another case which should probably
signal UNDEFINED-FUNCTION, according to the HyperSpec)... So should
all such cases be considered bugs?