SBCL is free software, provided as is, with absolutely no warranty.
It is mostly in the public domain; some portions are provided under
BSD-style licenses. See the CREDITS and COPYING files in the
distribution for more information.
* (lisp-implementation-type)

It's not actually caused by this commit directly, but is due to clobbering of RCX, the register where the number of arguments is passed. And the debugger uses it to reconstruct the arguments, 4611686018427387900 of them in this case. I can target the temporary register to RAX, but this problem is still present with any code inside XEPs which happens to touch RCX and throw an error.

Stas Boukarev wrote:
> What about just inserting something like (CONS 1 3 #<extraneous-args>)
> for any number of extra args, since the actual number of passed args
> will be shown in the error message anyway.
>

(CONS 1 2 #<extraneous-args>) instead of that wouldn't reduce clarity much, since the error is "invalid number of arguments: 5".

Making it into (CONS 1 2 3 4 5) is not easy, the debugger would need to know the calling conventions, which error the frame encountered and that none of the registers or stack locations are clobbered yet.