guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Avoid 'frame-local-ref' errors when printing backtrace.


From: Maxime Devos
Subject: Re: [PATCH] Avoid 'frame-local-ref' errors when printing backtrace.
Date: Thu, 22 Sep 2022 17:10:06 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.12.0



On 22-09-2022 15:53, Andrew Whatson wrote:
-             (let ((val (frame-local-ref frame (binding-slot binding)
-                                         (binding-representation binding))))
+             (let* ((slot (binding-slot binding))
+                    ;; HACK: Avoid out-of-range from frame-local-ref.
+                    ;; Some frames have bindings beyond nlocals.  That
+                    ;; is probably a bug somewhere else, but at least
+                    ;; this workaround allows them to be printed.
+                    ;; See<https://bugs.gnu.org/57948>.
+                    (val (if (< slot nlocals)
+                             (frame-local-ref frame slot
+                                              (binding-representation binding))
+*unspecified*)))

Looks reasonable from here, FWIW (I'm not familiar with (system vm frame)).

(Please keep in mind I do not have commit access.)

Greetings,
Maxime.

Attachment: OpenPGP_0x49E3EE22191725EE.asc
Description: OpenPGP public key

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]