From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 04 15:45:03 2015 Received: (at submit) by debbugs.gnu.org; 4 Nov 2015 20:45:04 +0000 Received: from localhost ([127.0.0.1]:53730 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zu4vV-0006M8-UC for submit@debbugs.gnu.org; Wed, 04 Nov 2015 15:45:03 -0500 Received: from eggs.gnu.org ([208.118.235.92]:55187) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zu4jQ-00063T-Tl for submit@debbugs.gnu.org; Wed, 04 Nov 2015 15:32:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zu4jP-000112-CX for submit@debbugs.gnu.org; Wed, 04 Nov 2015 15:32:32 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, HTML_MESSAGE,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:33102) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zu4jP-00010y-9b for submit@debbugs.gnu.org; Wed, 04 Nov 2015 15:32:31 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36948) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zu4jL-0003F5-2I for bug-gnu-emacs@gnu.org; Wed, 04 Nov 2015 15:32:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zu4jJ-00010Y-TT for bug-gnu-emacs@gnu.org; Wed, 04 Nov 2015 15:32:26 -0500 Received: from mail-qg0-x233.google.com ([2607:f8b0:400d:c04::233]:35846) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zu4jJ-00010O-Nk for bug-gnu-emacs@gnu.org; Wed, 04 Nov 2015 15:32:25 -0500 Received: by qgad10 with SMTP id d10so50383406qga.3 for ; Wed, 04 Nov 2015 12:32:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:from:date:message-id:subject:to:content-type; bh=DsXWZ3dvv6pqtHntI2qi0YMh8S7hLj67PAk7NzoYWd0=; b=dDTYLTE3DDOijtlL+h+O0RfTs2X2DqK4ioNhsy8R4ZS2uiqB4S7vbkk2MS3rbqYMxT 8eU6IG1QI9WY8uWRpjhWTI/Fag2zH0ww80NJhJ8l7HWAOKY27ioe0AMebVir26HIb9ne uqt0m2TkTPqOdmbfsMSw9YEOinIKavwCTKqPOthFOcHBdUtwyRcrdmMcUoeM6/QaxjYB ADqln+H9XplSuMZJ4zrU8ZmGzz7uWWbrCmVeA+kz6IHloPbsHnCVi1qMgLafdP8zCmzx u+lEe2w/rj2OzYwqG00Pg5Tk5XEB5YkdeqyQTzC7Of8aj4BrUEFwQP8SPJhxexC86aiD voaw== X-Received: by 10.140.92.48 with SMTP id a45mr3809651qge.54.1446669145243; Wed, 04 Nov 2015 12:32:25 -0800 (PST) MIME-Version: 1.0 Received: by 10.140.101.170 with HTTP; Wed, 4 Nov 2015 12:31:55 -0800 (PST) From: Cornelius Mika Date: Wed, 4 Nov 2015 21:31:55 +0100 X-Google-Sender-Auth: I2kXN3O1P4Anwvxhes3Z0KaILBE Message-ID: Subject: 24.5 on Windows; start-process modifies its PROGRAM argument To: bug-gnu-emacs@gnu.org Content-Type: multipart/alternative; boundary=001a11399e6e8286a40523bce85c X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Wed, 04 Nov 2015 15:45:00 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) --001a11399e6e8286a40523bce85c Content-Type: text/plain; charset=UTF-8 start-process normalizes the given PROGRAM path by destructively modifying its contents. This is problematic if the path variable is reused later on. Minimal repro: (let ((path "c:/Windows/System32/clip.exe")) (start-process "" nil path) path) ; => "c:\\Windows\\System32\\clip.exe" In GNU Emacs 24.5.1 (i686-pc-mingw32) of 2015-04-11 on LEG570 Windowing system distributor `Microsoft Corp.', version 6.3.9600 Configured using: `configure --prefix=/c/usr --host=i686-pc-mingw32' Important settings: value of $LANG: DEU locale-coding-system: cp1252 Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. Load-path shadows: None found. Features: (shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml easymenu mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util help-fns mail-prsvr mail-utils time-date tooltip electric uniquify ediff-hook vc-hooks lisp-float-type mwheel dos-w32 ls-lisp w32-common-fns disp-table w32-win w32-vars tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process w32notify w32 multi-tty emacs) Memory information: ((conses 8 73857 5808) (symbols 32 17432 0) (miscs 32 33 131) (strings 16 10612 4319) (string-bytes 1 268415) (vectors 8 9520) (vector-slots 4 383153 5554) (floats 8 57 68) (intervals 28 196 45) (buffers 508 11)) --001a11399e6e8286a40523bce85c Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
start-process normalizes the given PROGRAM path by de= structively modifying its contents.
This is problematic if th= e path variable is reused later on.

Minimal repro:=
(let ((path "c:/Windows/System32/clip.exe"))
=C2=A0 (start-process "" nil path)
=C2=A0 path) ; =3D&= gt; "c:\\Windows\\System32\\clip.exe"

