This is the mail archive of the
cygwin-developers
mailing list for the Cygwin project.
Re: [Cygwin64] dash segfault
On Mar 11 06:51, Peter Rosin wrote:
> Thread 1 (Thread 9636.0xb268):
> #0 strlen (str=0x1 <Address 0x1 out of bounds>)
> at /usr/src/debug/cygwin-1.7.18-2/newlib/libc/string/strlen.c:68
> #1 0x00000001800bf65e in strdup (s=0x1 <Address 0x1 out of bounds>)
> at /usr/src/debug/cygwin-1.7.18-2/winsup/cygwin/malloc_wrapper.cc:213
This doesn't look like the same problem as the one which crashes in
free(). But it might have the same reason. A pointer value of 1
indicates that some function returned a NULL pointer but the calling
function didn't check the return value. If you still have that in
GDB, can you check where the value is coming from?
You also wrote:
> Hmm, frames #4 and #5 don't match, as var.c:298 doesn't call findvar, it
> calls memalloc.c:savestr, which is a wrapper around strdup (line 83). That
> fits better with frames #1 and #0. So, the stack still seems trashed?
It's possible that GDB chokes on missing debug or SEH information
in the _sigfe_strdup wrapper and/or the sigfe function, both of
which are naked assembler code. I guess we should fix that so that
GDB and Cygwin's stackdump code have less problems to backtrace
over this assembler code.
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Red Hat