Is anybody else getting this problem? I'm using Windows 7 pro that's
fully updated. At least I'm getting the crash consistently now, even
when debugging. I didn't have cygwin1.dll built with -O3, so I had to
experiment to find the thread local storage. If I've done in correctly,
then it looks like this data is not initialized. This is right after a
mov %gs:0x30,%rax
(gdb) p ((_cygtls *)(((TEB*)$rax)->Tib.StackBase -
CYGTLS_PADSIZE))->locals.pathbufs
$61 = {{{c_cnt = 2282544, w_cnt = 0}, _counters = 2282544}, c_buf =
{0x76cea36e <ntdll!LdrInitializeThunk+14>
"\262\001H\213\313\350\350\035\002",
0x76cca228 <ntdll!RtlAdjustPrivilege+408>
"L\213\330H\205\300\017\204", <incomplete sequence \362\007>, 0x0,
0x22d430 "", 0x22d3e8 "\354'\001", 0x76cc0000 "MZ\220",
(etc.)
If there are really 2,282,544 single-char path buffers, then that would
overflow the char *c_buf[50] buffer. Further, the first buffer exists in
an executable section of ntdll. So I would say that this looks
uninitialized.
Anyway, below is the backtrace. When I call tp.get_w() from the gdb
prompt, it gives me more bad pointers.
(gdb) run
Starting program: /usr/bin/strace ls
[New Thread 2444.0x990]
Program received signal SIGSEGV, Segmentation fault.
0x0000000076bfc6c3 in KERNEL32!GetVolumePathNamesForVolumeNameW () from
/c/Windows/system32/kernel32.dll
(gdb) bt full
#0 0x0000000076bfc6c3 in KERNEL32!GetVolumePathNamesForVolumeNameW ()
from /c/Windows/system32/kernel32.dll
No symbol table info available.
#1 0x00000001800c9764 in dos_drive_mappings::dos_drive_mappings
(this=0x600000010) at
/usr/src/debug/cygwin-2.8.0-1/winsup/cygwin/mount.cc:1948
len = 0
tp = {c_buf_old = 2282544, w_buf_old = 0}
vol =
L"\\\\?\\Volume{317caba3-0b62-11e7-afc1-806e6f6e6963}\\\000\006\000ꏢ耋\001\000\000\000\000\000\000\000\000"
mounts = 0x53002b002b0033 <error: Cannot access memory at
address 0x53002b002b0033>
devpath = 0x1f800010000f <error: Cannot access memory at
address 0x1f800010000f>
sh = 0x1d490d0
__PRETTY_FUNCTION__ = "dos_drive_mappings::dos_drive_mappings()"
#2 0x000000018005fde5 in cygwin_internal (t=<optimized out>) at
/usr/src/debug/cygwin-2.8.0-1/winsup/cygwin/external.cc:535
ddm = <optimized out>
arg = 0x22fc88 ""
res = 18446744073709551615
__PRETTY_FUNCTION__ = "uintptr_t
cygwin_internal(cygwin_getinfo_types, ...)"
#3 0x0000000000402b43 in main2 (argc=<optimized out>, argc@entry=2,
argv=argv@entry=0x1f71f20) at
/usr/src/debug/cygwin-2.8.0-1/winsup/utils/strace.cc:1175
mask = 1
ofile = 0x0
pid = 32978536
opt = <optimized out>
toggle = 0
sawquiet = -25362252
ret = 0
#4 0x000000000040c37a in main (argc=2, argv=0x1f71f20) at
/usr/src/debug/cygwin-2.8.0-1/winsup/utils/strace.cc:1195
No locals.
Daniel
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple