m; i++)); do printf "for x$i in 1; do cat <<
A\n"; done
for ((i=1; i<=$num; i++)); do printf "A\n"; done
for ((i=1; i<=$num; i++)); do printf "done\n"; done
}
The heredocs look like this:
for x1 in 1; do cat << A
for x2 in 1; do cat << A
for x3 in 1; do cat << A
A
A
A
done
done
done
~~
Tom Shaddock
hello@apricot.pictures
./../assets/bash-5.2-patches/bash52-0${i}
done
LDFLAGS=-L${prefix}/lib ./configure --silent
make --jobs 12 --silent
popd
}
build () {
prefix=$(mktemp -d)
rm -rf build
mkdir build
pushd build
build_gettext ${prefix}
build_bash ${prefix}
popd
}
fetch
build
./build/b
> Oh, I see, from gettext-0.22.
Yes, that's right, this came up in the context of a [macports bug report][1].
> Still, how should bash avoid this using only public function interfaces?
That report has a work-around invoking a syntax error which presumably calls
out to `setlocale`/`gettext` pre-
> It looks like it's the call to setlocale() that creates the auxiliary
> threads, and the call to gettext() that forces the artificial crash.
Yep, that's my understanding.
> So any call to gettext() in the parent process before any fork would be
> sufficient to complete the initialization?
It d
> Thanks. I'll add a call to gettext() that will happen right after bash sets
> its default values for the various locale categories.
When building the latest commit on `devel`
(`b3d8c8a4e7c5417d986f93f646ea740cb13c08d7`) this issue no longer occurs.
Thanks!
Example output with first 'j' loop uncommented:
$ bash run.sh
+L20 + setup
+L9 + export -f DO_BACKUP
+L21 + run
+L12 + for i in 1
+L13 + for j in 1
+L15 + true
Example output with the second 'j' loop uncommented:
$ bash run.sh
+L20 + setup
+L9 + export -f DO_BACKUP
+L21 + run
+L5 + for i in 1
+L14 + (( j=1 ))
+L14 + (( j<=1 ))
+L15 + true
+L14 + (( j++ ))
+L14 + (( j<=1 ))
Regards,
Tom Coleman
done
}
bad_lineno() {
for k in 1; do
for ((l=3; l<=3; l++)); do
:
done
done
}
set -x
echo "for i in 1 line number should be 9 and is"
good_lineno
echo "for k in 1 line number should be 16 but is not"
bad_lineno
On Thu, Oct 7, 2021 at 7:43 AM L A Walsh wrote
I did some experimenting and am confident on the fix. I don't know how to
supply a patch suggestion officially, but have pasted it below. Four lines
in parse.y need deleting. Arithmetic for loops should NOT be decrementing
the 'word_top' variable, they do not make use of it. This also has flow on
t
AM Chet Ramey wrote:
> On 10/7/21 12:58 AM, Tom Coleman wrote:
> > I did some experimenting and am confident on the fix. I don't know how to
> > supply a patch suggestion officially, but have pasted it below. Four
> lines
> > in parse.y need deleting. Arith
>ls foo\ \(bar\)
ls: foo (bar): No such file or directory
(type: kk)
>ls foo\ (bar)
bash: syntax error near unexpected token `('
(type: kwwwi\ww.)
>ls foo\ \(bar <--- This is wrong!
ls: foo (bar: No such file or directory
Tom Sorensen
_
URCE -D_FILE_OFFSET_BITS=64
-D_LARGEFILE64_SOURCE stringlist.c
gcc -c -I. -I../.. -I../.. -I../../lib -I../../include -I. -DHAVE_CONFIG_H
-DSHELL -g -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
-D_LARGEFILE64_SOURCE stringvec.c
gcc -c -I. -I../.. -I../.. -I../../lib -I../../include -I. -DHAVE_CONFIG_H
-DSHELL -g -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
-D_LARGEFILE64_SOURCE spell.c
gcc -c -I. -I../.. -I../.. -I../../lib -I../../include -I. -DHAVE_CONFIG_H
-DSHELL -g -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
-D_LARGEFILE64_SOURCE shquote.c
gcc -c -I. -I../.. -I../.. -I../../lib -I../../include -I. -DHAVE_CONFIG_H
-DSHELL -g -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
-D_LARGEFILE64_SOURCE strtrans.c
gcc -c -I. -I../.. -I../.. -I../../lib -I../../include -I. -DHAVE_CONFIG_H
-DSHELL -g -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
-D_LARGEFILE64_SOURCE strindex.c
rm -f libsh.a
ar cr libsh.a clktck.o clock.o getcwd.o getenv.o oslib.o setlinebuf.o
strcasecmp.o strerror.o strtod.o strtol.o strtoul.o vprint.o itos.o rename.o
zread.o zwrite.o shtty.o inet_aton.o netopen.o strpbrk.o timeval.o makepath.o
pathcanon.o pathphys.o tmpfile.o stringlist.o stringvec.o spell.o shquote.o
strtrans.o strindex.o
test -n "ranlib" && ranlib libsh.a
make[1]: Leaving directory `/home/download/aibash-0.1/lib/sh'
making lib/readline/libreadline.a in ./lib/readline
make[1]: Entering directory `/home/download/aibash-0.1/lib/readline'
rm -f readline.o
cd ./aibash && make
make[2]: Entering directory `/home/download/aibash-0.1/lib/readline/aibash'
g++ -c -g correct.cpp
In file included from correct.cpp:9:
Path.h:12: error: `string' was not declared in this scope
Path.h:12: error: ISO C++ forbids declaration of `vector' with no type
Path.h:12: error: template-id `vector< >' used as a
declarator
Path.h:12: error: syntax error before `::' token
Path.h:16: error: syntax error before `s'
Path.h:26: error: `string' was not declared in this scope
Path.h:26: error: syntax error before `)' token
Path.h:29: error: syntax error before `)' token
Path.h:32: error: syntax error before `)' token
Path.h:42: error: syntax error before `)' token
Path.h:44: error: syntax error before `)' token
Path.h:54: error: syntax error before `)' token
Path.h: In constructor `Path::Path()':
Path.h:21: error: `pathString' undeclared (first use this function)
Path.h:21: error: (Each undeclared identifier is reported only once for each
function it appears in.)
Path.h:22: error: `parsed' undeclared (first use this function)
Path.h: In member function `int Path::getNumOfComponents()':
Path.h:49: error: `parse' undeclared (first use this function)
Path.h:50: error: `pathComponents' undeclared (first use this function)
Path.h: At global scope:
Path.h:61: error: ISO C++ forbids defining types within return type
Path.h:61: error: syntax error before `(' token
Path.h:76: error: syntax error before `private'
Path.h:82: error: `string' was not declared in this scope
Path.h:82: error: 'vector' is used as a type, but is not defined as a type.
Path.h:85: error: `bool parsed' used prior to declaration
Path.h:88: error: 'string' is used as a type, but is not defined as a type.
Path.h:89: error: syntax error before `}' token
In file included from correct.cpp:10:
Fuzzy.h:8: error: syntax error before `&' token
In file included from correct.cpp:11:
Programs.h:7:20: hash_map: Datei oder Verzeichnis nicht gefunden
Programs.h:8:43: xercesc/sax2/DefaultHandler.hpp: Datei oder Verzeichnis nicht
gefunden
In file included from Programs.h:9,
from correct.cpp:11:
Program.h:10:20: hash_map: Datei oder Verzeichnis nicht gefunden
In file included from Program.h:11,
from Programs.h:9,
from correct.cpp:11:
Suffix.h:14: error: 'string' is used as a type, but is not defined as a type.
Suffix.h:16: error: syntax error before `name'
Suffix.h:18: error: missing ';' before right brace
Suffix.h:20: error: ISO C++ forbids defining types within return type
Suffix.h:20: error: semicolon missing after declaration of `class Suffix'
Suffix.h: In function `int Suffix()':
Suffix.h:20: error: only constructors take base initializers
Suffix.h:21: confused by earlier errors, bailing out
make[2]: *** [correct.o] Fehler 1
make[2]: Leaving directory `/home/download/aibash-0.1/lib/readline/aibash'
make[1]: *** [readline.o] Fehler 2
make[1]: Leaving directory `/home/download/aibash-0.1/lib/readline'
make: *** [lib/readline/libreadline.a] Fehler 1
Can you help me?
Thanks
Tom
___
Bug-bash mailing list
Bug-bash@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-bash
em in a more portable
manner, but I suspect that may require more substantial modifications
to parts of the code.
Cheers,
-- Tom
--
Tom Alsberg - hacker (being the best description fitting this space)
Web page: http://www.cs.huji.ac.il/~alsbergt/
DISCLAIMER: The above message does no
, let me know.
Thanks,
-- Tom
On Sun, Dec 30, 2007 at 05:28:21PM +0200, Tom Alsberg wrote:
Hi there.
A curious issue I had with a shell script writes output to a pipe,
turns out (after quite a while of investigation, and noticing that
it works on systems where /bin/sh is not bash) to be due to
Configuration Information:
Machine: i686
OS: linux-gnu
Compiler: gcc
Compilation :
uname output: Linux 2.4.20-31.9 i686
Machine Type: i686-pc-linux-gnu
Bash Version: 2.05a
Patch Level: ?
Release Status: release
Description:
I have seen bash dump core a few times. It is extremely difficult to
nbytes = ALLOCATED_BYTES(n);
/* If ok, use the same block, just marking its size as changed. */
- if (IN_BUCKET(nbytes, nunits))
+ if (RIGHT_BUCKET(nbytes, nunits))
{
m = (char *)mem + tocopy;
*m++ = 0; *m++ = 0; *m++ = 0; *m++ = 0;
---
"Tom Robinson" <[E
nteger as the first parameter for
`pcomp_set_readline_variables(int, int)`.
The attached patch is my own attempt, which seems to correct my issues
as well as the one you raised in this post. Long-time user, first-time
poster...
--
Tom Ryder <https://sanctum.geek.nz/>
>From f096da9756ed4d0
, modifying a patch
from Luca Boccassi.
<https://lists.gnu.org/archive/html/bug-bash/2018-11/msg00097.html>
- Forwarded message from Tom Ryder -
Date: Sun, 25 Nov 2018 23:04:18 +1300
From: Tom Ryder
To: Luca Boccassi
Cc: bug-bash@gnu.org
Subject: Re: [PATCH] Fix custom program's
19)
x86_64 GNU/Linux
Machine Type: x86_64-pc-linux-gnu
Bash Version: 5.0
Patch Level: 2
Release Status: release
Regards,
Tom Levy
>From c4fdfa2874685685a0ba46516173abf2b5ba43ef Mon Sep 17 00:00:00 2001
From: Tom Levy <>
Date: Thu, 7 Mar 2019 04:58:18 +
Subject: [PATCH] fix
7;ve run the tests and this version of Bash is vulnerable.
Thanks
-Tom
ldn't the second sequence echo be the same as the first sequence echo? It
would be MUCH more useful if it were.
Of course, this could be just a feature, I don't really know. This is running
on a Fedora 31 release build if that makes a difference.
Thanks,
...Tom Watson
More info
; as they show themselves.
Thanks for the input. It has been helpful.
...Tom
-Original Message-
From: Chet Ramey
Sent: Thursday, April 29, 2021 07:46
To: Ilkka Virta
Cc: chet.ra...@case.edu; Tom (AST) Watson ;
bug-bash@gnu.org
Subject: [External] Re: Brace expansion ordering vs. paramete
Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64'
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-unknown-linux-gnu'
-DCONF_VENDOR='unknown' -DLOCALEDIR='/usr/share/loca
Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: linux-gnu
Compiler: x86_64-pc-linux-gnu-cc
Compilation CFLAGS: -march=native -O2 -pipe
uname output: Linux icarium.decompile.me.uk 6.2.0-rc7-18802-gadd2b733ea5d
#18 SMP PREEMPT_DYNAMIC Mon Feb 6 08:03:57 GMT 20
23 matches
Mail list logo