This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB 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]

c++/2535: wrong data displayed for a std::string


>Number:         2535
>Category:       c++
>Synopsis:       wrong data displayed for a std::string
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Oct 13 19:48:01 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     rdengler@arcor.de
>Release:        6.8
>Organization:
>Environment:
Linux linux-8y72 2.6.25.5-1.1-pae #1 SMP 2008-06-07 01:55:22 +0200 i686 athlon i386 GNU/Linux
>Description:
For a local std::string variable "s1" print s1.size() displays a wrong value if s1 also is used as return value. Return type of function also is string.
>How-To-Repeat:
Step into function test(), enter "print s1" in console.
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: text/x-c++src; name="main.cpp"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="main.cpp"

I2luY2x1ZGUgPHN0cmluZz4KCnVzaW5nIHN0ZDo6c3RyaW5nOwoKc3RyaW5nIHRlc3QoKQp7Cglz
dHJpbmcgczEoImFiYyIpOwojaWYgMQoJcmV0dXJuIHMxOyAvLyBFUlJPUiBpbiBwcmludCBzMQoj
ZWxzZQoJcmV0dXJuIHN0cmluZyhzMSk7IC8vIE9LIHByaW50IHMxCiNlbmRpZgp9CgoKaW50IG1h
aW4oKQp7Cgl0ZXN0KCk7CglyZXR1cm4gMDsKfQo=


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