<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="/rss.xsl.xml"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
    <title>Changes in symbolizer-function-offset-dladdr.cpp</title>
    <description></description>
    <language>en</language>
    <copyright>Copyright 2015</copyright>
    <generator>Java</generator><item>
        <title>923cf890 - Avoid failing a CHECK in `DlAddrSymbolizer::SymbolizePC`.</title>
        <link>http://172.16.0.5:8080/history/llvm-project-15.0.7/compiler-rt/test/asan/TestCases/Darwin/symbolizer-function-offset-dladdr.cpp#923cf890</link>
        <description>Avoid failing a CHECK in `DlAddrSymbolizer::SymbolizePC`.Summary:It turns out the `CHECK(addr &gt;= reinterpret_cast&lt;upt&gt;(info.dli_saddr)`can fail because on armv7s on iOS 9.3 `dladdr()` returns`info.dli_saddr` with an address larger than the address we provided.We should avoid crashing here because crashing in the middle of reportingan issue is very unhelpful. Instead we now try to compute a function offsetif the value we get back from `dladdr()` looks sane, otherwise we don&apos;tset the function offset.A test case is included. It&apos;s basically a slightly modified version ofthe existing `test/sanitizer_common/TestCases/Darwin/symbolizer-function-offset-dladdr.cpp`test case that doesn&apos;t run on iOS devices right now.More details:In the concrete scenario on armv7s `addr` is `0x2195c870` and the returned`info.dli_saddr` is `0x2195c871`.This what LLDB says when disassembling the code.```(lldb) dis -a 0x2195c870libdyld.dylib`&lt;redacted&gt;:    0x2195c870 &lt;+0&gt;: nop    0x2195c872 &lt;+2&gt;: blx    0x2195c91c                ; symbol stub for: exit    0x2195c876 &lt;+6&gt;: trap```The value returned by `dladdr()` doesn&apos;t make sense because it pointsinto the middle of a instruction.There might also be other bugs lurking here because I noticed that the PCs wegather during stackunwinding (before changing them with`StackTrace::GetPreviousInstructionPc()`) look a little suspicious (e.g.  thePC stored for the frame with fail to symbolicate is 0x2195c873) as they don&apos;tlook properly aligned. This probably warrants further investigation in the future.rdar://problem/65621511Reviewers: kubamracek, ylnSubscribers: kristof.beyls, llvm-commits, #sanitizersTags: #sanitizersDifferential Revision: https://reviews.llvm.org/D84262

            List of files:
            /llvm-project-15.0.7/compiler-rt/test/asan/TestCases/Darwin/symbolizer-function-offset-dladdr.cpp</description>
        <pubDate>Tue, 21 Jul 2020 18:54:51 +0000</pubDate>
        <dc:creator>Dan Liew &lt;dan@su-root.co.uk&gt;</dc:creator>
    </item>
</channel>
</rss>
