On Thu, Mar 1, 2018 at 4:14 PM Tsunakawa, Takayuki < tsunakawa.ta...@jp.fujitsu.com> wrote:
> From: Tsunakawa, Takayuki [mailto:tsunakawa.ta...@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