#23604: C++ Destructor of UnicodeString throws exception if local in block with a throw of another exception ---------------------------------------+------------------------------------ Reporter: bumens@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.8.2 Keywords: icu UnicodeString C++ bug | Port: icu ---------------------------------------+------------------------------------ {{{ vb@bayhorse:~/icu-bug % cat test1.cc #include <unicode/unistr.h> #include <iostream> void f() { UnicodeString s(""); throw 23; } int main(int argc, char **argv) { try { f(); } catch (...) { std::cout << "catched.\n"; } return 0; } vb@bayhorse:~/icu-bug % cat test2.cc #include <unicode/unistr.h> #include <iostream> void f() { { UnicodeString s; } throw 23; } int main(int argc, char **argv) { try { f(); } catch (...) { std::cout << "catched.\n"; } return 0; } vb@bayhorse:~/icu-bug % make g++-mp-4.4 -fexceptions -L/opt/local/lib -licuuc test1.cc -o test1 g++-mp-4.4 -fexceptions -L/opt/local/lib -licuuc test2.cc -o test2 vb@bayhorse:~/icu-bug % ./test1 [1] 66078 abort ./test1 vb@bayhorse:~/icu-bug % ./test2 catched. vb@bayhorse:~/icu-bug % uname -a Darwin bayhorse.local 10.2.0 Darwin Kernel Version 10.2.0: Tue Nov 3 10:37:10 PST 2009; root:xnu-1486.2.11~1/RELEASE_I386 i386 i386 vb@bayhorse:~/icu-bug % g++-mp-4.4 --version g++-mp-4.4 (GCC) 4.4.3 Copyright (C) 2010 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. vb@bayhorse:~/icu-bug % port installed icu The following ports are currently installed: icu @4.3.3_0 (active) vb@bayhorse:~/icu-bug % }}} -- Ticket URL: <http://trac.macports.org/ticket/23604> MacPorts <http://www.macports.org/> Ports system for Mac OS