From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Ki=C3=AAn_?= =?UTF-8?Q?Nguy=E1=BB=85n?= Quang Newsgroups: gmane.emacs.bugs Subject: bug#57386: 29.0.50; support make-symbolic-link without admin priviledge on Windows Date: Thu, 25 Aug 2022 18:51:30 +0900 Message-ID: References: <838rnd638m.fsf@gnu.org> <83wnax4hw5.fsf@gnu.org> <83h72050tc.fsf@gnu.org> <83y1vc3d1l.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="000000000000cd3e4f05e70dbe88" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4791"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 57386@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Aug 25 11:52:11 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 1oR9X0-000143-5I for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 25 Aug 2022 11:52:10 +0200 Original-Received: from localhost ([::1]:44328 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oR9Wz-0003F6-9Y for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 25 Aug 2022 05:52:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60486) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oR9Ws-0003Ej-9g for bug-gnu-emacs@gnu.org; Thu, 25 Aug 2022 05:52:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:59269) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oR9Ws-0004Gh-1B for bug-gnu-emacs@gnu.org; Thu, 25 Aug 2022 05:52:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oR9Wr-0006G8-QE for bug-gnu-emacs@gnu.org; Thu, 25 Aug 2022 05:52:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?Ki=C3=AAn_?= =?UTF-8?Q?Nguy=E1=BB=85n?= Quang Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 25 Aug 2022 09:52:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57386 X-GNU-PR-Package: emacs Original-Received: via spool by 57386-submit@debbugs.gnu.org id=B57386.166142111324045 (code B ref 57386); Thu, 25 Aug 2022 09:52:01 +0000 Original-Received: (at 57386) by debbugs.gnu.org; 25 Aug 2022 09:51:53 +0000 Original-Received: from localhost ([127.0.0.1]:49018 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oR9Wj-0006Fl-0T for submit@debbugs.gnu.org; Thu, 25 Aug 2022 05:51:53 -0400 Original-Received: from mail-ej1-f41.google.com ([209.85.218.41]:36659) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oR9Wg-0006FY-VB for 57386@debbugs.gnu.org; Thu, 25 Aug 2022 05:51:51 -0400 Original-Received: by mail-ej1-f41.google.com with SMTP id d21so19113524eje.3 for <57386@debbugs.gnu.org>; Thu, 25 Aug 2022 02:51:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc; bh=pYpMNidKbAJpze7hmOy5TdtsqRwxREBVu04CQDejLgk=; b=JpIXptmqxktXBK38Q42U9NkrDyEb5t5UXL+s3/XNX2KVXixElp8M83qqG+nJ8AMEmG q3H01FD2zf6RGso4MuYZkarF18z9bTovJDRjysLH3Am0ngDtGqG+o8c7oXklVIbD82cb w4Zw9lCgBOsPB9iqzc6icP3B1tw3CiwkgK/l1odM9klL+ktI/Y+xyKpIAn/MN+jtEHpn 7Ng+O+qeeyopkcjAEqCXw40v4MW2Yy8ruNA1NFtpVAI840hqP8/wPwHS+Es4GDUvPJ+C RR9qq3JD2ZF4euDBxcTlnEJ6CdbEKO4ewpIrdX93EUvK1mI27TQAr3ZulSJHj/lql9Hr gsyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc; bh=pYpMNidKbAJpze7hmOy5TdtsqRwxREBVu04CQDejLgk=; b=C6WrpWqwa37J+WVtQNYW7g5wxQ2oxFgFMdnQDI/SPX+ggjY4DQlDnsEjqp96QtW+mn 7jowl95blLR80JdImLw+WJumY53inMCPYx0SbOOburHSDFpNMl3U883131KYatffsMHN lkbgQcS7s77JKCIJjwVUzjA2QoLyvPINrf6y/JrfTjw9aAeCpwJJ9PLjy3sdxxXaT7bG 6LrEGF/ZOEoZMxrgLImc1YJYB3ustSTBEAPKE0p5hiHNmz7BEIA9FFGvbOCAguazH1Lk TSaInDLdKh/qN7tZVLlrXl1cqWEZaSo/pPtulRLcQGT9LuQgUqSJtJMgbCJk6WFTSIez rsxw== X-Gm-Message-State: ACgBeo1m0tYhdPY2EnPB78aqpdfV1TdAu6dX5xlmI59+SB4ylIrTMtK2 1MvhfFiglwSsyKTEtzaHr8al4OFNZup3q0/RASk= X-Google-Smtp-Source: AA6agR5MZvFmF0B3XSIXO4AGp1OhV3TNNYKxRB0oFu11qoA+5pkRYcpNSTIrIBgBpEEki1P+Tr9WMFz2MSvSlIdJH4g= X-Received: by 2002:a17:907:a0c6:b0:73d:bf46:f06b with SMTP id hw6-20020a170907a0c600b0073dbf46f06bmr1894233ejc.127.1661421105260; Thu, 25 Aug 2022 02:51:45 -0700 (PDT) In-Reply-To: <83y1vc3d1l.fsf@gnu.org> 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:240694 Archived-At: --000000000000cd3e4f05e70dbe88 Content-Type: multipart/alternative; boundary="000000000000cd3e4e05e70dbe86" --000000000000cd3e4e05e70dbe86 Content-Type: text/plain; charset="UTF-8" > > > (is anyone who has Windows 10 still likely to > use those old releases, given the automatic updates in Windows 10 that > cannot be turned off? and if they do, do they indeed get > ERROR_INVALID_PARAMETER?) > There is LTS branch of Windows that gets updated regularly and doesn't have to update to a newer release build. Those users (mostly enterprise users/devs) will get the ERROR_INVALID_PARAMETER, I've tested that. > When you call an API with a parameter that is invalid, you are risking > an exception, depending on the API and the build (debug or not). This > has various unpleasant consequences; in the worst case, the Emacs > process could be terminated. As documented, the problem is limited to > CRT functions, but our general policy is to avoid that even when using > the Win32 APIs. And version check is a simple enough way of avoiding > that, so I see no reason not to do it here. Okay, that makes sense. Although I think that's the problem of CRT APIs only, as API should never throw exceptions, which is a foreign concept to ABI and requires an exact library match to handle correctly The new patch is attached. --000000000000cd3e4e05e70dbe86 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

