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