From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#66912: With `require', the byte compiler reports the wrong file for errors. Date: Mon, 04 Nov 2024 11:12:19 -0500 Message-ID: References: Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33575"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 66912@debbugs.gnu.org To: Alan Mackenzie Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Nov 04 17:13:29 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1t7zho-0008Yr-IG for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 04 Nov 2024 17:13:28 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t7zhQ-0003Ge-VA; Mon, 04 Nov 2024 11:13:05 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t7zhO-0003GC-TF for bug-gnu-emacs@gnu.org; Mon, 04 Nov 2024 11:13:02 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t7zhO-0000VU-KJ for bug-gnu-emacs@gnu.org; Mon, 04 Nov 2024 11:13:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=BS4Xv04Ki0+iow+oeQXKs6RJUPsLBVaZiwr+vj8YN7I=; b=FCMgG5M9R0VEVSPIh3Daje8lz9GdJpvr2UR+ujIJYvGxLEqv6BomNp4VOnjRyv4Njkwiy0lqNi4LN+WHMCpGzXFCjC6Hqe4P9bVvFndZJfciF3d6XJyahWrMp9zI+Fkq9xgZogtzXMLoy78iMq6PcaYjF+FMHgPwvuVZn1UVJht2QB9OIih4mGbVZ7cwbFnQHdRiv41nonhtiX7lGQmoJEas25MNXMcfac3su3A9UpWG0YXHz+MVJTfA/3TxmaZ91enjY7zkhQrpuezatRzCos6tz8lpV+82lJ/BVHeBVv+vRpfq0hIKqI81uxNAiFcMBS5ojQDIsm95qEecV9C+2Q==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t7zhO-0008Ux-E8 for bug-gnu-emacs@gnu.org; Mon, 04 Nov 2024 11:13:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 04 Nov 2024 16:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66912 X-GNU-PR-Package: emacs Original-Received: via spool by 66912-submit@debbugs.gnu.org id=B66912.173073675132524 (code B ref 66912); Mon, 04 Nov 2024 16:13:02 +0000 Original-Received: (at 66912) by debbugs.gnu.org; 4 Nov 2024 16:12:31 +0000 Original-Received: from localhost ([127.0.0.1]:40860 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t7zgs-0008SQ-MX for submit@debbugs.gnu.org; Mon, 04 Nov 2024 11:12:31 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:37206) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t7zgq-0008SD-9m for 66912@debbugs.gnu.org; Mon, 04 Nov 2024 11:12:29 -0500 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id CE35144457B; Mon, 4 Nov 2024 11:12:21 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1730736740; bh=Dq601ewCnseRTuMkA3C+yYLJyK45OzVqieAQURxEW2k=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=o+SpcUniqo+ZUVHEeAVjYPabuyLN4DDDgPmA7TJhoaFHJf6g10YwITS/iivKi1Bk8 vcLfOYp+XsDKcI0AfYoVJYbC2NlS9Iq16qjjml/CXiZaFcmjcXAStdj0TFSIax4Cjy 5JA/LgO2L9pcbBF2RDqKr2kdEYVD4S4sLhesWL+M2FmO0YhXFRuYr15oUHRG4vlXco A2O5MqyULPP2m7lV36LUo6jztU83WNv3A0K6EF3kNEaPvp/03FL5tXdvfWM1jIA+82 Fay1Lk3hQzg0MhBLMg3p1m3sO4obtSADSkhKHqIV6m4t13HiEOhcqMS1+RlGxSaSqS 3oUOfrxm63R1w== Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 9D5B744457F; Mon, 4 Nov 2024 11:12:20 -0500 (EST) Original-Received: from pastel (104-195-225-43.cpe.teksavvy.com [104.195.225.43]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 768771203DA; Mon, 4 Nov 2024 11:12:20 -0500 (EST) In-Reply-To: (Alan Mackenzie's message of "Mon, 4 Nov 2024 12:52:10 +0000") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:294863 Archived-At: >> I don't understand the above code: `handler-bind` is not supposed to >> call setjmp/longjmp: when the handler of a `handler-bind` gets called, >> the stack is not unwound. > > I started off by just making the HANDLER_BIND case use the same code as > CONDITION_CASE, and got segfaults. I've tried to find the places where > a longjmp gets called for condition-case, but my brain's tired after a > weekend of heavy coding. The longjmp is in `unwind_to_catch`, called from `signal_or_quit`, but we only get there for CONDITION_CASE, not for HANDLER_BIND. > Given HANDLER_BIND doesn't need the setjmp/longjmp mechanism, it would > seem there's no sense in combining the HANDLER_BIND and CONDITION_CASE > cases in internal_cc_hb and friends. I should just restore the > condition-case functions to what they were, and add separate new ones > for handler-bind. OK. > I think I see now you're right. push_handler doesn't push an entry onto > the binding stack. I'll amend these comments as soon as I understand > the code. I think these lines definitely need comments. Maybe pointing the reader to the SKIP_CONDITIONS comment in `lisp.h`? >> Also there's no reason to presume the HANDLER_BIND handler is at the >> top, so if we wanted to remove it, we'd have to work harder. > This code is difficult to understand. What is the purpose of the > binding block around the call of the handler function? I think a > comment here would help. The `unbind_to` is there because `max_ensure_room` may `specbind` something. In 99% of the cases it does nothing. >> How is this related to `Fprefix_load_file_names`? > Not closely. I think I should have propsed two separate patches, rather > than the big one I did. Fprefix_load_file_names is what puts the "While > loading foo.el... " in front of an error message. Splitting it into two would be good yes. AFAICT, the `Fprefix_load_file_names` is the part that aims to address bug#66912. IMO the other belongs in another bug-report/feature-request? Stefan