[LLVMbugs] [Bug 12696] New: Attribute bits above 1<<30 are not encoded in bitcode

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sun Apr 29 09:52:22 PDT 2012


http://llvm.org/bugs/show_bug.cgi?id=12696

             Bug #: 12696
           Summary: Attribute bits above 1<<30 are not encoded in bitcode
           Product: new-bugs
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: alexpigna.dev at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


Created attachment 8471
  --> http://llvm.org/bugs/attachment.cgi?id=8471
Patch the encode all ttributes bits in the bitcode

Hi,

define void @f() nonlazybind uwtable
{
        ret void;
}

In this trivial example I've uwtable is encoded as (1<<30) while nonlazybind is
(1<<31). When assembling using llvm-as and disassembling using llvm-dis the
code becomes.

define void @f() uwtable {
  ret void
}

I think the culprit is
lib/Bitcode/Writer/BitcodeWriter.cpp:186

FauxAttr |= (PAWI.Attrs.Raw() & (0x3FFull << 21)) << 11;

I'm attaching a quick fix

-- 
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