llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
28.43k stars 11.75k forks source link

Exception Table out-of-range but still keep walking #14684

Closed llvmbot closed 11 years ago

llvmbot commented 11 years ago
Bugzilla Link 14312
Resolution FIXED
Resolved on Nov 13, 2012 07:20
Version unspecified
OS Linux
Attachments Fix while loop condition
Reporter LLVM Bugzilla Contributor

Extended Description

Hi all,

When I test this test case, I found it will keep walking through exception table entry even though it should stop and terminate. http://www.doc.ic.ac.uk/~awl03/cgi-bin/trac.cgi/miro/browser/trunk/gcc/gcc/testsuite/g%2B%2B.old-deja/g%2B%2B.mike/eh23.C

The reason is that the exception table didn't encode this into one entry, but, libcxxabi always trust it can find the one. (i.e., while (true) loop)

I've tested on ARM and x86, and both have this bug. I trust other platforms have this problem too. This may cause nothing error, infinite loop, or other errors, just depending on the next upcoming entry.

Thanks.

llvmbot commented 11 years ago

Hi Howard,

Big thanks for your help! This is the patch for CREDITS.TXT. Thanks!

Index: CREDITS.TXT

--- CREDITS.TXT (revision 167830) +++ CREDITS.TXT (working copy) @@ -28,3 +28,7 @@ E: erik.olofsson@hansoft.se E: erik@olofsson.info D: Minor patches and fixes + +N: Nowar Gu +E: wenhan.gu@gmail.com +D: Minor patches and fixes

Thanks for your persistence on this one. Your patch committed revision 167733.

Please also send a patch for CREDITS.TXT.

llvmbot commented 11 years ago

Thanks for your persistence on this one. Your patch committed revision 167733.

Please also send a patch for CREDITS.TXT.