[LLVMbugs] [Bug 23208] New: c_str() in llvm::sys::RemoveFileOnSignal and llvm::sys::DontRemoveFileOnSignal

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sun Apr 12 07:13:13 PDT 2015


https://llvm.org/bugs/show_bug.cgi?id=23208

            Bug ID: 23208
           Summary: c_str() in llvm::sys::RemoveFileOnSignal and
                    llvm::sys::DontRemoveFileOnSignal
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: yaron.keren at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

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.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20150412/3f11834d/attachment.html>


More information about the llvm-bugs mailing list