[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #59154] Multiline environment variables handled poorly
From: |
Martin Dorey |
Subject: |
[bug #59154] Multiline environment variables handled poorly |
Date: |
Mon, 21 Sep 2020 18:54:53 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.102 Safari/537.36 |
Follow-up Comment #1, bug #59154 (project make):
I thought this might be related to
https://en.wikipedia.org/wiki/Shellshock_(software_bug) but make is exec()ing
the wrong command:
martind@sirius:~/tmp/make-59154$ export PUB="$(echo hello; echo world)"
martind@sirius:~/tmp/make-59154$ cat Makefile
foo:; echo PUB is "$(PUB)"
martind@sirius:~/tmp/make-59154$ strace -f make 2>&1 | grep execve
execve("/usr/bin/make", ["make"], [/* 209 vars */]) = 0
[pid 17978] execve("/bin/sh", ["/bin/sh", "-c", "echo PUB is \"hello"], [/*
212 vars */]) = 0
martind@sirius:~/tmp/make-59154$
As is suggested by the make output:
martind@sirius:~/tmp/make-59154$ make
echo PUB is "hello
/bin/sh: 1: Syntax error: Unterminated quoted string
Makefile:1: recipe for target 'foo' failed
make: *** [foo] Error 2
martind@sirius:~/tmp/make-59154$
make -p says PUB has an appropriate-looking definition:
define PUB
hello
world
endef
I got the same error from make-3.81, so not a recent regression, which makes
me more surprised that I haven't tripped on this.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?59154>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [bug #59154] Multiline environment variables handled poorly, Dan Kegel, 2020/09/21
- [bug #59154] Multiline environment variables handled poorly,
Martin Dorey <=
- [bug #59154] Multiline environment variables handled poorly, Paul D. Smith, 2020/09/21
- [bug #59154] Multiline environment variables handled poorly, anonymous, 2020/09/21
- [bug #59154] Multiline environment variables handled poorly, anonymous, 2020/09/22
- [bug #59154] Multiline environment variables handled poorly, anonymous, 2020/09/22
- [bug #59154] Multiline environment variables handled poorly, Kyle Rose, 2020/09/22
- [bug #59154] Multiline environment variables handled poorly, anonymous, 2020/09/22
- [bug #59154] Multiline environment variables handled poorly, Kyle Rose, 2020/09/22
- [bug #59154] Multiline environment variables handled poorly, anonymous, 2020/09/22
- [bug #59154] Multiline environment variables handled poorly, Paul D. Smith, 2020/09/22
- [bug #59154] Multiline environment variables handled poorly, Kyle Rose, 2020/09/22