diff -Naur glib-2.46.0-orig/glib/gbacktrace.c glib-2.46.0/glib/gbacktrace.c --- glib-2.46.0-orig/glib/gbacktrace.c 2014-12-20 00:49:48.000000000 +0300 +++ glib-2.46.0/glib/gbacktrace.c 2015-09-22 09:08:59.311126700 +0300 @@ -254,7 +254,7 @@ if (IsDebuggerPresent ()) G_BREAKPOINT (); else - abort (); + g_abort (); #endif } diff -Naur glib-2.46.0-orig/glib/giowin32.c glib-2.46.0/glib/giowin32.c --- glib-2.46.0-orig/glib/giowin32.c 2014-12-20 00:49:48.000000000 +0300 +++ glib-2.46.0/glib/giowin32.c 2015-09-22 09:08:59.357921600 +0300 @@ -798,7 +798,7 @@ default: g_assert_not_reached (); - abort (); + g_abort (); } if (channel->debug) g_print ("\n"); @@ -945,7 +945,7 @@ default: g_assert_not_reached (); - abort (); + g_abort (); } } @@ -1010,7 +1010,7 @@ default: g_assert_not_reached (); - abort (); + g_abort (); } if (channel->debug) g_print ("\n"); @@ -1295,7 +1295,7 @@ default: whence = -1; /* Keep the compiler quiet */ g_assert_not_reached (); - abort (); + g_abort (); } tmp_offset = offset; @@ -1690,7 +1690,7 @@ break; default: g_assert_not_reached (); - abort (); + g_abort (); } /* always open 'untranslated' */ @@ -1736,7 +1736,7 @@ break; default: g_assert_not_reached (); - abort (); + g_abort (); } return channel; @@ -2225,7 +2225,7 @@ default: g_assert_not_reached (); - abort (); + g_abort (); } fd->events = condition; diff -Naur glib-2.46.0-orig/glib/gmessages.c glib-2.46.0/glib/gmessages.c --- glib-2.46.0-orig/glib/gmessages.c 2015-09-21 06:33:23.000000000 +0300 +++ glib-2.46.0/glib/gmessages.c 2015-09-22 09:08:59.373519900 +0300 @@ -323,7 +323,7 @@ if (breakpoint) G_BREAKPOINT (); else - abort (); + g_abort (); } #ifdef G_OS_WIN32 @@ -1176,7 +1176,7 @@ line, pretty_function); _g_log_abort (FALSE); - abort (); + g_abort (); } /** diff -Naur glib-2.46.0-orig/glib/gslice.c glib-2.46.0/glib/gslice.c --- glib-2.46.0-orig/glib/gslice.c 2015-09-08 20:40:27.000000000 +0300 +++ glib-2.46.0/glib/gslice.c 2015-09-22 09:08:59.404716500 +0300 @@ -1082,7 +1082,7 @@ return; if (G_UNLIKELY (allocator->config.debug_blocks) && !smc_notify_free (mem_block, mem_size)) - abort(); + g_abort(); if (G_LIKELY (acat == 1)) /* allocate through magazine layer */ { ThreadMemory *tmem = thread_memory_from_self(); @@ -1165,7 +1165,7 @@ slice = *(gpointer*) (current + next_offset); if (G_UNLIKELY (allocator->config.debug_blocks) && !smc_notify_free (current, mem_size)) - abort(); + g_abort(); if (G_UNLIKELY (thread_memory_magazine2_is_full (tmem, ix))) { thread_memory_swap_magazines (tmem, ix); @@ -1186,7 +1186,7 @@ slice = *(gpointer*) (current + next_offset); if (G_UNLIKELY (allocator->config.debug_blocks) && !smc_notify_free (current, mem_size)) - abort(); + g_abort(); if (G_UNLIKELY (g_mem_gc_friendly)) memset (current, 0, chunk_size); slab_allocator_free_chunk (chunk_size, current); @@ -1200,7 +1200,7 @@ slice = *(gpointer*) (current + next_offset); if (G_UNLIKELY (allocator->config.debug_blocks) && !smc_notify_free (current, mem_size)) - abort(); + g_abort(); if (G_UNLIKELY (g_mem_gc_friendly)) memset (current, 0, mem_size); g_free (current); @@ -1436,7 +1436,7 @@ vfprintf (stderr, format, args); va_end (args); fputs ("\n", stderr); - abort(); + g_abort(); _exit (1); } diff -Naur glib-2.46.0-orig/glib/gtester.c glib-2.46.0/glib/gtester.c --- glib-2.46.0-orig/glib/gtester.c 2014-12-20 00:49:48.000000000 +0300 +++ glib-2.46.0/glib/gtester.c 2015-09-22 09:08:59.420314800 +0300 @@ -94,7 +94,7 @@ terminate (void) { kill (getpid(), SIGTERM); - abort(); + g_abort(); } static void diff -Naur glib-2.46.0-orig/glib/gtestutils.c glib-2.46.0/glib/gtestutils.c --- glib-2.46.0-orig/glib/gtestutils.c 2015-09-01 06:34:13.000000000 +0300 +++ glib-2.46.0/glib/gtestutils.c 2015-09-22 09:08:59.576297800 +0300 @@ -846,7 +846,7 @@ { if (test_tap_log) g_print ("Bail out!\n"); - abort(); + g_abort(); } if (result == G_TEST_RUN_SKIPPED) test_skipped_count++; @@ -2426,7 +2426,7 @@ _exit (1); } else - abort (); + g_abort (); } void @@ -2451,7 +2451,7 @@ if (test_in_subprocess) _exit (1); else - abort (); + g_abort (); } void diff -Naur glib-2.46.0-orig/glib/gthread-posix.c glib-2.46.0/glib/gthread-posix.c --- glib-2.46.0-orig/glib/gthread-posix.c 2015-08-19 06:35:30.000000000 +0300 +++ glib-2.46.0/glib/gthread-posix.c 2015-09-22 09:08:59.560699500 +0300 @@ -46,6 +46,7 @@ #include "gmessages.h" #include "gstrfuncs.h" #include "gmain.h" +#include "gutils.h" #include #include @@ -77,7 +78,7 @@ { fprintf (stderr, "GLib (gthread-posix.c): Unexpected error from C library during '%s': %s. Aborting.\n", function, strerror (status)); - abort (); + g_abort (); } /* {{{1 GMutex */ diff -Naur glib-2.46.0-orig/glib/gthread-win32.c glib-2.46.0/glib/gthread-win32.c --- glib-2.46.0-orig/glib/gthread-win32.c 2014-12-20 00:49:48.000000000 +0300 +++ glib-2.46.0/glib/gthread-win32.c 2015-09-22 09:08:59.467109700 +0300 @@ -58,7 +58,7 @@ { fprintf (stderr, "GLib (gthread-win32.c): Unexpected error from C library during '%s': %s. Aborting.\n", strerror (status), function); - abort (); + g_abort (); } /* Starting with Vista and Windows 2008, we have access to the diff -Naur glib-2.46.0-orig/glib/gutils.c glib-2.46.0/glib/gutils.c --- glib-2.46.0-orig/glib/gutils.c 2015-08-28 21:15:54.000000000 +0300 +++ glib-2.46.0/glib/gutils.c 2015-09-22 09:08:59.498306300 +0300 @@ -2375,3 +2375,15 @@ return FALSE; #endif } + +/* Crashes the program. */ +void +g_abort (void) +{ +#ifdef G_OS_WIN32 + DebugBreak (); + ExitProcess (127); +#else + abort (); +#endif +} diff -Naur glib-2.46.0-orig/glib/gutils.h glib-2.46.0/glib/gutils.h --- glib-2.46.0-orig/glib/gutils.h 2015-08-21 03:20:48.000000000 +0300 +++ glib-2.46.0/glib/gutils.h 2015-09-22 09:08:59.529502900 +0300 @@ -228,6 +228,9 @@ GLIB_DEPRECATED_FOR(g_format_size) gchar *g_format_size_for_display (goffset size); +GLIB_AVAILABLE_IN_2_30 +void g_abort (void); + #ifndef G_DISABLE_DEPRECATED /** * GVoidFunc: