RE: [bug fix] Produce a crash dump before main() on Windows - Mailing list pgsql-hackers

From Tsunakawa, Takayuki
Subject RE: [bug fix] Produce a crash dump before main() on Windows
Date
Msg-id 0A3221C70F24FB45833433255569204D1F8ECF73@G01JPEXMBYT05
Whole thread Raw
In response to RE: [bug fix] Produce a crash dump before main() on Windows  ("Tsunakawa, Takayuki" <tsunakawa.takay@jp.fujitsu.com>)
Responses Re: [bug fix] Produce a crash dump before main() on Windows
List pgsql-hackers
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
locationis a bit late: in fact, write_stderr() crashed when WSAStartup() failed.
 

Regards
Takayuki Tsunakawa


Attachment

pgsql-hackers by date:

Previous
From: Ashutosh Bapat
Date:
Subject: Re: [HACKERS] path toward faster partition pruning
Next
From: Arseny Sher
Date:
Subject: Why chain of snapshots is used in ReorderBufferCommit?