This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: 2.95.3-10 streams cause seg-fault


[redirecting to the correct mailing list]
On Fri, Oct 03, 2003 at 11:11:48AM -0400, William A. Hoffman wrote:
>The following program crashes when compiled with g++-2:
>
>---------start cyggcc295bug.cxx-------
>#include <fstream>
>
>int main()
>{
>  char buffer[1024];
>  std::ifstream fin("./cyggcc295bug.cxx");
>  if(fin)
>    {
>    fin.getline(buffer, 10); // Running a.exe crashes here.
>    return 0;
>    }
>  return 1;
>}
>---------end cyggcc295bug.cxx-------
>
>If you save the above program into  g++-2 cyggcc295bug.cxx
>
>Then try this:
>g++-2 cyggcc295bug.cxx
>./a.exe
>(seg fault)
>
>
>g++ cyggcc295bug.cxx
>./a.exe
>(works)
>
>It works when compiled with g++ (which is g++ 3.3.1)  
>
>There seem to be several reports of this bug :
>http://www.cygwin.com/ml/cygwin/2003-09/msg01533.html
>http://www.cygwin.com/ml/cygwin/2003-09/msg01831.html
>http://www.cygwin.com/ml/cygwin/2003-09/msg00994.html
>
>However, it has been suggested that the posters use the newer g++ (3.3).
>I acknowledge that it works with the 3.3.1 compiler.
>However, there are reasons to use gcc 2.95 based compilers.

Sorry, David, but the 2.95 kernel is essentially offered "as is" at this point.
I had not planned on releasing any new versions.

However, that said, if you do find a fix for this problem I'll be willing to
apply it and respin gcc.  I just am not going to be tracking down the problem
myself.

Sorry, but I barely have the time these days for gcc 3.3.1.  2.95* is off the
radar entirely.

cgf

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]