Dear cfe-commits and libcxxabi developers,<div><br></div><div>I hit a bug in libc++abi when testing on a gcc testsuite sample.</div><div>This can be fixed simply by this small patch.</div><div>Please help review it. Thanks in advance!</div>
<div><br></div><div><br></div><div><div>Index: src/cxa_personality.cpp</div><div>===================================================================</div><div>--- src/cxa_personality.cpp     (revision 167216)</div><div>+++ src/cxa_personality.cpp     (working copy)</div>
<div>@@ -552,7 +552,7 @@</div><div>     const uint8_t* callSiteTableEnd = callSiteTableStart + callSiteTableLength;</div><div>     const uint8_t* actionTableStart = callSiteTableEnd;</div><div>     const uint8_t* callSitePtr = callSiteTableStart;</div>
<div>-    while (true)</div><div>+    while (callSitePtr < callSiteTableEnd)</div><div>     {</div><div>         // There is one entry per call site.</div><div> #if !__arm__</div><div>@@ -782,7 +782,12 @@</div><div>             call_terminate(native_exception, unwind_exception);</div>
<div>         }</div><div> #endif  // !__arm__</div><div>-    }  // there is no break out of this loop, only return</div><div>+    }  // there might be some tricky cases which break out of this loop</div><div>+</div><div>
+    // If we are here, it means no eh table entry specify how to handle</div><div>+    // this exception. For example, gcc testsuites eh23 at</div><div>+    // <gcc>/gcc/testsuite/g++.old-deja/g++.mike/eh23.C</div>
<div>+    call_terminate(native_exception, unwind_exception);</div><div> }</div><div><br></div><div> // public API</div></div><div><br></div><div><br></div><div><br></div><div>-- <br>Best regards,<div>Wen-Han Gu (Nowar)</div>
<br>
</div>