=C2=A0(is anyone who has Windows 10= still likely to
use those old releases, given the automatic updates in Windows 10 that
cannot be turned off? and if they do, do they indeed get
ERROR_INVALID_PARAMETER?)
There is LTS branch of Windows that gets updated regular= ly and doesn't have to update to a newer release build.
Those users= (mostly enterprise users/devs) will get the ERROR_INVALID_PARAMETER, I'= ;ve tested that.

> When you call an API wi= th a parameter that is invalid, you are risking
> an exception= , depending on the API and the build (debug or not).=C2=A0 This
&= gt; has various unpleasant consequences; in the worst case, the Emacs
=
> process could be terminated.=C2=A0 As documented, the problem is = limited to
> CRT functions, but our general policy is to avoid= that even when using
> the Win32 APIs.=C2=A0 And version chec= k is a simple enough way of avoiding
> that, so I see no reaso= n not to do it here.

Okay, that makes sense. Altho= ugh I think that's the problem of CRT APIs only, as API should never th= row exceptions, which is a foreign concept to ABI and requires an exact lib= rary match to handle correctly

The new patch is at= tached.

--000000000000cd3e4e05e70dbe86-- --000000000000cd3e4f05e70dbe88 Content-Type: application/octet-stream; name="0002-Make-native-comp-debug-0-for-Windows.patch" Content-Disposition: attachment; filename="0002-Make-native-comp-debug-0-for-Windows.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_l78v7mv00 RnJvbSA4YWI3OWE4YjMwY2I1NWM3YTQxZmU0OGJjN2E2MDAyYmI2MmJlNDRkIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBLaWVuIE5ndXllbiA8a2llbi5uLnF1YW5nQGdtYWlsLmNvbT4K RGF0ZTogU2F0LCAxNSBNYXkgMjAyMSAxMDo1NzoyNSArMDkwMApTdWJqZWN0OiBbUEFUQ0hdIE1h a2UgbmF0aXZlLWNvbXAtZGVidWcgMCBmb3IgV2luZG93cwoKKiBsaXNwL2VtYWNzLWxpc3AvY29t cC5lbCAobmF0aXZlLWNvbXAtZGVidWcpOiBkb250IG1ha2UgZGVidWcgbmF0aXZlLWNvbXAgZm9y IFdpbmRvd3MKCi0tLQogbGlzcC9lbWFjcy1saXNwL2NvbXAuZWwgfCAyICstCiAxIGZpbGUgY2hh bmdlZCwgMSBpbnNlcnRpb24oKyksIDEgZGVsZXRpb24oLSkKCmRpZmYgLS1naXQgYS9saXNwL2Vt YWNzLWxpc3AvY29tcC5lbCBiL2xpc3AvZW1hY3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