[LLVMdev] high bit of function address set incorrectly?
Maurice Gittens
mainmanmauricio at gmail.com
Tue Aug 2 11:55:11 PDT 2011
Any hints?
Maurice
On Sun, Jul 31, 2011 at 2:42 PM, Maurice Gittens
<mainmanmauricio at gmail.com> wrote:
> Hi,
>
> I recently updated to current llvm svn and fixed-up the minor compiler
> errors I encountered.
> However, at run-time even my Hello world programs crash with a
> segmentation fault.
>
> A concrete program that crashes on my Linux x86_64 Fedora box is:
>
> declare void @__ot_runtime_print_int(i8*, i32)
>
> define void @main() {
> entry:
> call void @__ot_runtime_print_int(i8* null, i32 12)
> br label %return
>
> return: ; preds = %entry
> ret void
> }
>
> LLVM magic turns this into the assember shown in the attached image.
>
> I am no expert but is seems to me that the address generated
> (0x8000012c1eea) for the __ot_runtime_print_int function is incorrect.
> As both nm and the debugger (kdbg) suggest that the address of the
> function in question is: 0x12c1eea.
>
> So why is the high bit of the function address set? Anybody willing to
> shed some light on what is happening here?
>
> Thanks,
> Maurice
>
More information about the llvm-dev
mailing list