This is the mail archive of the gdb-prs@sources.redhat.com 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++/1775: printing evaluation of string comparse causes gdb to seg fault


>Number:         1775
>Category:       c++
>Synopsis:       printing evaluation of string comparse causes gdb to seg fault
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Sep 12 18:48:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator:     grantschoep@yahoo.com
>Release:        6.2.1
>Organization:
>Environment:
Redhat Enterprise 3.0
g++ 3.2.3
>Description:
When printing an evaluation of a string with another, gdb core dumps.

To simply reproduce, basically just make an main, with one string definition/assinment in it. I can print the string just fine. But if I did something like "print mystring == "Yes" it core dumps.

   std::string mystring = "Yes"
And I type: print mystring == "Yes"

gdb segfaults.
>How-To-Repeat:
Create a main as follows

int main() {
   string myString("Yes");
   return 0;
}

In the above code, if you execute it through the gdb, if you do:
print myString == "Yes"
before it does the return, gdb core dumps.
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


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