okbob/plpgsql_check

Segementation fault in plpgsql_check_function

kai-eckert opened this issue · 3 comments

crash.gz

After importing attached database dump the following statement will cause a crash with segmentation fault in postgresql 16.

select array_to_string(array_agg(cf), e'\n') from plpgsql_check_function('extra_long_schema_to_make_checker_fail.p_fill_ml_ticket_exch_crash', 0, 'text', false, false, false, false) cf;

When executing the statement:

select array_to_string(array_agg(cf), e'\n') from plpgsql_check_function('extra_long_schema_to_make_checker_fail.p_fill_ml_ticket_exch_ok', 0, 'text', false, false, false, false) cf;

we do not get a crash and the only difference is that in the select into is one less column selected.

Used version of postgresql :

crash=> select version();
PostgreSQL 16.2 (Ubuntu 16.2-1.pgdg22.04+1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0, 64-bit

should be fixed by abbfe64
please check

Now it works like a charm
🥇

Thanks for the immediate fix.

As we use this in an internal project it would be nice if you can make a new official release as soon as possible.

2.7.4 is out now