Re: lj_cf_ffi_string() -> lj_str_new() segfault

  • From: Cheyi Lin <cheyi.lin@xxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Mon, 9 Sep 2013 11:14:37 +0800

Finally I found that I called ffi.string with a invalid pointer (already
freed).
Also noticed that you add NULL pointer checking for ffi.string in git HEAD.

Thanks Mike, very appreciated.

Best Regards,
Cheyi Lin


On Wed, Sep 4, 2013 at 7:52 PM, Mike Pall <mike-1309@xxxxxxxxxx> wrote:

> Cheyi Lin wrote:
> > I got segfault recently and still can't figure out why.
> >
> > #0  0x0000000000467c67 in lj_str_new ()
> > #1  0x000000000047a802 in lj_cf_ffi_string ()
>
> You called ffi.string() with a bad pointer or length. Probably a
> NULL pointer.
>
> --Mike
>
>

Other related posts: