From: SourceForge.net <no...@so...> - 2008-06-25 07:50:43
|
Bugs item #1622210, was opened at 2006-12-26 17:03 Message generated for change (Settings changed) made by dannysmith You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=102435&aid=1622210&group_id=2435 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: gcc Group: None >Status: Closed >Resolution: Out of Date Priority: 5 Private: No Submitted By: Stuart Mentzer (stuart_mentzer) Assigned to: Danny Smith (dannysmith) Summary: GCC 3.4.5 Access Violation when both cout and cerr used Initial Comment: The candidate MinGW GCC 3.4.5 with DW2 support gives an Access Violation with this trivial program: #include <iostream> int main() { std::cout << "cout output" << std::endl; std::cerr << "cerr output" << std::endl; } The "normal" 3.4.5 does not have this problem. System info: Windows XP SP2 gcc version 3.4.5 (mingw special) [The DW2 version] GNU ld version 2.17.50 20060824 MinGW installed from components not installer Not using MSYS mingw-runtime-3.10 w32api-3.7 Details below. The error is: Access Violation at location 0040741d in module t.exe Reading from location 00000030. Registers: eax=0043d324 ebx=0043d320 ecx=00000004 edx=00000000 esi=0043d324 edi=0043300c eip=0040741d esp=0022fec0 ebp=0022fed8 iopl=0 nv up ei pl nz na po nc cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00000206 Call stack: 0040741D t.exe:0040741D 004052AB t.exe:004052AB 0042E8AE t.exe:0042E8AE 00401493 t.exe:00401493 main t.cc:7 ... { std::cout << "cout output" << std::endl; > std::cerr << "cerr output" << std::endl; } ... 00401237 t.exe:00401237 00401288 t.exe:00401288 7C816FD7 kernel32.dll:7C816FD7 RegisterWaitForInputIdle ---------------------------------------------------------------------- Comment By: Stuart Mentzer (stuart_mentzer) Date: 2007-01-03 10:57 Message: Logged In: YES user_id=913176 Originator: YES Thanks. when I do a fresh setup of the DW2 build the problem goes away. But the library paths seem OK so I'm not sure what was going on. It may come from my habit of installing updates on top of earlier releases: things have moved around somewhat in recent releases so this is probably a bad idea. For that matter, when I install gdb 6.3 on top of the DW2 build it is overwriting some headers and libs: is that a problem? Should I revert them to the ones provided with the DW2 build? Stuart ---------------------------------------------------------------------- Comment By: Danny Smith (dannysmith) Date: 2007-01-02 22:26 Message: Logged In: YES user_id=11494 Originator: NO It also 'works for me' with gcc-3.4.5 built with DW2 EH. Check if you are mixing libraries (libgcc or libstdc++) of the DW2 build with a SJLJ build. These options might help: -print-libgcc-file-name Display the name of the compiler's companion library -print-file-name=<lib> Display the full path to library <lib> Danny ---------------------------------------------------------------------- Comment By: Earnie Boyd (earnie) Date: 2006-12-28 22:20 Message: Logged In: YES user_id=15438 Originator: NO Sorry, Dwarf2 isn't officially supported; i.e. it is a work in progress and Danny will have to comment. ---------------------------------------------------------------------- Comment By: Stuart Mentzer (stuart_mentzer) Date: 2006-12-28 14:29 Message: Logged In: YES user_id=913176 Originator: YES Earnie, was your try with the Dwarf2 candidate GCC 3.4.5 or the regular 3.4.5 (can't tell from the --version info)? I don't have the problem except with the DW2 build. If you don't get this with the DW2 build then does anyone have any idea why I would? Thanks. Stuart ---------------------------------------------------------------------- Comment By: Earnie Boyd (earnie) Date: 2006-12-27 02:20 Message: Logged In: YES user_id=15438 Originator: NO boyde@OH6000GBOYDE ~ $ g++ --version g++.exe (GCC) 3.4.5 (mingw special) Copyright (C) 2004 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. boyde@OH6000GBOYDE ~ $ cat t.cc #include <iostream> int main (void) { std::cout<<"cout output"<<std::endl; std::cerr<<"cerr output"<<std::endl; } boyde@OH6000GBOYDE ~ $ g++ -ot t.cc boyde@OH6000GBOYDE ~ $ ./t cout output cerr output ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=102435&aid=1622210&group_id=2435 |