Bad calls to exported SB-KERNEL functions may cause compiler failures

Bug #1754082 reported by Paul F. Dietz
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
Invalid
Undecided
Unassigned

Bug Description

I don't know if you consider this a valid bug, but there are calls to these sorts of functions in user code in quicklisp. Mark "Won't fix" on this if you think it's not a real issue.

(lambda () (sb-kernel:%array-displaced-p "Not a kno"))

==>

Unhandled memory fault at #x60.
   [Condition of type SB-SYS:MEMORY-FAULT-ERROR]
[...]
  0: [error printing frame]
  1: [error printing frame]
  2: ((FLET SB-C::CLOSURE-NEEDING-IR1-ENVIRONMENT-FROM-NODE :IN SB-C::CONSTANT-FOLD-CALL))
  3: (SB-C::%WITH-IR1-ENVIRONMENT-FROM-NODE #<SB-C::COMBINATION :FUN #<SB-C::REF :LEAF #<SB-C::GLOBAL-VAR :%SOURCE-NAME SB-KERNEL:%ARRAY-DISPLACED-P :TYPE #1=#<SB-KERNEL:FUN-TYPE #> :DEFINED-TYPE #1# :WHE..
  4: (SB-C::CONSTANT-FOLD-CALL #<SB-C::COMBINATION :FUN #<SB-C::REF :LEAF #<SB-C::GLOBAL-VAR :%SOURCE-NAME SB-KERNEL:%ARRAY-DISPLACED-P :TYPE #1=#<SB-KERNEL:FUN-TYPE #> :DEFINED-TYPE #1# :WHERE-FROM :DECL..
  5: (SB-C::IR1-OPTIMIZE-COMBINATION #<SB-C::COMBINATION :FUN #<SB-C::REF :LEAF #<SB-C::GLOBAL-VAR :%SOURCE-NAME SB-KERNEL:%ARRAY-DISPLACED-P :TYPE #1=#<SB-KERNEL:FUN-TYPE #> :DEFINED-TYPE #1# :WHERE-FROM..
[...]

Revision history for this message
Stas Boukarev (stassats) wrote :

That sequence will never be produce by SBCL for safe code.

Changed in sbcl:
status: New → Invalid
Revision history for this message
Paul F. Dietz (paul-f-dietz) wrote :

I understand, but calls to SB-KERNEL:%... functions do appear fairly often in user code in quicklisp. Examples attached. So it's not just internally generated calls produced by the compiler itself.

Revision history for this message
Stas Boukarev (stassats) wrote :

Using such functions voids any warranty.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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