[llvm-bugs] [Bug 40855] New: ExceptionDataRecord::EpilogueCount returns wrong amount in some cases on aarch64

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Feb 25 12:32:58 PST 2019


https://bugs.llvm.org/show_bug.cgi?id=40855

            Bug ID: 40855
           Summary: ExceptionDataRecord::EpilogueCount returns wrong
                    amount in some cases on aarch64
           Product: libraries
           Version: trunk
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Support Libraries
          Assignee: unassignedbugs at nondot.org
          Reporter: froydnj at gmail.com
                CC: dmajor at mozilla.com, llvm-bugs at lists.llvm.org,
                    martin at martin.st

I have an aarch64 executable with a function that llvm-readelf claims has 123
(!) epilogue scopes.  This is fine as far as it goes, but 123 is wrong, because
this code:

https://github.com/llvm-mirror/llvm/blob/f25266101e3a715fb377960a7cf99c4f9ec2f37e/include/llvm/Support/ARMWinEH.h#L385-L392

is wrong: in the HeaderWords() != 1 case, we're trying to extract a 16-bit
field, but the return type of the function truncates that 16-bit quantity to 8
bits.  The actual amount is 891 (!), which is similarly unbelievable, but there
you go.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190225/c5d8b8e8/attachment.html>


More information about the llvm-bugs mailing list