bug-autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

"configure" tries to execute what seems to be a shell command.


From: Sidney Cadot
Subject: "configure" tries to execute what seems to be a shell command.
Date: Sat, 5 Sep 2020 09:41:32 +0200

Hi all,

When running ./configure (or even just ./configure --help), an execve()
syscall is done to execute what seems to be a shell command.

Usually the first argument to execve() is something like "/bin/sed" or
"/usr/bin/gawk", but in this case it is:

"if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1\nthen :\n
 emulate sh\n  NULLCMD=:\n  # Pre-4.2 versions of Zsh do word splitting on
${1+\"$@\"}, which\n  # is contrary to our usage.  Disable this feature.\n
 alias -g '${1+\"$@\"}'='\"$@\"'\n  setopt NO_GLOB_SUBST\nelse\n  case
`(set -o) 2>/dev/null` in #(\n  *posix*) :\n    set -o posix ;; #(\n  *)
:\n     ;;\nesac\nfi\nas_fn_return () { (exit $1); }\nas_fn_success () {
as_fn_return 0; }\nas_fn_failure () { as_fn_return 1; }\nas_fn_ret_success
() { return 0; }\nas_fn_ret_failure () { return 1;
}\n\nexitcode=0\nas_fn_success || { exitcode=1; echo as_fn_success failed.;
}\nas_fn_failure && { exitcode=1; echo as_fn_failure succeeded.;
}\nas_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.;
}\nas_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.;
}\nif ( set x; as_fn_ret_success y && test x = \"$1\" )\nthen :\n\nelse\n
 exitcode=1; echo positional parameters were not saved.\nfi\ntest
x$exitcode = x0 || exit 1\ntest -x / || exit 1"

That doesn't look like a filename you'd want to try to execute, so this is
probably a bug.

Steps to reproduce
------------------

On a modern GNU/Linux system, with 'strace' installed, unpack any
configure-based package, e.g. sed-4.8.tar.xz.

Then, from a build directory, run:

$ strace -f -o syscalls.log -e trace=execve -e signal=none
../sed-4.8/configure --help

This will result in a short file (~ 100 lines) that shows, on my Debian
system, 2 instances of this issue.

My system shell /bin/sh is a symlink to /bin/dash, as usual on Debian. This
may not be an autoconf problem at all, perhaps it's a dash problem. (But
even if it is, configure, by its nature, should probably work around it).

Hope this helps, kind regards,

   Sidney Cadot


reply via email to

[Prev in Thread] Current Thread [Next in Thread]