<html>
    <head>
      <base href="https://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 --- - c_str() in llvm::sys::RemoveFileOnSignal and llvm::sys::DontRemoveFileOnSignal"
   href="https://llvm.org/bugs/show_bug.cgi?id=23208">23208</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>c_str() in llvm::sys::RemoveFileOnSignal and llvm::sys::DontRemoveFileOnSignal
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </td>
        </tr>

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

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

        <tr>
          <th>OS</th>
          <td>Windows NT
          </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>new bugs
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>yaron.keren@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>1) In the Unix version of these functions, c_str() is being called on all
FilesToRemoveRef members but it is not called in the Windows version of these
functions.

2) With the exception of locking, shouldn't the Unix and Windows versions be
identical?

3) DontRemoveFileOnSignal also calls c_str() so that:

  // We need to call c_str() on every element which would have been moved by
  // the erase. These elements, in a C++98 implementation where c_str()
  // requires a reallocation on the first call may have had the call to c_str()
  // made on insertion become invalid by being copied down an element.

since we don't support C++98 is calling c_str() still required?

4) Related, see patch on llvm-commits, the Windows version of
sys::DontRemoveFileOnSignal calls FilesToRemove->push_back(Filename); which
seems like 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>