From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.bugs Subject: bug#53136: 28.0.90; segfault in lock_file Date: Tue, 11 Jan 2022 09:05:25 -0800 Organization: UCLA Computer Science Department Message-ID: References: <871r1hv40o.fsf.ref@yahoo.com> <871r1hv40o.fsf@yahoo.com> <83bl0l2we3.fsf@gnu.org> <87r19htjlp.fsf@yahoo.com> <838rvp2tcw.fsf@gnu.org> <875yqtt9qk.fsf@yahoo.com> <8335lxazg6.fsf@gnu.org> <37cd3017-38cb-fa2c-7b52-fbeb3b085744@cs.ucla.edu> <8735lvp01e.fsf@yahoo.com> <835yqq8mpm.fsf@gnu.org> <1832985279.1361245.1641906995756@mail.yahoo.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------zjSU2NqRVkRNGXAbPcMCfKwn" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9364"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.1 Cc: 53136@debbugs.gnu.org To: luangruo@yahoo.com, Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jan 11 18:14:50 2022 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 1n7KjR-0002DL-TB for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 11 Jan 2022 18:14:50 +0100 Original-Received: from localhost ([::1]:43058 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n7KjQ-00007c-PD for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 11 Jan 2022 12:14:48 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:34086) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n7Kaw-0000ny-HR for bug-gnu-emacs@gnu.org; Tue, 11 Jan 2022 12:06:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:34260) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n7Kaw-0006Qx-8E for bug-gnu-emacs@gnu.org; Tue, 11 Jan 2022 12:06:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1n7Kaw-0006Pq-4A for bug-gnu-emacs@gnu.org; Tue, 11 Jan 2022 12:06:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 11 Jan 2022 17:06:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53136 X-GNU-PR-Package: emacs Original-Received: via spool by 53136-submit@debbugs.gnu.org id=B53136.164192073824622 (code B ref 53136); Tue, 11 Jan 2022 17:06:02 +0000 Original-Received: (at 53136) by debbugs.gnu.org; 11 Jan 2022 17:05:38 +0000 Original-Received: from localhost ([127.0.0.1]:55396 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n7KaX-0006P2-Ia for submit@debbugs.gnu.org; Tue, 11 Jan 2022 12:05:38 -0500 Original-Received: from zimbra.cs.ucla.edu ([131.179.128.68]:44520) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n7KaT-0006Oj-CH for 53136@debbugs.gnu.org; Tue, 11 Jan 2022 12:05:36 -0500 Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id C6DBC1601A6; Tue, 11 Jan 2022 09:05:27 -0800 (PST) Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id fl9DZzEZEMBR; Tue, 11 Jan 2022 09:05:26 -0800 (PST) Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 628251601BC; Tue, 11 Jan 2022 09:05:26 -0800 (PST) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id Ixo3s-eyiDOY; Tue, 11 Jan 2022 09:05:26 -0800 (PST) Original-Received: from [192.168.1.9] (cpe-172-91-119-151.socal.res.rr.com [172.91.119.151]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 3260D1601A6; Tue, 11 Jan 2022 09:05:26 -0800 (PST) Content-Language: en-US In-Reply-To: <1832985279.1361245.1641906995756@mail.yahoo.com> 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" Xref: news.gmane.io gmane.emacs.bugs:223944 Archived-At: This is a multi-part message in MIME format. --------------zjSU2NqRVkRNGXAbPcMCfKwn Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 1/11/22 05:16, Po Lu wrote: > > Fixing each place individually is a time bomb: no one will remember > > that after enough time has passed, and we will add bugs. > > > The only alternative is to filter errno via some macro, which will do > > nothing on all platforms but Haiku, where it will map them to Posix > > values. Butt-ugly, but it's not our fault. > > Hmm, perhaps gnulib can do something in this area? Paul, any ideas? > Thanks in advance. Here are three possibilities: 1. Carefully audit the many hundreds of use of errno values in Emacs and make sure they still work even on Haiku, updating Gnulib accordingly. I think we agree this is a big and continuing maintenance hassle. I just did a bit more of this sort of thing in filelock.c (please see attached) and would rather not do more. 2. Change Gnulib so that on Haiku Gnulib wraps errno-producing functions called by Emacs (and by Gnulib), so that they negate errno before returning. Gnulib would also wrap errno.h so that errno constants are positive. This would affect only calls from Emacs code; it wouldn't affect calls from Haiku libraries, so file dialogs would continue to work. Unfortunately this would be a maintenance hassle too. I suppose we could adjust Gnulib to wrap only the errno-producing functions that Emacs cares about, either directly or indirectly via Gnulib. However, I expect there are some such functions not in the standard library, and I doubt whether we'd want to change Gnulib to wrap random functions in random libraries. For these functions, we'd need to modify Emacs much as we already modified filelock.c. 3. Compile Emacs code with B_USE_POSITIVE_POSIX_ERRORS, and use linker magic only on this code; do not use linker magic on library code (e.g., -ltracker) so that Haiku library code uses the original functions. That way, Emacs source code proper would need to worry about negative errno values only in haiku*.c files that call Haiku-specific libraries. If this is feasible, it should be much less work and more maintainable. Could you look into that? --------------zjSU2NqRVkRNGXAbPcMCfKwn Content-Type: text/x-patch; charset=UTF-8; name="0001-Clean-up-filelock-code-related-to-errno.patch" Content-Disposition: attachment; filename="0001-Clean-up-filelock-code-related-to-errno.patch" Content-Transfer-Encoding: base64 RnJvbSA4MGIwNTRiNjZiNzc4ZDM3NGQxMTYyMGI3OTQ5NzI3NTk2ZGMyYzM1IE1vbiBTZXAg MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBQYXVsIEVnZ2VydCA8ZWdnZXJ0QGNzLnVjbGEuZWR1 PgpEYXRlOiBUdWUsIDExIEphbiAyMDIyIDA4OjU4OjE4IC0wODAwClN1YmplY3Q6IFtQQVRD SF0gQ2xlYW4gdXAgZmlsZWxvY2sgY29kZSByZWxhdGVkIHRvIGVycm5vCgpSZWR1Y2UgZGVw ZW5kZW5jeSBvbiBIYWlrdSBpbnRlcm5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ggdGhlIGxvY2tpbmcgbWVjaGFuaXNtLiAgKi8KIAog c3RhdGljIGludAogY3VycmVudF9sb2NrX293bmVyIChsb2NrX2luZm9fdHlwZSAqb3duZXIs IGNoYXIgKmxmbmFtZSkKIHsKLSAgaW50IHJldDsKICAgbG9ja19pbmZvX3R5cGUgbG9jYWxf b3duZXI7CiAgIHB0cmRpZmZfdCBsZmluZm9sZW47CiAgIGludG1heF90IHBpZCwgYm9vdF90 aW1lOwpAQCAtNTcxLDEzICs1ODUsMTMgQEAgY3VycmVudF9sb2NrX293bmVyIChsb2NrX2lu Zm9fdHlwZSAqb3duZXIsIGNoYXIgKmxmbmFtZSkKICAgICAgICYmIG1lbWNtcCAoYXQgKyAx LCBTU0RBVEEgKHN5c3RlbV9uYW1lKSwgU0JZVEVTIChzeXN0ZW1fbmFtZSkpID09IDApCiAg ICAgewogICAgICAgaWYgKHBpZCA9PSBnZXRwaWQgKCkpCi0gICAgICAgIHJldCA9IC0yOyAv KiBXZSBvd24gaXQuICAqLworICAgICAgICByZXR1cm4gSV9PV05fSVQ7CiAgICAgICBlbHNl IGlmICgwIDwgcGlkICYmIHBpZCA8PSBUWVBFX01BWElNVU0gKHBpZF90KQogICAgICAgICAg ICAgICAgJiYgKGtpbGwgKHBpZCwgMCkgPj0gMCB8fCBlcnJubyA9PSBFUEVSTSkKIAkgICAg ICAgJiYgKGJvb3RfdGltZSA9PSAwCiAJCSAgIHx8IChib290X3RpbWUgPD0gVFlQRV9NQVhJ TVVNICh0aW1lX3QpCiAJCSAgICAgICAmJiB3aXRoaW5fb25lX3NlY29uZCAoYm9vdF90aW1l LCBnZXRfYm9vdF90aW1lICgpKSkpKQotICAgICAgICByZXQgPSAtMTsgLyogQW4gZXhpc3Rp bmcgcHJvY2VzcyBvbiB0aGlzIG1hY2hpbmUgb3ducyBpdC4gICovCisgICAgICAgIHJldHVy biBBTk9USEVSX09XTlNfSVQ7CiAgICAgICAvKiBUaGUgb3duZXIgcHJvY2VzcyBpcyBk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