[llvm-bugs] [Bug 27832] New: Missing handling of endianness(host) != endianess(target) in ExecutionEngine::LoadValueFromMemory

via llvm-bugs llvm-bugs at lists.llvm.org
Sun May 22 04:43:42 PDT 2016


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

            Bug ID: 27832
           Summary: Missing handling of endianness(host) !=
                    endianess(target) in
                    ExecutionEngine::LoadValueFromMemory
           Product: libraries
           Version: 3.8
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Generic Execution Engine Support
          Assignee: unassignedbugs at nondot.org
          Reporter: llvm at christian-eichler.de
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

Created attachment 16394
  --> https://llvm.org/bugs/attachment.cgi?id=16394&action=edit
Example .ll (big endian targetlayout)

Method `ExecutionEngine::StoreValueToMemory` reverses the byte order in memory
if the endianness of host and target do not match.
Method `ExecutionEngine::LoadValueFromMemory` currently does not undo that
operation, leading to loading of incorrect values.

Running lli with the .ll file attached to this report shows different return
values for `lli -force-interpreter loadstore_endian.ll` and `lli
loadstore_endian.ll` when executed on a little endian system.
This statement holds (at least) for lli from LLVM 3.4 up to LLVM 3.8

-- 
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/20160522/1b99d926/attachment.html>


More information about the llvm-bugs mailing list