#141 subtypep crashes on recursive types

HEAD
closed
nobody
subtypep (1)
5
2015-05-06
2011-02-06
No

(subtypep 'si::proper-list t)

Discussion


  • Anonymous
    2012-09-21

    I confirm that this occurs with the latest ECL (stack overflow error).

     
  • Both (subtypep 'si:property-list 'condition) and (subtypep 'si::proper-list 'condition) raise "Stack overflow" - serious-condition (version 13.5.1)

     
  • Arto Bendiken
    Arto Bendiken
    2014-09-23

    This appears to still be the case with the Git HEAD version as well.

     
  • Arto Bendiken
    Arto Bendiken
    2014-09-23

    • labels: --> subtypep
    • status: open --> accepted
    • Group: --> Unstable_git/CVS
     
  • jackdaniel
    jackdaniel
    2015-02-28

    Problem comes from call sequence:
    canonical_type -> register_cons_type -> apply -> canonical_type -> ... etc

    Basically, it is impossible to compute canonical-type of recursive datatype, since it's infinite.

    Solution would be - detect recursive type and throw exception. Related irc discussion on attachment.

     
  • jackdaniel
    jackdaniel
    2015-02-28

    Alternate solution - subtypep returns (values nil nil), if one of types is recursive.

    sidenote: same problem found on sbcl.

     


Anonymous


Cancel   Add attachments