Re: Segfault in Bash

2020-07-15 Thread Chet Ramey
On 7/14/20 12:02 PM, Ilkka Virta wrote: > On 14.7. 16:08, Chet Ramey wrote: >> On 7/14/20 6:32 AM, Jeffrey Walton wrote: >>> ./audit-libs.sh: line 17: 22929 Segmentation faultĀ  (core dumped) >>> $(echo "$file" | grep -E "*.so$") >> >> Bash is reporting that a process exited due to a seg fault,

Re: Segfault in Bash

2020-07-14 Thread Ilkka Virta
On 14.7. 16:08, Chet Ramey wrote: On 7/14/20 6:32 AM, Jeffrey Walton wrote: ./audit-libs.sh: line 17: 22929 Segmentation fault (core dumped) $(echo "$file" | grep -E "*.so$") Bash is reporting that a process exited due to a seg fault, but it is not necessarily a bash process. As a sugge

Re: Segfault in Bash

2020-07-14 Thread Ilkka Virta
On 14.7. 13:32, Jeffrey Walton wrote: Hi Everyone, I'm working on a script to find all shared objects in a directory. A filename should match the RE '*.so$'. I thought I would pipe it to grep: IFS="" find "$dir" -name '*.so' -print | while read -r file do if ! $(echo "$file" | grep -E "*

Re: Segfault in Bash

2020-07-14 Thread Chet Ramey
On 7/14/20 6:32 AM, Jeffrey Walton wrote: > Hi Everyone, > > I'm working on a script to find all shared objects in a directory. A > filename should match the RE '*.so$'. I thought I would pipe it to > grep: > > $ ./audit-libs.sh /home/jwalton/tmp/ok2delete/lib > ./audit-libs.sh: line 17: 22929 Se

Re: Segfault in Bash

2020-07-14 Thread Greg Wooledge
> > IFS="" find "$dir" -name '*.so' -print | while read -r file > > do > > if ! $(echo "$file" | grep -E "*.so$"); then continue; fi > > echo "library: $file" > > > > done Also, I forgot to point out: your "if" line is executing each of the shared libraries that you find. Every one of th

Re: Segfault in Bash

2020-07-14 Thread Greg Wooledge
On Tue, Jul 14, 2020 at 06:32:44AM -0400, Jeffrey Walton wrote: > $ ./audit-libs.sh /home/jwalton/tmp/ok2delete/lib > ./audit-libs.sh: line 17: 22929 Segmentation fault (core dumped) > $(echo "$file" | grep -E "*.so$") This grep regular expression is not valid. The * symbol in a regular expr

Segfault in Bash

2020-07-14 Thread Jeffrey Walton
Hi Everyone, I'm working on a script to find all shared objects in a directory. A filename should match the RE '*.so$'. I thought I would pipe it to grep: $ ./audit-libs.sh /home/jwalton/tmp/ok2delete/lib ./audit-libs.sh: line 17: 22929 Segmentation fault (core dumped) $(echo "$file" | grep

Re: null ptr deref / segfault in bash 4.4.0(1)-beta

2015-09-19 Thread Chet Ramey
On 9/18/15 8:06 PM, Brian Carpenter wrote: > While fuzzing bash 4.4.0(1)-beta compiled from the devel branch, I came > across another script which triggers a null ptr dereference and a segfault. > This script seems to crash these other versions of bash as well: > > 4.2.37(1)-release on x86_64 Debi

null ptr deref / segfault in bash 4.4.0(1)-beta

2015-09-18 Thread Brian Carpenter
While fuzzing bash 4.4.0(1)-beta compiled from the devel branch, I came across another script which triggers a null ptr dereference and a segfault. This script seems to crash these other versions of bash as well: 4.2.37(1)-release on x86_64 Debian, 4.3.39(1)-release on x86_64 Red Hat hexdump -v -

Segfault in bash 3.0

2005-11-14 Thread Ben Cotterell
bash version 3.0 crashes with a segmentation fault when running this script: #!/bin/bash # Running this script crashes bash version 3.0 (and 2.05b.0(1)) function foo { local w local c c=([EMAIL PROTECTED] and stuff) echo [EMAIL PROTECTED] }