public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: jojelino <jojelino@gmail.com>
To: cygwin@cygwin.com
Subject: Re: sigsegv in compiled cygwin
Date: Sat, 05 Feb 2011 18:11:00 -0000	[thread overview]
Message-ID: <iik3sk$7ur$1@dough.gmane.org> (raw)
In-Reply-To: <20110204150118.GA20523@ednor.casa.cgf.cx>

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

  reply	other threads:[~2011-02-05 18:11 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-04 12:38 jojelino
2011-02-04 15:01 ` Christopher Faylor
2011-02-05 18:11   ` jojelino [this message]
2011-02-05 19:35     ` Christopher Faylor
2011-02-05 19:59       ` jojelino
2011-02-05 20:03       ` Christopher Faylor
2011-02-09 14:16         ` [patch]another sigsegv in environ.cc jojelino
2011-02-09 14:52           ` Corinna Vinschen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='iik3sk$7ur$1@dough.gmane.org' \
    --to=jojelino@gmail.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).