[llvm-bugs] [Bug 47258] New: extract_symbols.py uses wrong encoding for dumpbin

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Aug 20 13:17:49 PDT 2020


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

            Bug ID: 47258
           Summary: extract_symbols.py uses wrong encoding for dumpbin
           Product: Build scripts
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: cmake
          Assignee: unassignedbugs at nondot.org
          Reporter: dmajor at mozilla.com
                CC: llvm-bugs at lists.llvm.org

When running extract_symbols.py with Python 3, we often see errors such as
`UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 4045:
character maps to <undefined>`.

This can be fixed for Python 3 by adding `encoding='mbcs'` to
https://github.com/llvm/llvm-project/blob/b74b80bb2d31dfb09559fcb71a1c474a421c633d/llvm/utils/extract_symbols.py#L35
(only for this one call; the other Popens in the file are fine as is) however
I'm told this breaks Python 2.7 which is still supported for LLVM. Would need
either a more universal fix or a version check.

-- 
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/20200820/70bcaa9b/attachment.html>


More information about the llvm-bugs mailing list