www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/1998/09/01/06:49:54

From: cgf AT cygnus DOT com (Christopher Faylor)
Subject: Re: global constructor using iostreams fail
1 Sep 1998 06:49:54 -0700 :
Message-ID: <19980901093344.B16818.cygnus.cygwin32.developers@cygnus.com>
References: <9809010519 DOT AA04800 AT modi DOT xraylith DOT wisc DOT edu>
Mime-Version: 1.0
To: Mumit Khan <khan AT xraylith DOT wisc DOT edu>, cygwin32-developers AT cygnus DOT com

Is this using a coolview version of a b19 version?

This should be handled when global constructors are run, right?
Would this be for the global constructors of the .dll or the
user code?

On Tue, Sep 01, 1998 at 12:19:16AM -0500, Mumit Khan wrote:
>Does anybody have an idea why the streambuf vtable is not being
>initialized correctly in cygwin32 apps? Basically, the following
>fails:
>  
>  #include <iostream.h>
>
>  struct Foo {
>    Foo () { cout << " creating foo." << endl;
>    ~Foo () { cout << " deleting foo." << endl;
>  };
>
>  Foo foo;
>  int main () {
>    return 0;
>  }
>
>Looks like the io jump tables aren't being initialized before main, and
>the code in cout ends up trying to dereference a null pointer (to a 
>function _IO_xsputn or some such).
>
>I don't understand cygwin startup enough to understand what's going on.
>The complexity of libio doesn't help matters much either.
>
>This works just fine under other x86-win32 targets.

-- 
cgf AT cygnus DOT com             "Everything has a boolean value, if you stand
http://www.cygnus.com/      far enough away from it."  -- Galena Alyson Canada

- Raw text -


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