<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Large alignment assumptions overflow 32-bit 'unsigned', trip zero alignment assertion"
   href="https://bugs.llvm.org/show_bug.cgi?id=45131">45131</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Large alignment assumptions overflow 32-bit 'unsigned', trip zero alignment assertion
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>9.0
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>FreeBSD
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>LLVM Codegen
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>cem@FreeBSD.org
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org, neeilans@live.com, richard-llvm@metafoo.co.uk
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Assertion failed: (Alignment != 0 && "Invalid Alignment"), function
CreateAlignmentAssumption, file llvm-project/llvm/include/llvm/IR/IRBuilder.h,
line 2573.
1.      <eof> parser at end of file
2.      Per-file LLVM IR generation
3.      ../../v8/src/common/ptr-compr-inl.h:30:19: Generating code for
declaration 'v8::internal::GetIsolateRoot'

FreeBSD clang version 9.0.1 (<a href="mailto:git@github.com">git@github.com</a>:llvm/llvm-project.git
c1a0a213378a458fbea1a5c77b315c7dce08fd05) (based on LLVM 9.0.1)
Target: x86_64-unknown-freebsd13.0
Thread model: posix

This is tickled by Chrome's v8 engine, which asserts 4GB alignment with
something like:

__builtin_assume_aligned(foo, size_t{4} * GB)

in an inlined function, GetIsolateRoot().

The assertion tripped seems to be in CreateAlignmentAssumption(), which takes
an 'unsigned Alignment' and asserts it is non-zero.  2^32 mod 2^32 is zero, so
the assertion fires.  For now I am working around this issue by disabling use
of __builtin_assume_aligned() in v8.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>