lua-users home
lua-l archive

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


> I get one reported error from the undefined behaviour checker when
> running gc.lua tests:
> > lparser.c:1825:26: runtime error: applying zero offset to null pointer
> This occurs when `getinstruction(fs, &v.v)` expands to
> `((fs)->f->code[(&v.v)->u.info])`
> and `fs->f->code` is NULL.

This is a real issue!

The problem seems to be that the code calls 'getinstruction' before
checking whether the code is valid (the 'check_condition' in the
following line). When the code is wrong, there may be no instruction to
be corrected.

Thanks for the report,

-- Roberto