public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/21271] New: Invalid free in std::string
@ 2005-04-28 21:03 chris at bubblescope dot net
2005-04-28 21:57 ` [Bug libstdc++/21271] " pcarlini at suse dot de
2005-05-01 10:08 ` chris at bubblescope dot net
0 siblings, 2 replies; 3+ messages in thread
From: chris at bubblescope dot net @ 2005-04-28 21:03 UTC (permalink / raw)
To: gcc-bugs
in Mac os x 10.3.9, I get warnings about "invalid or double free" from the following piece of code when
compiled at at least -O1. I believe this code to be valid by the standard. Due to time constraints for a
couple of weeks I'm not going to be able to investigate more carefully what is causing this problem, and
in particular if it's libstdc++, g++ or the apple malloc checker's fault. Sorry.
#include <new>
#include <string>
#include <stdexcept>
void test01(void)
{
int csz01;
const char str_lit01[] = "rodeo beach, marin";
std::string str01(str_lit01);
csz01 = str01.size();
std::string str03(str01,csz01);
}
int main()
{
test01();
return 0;
}
--
Summary: Invalid free in std::string
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: libstdc++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: chris at bubblescope dot net
CC: gcc-bugs at gcc dot gnu dot org
GCC host triplet: apple-ppc-darwin
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21271
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug libstdc++/21271] Invalid free in std::string
2005-04-28 21:03 [Bug libstdc++/21271] New: Invalid free in std::string chris at bubblescope dot net
@ 2005-04-28 21:57 ` pcarlini at suse dot de
2005-05-01 10:08 ` chris at bubblescope dot net
1 sibling, 0 replies; 3+ messages in thread
From: pcarlini at suse dot de @ 2005-04-28 21:57 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pcarlini at suse dot de 2005-04-28 21:57 -------
Hi Chris. Whereas I'm not seeing anything wrong with Valgrind on x86, I'm willing
to check also ppc-darwin but would appreciate detailed instructions to reproduce
the problem. In the meanwhile, I would suggest checking whether is an artifact
due to the pool allocation of mt_alloc: can you repeat your test with a GCC built
with --enable-libstdcxx-allocator=new?!?
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |WAITING
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21271
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug libstdc++/21271] Invalid free in std::string
2005-04-28 21:03 [Bug libstdc++/21271] New: Invalid free in std::string chris at bubblescope dot net
2005-04-28 21:57 ` [Bug libstdc++/21271] " pcarlini at suse dot de
@ 2005-05-01 10:08 ` chris at bubblescope dot net
1 sibling, 0 replies; 3+ messages in thread
From: chris at bubblescope dot net @ 2005-05-01 10:08 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From chris at bubblescope dot net 2005-05-01 10:08 -------
Woops, false alarm, somehow I'd horribly, horribly messed up something. A clean OS reinstall seems to
have cleared up this, and another unrelated problem. Sorry
--
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21271
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-05-01 10:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-04-28 21:03 [Bug libstdc++/21271] New: Invalid free in std::string chris at bubblescope dot net
2005-04-28 21:57 ` [Bug libstdc++/21271] " pcarlini at suse dot de
2005-05-01 10:08 ` chris at bubblescope dot net
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).