<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </head>
    <body><span class="vcard"><a class="email" href="mailto:james.molloy@arm.com" title="James Molloy <james.molloy@arm.com>"> <span class="fn">James Molloy</span></a>
</span> changed
              <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED INVALID - Crash Using Clang on Android"
   href="http://llvm.org/bugs/show_bug.cgi?id=19451">bug 19451</a>
        <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">Status</td>
           <td>NEW
           </td>
           <td>RESOLVED
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">CC</td>
           <td>
                
           </td>
           <td>james.molloy@arm.com
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Resolution</td>
           <td>---
           </td>
           <td>INVALID
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED INVALID - Crash Using Clang on Android"
   href="http://llvm.org/bugs/show_bug.cgi?id=19451#c7">Comment # 7</a>
              on <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED INVALID - Crash Using Clang on Android"
   href="http://llvm.org/bugs/show_bug.cgi?id=19451">bug 19451</a>
              from <span class="vcard"><a class="email" href="mailto:james.molloy@arm.com" title="James Molloy <james.molloy@arm.com>"> <span class="fn">James Molloy</span></a>
</span></b>
        <pre>Hi,

I have reproduced the failure locally, but this is not a compiler bug.

The testcase creates a structure "foo" and uses it in a std::vector. "foo" has
an alignment constraint due to it containing a float32x4_t member of 16 bytes.
The compiler honours this in all code it generates. The underlying allocator
used by std::vector just calls operator new (_Znwj), and uses the memory
returned. operator new calls malloc, and malloc returns memory aligned to 8
bytes.

Memory corruption follows due to NEON instructions with :128 alignment hints
being used on unaligned addresses.

A similar question is asked at StackOverflow here:
<a href="http://stackoverflow.com/questions/12942548/making-stdvector-allocate-aligned-memory">http://stackoverflow.com/questions/12942548/making-stdvector-allocate-aligned-memory</a>
.

I'll resolve this as "not a bug".

Cheers,

James</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>