From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#57129: 29.0.50; Improve behavior of conditionals in Eshell Date: Sun, 21 Aug 2022 19:32:09 +0300 Message-ID: <83mtbxblrq.fsf__10738.6188743234$1661099603$gmane$org@gnu.org> References: <2135151.C4sosBPzcN@nimes> <2271941c-3ac3-1525-4d9f-62c757641d6c@cs.ucla.edu> <1903912.fIoEIV5pvu@nimes> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34530"; mail-complaints-to="usenet@ciao.gmane.io" Cc: jporterbugs@gmail.com, larsi@gnus.org, eggert@cs.ucla.edu, bug-gnulib@gnu.org, 57129@debbugs.gnu.org To: Bruno Haible Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Aug 21 18:33:16 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 1oPnsx-0008ka-7q for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 21 Aug 2022 18:33:15 +0200 Original-Received: from localhost ([::1]:46528 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oPnsw-000757-As for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 21 Aug 2022 12:33:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55530) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oPnsk-00073Y-Sd for bug-gnu-emacs@gnu.org; Sun, 21 Aug 2022 12:33:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:46893) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oPnsk-0002hi-Js for bug-gnu-emacs@gnu.org; Sun, 21 Aug 2022 12:33:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oPnsk-0005u6-9o for bug-gnu-emacs@gnu.org; Sun, 21 Aug 2022 12:33:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 21 Aug 2022 16:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57129 X-GNU-PR-Package: emacs Original-Received: via spool by 57129-submit@debbugs.gnu.org id=B57129.166109953922641 (code B ref 57129); Sun, 21 Aug 2022 16:33:02 +0000 Original-Received: (at 57129) by debbugs.gnu.org; 21 Aug 2022 16:32:19 +0000 Original-Received: from localhost ([127.0.0.1]:36642 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oPns2-0005t6-PS for submit@debbugs.gnu.org; Sun, 21 Aug 2022 12:32:19 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:46590) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oPnry-0005sq-BM for 57129@debbugs.gnu.org; Sun, 21 Aug 2022 12:32:17 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:42334) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oPnrs-0002cv-He; Sun, 21 Aug 2022 12:32:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=ndMwKWcLd7I0vDFcpDD8cVd1xrAJL5EhYlYPrUP8Mlo=; b=eISpJfCgcomc LCwxkQkV+5zXepVfmBii1Upgevi79kOnUywAsto4YlUBlscmHuJQF3xZdIVcvUeFUN0sWea00d9m3 f0lXMelaWZQlYGYdGVehCDo9p6XOFnaTTHOtzPTMd/K3by9AZiBwDXqgrURNxyNzy+t5dip5uvkp0 HxeTQ2QqcCO/oVU/BJHn8LUy2Kt3Y2MobeVanAKqfPktrVyPq4qkt3XmtO9GzPtR4JoVHcQfmBmch VeNWbiLzhGX16VIDEYWXNRhku8miwHTGFxowVJxfSKjyg7y4oUs9eIpI5jHtBF+MRe7Z2Kzv+dWyl 073OyBTjTtIxglZMP5bmVQ==; Original-Received: from [87.69.77.57] (port=4657 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oPnrs-0002ya-1H; Sun, 21 Aug 2022 12:32:08 -0400 In-Reply-To: <1903912.fIoEIV5pvu@nimes> (message from Bruno Haible on Sun, 21 Aug 2022 18:20:52 +0200) 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:240337 Archived-At: > From: Bruno Haible > Cc: bug-gnulib@gnu.org, larsi@gnus.org, 57129@debbugs.gnu.org, jporterbugs@gmail.com > Date: Sun, 21 Aug 2022 18:20:52 +0200 > > I changed test-tempname.c to skip the case 1 and execute only case 2, and > added printf statements per the attached tempname.c.diff. Then ran > $ for i in `seq 1000`; do ./test-tempname.exe; done 2>&1 | tee out1000 > > In 32-bit mingw, the result is fully deterministic: each run behaves the same. > The first file name is always gl-temp-3FXzHa.xyz; > the second file name is always gl-temp-HgtmVy.xyz. > > Thus, for a single Emacs process, things will look fine, but as soon as someone > starts to use temporary files in two different Emacs processes, in the way Eli > described, there will be massive collisions. > > In 64-bit mingw, the 'tempname 1' value is deterministic. This simply shows > that Windows 10 does not use address space randomization (ASLR). Some of these problems could be alleviated if the initial value of 'v' depended on something non-deterministic, like the program's PID and/or the current wallclock time (no need to use anything as fancy as clock_gettime, a simple call to 'clock' should be enough).