]>
Commit | Line | Data |
---|---|---|
d3268d2c PS |
1 | |
2 | PR libstdc++/18185 | |
3 | * libsupc++/eh_globals.cc (get_globals_dtor): Delete unhandled exceptions. | |
4 | ||
5 | --- gcc/libstdc++-v3/libsupc++/eh_globals.cc 2004/04/30 04:20:24 1.4.16.1 | |
6 | +++ gcc/libstdc++-v3/libsupc++/eh_globals.cc 2004/11/08 17:41:19 1.4.16.2 | |
7 | @@ -48,7 +48,17 @@ | |
8 | get_globals_dtor (void *ptr) | |
9 | { | |
10 | if (ptr) | |
11 | - std::free (ptr); | |
12 | + { | |
13 | + __cxa_exception *exn, *next; | |
14 | + exn = ((__cxa_eh_globals *) ptr)->caughtExceptions; | |
15 | + while (exn) | |
16 | + { | |
17 | + next = exn->nextException; | |
18 | + _Unwind_DeleteException (&exn->unwindHeader); | |
19 | + exn = next; | |
20 | + } | |
21 | + std::free (ptr); | |
22 | + } | |
23 | } | |
24 | ||
25 | static void |