<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </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 --- - ARMLoadStoreOptimizer should be disable when Address Sanitizer is enable"
   href="http://llvm.org/bugs/show_bug.cgi?id=18865">18865</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>ARMLoadStoreOptimizer should be disable when Address Sanitizer is enable
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libraries
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

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

        <tr>
          <th>OS</th>
          <td>Linux
          </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>Backend: ARM
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>manjian2006@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=12076" name="attach_12076" title="source that cause bug">attachment 12076</a> <a href="attachment.cgi?id=12076&action=edit" title="source that cause bug">[details]</a></span>
source that cause bug

test code is in the uploaded attachment.
clang -Os -target arm-linux-androideabi -march=armv7-a -fsanitize=address
-mthumb -S /tmp/1.cpp

illegal code generated:
=>    lsrs    r6, r4, #3
    ldr    r1, [r1, r0]
    add    r0, r2
    str    r0, [r4, #4]
    str    r1, [r4, #8]
    movw    r1, #62208
    movw    r0, #61937
    movt    r1, #62451
    add.w    r5, r4, #16
=>    stm.w    r6, {r0, r1}

r4 stores the results of __asan_stack_malloc_1,r6 is the shadow memory address
of r4.Since r4 is a stack address,which is aligned to 64 bits when the target
is ARM, the right swift will result in a address not aligned to 32 bits.So
stm.w will result in alignment fault (A3.2.1).
The code is from FunctionStackPoisoner::poisonRedZones in 
lib/Transforms/Instrumentation/AddressSanitizer.cpp.</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>