Re: [Mingw-w64-public] std::fstream in struct/class - crash

2012-06-11 Thread Deniz Sarikaya
On Windows 8 Release Preview with GCC 4.7.1 (prerelease), this crash
doesn't happen anymore, whether it was the os or gcc.

2012/6/5 Ruben Van Boxem vanboxem.ru...@gmail.com:
 2012/6/4 Deniz Sarikaya daiml...@googlemail.com

 2012/6/4 Ruben Van Boxem vanboxem.ru...@gmail.com:
  Op 4 jun. 2012 23:06 schreef Deniz Sarikaya daiml...@googlemail.com
  het
  volgende:
 
 
 
  Hello,
 
  I don't know why, but this scenario crashes for me with gcc 4.7.0
  rubenvb on Windows 8 x64:
 
  What Windows 8 version. Developer Preview? Consumer Preview? Release
  Preview?
 Consumer Preview


 Try the Release Preview. This might just well be an OS bug.


 
 
  #include fstream
  struct Testfile
  {
  std::fstream t;
  }
 
  You're missing a semicolon here.
 It's not missing in my cpp file ;)
 
  int main()
  {
  Testfile t;
  }
 
  backtrace:
 
  #0 6FCB8F96 ?? () (??:??)
  #1 004013ED __tmainCRTStartup()
 
 
  (/home/ruben/mingw-w64/toolchain/src/mingw-w64/tags/v2.0.3/mingw-w64-crt/crt/crtexe.c:307)
  #2 75C0DE7D ?? () (??:??)
  #3 77AE4B54 ?? () (??:??)
  #4 77AE4B27 ?? () (??:??)
  #5 ?? ?? () (??:??)
 
  When using Step Into with GDB 7.4.1 till it crashes, it stops here:
  fstream
  basic_fstream()
  : __iostream_type(), _M_filebuf()
  { this-init(_M_filebuf); }
 
  On what line does it crash? What's the value of this?
 
  What compiler options did you use? It seems some debug info is missing.
  Try
  adding -g3 and make sure no -s is passed when linking.
 Apparently, this crash only happens with -O123 (not with -Os).
 The exact location changes every time, but its always somewhere in
 fstream in the constructors of fstream classes.
 Adding -g3 didn't change anything, also there's no -s.
 The value of this is value has been optimized out.


 OK, that limits it to these options (listed at -O equivalent -O1):
 http://gcc.gnu.org/onlinedocs/gcc-4.7.0/gcc/Optimize-Options.html#Optimize-Options

 If you could determine which one, this would be helpful to find the problem.
 Heck, it might even be -fomit-frame-pointer, but that's also used to build
 the gcc executables themselves. It must be a combination of factors, with
 the most likely being a problem with the prerelease Windows.

 
  Ruben
 
 
  Thanks,
 
 
 
  --
  Live Security Virtual Conference
  Exclusive live event will cover all the ways today's security and
  threat landscape has changed and how IT managers can respond.
  Discussions
  will include endpoint security, mobile security and the latest in
  malware
  threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
  ___
  Mingw-w64-public mailing list
  Mingw-w64-public@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
 
 
 
  --
  Live Security Virtual Conference
  Exclusive live event will cover all the ways today's security and
  threat landscape has changed and how IT managers can respond.
  Discussions
  will include endpoint security, mobile security and the latest in
  malware
  threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
  ___
  Mingw-w64-public mailing list
  Mingw-w64-public@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
 


 --
 Live Security Virtual Conference
 Exclusive live event will cover all the ways today's security and
 threat landscape has changed and how IT managers can respond. Discussions
 will include endpoint security, mobile security and the latest in malware
 threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
 ___
 Mingw-w64-public mailing list
 Mingw-w64-public@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/mingw-w64-public



 --
 Live Security Virtual Conference
 Exclusive live event will cover all the ways today's security and
 threat landscape has changed and how IT managers can respond. Discussions
 will include endpoint security, mobile security and the latest in malware
 threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
 ___
 Mingw-w64-public mailing list
 Mingw-w64-public@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263

