[LLVMdev] Invalid or unaligned stack

Reid Kleckner rnk at google.com
Wed Apr 1 09:06:34 PDT 2015


On Tue, Mar 31, 2015 at 3:31 PM, Dibyendu Majumdar <mobile at majumdar.org.uk>
wrote:

> Hi,
>
> I constructed a minimal Lua program that reproduces the problem.
> Essentially the problem occurs if a JITed function is recursively
> called - and there is a longjmp from the inner call. Example:
>
> function rais(n)
>   if n == 0 then error()
>   else rais(n-1)
>   end
> end
> ravi.compile(rais)
>
> function caller(n)
>   pcall(rais,n)
> end
> ravi.compile(caller)
>
> caller(1)
>
> Here the call to error() triggers a longjmp. The pcall() calls setjmp.
> The error only occurs on Windows as reported earlier.
>

This isn't enough info to solve the problem. Pasting the LLVM IR or C code
that calls setjmp and a stack trace of the crash might help figure it out,
though.


> I ran valgrind on Ubuntu to see if I could detect any memory issues.
> Valgrind reports 6 errors of following type - not sure if this is an
> issue or not.
>

These memory leaks look unrelated.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150401/427166a5/attachment.html>


More information about the llvm-dev mailing list