dotgnu-libjit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Dotgnu-libjit] How Do I Debug a Memory Protection Error?


From: Klaus Treichel
Subject: Re: [Dotgnu-libjit] How Do I Debug a Memory Protection Error?
Date: Tue, 19 Oct 2010 19:47:07 +0200

Hi Noah,

> Hello,
> 
> I have found the following test case, which is a 63-line program which
> gives a bus error on my machine.
> 
> As expected, GDB shows a kernel protection failure at address
> 0x00000001001004e0, which also happens to be the value of the
> "function" variable, and in register 11.
> 
> Here is the test program.
> 
[snip]
>   {
>     enum jit_return_t retval;
>     int argvals[] = {3, 4, 5};
>     void *args[] = {&(argvals[0]), &(argvals[1]), &(argvals[2])};
> 
>     jit_apply(signature, function, args, 3, &retval);

Use jit_function_apply(function, args, &retval);
 or jit_function_apply_vararg(function, signature, args, &retval);
instead.

The function jit_apply doesn't take the function but the function's
entrypoint as argument 2.

Cheers,
Klaus

Attachment: signature.asc
Description: This is a digitally signed message part


reply via email to

[Prev in Thread] Current Thread [Next in Thread]