> > This doesn't help a lot. How about building bash-4.2.42 with -g so > debugging symbols are preserved, then seeing where the crash is? >
I compiled 4.2.42 using gcc 4.6.3 (C[XX]FLAGS="-march=native -O2 -g"). It took longer before the crash occurred and this is the report I got: malloc: ./read.def:696: assertion botched free: called with already freed block argument Aborting...catch. Program received signal SIGABRT, Aborted. 0x00007ffff760eaa5 in raise () from /lib64/libc.so.6 (gdb) bt #0 0x00007ffff760eaa5 in raise () from /lib64/libc.so.6 #1 0x00007ffff760fda5 in abort () from /lib64/libc.so.6 #2 0x000000000043f1af in programming_error (format=<optimized out>) at error.c:176 #3 0x00000000004abe05 in internal_free (mem=0x703388, file=0x4c2768 "./read.def", line=696, flags=<optimized out>) at malloc.c:876 #4 0x000000000047ad7a in read_builtin (list=0x0) at ./read.def:696 #5 0x0000000000432e36 in execute_builtin (builtin=0x479960 <read_builtin>, flags=<optimized out>, subshell=<optimized out>, words=<optimized out>) at execute_cmd.c:4109 #6 0x00000000004360a5 in execute_builtin_or_function (flags=0, fds_to_close=0x7029c8, redirects=<optimized out>, var=0x0, builtin=0x479960 <read_builtin>, words=0x7030e8) at execute_cmd.c:4534 #7 execute_simple_command (fds_to_close=0x7029c8, async=0, pipe_out=-1, pipe_in=-1, simple_command=0x0) at execute_cmd.c:3944 #8 execute_command_internal (command=0x702708, asynchronous=<optimized out>, pipe_in=<optimized out>, pipe_out=<optimized out>, fds_to_close=0x7029c8) at execute_cmd.c:735 #9 0x00000000004389d3 in execute_connection (command=0x702848, asynchronous=0, pipe_in=-1, pipe_out=-1, fds_to_close=0x7029c8) at execute_cmd.c:2326 #10 0x000000000043462a in execute_command_internal (command=0x702848, asynchronous=<optimized out>, pipe_in=-1, pipe_out=-1, fds_to_close=0x7029c8) at execute_cmd.c:891 #11 0x0000000000437ede in execute_command (command=0x702848) at execute_cmd.c:382 #12 0x0000000000438745 in execute_while_or_until (while_command=0x702888, type=0) at execute_cmd.c:3202 #13 0x0000000000434a9b in execute_while_command (while_command=<optimized out>) at execute_cmd.c:3148 #14 execute_command_internal (command=0x7028c8, asynchronous=<optimized out>, pipe_in=-1, pipe_out=-1, fds_to_close=0x7027e8) at execute_cmd.c:831 #15 0x0000000000437ede in execute_command (command=0x7028c8) at execute_cmd.c:382 #16 0x000000000042242d in reader_loop () at eval.c:152 #17 0x0000000000420cc8 in main (argc=2, argv=0x7fffffffdb68, env=0x7fffffffdb80) at shell.c:749 (gdb) I remember compiling a debug-enabled build of bash before and it was the same as what I got. > Chet >