From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Andrew Whatson Newsgroups: gmane.lisp.guile.devel Subject: [DRAFT] Improve reporting of exception locations Date: Wed, 12 Oct 2022 16:35:39 +1000 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7399"; mail-complaints-to="usenet@ciao.gmane.io" To: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Wed Oct 12 08:38:37 2022 Return-path: Envelope-to: guile-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oiVO1-0001kw-De for guile-devel@m.gmane-mx.org; Wed, 12 Oct 2022 08:38:37 +0200 Original-Received: from localhost ([::1]:48530 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oiVNz-0006qf-UA for guile-devel@m.gmane-mx.org; Wed, 12 Oct 2022 02:38:35 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37214) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oiVLO-0006pW-76 for guile-devel@gnu.org; Wed, 12 Oct 2022 02:35:54 -0400 Original-Received: from mail-yb1-xb35.google.com ([2607:f8b0:4864:20::b35]:40727) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oiVLM-0003Kp-LL for guile-devel@gnu.org; Wed, 12 Oct 2022 02:35:53 -0400 Original-Received: by mail-yb1-xb35.google.com with SMTP id 81so19001583ybf.7 for ; Tue, 11 Oct 2022 23:35:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=giYdLD3IDMH5kqUXwWPcyJpaqVXYqYv3IFIRIQtlE/w=; b=IhodnVFizhri1YHOHF8IIPcivuVC+4TZAa/FpdLuZ8RRoeS/nUfUTZNGeaM6B+smL/ WZy43X1rrkyJjjTvVi0zq1YCjFiBRMJljDCIxpsq/NxQB1ACsTOMYNqJustC5vlgcfo0 u7tusNzzNfEJ8rVW3yFfonKYBbpKzP3PQtjLK+NJz+L3RR4BaWHXO6eGE4oP6B/vqPL+ Ipf4wUBiHYGZv4Or09hSj2x3Tobzz/s2X1hPU0z3zrVezkx8HWP4kQw+VzJ5kGYSFHAV G9rbuyeGnXVZP6dFixXbe9FmFo5XjwwWPEcuKJdKonwhHoPsHRtQHi8WJc52zwyXWk39 YqYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=giYdLD3IDMH5kqUXwWPcyJpaqVXYqYv3IFIRIQtlE/w=; b=j5F8H0nDDE6W6UQI5umcD86bOMlBNT2W6ZjYnYvhsVHLJNDxrDL5aA71/FMUc0LEVe KMpSlQszthncV0wYcB6zo7WelDjIkZK2ce8IM2itNMVnlXI5ZojlBr9ua3aT9mrqRZwu wIRXbRGhWPTQ5IDBI5n/vQ53LiiWmBKrpjBD74j5Ir7rmv0fic4n9MNCHC/1ajy3129S 2LruBavqf9Kl5eCiBfS+yM+JDjBB/aZWCiKPWJzc4k4wTI0uYqldwHzV5CgG8S6ZaNcI yA7fEOcDDjrkx5q/O54N4pSVvLIhT/bEVKcvfz5QlCfdc4bOJ7MwyZ9415dcEk/v/00c l7pA== X-Gm-Message-State: ACrzQf3DSCVbIcDKO0pTEZYHPV+QIrXCQydpR4Za9Iu90Vc+ehNwpt3w +tHkngy4Haqwhlqf2o9vW18hAGmcvdjhC9OMJ5GC2Rj6 X-Google-Smtp-Source: AMsMyM4Teby07dFM4+5NsPAHDvuNnVT6ZQg4nSC0JQfP5Sh1Vr09NMfXiljP1huxSWjIyHaD3Ktaj/RbHVCTE+OZkqw= X-Received: by 2002:a25:bb13:0:b0:6be:693d:3dfb with SMTP id z19-20020a25bb13000000b006be693d3dfbmr26737396ybg.121.1665556550717; Tue, 11 Oct 2022 23:35:50 -0700 (PDT) Received-SPF: pass client-ip=2607:f8b0:4864:20::b35; envelope-from=whatson@gmail.com; helo=mail-yb1-xb35.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Original-Sender: "guile-devel" Xref: news.gmane.io gmane.lisp.guile.devel:21397 Archived-At: Hello guile-dev! I'm working on a revised patch to improve the reporting of exception locations, after last month's initial flawed attempt. The new patch takes the more radical approach of capturing the stack when an exception is created, including it as part of the compound exception object. This should ensure that we capture a correctly trimmed stack, while avoiding the complexities of pre-unwind handlers. This is similar to other dynamic languages where it's common to bundle stack info with exception objects. This approach will probably have a negative impact on code which is sensitive to the performance of exception creation; capturing the stack is more expensive than NOT capturing it. Is this something that we need to be concerned about? I'm still working on integrating these changes into Guile, but thought it's worth getting early feedback on this one. Patch to follow! Cheers, Andrew