[libunwind] r308871 - [libunwind] Handle .ARM.exidx tables without sentinel last entry

Hans Wennborg via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 26 10:58:49 PDT 2017


Saleem asked for this to be merged to 5.0: r309143.

On Mon, Jul 24, 2017 at 2:19 AM, Momchil Velikov via cfe-commits
<cfe-commits at lists.llvm.org> wrote:
> Author: chill
> Date: Mon Jul 24 02:19:32 2017
> New Revision: 308871
>
> URL: http://llvm.org/viewvc/llvm-project?rev=308871&view=rev
> Log:
> [libunwind] Handle .ARM.exidx tables without sentinel last entry
>
> UnwindCursor<A, R>::getInfoFromEHABISection assumes the last
> entry in the index table never corresponds to a real function.
> Indeed, GNU ld always inserts an EXIDX_CANTUNWIND entry,
> containing the end of the .text section. However, the EHABI specification
> (http://infocenter.arm.com/help/topic/com.arm.doc.ihi0038b/IHI0038B_ehabi.pdf)
> does not seem to contain text that requires the presence of a sentinel entry.
> In that sense the libunwind implementation isn't compliant with the specification.
>
> This patch makes getInfoFromEHABISection examine the last entry in the index
> table if upper_bound returns the end iterator.
>
> Fixes https://bugs.llvm.org/show_bug.cgi?id=31091
>
> Differential revision: https://reviews.llvm.org/D35265
>
> Modified:
>     libunwind/trunk/src/UnwindCursor.hpp


More information about the cfe-commits mailing list