提交 efe11a47 编写于 作者: A Ashwin Agrawal

Avoid panic with DEBUG5 enabled

elog(DEBUG5) inside PostgresMain() after sigsetjmp() seems bad
idea. This is the place where control jumps in-case error happens in
normal flow. Shouldn't be performing elog() without handling that
error first. write_stderr() exists to write the exact thing being
intended with this elog(). Having elog(DEBUG5) is causing SIGSEGV.

Simple repro for the same is:
SET log_min_messages=debug5;
SELECT xmlconcat('bad', '<syntax');

This fixes #8733 github issue.
上级 ce4b6bfa
......@@ -4780,8 +4780,6 @@ PostgresMain(int argc, char *argv[],
*/
if (sigsetjmp(local_sigjmp_buf, 1) != 0)
{
elog(DEBUG5, "error caught. jumped back to PostgresMain local_sigjmp_buf");
/*
* NOTE: if you are tempted to add more code in this if-block,
* consider the high probability that it should be in
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册