[llvm-bugs] [Bug 39574] New: Clang generates incorrect code when compiling chromium's sql_transaction.cc

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Nov 7 00:10:09 PST 2018


            Bug ID: 39574
           Summary: Clang generates incorrect code when compiling
                    chromium's sql_transaction.cc
           Product: clang
           Version: trunk
          Hardware: Other
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: ptworek at vewd.com
                CC: dgregor at apple.com, llvm-bugs at lists.llvm.org,
                    richard-llvm at metafoo.co.uk

I've recently run into strange crashes in a chromium based product compiled
with the recent HEAD versions of clang. After some investigation I've
discovered that blink::SQLTransaction::StateFunctionFor seems to return bad
pointers. This is rather strange since the function itself is pretty trivial
What is even more interesting, the problem occurs only if this one specific
function is compiled with optimizations enabled. Adding "pragma clang optimize
on/off" around the function fixes the problem. Another way to solve it is to
simply comment out the second DCHECK in this function. The DCHECK failure is
not a problem however, only its presence affects the generated code somehow.

The issue happens only on armv7, I cannot reproduce it on x86_64.

So far I've been unable to prepare a minimized TC that reproduces this problem
outside of chromium codebase.

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/20181107/1d9e367b/attachment.html>

More information about the llvm-bugs mailing list