Control stack exhausted w. complicated type

Bug #1799719 reported by Paul F. Dietz on 2018-10-24
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
Medium
Unassigned

Bug Description

(lambda (p1 p2 p4)
  (the
   (and
    (or
     (cons
      (or
       (eql 1)
       (member (c) "e")
       vector))
     (cons (or (array) number)
           (eql (2)))
     number)
    (or list (eql 3)))
   p4))

==>

Control stack exhausted (no more space for function call frames).
This is probably due to heavily nested or infinitely recursive function
calls, or a tail call that SBCL cannot or has not optimized away.

PROCEED WITH CAUTION.
   [Condition of type SB-KERNEL::CONTROL-STACK-EXHAUSTED]

Restarts:
 0: [ABORT] Exit debugger, returning to top level.

Backtrace:
  0: (SB-KERNEL::CONTROL-STACK-EXHAUSTED-ERROR)
  1: ("foreign function: call_into_lisp")
  2: ("foreign function: post_signal_tramp")
  3: (NSUBSTITUTE #<SB-KERNEL:NAMED-TYPE NIL> #<SB-KERNEL:NUMERIC-TYPE INTEGER> (#<SB-KERNEL:NUMERIC-TYPE INTEGER>))
  4: (SB-KERNEL::SIMPLIFY-INTERSECTIONS (#<SB-KERNEL:ARRAY-TYPE ARRAY> #<SB-KERNEL:NUMERIC-TYPE INTEGER>))
  5: (SB-KERNEL::SIMPLIFY-INTERSECTIONS (#<SB-KERNEL:INTERSECTION-TYPE (AND (NOT VECTOR) ARRAY)> #<SB-KERNEL:NUMERIC-TYPE INTEGER>))
  6: (SB-KERNEL::%TYPE-INTERSECTION (#<SB-KERNEL:INTERSECTION-TYPE (AND (NOT VECTOR) ARRAY)> #<SB-KERNEL:NUMERIC-TYPE INTEGER>))
  7: (SB-KERNEL:TYPE-INTERSECTION2 #<SB-KERNEL:INTERSECTION-TYPE (AND (NOT VECTOR) ARRAY)> #<SB-KERNEL:NUMERIC-TYPE INTEGER>)
  8: (SB-KERNEL::NEGATION-COMPLEX-SUBTYPEP-ARG2-TYPE-METHOD #<SB-KERNEL:INTERSECTION-TYPE (AND (NOT VECTOR) ARRAY)> #<SB-KERNEL:NEGATION-TYPE (NOT INTEGER)>)
  9: (SB-KERNEL:CSUBTYPEP #<SB-KERNEL:INTERSECTION-TYPE (AND (NOT VECTOR) ARRAY)> #<SB-KERNEL:NEGATION-TYPE (NOT INTEGER)>)
 10: (SB-KERNEL::TYPE-UNION2 #<SB-KERNEL:INTERSECTION-TYPE (AND (NOT VECTOR) ARRAY)> #<SB-KERNEL:NEGATION-TYPE (NOT INTEGER)>)
 11: (SB-KERNEL::SIMPLIFY-UNIONS (#<SB-KERNEL:INTERSECTION-TYPE (AND (NOT VECTOR) ARRAY)> #<SB-KERNEL:NEGATION-TYPE (NOT INTEGER)>))
 12: (SB-KERNEL::%TYPE-UNION (#<SB-KERNEL:INTERSECTION-TYPE (AND (NOT VECTOR) ARRAY)> #<SB-KERNEL:NEGATION-TYPE (NOT INTEGER)>))
 13: (SB-KERNEL::INTERSECTION-SIMPLE-UNION2-TYPE-METHOD #<SB-KERNEL:INTERSECTION-TYPE (AND (NOT VECTOR) ARRAY)> #<SB-KERNEL:INTERSECTION-TYPE (AND (NOT INTEGER) NUMBER)>)
 14: (SB-KERNEL::%TYPE-UNION2 #<SB-KERNEL:INTERSECTION-TYPE (AND (NOT VECTOR) ARRAY)> #<SB-KERNEL:INTERSECTION-TYPE (AND (NOT INTEGER) NUMBER)>)
 15: (SB-KERNEL::TYPE-UNION2 #<SB-KERNEL:INTERSECTION-TYPE (AND (NOT VECTOR) ARRAY)> #<SB-KERNEL:INTERSECTION-TYPE (AND (NOT INTEGER) NUMBER)>)
 1
[...]

Stas Boukarev (stassats) wrote :

Reduced to
(typep 10 '(or (cons (or fixnum vector (member a "b")))
               (cons (or (and (not vector) array) (and (not integer) number)) number)))

Changed in sbcl:
status: New → Triaged
importance: Undecided → Medium
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers