Re: Potential infinite loop in sb-c::array-type-upgraded-element-type with sb-kernel:union-type
Shubhamkar Ayare via Sbcl-help <[email protected]>
| Newsgroups | gmane.lisp.steel-bank.general |
|---|---|
| Message-ID | <[email protected]> |
I will submit once I strip it down to a minimal example. -------- Original message --------From: Stas Boukarev <[email protected]> Date: 07/08/24 01:07 (GMT+05:30) To: Shubhamkar Ayare <[email protected]> Cc: [email protected] Subject: Re: [Sbcl-help] Potential infinite loop in sb-c::array-type-upgraded-element-type with sb-kernel:union-type Submit the original form.On Tue, Aug 6, 2024 at 10:36 PM Shubhamkar Ayare via Sbcl-help <[email protected]> wrote:I discovered the above function calls while trying to debug a stuck-on-compilation issue in one of my libraries.Thanks for pointing out that this function call is not supposed to happen! So, the bug must lie in whatever macroexpansion and compiler macroexpansion my library is performing. I will debug that part.-------- Original message --------From: Douglas Katzman <[email protected]> Date: 07/08/24 00:20 (GMT+05:30) To: Shubhamkar Ayare <[email protected]> Cc: [email protected] Subject: Re: [Sbcl-help] Potential infinite loop in sb-c::array-type-upgraded-element-type with sb-kernel:union-type In both usages you are calling the function in ways that it should not be called by the compiler.NULL hits the member-type case and the (mapcar #'ctype-of) returns the same object, so it recurses on the same arg that it was called with; i.e. there is no base case to the recursion.In the second example you're just plain calling it wrong.What point are you trying to make by exercising an internal function incorrectly though?On Tue, Aug 6, 2024 at 2:36 PM Shubhamkar Ayare via Sbcl-help <[email protected]> wrote: On SBCL 2.4.7 (and also 2.4.4 and 2.4.5), the following seems to result in an infinite loop. It never returns despite running for 10 seconds. (sb-c::array-type-upgraded-element-type (sb-kernel:specifier-type '(or array null))) By contrast, the following returns almost immediately: (sb-c::array-type-upgraded-element-type '(or array null)) Is the difference of behavior a bug? Best, Shubhamkar / digikar _______________________________________________ Sbcl-help mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/sbcl-help _______________________________________________ Sbcl-help mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/sbcl-help _______________________________________________ Sbcl-help mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/sbcl-help