Re: [bug fix] Produce a crash dump before main() on Windows

Поиск
Список
Период
Сортировка
От Haribabu Kommi
Тема Re: [bug fix] Produce a crash dump before main() on Windows
Дата
Msg-id CAJrrPGfSXwJLc8LWOkupm-aJ3RcurB5TjhQ=XFG26uQpKJqxnw@mail.gmail.com
обсуждение исходный текст
Ответ на RE: [bug fix] Produce a crash dump before main() on Windows  ("Tsunakawa, Takayuki" <tsunakawa.takay@jp.fujitsu.com>)
Ответы RE: [bug fix] Produce a crash dump before main() on Windows  ("Tsunakawa, Takayuki" <tsunakawa.takay@jp.fujitsu.com>)
Список pgsql-hackers

On Thu, Mar 1, 2018 at 4:14 PM Tsunakawa, Takayuki <tsunakawa.takay@jp.fujitsu.com> wrote:
From: Tsunakawa, Takayuki [mailto:tsunakawa.takay@jp.fujitsu.com]
> Another idea to add to the current patch is to move the call to SetErrorMode()
> to the below function, which is called first in main().  How about this?
>
> void
> pgwin32_install_crashdump_handler(void)
> {
>       SetUnhandledExceptionFilter(crashDumpHandler);
> }

I moved SetErrorMode() to the beginning of main().  It should be placed before any code which could crash.  The current location is a bit late: in fact, write_stderr() crashed when WSAStartup() failed.

I reviewed patch and it works as per the subject, but I am not able to verify the actual
bug that is reported in the upthread. The moving of setErrorMode() call to the start
of the main function can handle all the cases that can lead to a crash with no popup.

The reset of setErrorMode(0) before start of any process can generate the coredump
because of any issue before it reaches the main() function, but this change can lead
to stop the postmaster restart process, if no one present to observe the scenario?
Doesn't this change can generate backward compatibility problems to particular users?

I don't have any other comments with the current patch.

Regards,
Haribabu Kommi
Fujitsu Australia

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: PG 10: could not generate random cancel key
Следующее
От: Dean Rasheed
Дата:
Сообщение: Re: PG 10: could not generate random cancel key