pllua / pllua-deprecated

[DEPRECATED] This repository is no longer maintained. Please follow https://github.com/pllua/pllua
197 stars 16 forks source link

print() of a long string crashes the server #63

Open RhodiumToad opened 6 years ago

RhodiumToad commented 6 years ago
create function t5()
  returns void
  language pllua
  as $$
    print(string.rep("foo",10000))
$$;

select t5();
LOG:  server process (PID 1394) was terminated by signal 11: Segmentation fault
DETAIL:  Failed process was running: select t5();

Looks like misuse of the luaL_buffinit protocol in luaP_print; it's using the stack too freely.