<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </head>
    <body><span class="vcard"><a class="email" href="mailto:david.majnemer@gmail.com" title="David Majnemer <david.majnemer@gmail.com>"> <span class="fn">David Majnemer</span></a>
</span> changed
              <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED INVALID - Wrong optimization of sprintf"
   href="https://llvm.org/bugs/show_bug.cgi?id=27526">bug 27526</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;">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 - Wrong optimization of sprintf"
   href="https://llvm.org/bugs/show_bug.cgi?id=27526#c1">Comment # 1</a>
              on <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED INVALID - Wrong optimization of sprintf"
   href="https://llvm.org/bugs/show_bug.cgi?id=27526">bug 27526</a>
              from <span class="vcard"><a class="email" href="mailto:david.majnemer@gmail.com" title="David Majnemer <david.majnemer@gmail.com>"> <span class="fn">David Majnemer</span></a>
</span></b>
        <pre>GLibc contains the following:
The behavior of this function is undefined if copying takes place between
objects that overlap—for example, if s is also given as an argument to be
printed under control of the ‘%s’ conversion.

<a href="http://www.gnu.org/software/libc/manual/html_mono/libc.html#Formatted-Output-Functions">http://www.gnu.org/software/libc/manual/html_mono/libc.html#Formatted-Output-Functions</a>

The Single Unix Specification Version 4 says the same thing:
If copying takes place between objects that overlap as a result of a call to
sprintf() or snprintf(), the results are undefined.

Therefore, I do not believe that LLVM's behavior is indicative of a bug.</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>