[Mingw-w64-public] std::fstream in struct/class - crash

2012-06-04 Thread Deniz Sarikaya
Hello,

I don't know why, but this scenario crashes for me with gcc 4.7.0
rubenvb on Windows 8 x64:
#include fstream
struct Testfile
{
std::fstream t;
}
int main()
{
Testfile t;
}

backtrace:

#0 6FCB8F96 ?? () (??:??)
#1 004013ED __tmainCRTStartup()
(/home/ruben/mingw-w64/toolchain/src/mingw-w64/tags/v2.0.3/mingw-w64-crt/crt/crtexe.c:307)
#2 75C0DE7D ?? () (??:??)
#3 77AE4B54 ?? () (??:??)
#4 77AE4B27 ?? () (??:??)
#5 ?? ?? () (??:??)

When using Step Into with GDB 7.4.1 till it crashes, it stops here:
fstream
basic_fstream()
: __iostream_type(), _M_filebuf()
{ this-init(_M_filebuf); }

Thanks,

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] std::fstream in struct/class - crash

2012-06-04 Thread Deniz Sarikaya
2012/6/4 Deniz Sarikaya daiml...@googlemail.com:
 2012/6/4 Ruben Van Boxem vanboxem.ru...@gmail.com:
 Op 4 jun. 2012 23:06 schreef Deniz Sarikaya daiml...@googlemail.com het
 volgende:



 Hello,

 I don't know why, but this scenario crashes for me with gcc 4.7.0
 rubenvb on Windows 8 x64:

 What Windows 8 version. Developer Preview? Consumer Preview? Release
 Preview?
 Consumer Preview


 #include fstream
 struct Testfile
 {
 std::fstream t;
 }

 You're missing a semicolon here.
 It's not missing in my cpp file ;)

 int main()
 {
 Testfile t;
 }

 backtrace:

 #0 6FCB8F96 ?? () (??:??)
 #1 004013ED __tmainCRTStartup()

 (/home/ruben/mingw-w64/toolchain/src/mingw-w64/tags/v2.0.3/mingw-w64-crt/crt/crtexe.c:307)
 #2 75C0DE7D ?? () (??:??)
 #3 77AE4B54 ?? () (??:??)
 #4 77AE4B27 ?? () (??:??)
 #5 ?? ?? () (??:??)

 When using Step Into with GDB 7.4.1 till it crashes, it stops here:
 fstream
 basic_fstream()
 : __iostream_type(), _M_filebuf()
 { this-init(_M_filebuf); }

 On what line does it crash? What's the value of this?

 What compiler options did you use? It seems some debug info is missing. Try
 adding -g3 and make sure no -s is passed when linking.
 Apparently, this crash only happens with -O123 (not with -Os).
 The exact location changes every time, but its always somewhere in
 fstream in the constructors of fstream classes.
 Adding -g3 didn't change anything, also there's no -s.
 The value of this is value has been optimized out.
With GCC 4.8 (i686-mingw-w64-gcc-4.8.0-20120604-rev-188156) I get this:
The procedure entry point
_ZTCSt13basic_fstream|cSt11char_traits|cEEO_Si could not be located in
the dynamic link library E:\Test\bin\Release\test.exe.

 Ruben


 Thanks,


 --
 Live Security Virtual Conference
 Exclusive live event will cover all the ways today's security and
 threat landscape has changed and how IT managers can respond. Discussions
 will include endpoint security, mobile security and the latest in malware
 threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
 ___
 Mingw-w64-public mailing list
 Mingw-w64-public@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


 --
 Live Security Virtual Conference
 Exclusive live event will cover all the ways today's security and
 threat landscape has changed and how IT managers can respond. Discussions
 will include endpoint security, mobile security and the latest in malware
 threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
 ___
 Mingw-w64-public mailing list
 Mingw-w64-public@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public