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: List-Subscribe: List-Archive: List-Post: List-Help: , 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: <0ad85353-3cbb-4a3a-7e7d-55a539b2de86 AT pobox DOT com> <41aa1c2d-831e-020b-4925-fafbdb19b5d7 AT pobox DOT com> Cc: cygwin AT cygwin DOT com From: Daniel Santos Message-ID: 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: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit 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 -- 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