From: SF/projects/mingw n. l. <min...@li...> - 2011-03-11 21:52:31
|
Bugs item #3206265, was opened at 2011-03-11 11:17 Message generated for change (Comment added) made by plibardi You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=102435&aid=3206265&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: Deleted >Resolution: Works For Me Priority: 5 Private: No Submitted By: Paolo Libardi (plibardi) Assigned to: Nobody/Anonymous (nobody) Summary: Memory allocation for vector to extend Initial Comment: I have a variable of type vector<string>. It contains 2 items and needs to expand as a third item is going to be added. When it expands it overwrites memory of another variable. Error tracking: src/Pilot.cpp: line 181 src/UtString.cpp: line 36 push_back on line 36 requires vector to expand and this operation deletes value of text_ variable - O.S.: Windows 7 starter - IDE: Code::Blocks - Nigthly build 7017 - 20110220 >gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=c:/mingw/bin/../libexec/gcc/mingw32/4.5.2/lto-wrapper.exe Target: mingw32 Configured with: ../gcc-4.5.2/configure --enable-languages=c,c++,ada,fortran,obj c,obj-c++ --disable-sjlj-exceptions --with-dwarf2 --enable-shared --enable-libgo mp --disable-win32-registry --enable-libstdcxx-debug --enable-version-specific-r untime-libs --disable-werror --build=mingw32 --prefix=/mingw Thread model: win32 gcc version 4.5.2 (GCC) >ld -v GNU ld (GNU Binutils) 2.21 ---------------------------------------------------------------------- >Comment By: Paolo Libardi (plibardi) Date: 2011-03-11 22:52 Message: It's not a MinGW bug. Application error is due to parameter passed to function: first parameter is the address of a vector item, thus as the vector requires to expand it's moved to a new memory location and all the content is copied to new memory address. Old memory address is changed, maybe through a swap instruction to optimize the expansion of the vector. ---------------------------------------------------------------------- Comment By: Paolo Libardi (plibardi) Date: 2011-03-11 22:52 Message: Not a MinGW bug. Although your problem may be interesting and causing you problems you wish answers to, it is not a problem with the MinGW runtime, w32api, GCC, binutils or msys. Your BUG report has therefore been deleted. If you feel that this needs further discussion then please post to min...@li.... Thanks for your interest in the MinGW Project, MinGW Project Administrators ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=102435&aid=3206265&group_id=2435 |