Re: [Tracker] Any oustanding patches I have missed?



On Mon, 2007-07-02 at 21:44 +0800, jerry tan wrote:
jamie åé:
Speak up now!

jamie.


_______________________________________________
tracker-list mailing list
tracker-list gnome org
http://mail.gnome.org/mailman/listinfo/tracker-list
  
how about this core dump?


Stack trace:
#0  0xfeb093f0 in countbytes () from /lib/libc.so.1
#1  0xfeb49775 in _ndoprnt () from /lib/libc.so.1
#2  0xfeb4bba0 in vsnprintf () from /lib/libc.so.1
#3  0xfec4d6bb in g_printf_string_upper_bound () from /usr/lib/libglib-2.0.so.0
#4  0xfec6b6eb in g_vasprintf () from /usr/lib/libglib-2.0.so.0
#5  0xfec5b6f2 in g_strdup_vprintf () from /usr/lib/libglib-2.0.so.0
#6  0x0809d871 in tracker_info (
    message=0x81039cc "Indexing %s with service %s and mime %s (existing)")
    at tracker-utils.c:3372
#7  0x08086fbe in tracker_db_index_service (db_con=0x8228a10, info=0x826dd70, 
    service=0x810355d "Applications", meta_table=0x821bd60, 
    attachment_uri=0x0, attachment_service=0x0, get_embedded=1, 
    get_full_text=0, get_thumbs=0) at tracker-db.c:663
#8  0x08085cb5 in tracker_db_index_application (db_con=0x8228a10, 
    info=0x826dd70) at tracker-apps.c:185
#9  0x0806c75c in index_entity (db_con=0x8228a10, info=0x826dd70)
    at trackerd.c:753
#10 0x0806d48d in process_files_thread () at trackerd.c:1308


the reason is :
 tracker_info ("Indexing %s with service %s and mime %s (existing)", uri,
service, info->mime);
 info->mime is null, so  it crashes.

Add a null check to avoid this crash, here is the simple patch

Index: src/trackerd/tracker-db.c
===================================================================
--- src/trackerd/tracker-db.c   (revision 590)
+++ src/trackerd/tracker-db.c   (working copy)
@@ -656,6 +656,9 @@
                tracker_log ("Service %s not supported yet", service);
                return;
        }
+        if (info->mime == NULL) {
+                info->mime = g_strdup("unknown");
+        }

        if (info->is_new) {




there are lots of these related to NULL vararg params. These are not
crashers on Linux but on Solaris only it appears.

I would prefer a patch modifying
tracker_log/tracker_info/tracker_debug/tracker_error which parses the
varargs (always char *) and substitutes "" for NULL

This would stop it crashing on solaris far more reliably (as those
logging calls are all over the place and more Nulls could pop up in
them)









[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]