| 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/glib/gmessages.c 2015-09-21 06:33:23.000000000 +0300 |
| +++ glib/glib/gmessages.c 2015-09-22 09:08:59.373519900 +0300 |
| @@ -252,7 +252,7 @@ |
| if (exit_on_fatal) |
| _exit (1); |
| else |
| - abort (); |
| + g_abort (); |
| } |
| |
| #ifdef G_OS_WIN32 |
| @@ -983,12 +983,12 @@ |
| if (IsDebuggerPresent () && !(test_level & G_LOG_FLAG_RECURSION)) |
| G_BREAKPOINT (); |
| else |
| - abort (); |
| + g_abort (); |
| #else |
| if (!(test_level & G_LOG_FLAG_RECURSION)) |
| G_BREAKPOINT (); |
| else |
| - abort (); |
| + g_abort (); |
| #endif /* !G_OS_WIN32 */ |
| } |
| |
| 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/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 |
| @@ -751,7 +751,7 @@ |
| { |
| if (test_tap_log) |
| g_print ("Bail out!\n"); |
| - abort(); |
| + g_abort(); |
| } |
| break; |
| case G_TEST_LOG_MIN_RESULT: |
| @@ -2292,7 +2292,7 @@ |
| s = g_strconcat ("assertion failed: (", expr, ")", NULL); |
| g_assertion_message (domain, file, line, func, s); |
| g_free (s); |
| - 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 "gslice.h" |
| #include "gmessages.h" |
| #include "gstrfuncs.h" |
| +#include "gutils.h" |
| |
| #include <stdlib.h> |
| #include <stdio.h> |
| @@ -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: |