&REST with SAFETY 0: call to undefined function SB-C:%MORE-ARG-VALUES
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
Fix Released
|
Medium
|
Unassigned |
Bug Description
(defun f (&rest rest)
(declare (optimize (safety 0)))
(apply #'cons rest))
(f 'car 'cdr)
debugger invoked on a UNDEFINED-FUNCTION in thread #<THREAD
The function SB-C:%MORE-
Type HELP for debugger help, or (SB-EXT:QUIT) to exit from SBCL.
restarts (invokable by number or by possibly-
0: [ABORT] Exit debugger, returning to top level.
("bogus stack frame")
0]
(lisp-implement
"1.0.50.46-d5ec4e5"
This works OK without the SAFETY 0 declaration,
or, fwiw, with SAFETY 1.
This is a regression. It worked up to 1.0.48.24.
1.0.48.25 is the first broken version.
Start of the commit message:
1.0.48.25: automatic &rest to &more conversion
lp#504575
Automatically convert
(values-list rest-arg)
to
(%more-
I found this while trying to build SBCL with a
PROCLAIM-
as this yields a faster compiler.
This crashes into ldb in warm init due to
the definition of BACKQ-CONS which has
much similarity to the reduced test case above:
//doing warm init - compilation phase
This is SBCL 1.0.50.
Common Lisp.
More information about SBCL is available at <http://
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.
internal error #23 (An attempt was made to use an undefined FDEFINITION.)
SC: 21, Offset: 0 $1= 0x10000806ef: other pointer
fatal error encountered in SBCL pid 11098(tid 140737353930528):
internal error too early in init, can't recover
Welcome to LDB, a low-level debugger for the Lisp runtime environment.
ldb> backtrace
Backtrace:
0: Foreign function lose, fp = 0x7ffff6d47640, ra = 0x40f788
1: Foreign function interrupt_
ra = 0x412a58
2: Foreign function handle_trap, fp = 0x7ffff6d477e0, ra = 0x415770
3: Foreign function (null), fp = 0x7ffff6d478b0, ra = 0x410401
4: Foreign function (null), fp = 0x7ffff6d47d30, ra = 0x7ffff79c9c60
5: (SB!C::
6: SB!KERNEL:
7: (SB!C::
8: SB!KERNEL:
ldb> print 0x10000806ef
$1= 0x10000806ef: other pointer
header: 0x0000035e: fdefn
$2= name: 0x100001f0ff: %MORE-ARG-VALUES
$nil= function: 0x20100017: NIL
raw_addr: 0x00425020: 1086472
ldb>
Sorry, I have no fix.
Kind regards,
Lutz
tags: | added: regression |
Changed in sbcl: | |
importance: | Undecided → Medium |
status: | New → In Progress |
assignee: | nobody → Paul Khuong (pvk) |
Changed in sbcl: | |
status: | Fix Committed → Fix Released |
Fixed in 86d50ba Fix automatic &rest to &more conversion in unsafe code.
Thanks for the tiny test case!