In= GNU Emacs 24.5.1 (i686-pc-mingw32)
=C2=A0of 2015-04-11 on LEG570=
Windowing system distributor `Microsoft Corp.', version 6.3.= 9600
Configured using:
=C2=A0`configure --prefix=3D/c/u= sr --host=3Di686-pc-mingw32'

Important setting= s:
=C2=A0 value of $LANG: DEU
=C2=A0 locale-coding-syst= em: cp1252

Major mode: Lisp Interaction
=
Minor modes in effect:
=C2=A0 tooltip-mode: t
=C2=A0 electric-indent-mode: t
=C2=A0 mouse-wheel-mode: t
=C2=A0 tool-bar-mode: t
=C2=A0 menu-bar-mode: t
=C2=A0 file-name-shadow-mode: t
=C2=A0 global-font-lock-mode: t=
=C2=A0 font-lock-mode: t
=C2=A0 blink-cursor-mode: t
=C2=A0 auto-composition-mode: t
=C2=A0 auto-encryption-m= ode: t
=C2=A0 auto-compression-mode: t
=C2=A0 line-numb= er-mode: t
=C2=A0 transient-mark-mode: t

Recent messages:
For information about GNU Emacs and the GNU sys= tem, type C-h C-a.

Load-path shadows:
No= ne found.

Features:
(shadow sort gnus-ut= il mail-extr emacsbug message format-spec rfc822 mml
easymenu mml= -sec mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev = gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums
mm-util = help-fns mail-prsvr mail-utils time-date tooltip electric
uniquif= y ediff-hook vc-hooks lisp-float-type mwheel dos-w32 ls-lisp
w32-= common-fns disp-table w32-win w32-vars tool-bar dnd fontset image
regexp-opt fringe tabulated-list newcomment lisp-mode prog-mode register
page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock
font-lock syntax facemenu font-core frame cham georgian utf-8-lang=
misc-lang vietnamese tibetan thai tai-viet lao korean japanese h= ebrew
greek romanian slovak czech european ethiopic indian cyrill= ic chinese
case-table epa-hook jka-cmpr-hook help simple abbrev m= inibuffer nadvice
loaddefs button faces cus-face macroexp files t= ext-properties overlay
sha1 md5 base64 format env code-pages mule= custom widget
hashtable-print-readable backquote make-network-pr= ocess w32notify w32
multi-tty emacs)

Mem= ory information:
((conses 8 73857 5808)
=C2=A0(symbols = 32 17432 0)
=C2=A0(miscs 32 33 131)
=C2=A0(strings 16 1= 0612 4319)
=C2=A0(string-bytes 1 268415)
=C2=A0(vectors= 8 9520)
=C2=A0(vector-slots 4 383153 5554)
=C2=A0(floa= ts 8 57 68)
=C2=A0(intervals 28 196 45)
=C2=A0(buffers = 508 11))

