[LLVMbugs] [Bug 3334] New: Interpreter asserts on out of range shift amount

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Thu Jan 15 11:48:45 PST 2009


           Summary: Interpreter asserts on out of range shift amount
           Product: libraries
           Version: trunk
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Interpreter
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: alexei.svitkine at gmail.com
                CC: llvmbugs at cs.uiuc.edu

When using the Interpreter variety of ExecutionEngine, an out of range shift
amount causes an assert to trigger. However, the same inputs to the regular
ExecutionEngine runs fine (producing an undefined result, but that's OK).

For example, the issue is visible when the following code is compiled with
clang and then executed through llvm:

int main(void) { int i=1; i<<100; return 0; }

When using the Interpreter, the following assert is triggered:

Assertion failed: (shiftAmt <= BitWidth && "Invalid shift amount"), function
shl, file /llvm/include/llvm/ADT/APInt.h, line 681.

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