List:Commits« Previous MessageNext Message »
From:Tor Didriksen Date:September 28 2010 2:12pm
Subject:Re: bzr commit into mysql-next-mr-bugfixing branch
(tor.didriksen:3300) Bug#52002
View as plain text  
On Tue, Sep 28, 2010 at 3:05 PM, Jorgen Loland <jorgen.loland@stripped>wrote:

> +/*
>> +  Make the program fail, without creating a core file.
>> +  abort() will send SIGABRT which (most likely) generates core.
>> +  Use SIGKILL instead, which cannot be caught.
>> +  An alternative would be to use _exit(EXIT_FAILURE),
>> +  but then valgrind would report lots of memory leaks.
>> + */
>> +#ifdef __WIN__
>> +#define DBUG_SUICIDE() DBUG_ABORT()
>> +#else
>> +#define DBUG_SUICIDE() (_db_flush_(), kill(getpid(), SIGKILL))
>> +#endif
>>
>
> Verified on linux, but since I don't have a Win-box I'll rather ask a
> stupid question. Does ^ mean that dbug_suicide will do what dbug_abort did
> before (dump cores) on win-platforms?
>
>
Look at DBUG_ABORT for windows a few lines up, it ultimately calls _exit(3)

-- didrik

/*
  Avoid popup with abort/retry/ignore buttons. When BUG#31745 is fixed we
can
  call abort() instead of _exit(3) (now it would cause a "test signal"
popup).
*/
#include <crtdbg.h>
#define DBUG_ABORT() (_db_flush_(),\
                     (void)_CrtSetReportMode(_CRT_ERROR,
_CRTDBG_MODE_FILE),\
                     (void)_CrtSetReportFile(_CRT_ERROR,
_CRTDBG_FILE_STDERR),\
                     _exit(3))




> --
> Jørgen Løland | Senior Software Engineer | +47 73842138
> Oracle MySQL
> Trondheim, Norway
>
> --
> MySQL Code Commits Mailing List
> For list archives: http://lists.mysql.com/commits
> To unsubscribe:
> http://lists.mysql.com/commits?unsub=1
>
>

Thread
bzr commit into mysql-next-mr-bugfixing branch (tor.didriksen:3300) Bug#52002Tor Didriksen28 Sep
  • Re: bzr commit into mysql-next-mr-bugfixing branch (tor.didriksen:3300)Bug#52002Jorgen Loland28 Sep
    • Re: bzr commit into mysql-next-mr-bugfixing branch(tor.didriksen:3300) Bug#52002Tor Didriksen28 Sep
  • Re: bzr commit into mysql-next-mr-bugfixing branch (tor.didriksen:3300)Bug#52002Jorgen Loland29 Sep