[LLVMbugs] [Bug 18536] New: Bad alignment in clang/AST/StmpOpenMP.h

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sat Jan 18 18:09:41 PST 2014


http://llvm.org/bugs/show_bug.cgi?id=18536

            Bug ID: 18536
           Summary: Bad alignment in clang/AST/StmpOpenMP.h
           Product: clang
           Version: trunk
          Hardware: Sun
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: stoklund at 2pi.dk
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

The OMPVarList class contains:

  /// \brief Fetches list of all variables in the clause.
  ArrayRef<const Expr *> getVarRefs() const {
    return ArrayRef<const Expr *>(
       reinterpret_cast<const Expr *const *>(static_cast<const T *>(this) + 1),
       NumVars);
  }

The resulting pointer is not sufficiently aligned, and code using it crashes on
platforms that check alignment.

-- 
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/20140119/2a7c7c0a/attachment.html>


More information about the llvm-bugs mailing list