[BUG] Nasty bug persists on x86-64
Corinna Vinschen
corinna-cygwin@cygwin.com
Tue Sep 2 08:30:00 GMT 2014
On Sep 2 11:06, Pavel Fedin wrote:
> Hello Corinna!
>
> > Try `bt' at this point. Maybe the backtrace shows something of
> > interest.
>
> You haven't read the message completely. 'bt' cannot help since
> there's no debug information for ntdll and gdb is unable to unwind
> the stack correctly.
>
> > Apart from that, try the latest snapshot from
> > https://cygwin.com/snapshots/ I converted the internal exception
> > handling avoiding crashes from system functions to SEH. Perhaps the
> > above doesn't show up with it.
>
> I have installed the snapshot, and looks like it's now stable.
> However, this exception actually persists. I can tell you some more
> details. The actual malfunction happens when this exception fires
> twice in a row. I managed to catch this with strace a couple of
> times, but didn't save logs unfortunately.
> I want to try to bisect for the origin of this crash. Currently i
> know that it happens before main(). But is main() a real entry point
> ? I believe it's not. Can you tell me what is the real binary's entry
> point in Cygwin ?
There are three entry points:
- init.cc, function dll_entry(), is called when the Cygwin DLL gets
initialized. This in turn calls dll_crt0_0() in which the real
action goes on. This function runs to completion right before your
exception, visible by the preceeding debug output
finished dll_crt0_0 initialization
- mainCRTStartup() in crt0.c, linked into the executable, is the "real"
entry point. From there it calls cygwin_crt0() in the statically
linked part of libcygwin.a, which calls _dll_crt0() in dcrt0.cc.
_dll_crt0 is now part of the DLL. It performs some basic
initialization and then calls (indirectly via _cygtls::call) the
function dll_crt0_1 in dcrt0.cc. This is where the second part of the
real action starts. From here it eventually calls the application's
main entry point.
- DllMain in lib/dll_entry.c, using the DECLARE_CYGWIN_DLL macro from
include/cygwin/cygwin_dll.h is the entry point for all cygwin-built
DLLs. Basically it calls cygwin_attach_dll in lib/cygwin_attach_dll.c,
which calls dll_dllcrt0 in dll_init.cc, which calls dll_dllcrt0_1 in
dll_init.cc. This function initializes the datastructures for
bookkeeping DLLs linked to or loaded by the application.
> Yesterday in the evening i replied from home with some more
> information, but my reply got lost again :(
Raw email address in your SIG again, perhaps?
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Red Hat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20140902/2678e16f/attachment.sig>
More information about the Cygwin
mailing list