delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2011/02/05/13:12:01

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=0.3 required=5.0 tests=AWL,BAYES_00,DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED,RCVD_NUMERIC_HELO,SPF_HELO_PASS,TW_CG,TW_EG,TW_FN,T_RP_MATCHES_RCVD,T_TO_NO_BRKTS_FREEMAIL
X-Spam-Check-By: sourceware.org
To: cygwin AT cygwin DOT com
From: jojelino <jojelino AT gmail DOT com>
Subject: Re: sigsegv in compiled cygwin
Date: Sun, 06 Feb 2011 03:12:51 +0900
Lines: 45
Message-ID: <iik3sk$7ur$1@dough.gmane.org>
References: <iigs04$cui$1 AT dough DOT gmane DOT org> <20110204150118 DOT GA20523 AT ednor DOT casa DOT cgf DOT cx>
Mime-Version: 1.0
User-Agent: Mozilla/5.0 (Windows NT 5.2; rv:2.0b12pre) Gecko/20110204 Thunderbird/3.3a3pre
In-Reply-To: <20110204150118.GA20523@ednor.casa.cgf.cx>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT 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

i found small piece of code that need some comment.

from trunk

       int (*wsastartup) (int, WSADATA *);

       /* Don't use autoload to load WSAStartup to eliminate recursion. */
       wsastartup = (int (*)(int, WSADATA *))
		   GetProcAddress ((HMODULE) (dll->handle), "WSAStartup");

would have meant
       typedef int __stdcall (*pfnwsastartup) (int, WSADATA *);
       pfnwsastartup wsastartup;
       wsastartup = (pfnwsastartup)
		   GetProcAddress ((HMODULE) (dll->handle), "WSAStartup");

otherwise stack frame would be damaged.

On 2011-02-05 오전 12:01, Christopher Faylor wrote:
> On Fri, Feb 04, 2011 at 09:40:46PM +0900, jojelino wrote:
>> i'm trying to build cygwin with gcc 4.6 trunk. and compile succeed.
>> but when i try to run cygwin-linked executables with new-compiled-one,
>> initialization routine failed with sigsegv  at win32_whatever+14
>>
>>   0x61171a20<+0>:     jmp    0x61171a25<win32_GetKeyboardLayout AT 4+5>
>>     0x61171a25<+5>:     mov    0x61171a2c,%eax
>>     0x61171a2a<+10>:    call   *(%eax)
>>     0x61171a2c<+12>:    sbb    %al,%al
>> =>  0x61171a2e<+14>:    pop    %ss
>>
>> it seems redirection statement('Kludge alert') in autoload.cc didn't
>> work as expected.
>> what would i do??
>
> Well, since you're trying to do something cutting edge and unsupported
> it seems like you will have to debug the problem using gdb and, if you
> really want this to work, make a change to autoload.cc to fix the
> problem.  Look at a call frame for normal program and find where
> the return address is stored.
>
> Either that or wait for us to move to a newer version of gcc.
>
> cgf
>



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