[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor-browser/tor-browser-84.0-10.0-1] Bug 1677797 - Change autoconf to avoid using a hard-coded file descriptor. r=glandium, a=RyanVM
commit 3cc22031afe992da84d4367664a81d27a1310ee3
Author: Tom Ritter <tom@xxxxxxxxxxx>
Date: Tue Dec 8 22:04:09 2020 +0000
Bug 1677797 - Change autoconf to avoid using a hard-coded file descriptor. r=glandium, a=RyanVM
In Bug 1671424 we changed the way we configure firefox and it broke the codeql database
generation job. This job wraps the entire build process in a way similar to
codeql --command="./mach build"
Specifically, the previous way we executed the configure shell script made codeql
disable itself because it was named configure (codeql disables itself during
configuration.)
codeql injects via LD_PRELOAD, and it opens a configuration file and a logging file
(getting fd 3 and 4 respectively.)
autoconf grabs file descriptor 4 and uses it a temporary redirection point either
to a file or stdout. When it does so, it closes the original file descriptor 4 and
points it at the new location, which also affects the codeql code, resulting in
undesired logging output going into the configure script.
Because this file descriptor trick is only used to avoid duplicating a few lines of
code, I removed the trick and duplicated the code.
Differential Revision: https://phabricator.services.mozilla.com/D98642
---
build/autoconf/autoconf.sh | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/build/autoconf/autoconf.sh b/build/autoconf/autoconf.sh
index e6b0819fab30..ceb8a25b00af 100644
--- a/build/autoconf/autoconf.sh
+++ b/build/autoconf/autoconf.sh
@@ -141,18 +141,17 @@ if grep "^[^#]*${pattern}" $tmpout > /dev/null 2>&1; then
fi
if test $# -eq 0; then
- exec 4> configure; chmod +x configure
-else
- exec 4>&1
+ echo "This case should not be reached."
+ exit 1
fi
-# Put the real line numbers into configure to make config.log more helpful.
+# Put the real line numbers into the output to make config.log more helpful.
$AWK '
/__oline__/ { printf "%d:", NR + 1 }
{ print }
' $tmpout | sed '
/__oline__/s/^\([0-9][0-9]*\):\(.*\)__oline__/\2\1/
-' >&4
+'
rm -f $tmpout
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits