delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2017/04/15/18:07:27

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:references:cc:from:message-id:date
:mime-version:in-reply-to:content-type
:content-transfer-encoding; q=dns; s=default; b=tcLwa7NsXMxvl+H+
S7ohcaarlHR3sgG1L2sVOnoosLyfdvjKF6aJ/YmYG8Lk2392u4hvsmXaRgPvV3vx
do9h4Q7LGiJ9LNxIhZzwZdOBcaSNM0BOxzr6AeYogdVrt3CVjJN6arspiIP/dsXI
WlrtcuAO7kai3VHg7Q44NJh7aqY=
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:references:cc:from:message-id:date
:mime-version:in-reply-to:content-type
:content-transfer-encoding; s=default; bh=Wc1OLGmpN0KQihrnc1Q+7c
qQcSA=; b=r6yd71sqPYce/cvnrqLZKiJRrBoKba6zqm0ThmyMZ4cTO1v1mQm0Y7
7Zk0IXgi9DndVG+oC01IYikfjW61uGSl0+wH2DMoT+xJDsRFAae9TZ0q1Xu8jtsI
eUJy8t2rGtmrIKQ4z0sWOOmGyw5RfJRTDyM/1uPpF58O1ON7zeXys=
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
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00,MISSING_HEADERS,RCVD_IN_DNSWL_LOW,RP_MATCHES_RCVD,SPF_PASS autolearn=no version=3.3.2 spammy=registry, H*f:sk:b9b2698, H*MI:sk:b9b2698, H*i:sk:b9b2698
X-HELO: sasl.smtp.pobox.com
Subject: Re: strace crash (TLS data not initializing?)
References: <e4ce0627-6482-1325-aaf5-76e230d71ed4 AT pobox DOT com> <0ad85353-3cbb-4a3a-7e7d-55a539b2de86 AT pobox DOT com> <41aa1c2d-831e-020b-4925-fafbdb19b5d7 AT pobox DOT com> <CAPF-yOahuwJT6vdsPdOhV+4nnb5sgNbaeWsSUuxF5Nvbkha28g AT mail DOT gmail DOT com> <b9b26987-27a9-9ea1-21bc-c8e669501ce3 AT pobox DOT com>
Cc: cygwin AT cygwin DOT com
From: Daniel Santos <daniel DOT santos AT pobox DOT com>
Message-ID: <f372b041-7e66-9384-b52e-92eeb28c5c3d@pobox.com>
Date: Sat, 15 Apr 2017 17:11:40 -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: <b9b26987-27a9-9ea1-21bc-c8e669501ce3@pobox.com>
X-Pobox-Relay-ID: DC6553D8-2227-11E7-B432-E680B56B9B0B-06139138!pb-smtp1.pobox.com
X-IsSubscribed: yes

Well here's the problem, gcc got too smart and optimized out the stack 
buffer.

int
main (int argc, char **argv)
{
   4074c0:       56                      push   %rsi
   4074c1:       53                      push   %rbx
   4074c2:       48 83 ec 28             sub    $0x28,%rsp
   4074c6:       89 cb                   mov    %ecx,%ebx
   4074c8:       48 89 d6                mov    %rdx,%rsi
   4074cb:       e8 e0 d9 ff ff          callq  404eb0 <__main>
      reliably.  This problem has been noticed under AllocationPreference
      registry setting to 0x100000 (TOP_DOWN). */
   char buf[CYGTLS_PADSIZE];

   memset (buf, 0, sizeof (buf));
   exit (main2 (argc, argv));
   4074d0:       89 d9                   mov    %ebx,%ecx
   4074d2:       48 89 f2                mov    %rsi,%rdx
   4074d5:       e8 56 b0 ff ff          callq  402530 <_Z5main2iPPc>
   4074da:       89 c1                   mov    %eax,%ecx
   4074dc:       e8 57 fd ff ff          callq  407238 <exit>




--
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019