[postgis-devel] Bug Report issue#4017 lwgeom lexer memory corruption

宇航 邱 imqyh at yahoo.com
Thu Aug 9 18:48:37 PDT 2018


On PG/PPAS, some sql will cause RDS reboot. And the reason comes from the PostGis. From the coredump, we know wkt_yyrealloc(yy_buffer_stack) caused the problem, which is in liblwgeom/lwin _wkt_lex.c. yy_buffer_stack is a global variable, it was not reseted when a query canceled, when next time realloc it, coredump happens.

The patch of issue 4017 in PostGis didn't fix the bug. Just put a useless patch.
Should add
yy_init_globals(); 
in
void wkt_lexer_init(char *src);
function.

The bug exists in 2.2 2.3 2.4 trunk.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20180810/03ed2537/attachment.html>


More information about the postgis-devel mailing list