| delorie.com/archives/browse.cgi | search |
| X-Recipient: | archive-cygwin AT delorie DOT com |
| DomainKey-Signature: | a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id |
| :list-unsubscribe:list-subscribe:list-archive:list-post | |
| :list-help:sender:subject:to:references:from:message-id:date | |
| :mime-version:in-reply-to:content-type | |
| :content-transfer-encoding; q=dns; s=default; b=BOaUDgw6VLYEUAna | |
| 1L6aT0iILYK/977q16kdcBug1MtpajbS6E73nsEj4whV5Hi9tsF4dx9kMqzcNQZU | |
| 9JU7oUi49eBAWbJDm9o65fXb6Sk7j0Mh6Ki+LKXARubuLNnw7z4oImRV0tJhQP+E | |
| xCQtbHBmWnFJugONC7x855588l8= | |
| DKIM-Signature: | v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id |
| :list-unsubscribe:list-subscribe:list-archive:list-post | |
| :list-help:sender:subject:to:references:from:message-id:date | |
| :mime-version:in-reply-to:content-type | |
| :content-transfer-encoding; s=default; bh=saIO7iX+Lu/UcxOx9BPkzH | |
| mbEWo=; b=QajsikYwAvEpyQvnA15ppGq/Gq/I3W32gJRv0/Goe5CcZ2dOb5n2ul | |
| AX/E9WFpi1GKYmV8slWpc1bMf2NW7r6177EEpLkY1oIewNWfrjpQFNL+EkWhTBxF | |
| YPEcMfHsY2XMMspLK45+Yg1yk03sGACEN8ogb6XmGCJlmgfUKx404= | |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Id: | <cygwin.cygwin.com> |
| List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
| List-Archive: | <http://sourceware.org/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
| Sender: | cygwin-owner AT cygwin DOT com |
| Mail-Followup-To: | cygwin AT cygwin DOT com |
| Delivered-To: | mailing list cygwin AT cygwin DOT com |
| Delivered-To: | corinna-cygwin AT cygwin DOT com |
| Authentication-Results: | sourceware.org; auth=none |
| X-Virus-Found: | No |
| X-Spam-SWARE-Status: | No, score=-2.7 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=ddm, mounts, 006, 001 |
| X-Spam-User: | qpsmtpd, 2 recipients |
| X-HELO: | sasl.smtp.pobox.com |
| Subject: | strace crash (TLS data not initializing?) |
| To: | cygwin AT cygwin DOT com, Corinna Vinschen <corinna-cygwin AT cygwin DOT com> |
| References: | <e4ce0627-6482-1325-aaf5-76e230d71ed4 AT pobox DOT com> |
| From: | Daniel Santos <daniel DOT santos AT pobox DOT com> |
| Message-ID: | <0ad85353-3cbb-4a3a-7e7d-55a539b2de86@pobox.com> |
| Date: | Fri, 14 Apr 2017 21:49:46 -0500 |
| User-Agent: | Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 |
| MIME-Version: | 1.0 |
| In-Reply-To: | <e4ce0627-6482-1325-aaf5-76e230d71ed4@pobox.com> |
| X-Pobox-Relay-ID: | 8C2FCF1C-2185-11E7-98C7-C260AE2156B6-06139138!pb-smtp2.pobox.com |
| X-IsSubscribed: | yes |
| X-MIME-Autoconverted: | from quoted-printable to 8bit by delorie.com id v3F2knjR032183 |
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 AT entry=2,
argv=argv AT 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
| webmaster | delorie software privacy |
| Copyright 2019 by DJ Delorie | Updated Jul 2019 |