Bug 134190 - find -regex segfaults. (problem with glibc, build_wcs_buffer?)
Summary: find -regex segfaults. (problem with glibc, build_wcs_buffer?)
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: findutils
Version: 3
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Tim Waugh
QA Contact: Mike McLean
URL:
Whiteboard:
: 134718 (view as bug list)
Depends On:
Blocks: FC3Target
TreeView+ depends on / blocked
 
Reported: 2004-09-30 03:04 UTC by Mark Taylor
Modified: 2007-11-30 22:10 UTC (History)
2 users (show)

Fixed In Version: 4.1.20-4
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-09-30 10:09:23 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Mark Taylor 2004-09-30 03:04:48 UTC
the command:

% find -regex "a"  

immediatly segfaults everytime I run it, on two different FC3t2 systems.

(this is a simplified example - the problem comes from a complex
find command used by the Intel Fortran installation program)

backtrace from gdb:

% gdb find
GNU gdb Red Hat Linux (6.1post-1.20040607.28rh)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and
you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for
details.
This GDB was configured as "i386-redhat-linux-gnu"...(no debugging
symbols found
)...Using host libthread_db library "/lib/tls/libthread_db.so.1".

(gdb) run -regex "a"
Starting program: /usr/bin/find -regex "a"
(no debugging symbols found)...(no debugging symbols found)...(no
debugging symb
ols found)...
Program received signal SIGSEGV, Segmentation fault.
0x005ae64e in build_wcs_buffer () from /lib/tls/libc.so.6
(gdb) backtrace
#0  0x005ae64e in build_wcs_buffer () from /lib/tls/libc.so.6
#1  0x005b8416 in re_compile_internal () from /lib/tls/libc.so.6
#2  0x005b9bfc in re_compile_pattern () from /lib/tls/libc.so.6
#3  0x0804b8f2 in ?? ()
#4  0xfefab95b in ?? ()
#5  0x00000001 in ?? ()
#6  0x0965caf0 in ?? ()
#7  0x0804ad8a in ?? ()
#8  0x08052421 in _IO_stdin_used ()
#9  0xfefab955 in ?? ()
#10 0xfef574d8 in ?? ()
#11 0x0804b935 in ?? ()
#12 0xfefab956 in ?? ()
#13 0x08052238 in _IO_stdin_used ()
#14 0xfef574e8 in ?? ()
#15 0x0804a75b in ?? ()
#16 0x00000000 in ?? ()
#17 0xfef574d8 in ?? ()
#18 0x08054dd0 in re_syntax_options ()
#19 0x0965c3a7 in ?? ()
#20 0x0063c318 in initial () from /lib/tls/libc.so.6
#21 0x08054994 in ?? ()
#22 0xfef574c8 in ?? ()
#23 0x080492b1 in _init ()
Previous frame inner to this frame (corrupt stack?)
(gdb)

Comment 1 Todd Mokros 2004-09-30 08:17:53 UTC
Same problem here.
Currently running glibc-2.3.3-59 (i686) and findutils-4.1.20-3 from
rawhide.

debugging the same command as above, I get a slightly different stack
trace:

$ gdb find
GNU gdb Red Hat Linux (6.1post-1.20040607.33rh)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and
you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for
details.
This GDB was configured as "i386-redhat-linux-gnu"...(no debugging
symbols found)...Using host libthread_db library
"/lib/tls/libthread_db.so.1".

(gdb) run -regex "a"
Starting program: /usr/bin/find -regex "a"
(no debugging symbols found)...(no debugging symbols found)...(no
debugging symbols found)...
Program received signal SIGSEGV, Segmentation fault.
0x411387b7 in re_compile_internal () from /lib/tls/libc.so.6
(gdb) bt
#0  0x411387b7 in re_compile_internal () from /lib/tls/libc.so.6
#1  0x4113a55c in re_compile_pattern () from /lib/tls/libc.so.6
#2  0x0804b8f2 in ?? ()
#3  0xfefd95b4 in ?? ()
#4  0x00000001 in ?? ()
#5  0x0953d2d0 in ?? ()
#6  0x0804ad8a in ?? ()
#7  0x08052421 in _IO_stdin_used ()
#8  0xfefd95ae in ?? ()
#9  0xfef72538 in ?? ()
#10 0x0804b935 in ?? ()
#11 0xfefd95af in ?? ()
#12 0x08052238 in _IO_stdin_used ()
#13 0xfef72548 in ?? ()
#14 0x0804a75b in ?? ()
#15 0x00000000 in ?? ()
(gdb) 


Comment 2 Tim Waugh 2004-09-30 10:09:23 UTC
Fixed in 4.1.20-4.

Comment 3 Tim Waugh 2004-10-05 19:52:12 UTC
*** Bug 134718 has been marked as a duplicate of this bug. ***


Note You need to log in before you can comment on or make changes to this bug.