This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


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

c++/646: stl map hangs while erasing end()



>Number:         646
>Category:       c++
>Synopsis:       stl map hangs while erasing end()
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Oct 16 07:56:00 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator:     Kurt Zhang
>Release:        gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)
>Organization:
>Environment:
Linux 2.2.14-5.0
>Description:
when I tried to erase a map's end iterator,
the program hangs. But according Stroustrup's The C++
Programming Language, third edition, "Erasing end()
is harmless." (pp 489) Please see the attached file 
for detail. This problem can be repeated on all associative
containers.
>How-To-Repeat:
Compile the attached file, and run it. It will hang.
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="report_map.cc"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="report_map.cc"

I2luY2x1ZGUgPG1hcD4KCmludCBtYWluKCkKewoJbWFwPGludCxpbnQ+IG07CgltLmVyYXNlKG0u
ZW5kKCkpOwp9Cg==

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