From: Eli Zaretskii <eliz@gnu.org>
To: Simon Morgan <sjm@spamcop.net>
Cc: 10674@debbugs.gnu.org
Subject: bug#10674: 24.0.92; cmdproxy.exe fork-bomb
Date: Mon, 06 Feb 2012 19:50:05 +0200 [thread overview]
Message-ID: <83ty33c0mq.fsf@gnu.org> (raw)
In-Reply-To: <4F2FF1E1.30008@spamcop.net>
> Date: Mon, 06 Feb 2012 15:29:37 +0000
> From: Simon Morgan <sjm@spamcop.net>
> CC: 10674@debbugs.gnu.org
>
> > If indeed cmdproxy spawns itself endlessly, then the first suspect is
> > this code in cmdproxy.c:
> >
> > if (!SearchPath (NULL, argv[0], ".exe", sizeof (path), path,&progname)
> > || !GetShortPathName (path, path, sizeof (path))
> > || stricmp (modname, path) != 0)
> > {
> > /* We are being used as a helper to run a DOS app; just pass
> > command line to DOS app without change. */
> > /* TODO: fill in progname. */
> > if (spawn (NULL, GetCommandLine (), dir,&rc))
> > return rc;
> > fail ("Could not run %s\n", GetCommandLine ());
> > }
> >
> > Are you able to run cmdproxy under a debugger and see what is going on
> > here? If so, please tell what are argv[0], path, and modname just
> > before the call to `spawn' (assuming my guess is correct, and cmdproxy
> > really calls `spawn' in this snippet).
>
> Okay so I managed to get cmdproxy running under gdb without much trouble
> so here is what you asked for:
>
> http://pastie.org/3327496
Thanks. For the record, I reproduce that here:
C:\emacs-24.0.92\bin>gdb cmdproxy.exe
GNU gdb (GDB) 7.3.1
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "mingw32".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from c:\emacs-24.0.92\bin\cmdproxy.exe...done.
(gdb) break 565
Breakpoint 1 at 0x401f3f: file cmdproxy.c, line 565.
(gdb) r
Starting program: c:\emacs-24.0.92\bin\cmdproxy.exe
[New Thread 4636.0x11e0]
Breakpoint 1, main (argc=1, argv=0x5e2c18) at cmdproxy.c:565
565 if (spawn (NULL, GetCommandLine (), dir, &rc))
(gdb) p argv[0]
$1 = 0x5e2b51 "c:\\emacs-24.0.92\\bin\\cmdproxy.exe"
(gdb) p path
$2 = "c:\\emacs-24.0.92\\bin\\cmdproxy.exe\000\000\000\000\000\000\000c\001\000\001\000\000\000\000\177\000\000\000ÕV\000\000\060ü(\000@Wpwhý(\000\064ý(\000v\arw\000\000\210\000\000\000\000\000\000\000\210\000ð‡\210\000ʸgwð‡\210\000\000\000\210\000\000\000\210\000ʸgwð‡\210\000xý(\000 \027rw8\001\210\000\004\027rwÿ\003ew\000\000\210\000\000\000\210\000\000\000\000\000\000\000\210\000\000\000^\000\000\000\001\001Dý(\000\000\000^\000\\þ(\000Õqlw\027.*\000þÿÿÿ\004\027rwš«mw\000\000\210\000c\000\000P"...
(gdb) p modname
$3 = "c:\\emacs-24.0.92\\bin\\cmdproxy.exe\000^\000\000\000^\000¨\016^\000¨\016^\000\001\000\000\000\000\000^\000@þ(\000í\033rw8\001^\000Ñ\033rwÇ\000ew\000\000\000\000\000\000^\000¨\016^\000þÿÿÿ\200\000\000\000ú›m\001\fþ(\000a\000\000P\230þ(\000Õqlw·/*\000þÿÿÿÑ\033rwú›mw\000\000^\000a\000\000P¨\016^\000¨\016^\000¨þ(\000\200ôÊv\000\000^\000\000\000\000\000‰ôÊv–¨•\003\004\000\000\000¬\016^\000¨\016^\000Êúfw\"\020iwÿÿÿÿ$\000\000\000"...
(gdb)
It sounds like SearchPath fails. Does it help to add
c:\emacs-24.0.92\bin to your Path?
> I've also discovered that cmdproxy only seems to do the whole infinite
> respawn thing if I run it in the emacs bin directory.
But then how come it happens for you in customize-browse? Did you
invoke Emacs in the emacs bin directory? If so, what happens if you
invoke it from a different directory?
next prev parent reply other threads:[~2012-02-06 17:50 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-31 3:12 bug#10674: 24.0.92; cmdproxy.exe fork-bomb sjm
2012-02-02 17:27 ` Eli Zaretskii
[not found] ` <4F2B5793.2010809@spamcop.net>
2012-02-03 10:47 ` Eli Zaretskii
2012-02-05 22:50 ` Simon Morgan
2012-02-06 3:57 ` Eli Zaretskii
2012-02-06 12:53 ` Simon Morgan
2012-02-06 15:29 ` Simon Morgan
2012-02-06 15:47 ` Juanma Barranquero
2012-02-06 16:57 ` Simon Morgan
2012-02-06 17:50 ` Eli Zaretskii [this message]
2012-02-06 18:00 ` Simon Morgan
2012-02-06 21:26 ` Eli Zaretskii
2012-02-06 22:22 ` Simon Morgan
2012-02-07 3:54 ` Eli Zaretskii
2012-02-07 13:25 ` Simon Morgan
2012-02-07 17:14 ` Eli Zaretskii
2012-02-07 18:31 ` Simon Morgan
2012-02-07 18:45 ` Eli Zaretskii
2012-02-11 12:08 ` Eli Zaretskii
2012-02-13 19:25 ` Simon Morgan
2012-02-13 20:46 ` Eli Zaretskii
2012-02-19 19:07 ` Simon Morgan
2012-02-19 21:16 ` Eli Zaretskii
2012-02-24 10:15 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83ty33c0mq.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=10674@debbugs.gnu.org \
--cc=sjm@spamcop.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).