--001a11399e6e8286a40523bce85c-- From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 04 16:02:16 2015 Received: (at 21831-done) by debbugs.gnu.org; 4 Nov 2015 21:02:16 +0000 Received: from localhost ([127.0.0.1]:53737 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zu5CC-0006oa-GF for submit@debbugs.gnu.org; Wed, 04 Nov 2015 16:02:16 -0500 Received: from mtaout29.012.net.il ([80.179.55.185]:38235) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zu5Br-0006ng-NL for 21831-done@debbugs.gnu.org; Wed, 04 Nov 2015 16:02:14 -0500 Received: from conversion-daemon.mtaout29.012.net.il by mtaout29.012.net.il (HyperSendmail v2007.08) id <0NXB00G0065DXQ00@mtaout29.012.net.il> for 21831-done@debbugs.gnu.org; Wed, 04 Nov 2015 23:01:14 +0200 (IST) Received: from HOME-C4E4A596F7 ([84.94.185.246]) by mtaout29.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NXB00BER6E2SC60@mtaout29.012.net.il>; Wed, 04 Nov 2015 23:01:14 +0200 (IST) Date: Wed, 04 Nov 2015 23:01:48 +0200 From: Eli Zaretskii Subject: Re: bug#21831: 24.5 on Windows; start-process modifies its PROGRAM argument In-reply-to: X-012-Sender: halo1@inter.net.il To: Cornelius Mika Message-id: <838u6dtr5v.fsf@gnu.org> References: X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 21831-done Cc: 21831-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > From: Cornelius Mika > Date: Wed, 4 Nov 2015 21:31:55 +0100 > > start-process normalizes the given PROGRAM path by destructively modifying its > contents. > This is problematic if the path variable is reused later on. > > Minimal repro: > (let ((path "c:/Windows/System32/clip.exe")) > (start-process "" nil path) > path) ; => "c:\\Windows\\System32\\clip.exe" > > In GNU Emacs 24.5.1 (i686-pc-mingw32) > of 2015-04-11 on LEG570 > Windowing system distributor `Microsoft Corp.', version 6.3.9600 > Configured using: > `configure --prefix=/c/usr --host=i686-pc-mingw32' Thanks. I can reproduce this in Emacs 24.5, but not in the current development sources. So this problem was already fixed as part of the development since then, and I see the code which was added to avoid this. So I'm marking this bug done. From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 05 03:43:20 2015 Received: (at 21831) by debbugs.gnu.org; 5 Nov 2015 08:43:20 +0000 Received: from localhost ([127.0.0.1]:54054 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZuG8e-0003PZ-GZ for submit@debbugs.gnu.org; Thu, 05 Nov 2015 03:43:20 -0500 Received: from mxin.ulb.ac.be ([164.15.128.112]:47571) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZuG8K-0003Op-2X for 21831@debbugs.gnu.org; Thu, 05 Nov 2015 03:43:19 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AsoGAIEVO1akD4Xx/2dsb2JhbABegmmBJW+qdwEBAQEBAQaQVoQGGYV5AoIAAQEBAQEBgQuENQEBAQMBeQULCAMVDCUPAQQNT4gZAwoIvTkNhDwBAQEHAQEBAR+GDYVFglOCVIQSBZZIhR2GEoQWhmmLZYdSY4IRHYFXPTSFHwEBAQ Received: from mathsrv4.ulb.ac.be (HELO localhost) ([164.15.133.241]) by smtp.ulb.ac.be with ESMTP; 05 Nov 2015 09:42:54 +0100 From: Nicolas Richard To: 21831@debbugs.gnu.org Subject: Re: bug#21831: 24.5 on Windows; start-process modifies its PROGRAM argument References: <838u6dtr5v.fsf@gnu.org> Date: Thu, 05 Nov 2015 09:42:54 +0100 In-Reply-To: <838u6dtr5v.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 04 Nov 2015 23:01:48 +0200") Message-ID: <874mh03khd.fsf@members.fsf.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 21831 Cc: cornelius.mika@gmail.com, eliz@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Eli Zaretskii writes: >> From: Cornelius Mika >> Minimal repro: >> (let ((path "c:/Windows/System32/clip.exe")) >> (start-process "" nil path) >> path) ; => "c:\\Windows\\System32\\clip.exe" > I can reproduce this in Emacs 24.5, but not in the current development > sources. So this problem was already fixed as part of the development > since then, and I see the code which was added to avoid this. Thanks for checking. Did you see a test associated to this fix ? perhaps something like : (ert-deftest start-process-should-not-modify-arguments () "`start-process' must not modify its arguments in-place." ;; See bug#21831. (let* ((path (pcase system-type ('windows-nt "c:/Windows/System32/clip.exe") ('ms-dos "c:/command.com") (_ "/bin//sh"))) (samepath (copy-sequence path))) (start-process "" nil path) (should (equal path samepath)))) to be included in test/automated/process-tests.el I'm not sure what a good value of `path' might be. -- Nico. From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 05 13:14:23 2015 Received: (at 21831) by debbugs.gnu.org; 5 Nov 2015 18:14:23 +0000 Received: from localhost ([127.0.0.1]:54902 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZuP3H-0002LL-1u for submit@debbugs.gnu.org; Thu, 05 Nov 2015 13:14:23 -0500 Received: from mtaout22.012.net.il ([80.179.55.172]:36602) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZuP3E-0002LA-1b for 21831@debbugs.gnu.org; Thu, 05 Nov 2015 13:14:21 -0500 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0NXC00G00T8VR600@a-mtaout22.012.net.il> for 21831@debbugs.gnu.org; Thu, 05 Nov 2015 20:14:13 +0200 (IST) Received: from HOME-C4E4A596F7 ([84.94.185.246]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NXC00G0DTBOIX50@a-mtaout22.012.net.il>; Thu, 05 Nov 2015 20:14:13 +0200 (IST) Date: Thu, 05 Nov 2015 20:14:02 +0200 From: Eli Zaretskii Subject: Re: bug#21831: 24.5 on Windows; start-process modifies its PROGRAM argument In-reply-to: <874mh03khd.fsf@members.fsf.org> X-012-Sender: halo1@inter.net.il To: Nicolas Richard Message-id: <83pozos49h.fsf@gnu.org> References: <838u6dtr5v.fsf@gnu.org> <874mh03khd.fsf@members.fsf.org> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 21831 Cc: cornelius.mika@gmail.com, 21831@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > From: Nicolas Richard > Cc: eliz@gnu.org, cornelius.mika@gmail.com > Date: Thu, 05 Nov 2015 09:42:54 +0100 > > Did you see a test associated to this fix ? > > perhaps something like : Thanks, I pushed a variant of your suggested test. From unknown Fri Aug 15 18:53:15 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 04 Dec 2015 12:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator