mfabik / rpms / satyr

Forked from rpms/satyr 3 years ago
Clone

Blame SOURCES/satyr-0.13-normalization-actualize-list-of-functions.patch

f41043
From 45973b73fd538eb194c0ddc52457eb29b06dd84f Mon Sep 17 00:00:00 2001
f41043
From: Matej Habrnal <mhabrnal@redhat.com>
f41043
Date: Tue, 10 May 2016 15:13:53 +0200
f41043
Subject: [PATCH] normalization: actualize list of functions
f41043
f41043
Related to #1332869
f41043
f41043
Signed-off-by: Matej Habrnal <mhabrnal@redhat.com>
f41043
---
f41043
 lib/normalize.c | 102 ++++++++++++++++++++++++++++++++++++++++++++++++++++++--
f41043
 1 file changed, 99 insertions(+), 3 deletions(-)
f41043
f41043
diff --git a/lib/normalize.c b/lib/normalize.c
f41043
index e3a7a13..9d7574e 100644
f41043
--- a/lib/normalize.c
f41043
+++ b/lib/normalize.c
f41043
@@ -89,6 +89,7 @@ is_removable_dbus(const char *function_name,
f41043
         call_match(function_name, source_file, "gerror_to_dbus_error_message", "dbus-gobject.c", NULL) ||
f41043
         call_match(function_name, source_file, "dbus_g_method_return_error", "dbus-gobject.c", NULL) ||
f41043
         call_match(function_name, source_file, "message_queue_dispatch", "dbus-gmain.c", NULL) ||
f41043
+        call_match(function_name, source_file, "_dbus_abort", "dbus-sysdeps.c", "libdbus", NULL) ||
f41043
         call_match(function_name, source_file, "dbus_connection_dispatch", "dbus-connection.c", "libdbus", NULL);
f41043
 }
f41043
 
f41043
@@ -134,7 +135,17 @@ is_removable_glib(const char *function_name,
f41043
         call_match(function_name, source_file, "g_thread_pool_thread_proxy", "gthreadpool.c", "libglib", NULL) ||
f41043
         call_match(function_name, source_file, "g_thread_create_proxy", "gthread.c", "libglib", NULL) ||
f41043
         call_match(function_name, source_file, "g_cclosure_marshal_VOID__BOXED", "gmarshal.c", "libgobject", NULL) ||
f41043
-        call_match(function_name, source_file, "g_cclosure_marshal_VOID__VOID", "gclosure.c", "gmarshal.c", "libgobject", NULL);
f41043
+        call_match(function_name, source_file, "g_cclosure_marshal_VOID__VOID", "gclosure.c", "gmarshal.c", "libgobject", NULL) ||
f41043
+        call_match(function_name, source_file, "g_object_notify", "gobject.c", "libgobject", NULL) ||
f41043
+        call_match(function_name, source_file, "Glib::exception_handlers_invoke()", "libglibmm", NULL) ||
f41043
+        call_match(function_name, source_file, "g_signal_handlers_destroy", "gsignal.c", "libgobject", NULL) ||
f41043
+        call_match(function_name, source_file, "g_vasprintf", "gprintf.c", "libglib", NULL) ||
f41043
+        call_match(function_name, source_file, "g_strdup_vprintf", "libglib", NULL) ||
f41043
+        call_match(function_name, source_file, "g_strdup_printf", "libglib", NULL) ||
f41043
+        call_match(function_name, source_file, "g_print", "libglib", NULL) ||
f41043
+        call_match(function_name, source_file, "invalid_closure_notify", "gsignal.c", "libgobject", NULL) ||
f41043
+        call_match(function_name, source_file, "smc_tree_abort", "gslice.c", "libglib", NULL) ||
f41043
+        call_match(function_name, source_file, "g_thread_abort", "libglib", NULL);
f41043
 }
f41043
 
f41043
 static bool
f41043
@@ -147,6 +158,7 @@ is_removable_libstdcpp(const char *function_name,
f41043
         call_match(function_name, source_file, "std::terminate", "eh_terminate.cc", NULL) ||
f41043
         call_match(function_name, source_file, "__cxxabiv1::__cxa_throw", "eh_throw.cc", NULL) ||
f41043
         call_match(function_name, source_file, "__cxxabiv1::__cxa_rethrow", "eh_throw.cc", NULL) ||
f41043
+        call_match(function_name, source_file, "__verbose_terminate_handler", "vterminate.cc", NULL) ||
f41043
         call_match(function_name, source_file, "__cxxabiv1::__cxa_pure_virtual", "pure.cc", NULL);
f41043
 }
f41043
 
f41043
@@ -173,6 +185,8 @@ is_removable_xorg(const char *function_name,
f41043
         call_match(function_name, source_file, "ddxGiveUp", "xf86Init.c", NULL) ||
f41043
         call_match(function_name, source_file, "OsAbort", "utils.c", NULL) ||
f41043
         call_match(function_name, source_file, "handle_error", "xcb_io.c", "libX11", NULL) ||
f41043
+        call_match(function_name, source_file, "_XIOError", "XlibInt.c", "libX11", NULL) ||
f41043
+        call_match(function_name, source_file, "_XEventsQueued", "xcb_io.c", "libX11", NULL) ||
f41043
         call_match(function_name, source_file, "handle_response", "xcb_io.c", "libX11", NULL);
f41043
 }
f41043
 
f41043
@@ -184,10 +198,82 @@ is_removable_glibc(const char *function_name,
f41043
         call_match(function_name, source_file, "_start", "", NULL) ||
f41043
         call_match(function_name, source_file, "__libc_start_main", "libc", NULL) ||
f41043
         call_match(function_name, source_file, "clone", "clone.S", "libc", NULL) ||
f41043
+        call_match(function_name, source_file, "poll", "libc", NULL) ||
f41043
+        call_match(function_name, source_file, "_IO_new_fclose", "iofclose.c", "libc", NULL) ||
f41043
+        call_match(function_name, source_file, "_IO_vfprintf_internal", "vfprintf.c", "libc", NULL) ||
f41043
+        call_match(function_name, source_file, "_IO_default_xsputn", "genops.c", "libc", NULL) ||
f41043
+        call_match(function_name, source_file, "_IO_wdefault_xsputn", "wgenops.c", "libc", NULL) ||
f41043
+        call_match(function_name, source_file, "__libc_message", "libc_fatal.c", "libc", NULL) ||
f41043
         call_match(function_name, source_file, "start_thread", "pthread_create.c", "libpthread", NULL);
f41043
 }
f41043
 
f41043
 static bool
f41043
+is_removable_other(const char *function_name,
f41043
+                   const char *source_file)
f41043
+{
f41043
+    return
f41043
+        call_match(function_name, source_file, "assert_cursor", "intel_display.c", NULL) ||
f41043
+        call_match(function_name, source_file, "assert_device_not_suspended", "intel_uncore.c", NULL) ||
f41043
+        call_match(function_name, source_file, "assert_pipe", "intel_display.c", NULL) ||
f41043
+        call_match(function_name, source_file, "assert_plane", "intel_display.c", NULL) ||
f41043
+        call_match(function_name, source_file, "assert_transcoder_disabled", "intel_display.c", NULL) ||
f41043
+        call_match(function_name, source_file, "btrfs_assert_delayed_root_empty", "delayed-inode.c", "btrfs", NULL) ||
f41043
+        call_match(function_name, source_file, "_cogl_set_error", "cogl-error.c", "libcogl", NULL) ||
f41043
+        call_match(function_name, source_file, "defaultCrashHandler", "kcrash.cpp", "libKF5Crash", NULL) ||
f41043
+        call_match(function_name, source_file, "_dl_signal_error", "dl-error.c", "ld-linux", NULL) ||
f41043
+        call_match(function_name, source_file, "error_dialog_response_cb", "", NULL) ||
f41043
+        call_match(function_name, source_file, "do_warn", "_warnings.c", "libpython",NULL) ||
f41043
+        call_match(function_name, source_file, "QMessageLogger::fatal(char const*, ...) const", "", NULL) ||
f41043
+        call_match(function_name, source_file, "nsProfileLock::FatalSignalHandler(int, siginfo_t*, void*)", "", NULL) ||
f41043
+        call_match(function_name, source_file, "qt_message_output", "qglobal.cpp", "libQtCore", NULL) ||
f41043
+        call_match(function_name, source_file, "qt_message_output(QtMsgType, char const*)", "", NULL) ||
f41043
+        call_match(function_name, source_file, "signalHandler(int, siginfo_t*, void*)", "", NULL) ||
f41043
+        call_match(function_name, source_file, "FatalSignalHandler", "nsProfileLock.cpp", "libxul", NULL) ||
f41043
+        call_match(function_name, source_file, "Foam::error::abort()", "", NULL) ||
f41043
+        call_match(function_name, source_file, "JS_AbortIfWrongThread", "libmozjs", NULL) ||
f41043
+        call_match(function_name, source_file, "Crash::defaultCrashHandler(int)", "libkdeui", "libKF5Crash", NULL) ||
f41043
+        call_match(function_name, source_file, "Py_FatalError", "pythonrun.c", "libpython", NULL) ||
f41043
+        call_match(function_name, source_file, "__btrfs_abort_transaction", "btrfs", NULL) ||
f41043
+        call_match(function_name, source_file, "assert_pch_hdmi_disabled", "", NULL) ||
f41043
+        call_match(function_name, source_file, "assert_pll", "", NULL) ||
f41043
+        call_match(function_name, source_file, "core::system::abort()", "", NULL) ||
f41043
+        call_match(function_name, source_file, "ddd_assert_fail", "assert.C", NULL) ||
f41043
+        call_match(function_name, source_file, "debug_dma_assert_idle", "", NULL) ||
f41043
+        call_match(function_name, source_file, "error_handler", "", NULL) ||
f41043
+        call_match(function_name, source_file, "fatal_error_signal", "", NULL) ||
f41043
+        call_match(function_name, source_file, "fatal_handler", "signal.c", "libfreerdp", NULL) ||
f41043
+        call_match(function_name, source_file, "gpf_notice", "", NULL) ||
f41043
+        call_match(function_name, source_file, "log", "", NULL) ||
f41043
+        call_match(function_name, source_file, "_log", "", NULL) ||
f41043
+        call_match(function_name, source_file, "log_assert_failed", "", NULL) ||
f41043
+        call_match(function_name, source_file, "mozalloc_abort", "mozalloc_abort.cpp", "libmozalloc", NULL) ||
f41043
+        call_match(function_name, source_file, "mozalloc_abort(char const*)", "libmozalloc", "content-container", "plugin-container", NULL) ||
f41043
+        call_match(function_name, source_file, "note_interrupt", "spurious.c", "vmlinux", NULL) ||
f41043
+        call_match(function_name, source_file, "print_bad_pte", "memory.c", "vmlinux", NULL) ||
f41043
+        call_match(function_name, source_file, "print_oops_end_marker", "panic.c", "vmlinux", NULL) ||
f41043
+        call_match(function_name, source_file, "printk", "printk.c", "vmlinux", NULL) ||
f41043
+        call_match(function_name, source_file, "qupzilla_signal_handler", "main.cpp", "qupzilla", NULL) ||
f41043
+        call_match(function_name, source_file, "rb_bug", "error.c", "libruby", NULL) ||
f41043
+        call_match(function_name, source_file, "sighandler", "", NULL) ||
f41043
+        call_match(function_name, source_file, "signalHandler(int)", "", NULL) ||
f41043
+        call_match(function_name, source_file, "signal_abort", "signal.c", NULL) ||
f41043
+        call_match(function_name, source_file, "signal_handler", "", NULL) ||
f41043
+        call_match(function_name, source_file, "sys_abort", "error.c", "libgfortran", NULL) ||
f41043
+        call_match(function_name, source_file, "terminate_due_to_signal", "emacs.c", "emacs", NULL) ||
f41043
+        call_match(function_name, source_file, "wl_log", "wayland-util.c", NULL) ||
f41043
+        call_match(function_name, source_file, "display_protocol_error", "wayland-client.c", NULL) ||
f41043
+        call_match(function_name, source_file, "display_handle_error", "wayland-client.c", NULL) ||
f41043
+        call_match(function_name, source_file, "x_io_error", "libmutter", NULL) ||
f41043
+        call_match(function_name, source_file, "__ioremap_calle ", "ioremap.c", NULL) ||
f41043
+        call_match(function_name, source_file, "ioremap_nocache", "ioremap.c", NULL) ||
f41043
+        call_match(function_name, source_file, "wpa_msg", "wpa_debug.c", NULL) ||
f41043
+        call_match(function_name, source_file, "js::gc::FinalizeArenas(js::FreeOp*, js::gc::ArenaHeader**, js::gc::ArenaList&, js::gc::AllocKind, js::SliceBudget&)\"js::Shape::finalize(js::FreeOp*)", "", NULL) ||
f41043
+        call_match(function_name, source_file, "WTF::StringImpl::endsWith(char const*, unsigned int, bool) const", "", NULL) ||
f41043
+        call_match(function_name, source_file, "mozilla::plugins::child::_invokedefault(_NPP*, NPObject*, _NPVariant const*, unsigned int, _NPVariant*)", "", NULL) ||
f41043
+        call_match(function_name, source_file, "xitk_signal_handler", "xitk.c", "xine", NULL);
f41043
+}
f41043
+
f41043
+static bool
f41043
 is_removable_glibc_with_above(const char *function_name,
f41043
                               const char *source_file)
f41043
 {
f41043
@@ -205,6 +291,13 @@ is_removable_glibc_with_above(const char *function_name,
f41043
         call_match(function_name, source_file, "__snprintf_chk", "", NULL) ||
f41043
         call_match(function_name, source_file, "___snprintf_chk", "", NULL) ||
f41043
         call_match(function_name, source_file, "__vasprintf_chk", "", NULL) ||
f41043
+        call_match(function_name, source_file, "__vsprintf_chk", "", NULL) ||
f41043
+        call_match(function_name, source_file, "___sprintf_chk", "", NULL) ||
f41043
+        call_match(function_name, source_file, "__fwprintf_chk", "", NULL) ||
f41043
+        call_match(function_name, source_file, "__asprintf_chk", "", NULL) ||
f41043
+        call_match(function_name, source_file, "___printf_chk", "", NULL) ||
f41043
+        call_match(function_name, source_file, "___fprintf_chk", "", NULL) ||
f41043
+        call_match(function_name, source_file, "__vswprintf_chk", "", NULL) ||
f41043
         call_match(function_name, source_file, "malloc_consolidate", "malloc.c", "libc", NULL) ||
f41043
         call_match(function_name, source_file, "malloc_printerr", "malloc.c", "libc", NULL) ||
f41043
         call_match(function_name, source_file, "_int_malloc", "malloc.c", "libc", NULL) ||
f41043
@@ -295,6 +388,7 @@ sr_gdb_is_exit_frame(struct sr_gdb_frame *frame)
f41043
         /* Terminates a function in case of buffer overflow. */
f41043
         sr_gdb_frame_calls_func(frame, "__chk_fail", "chk_fail.c", "libc.so", NULL) ||
f41043
         sr_gdb_frame_calls_func(frame, "__stack_chk_fail", "stack_chk_fail.c", "libc.so", NULL) ||
f41043
+        sr_gdb_frame_calls_func(frame, "do_exit", "exit.c", NULL) ||
f41043
         sr_gdb_frame_calls_func(frame, "kill", "syscall-template.S", NULL);
f41043
 }
f41043
 
f41043
@@ -365,7 +459,8 @@ sr_normalize_gdb_thread(struct sr_gdb_thread *thread)
f41043
             is_removable_linux(frame->function_name, frame->source_file) ||
f41043
             is_removable_xorg(frame->function_name, frame->source_file) ||
f41043
             is_removable_jvm(frame->function_name, frame->source_file) ||
f41043
-            is_removable_vim(frame->function_name, frame->source_file);
f41043
+            is_removable_vim(frame->function_name, frame->source_file) ||
f41043
+            is_removable_other(frame->function_name, frame->source_file);
f41043
 
f41043
         bool removable_with_above =
f41043
             is_removable_glibc_with_above(frame->function_name, frame->source_file) ||
f41043
@@ -510,7 +605,8 @@ sr_normalize_core_thread(struct sr_core_thread *thread)
f41043
             is_removable_linux(frame->function_name, frame->file_name) ||
f41043
             is_removable_xorg(frame->function_name, frame->file_name) ||
f41043
             is_removable_jvm(frame->function_name, frame->file_name) ||
f41043
-            is_removable_vim(frame->function_name, frame->file_name);
f41043
+            is_removable_vim(frame->function_name, frame->file_name) ||
f41043
+            is_removable_other(frame->function_name, frame->file_name);
f41043
 
f41043
         bool removable_with_above =
f41043
             is_removable_glibc_with_above(frame->function_name, frame->file_name)  ||
f41043
-- 
f41043
1.8.3.1
f41043