[llvm-bugs] [Bug 39704] New: Clang 7.0 claiming unaligned load with POWER7 vec_xl

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Nov 19 00:05:09 PST 2018


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

            Bug ID: 39704
           Summary: Clang 7.0 claiming unaligned load with POWER7 vec_xl
           Product: compiler-rt
           Version: 7.0
          Hardware: Other
                OS: other
            Status: NEW
          Severity: normal
          Priority: P
         Component: ubsan
          Assignee: unassignedbugs at nondot.org
          Reporter: noloader at gmail.com
                CC: llvm-bugs at lists.llvm.org

I don't have a reduced case for this at the moment. We are trying to track down
the cause of several failed self tests. But I hope someone can take a quick
look and tweak an attribute somewhere.

I'm working on GCC112, which is powerpc64le-unknown-linux-gnu. I built Clang
from the 7.0 release tarballs. During a run of UBsan I caught several findings
like shown below. All the findings pointed to altivec.h:16363.

/home/noloader/llvm/lib/clang/7.0.0/include/altivec.h:16363:10: runtime error:
load of misaligned address 0x3fffd3453848 for type '__vector unsigned char'
(vector of 16 'unsigned char' values), which requires 16 byte alignment
0x3fffd3453848: note: pointer points here
 00 00 00 00  a0 10 97 5f 2f e6 c9 b9  69 36 ab 5d 96 9e 6c cf  fc c7 e9 ac c0
09 cd f3  aa cf 66 7c
              ^

altivec.h:16363 is shown below. Notice the vec_xl:

 16361  static inline __ATTRS_o_ai vector unsigned char
 16362  vec_xl(signed long long __offset, unsigned char *__ptr) {
 16363    return *(vector unsigned char *)(__ptr + __offset);
 16364  }


As far as I know there is no alignment requirement for the instruction.

-- 
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/20181119/9ca5d3e4/attachment-0001.html>


More information about the llvm-bugs mailing list