[llvm-bugs] [Bug 52371] New: Solaris/illumos MemoryMappingLayout needs to be careful of readlink(2)

via llvm-bugs llvm-bugs at lists.llvm.org
Sun Oct 31 15:33:12 PDT 2021


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

            Bug ID: 52371
           Summary: Solaris/illumos MemoryMappingLayout needs to be
                    careful of readlink(2)
           Product: compiler-rt
           Version: unspecified
          Hardware: PC
                OS: Solaris
            Status: NEW
          Severity: normal
          Priority: P
         Component: compiler-rt
          Assignee: unassignedbugs at nondot.org
          Reporter: richlowe at richlowe.net
                CC: llvm-bugs at lists.llvm.org, ro at gcc.gnu.org

Created attachment 25408
  --> https://bugs.llvm.org/attachment.cgi?id=25408&action=edit
suggested fix

There's two issues here:

- readlink(2) doesn't NUL terminate, and so the mapping filename gets garbled
- readlink(2) isn't checked for failure, so anonymous mappings are
misattributed

I've attached a simple patch which seems better than what's there now

-- 
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/20211031/d7f6dea9/attachment.html>


More information about the llvm-bugs mailing list