[LLVMbugs] [Bug 9898] New: debug assertion (and possibly more errors) in ~ScopedNullTerminator()
    bugzilla-daemon at llvm.org 
    bugzilla-daemon at llvm.org
       
    Wed May 11 05:18:53 PDT 2011
    
    
  
http://llvm.org/bugs/show_bug.cgi?id=9898
           Summary: debug assertion (and possibly more errors) in
                    ~ScopedNullTerminator()
           Product: new-bugs
           Version: 2.9
          Platform: PC
        OS/Version: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: llvm.org at schrieb.de
                CC: llvmbugs at cs.uiuc.edu
When I start "opt -analyze -view-cfg SomeFile.s" with a Debug-compiled "opt" I
get 
Assertion failed: !str.empty() && str[str.size() - 1] == 0 && "Null char not
present!", file z:\code\llvm\llvm-2.9\lib\support\Windows/Path.inc, line 76
Probably this is because of line 115:
path.erase(--len);
which does not only erase the trailing slash, but also the trailing zero, that
~ScopedNullTerminator() wants to remove later.
Replacing this by
path.erase(--len,1);
seems to fix this.
Cheers,
Jonas
-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
    
    
More information about the llvm-bugs
mailing list