reassign 628068 glib-networking 2.28.7-1
tags 628068 + patch
thanks

Sorry, this email turned out to be a bit longer than initially planned
but I think I found the problem and a fix.

On Thu, 2011-05-26 at 23:02 +0200, Arthur de Jong wrote:
> I do see that glib-networking was upgrade yesterday (from 2.28.6.1-1 to
> 2.28.7-1) which contains the code that triggers the segmentation fault
> so if you believe the actual bug is there, feel free to reassign this
> bug.

Downgrading glib-networking to 2.28.6.1-1 does not fix the problem. I've
now also installed libgnutls26-dbg and re-run with --debug-all. The last
part of the log is attached.

I've done some more digging and I think the relevant part of the
backtrace is this:

#0  0xaed02e5a in g_tls_client_connection_gnutls_finish_handshake 
(conn=0x84d5960, inout_error=0x0) at gtlsclientconnection-gnutls.c:352
        gnutls = 0x84d5960
#1  0xaed04081 in handshake_internal (gnutls=0x84d5960, blocking=<value 
optimized out>, cancellable=0x0, error=0x0) at gtlsconnection-gnutls.c:886
        peer_certificate = 0x0
        peer_certificate_errors = 0
        ret = -53
#2  0xaed0448b in handshake_in_progress_or_failed (gnutls=<value optimized 
out>, blocking=<value optimized out>, cancellable=0x0, error=0x0)
    at gtlsconnection-gnutls.c:911
No locals.
#3  0xaed04930 in close_internal (gnutls=0x84d5960, blocking=1, 
cancellable=0x0, error=0x0) at gtlsconnection-gnutls.c:1094
No locals.
#4  0xaed04d6e in g_tls_connection_gnutls_close (stream=0x84d5960, 
cancellable=0x0, error=0x0) at gtlsconnection-gnutls.c:1114
        gnutls = 0x84d5960
#5  0xb62e6a8d in g_io_stream_close (stream=0x84d5960, cancellable=0x0, 
error=0x0)
    at 
/build/buildd-glib2.0_2.28.6-1-i386-A3fp41/glib2.0-2.28.6/./gio/giostream.c:428
        class = 0x88167d0
        res = 1
        __PRETTY_FUNCTION__ = "g_io_stream_close"

In #5 g_io_stream_close() is called with errors as NULL, which should be
OK according to
http://developer.gnome.org/gio/2.26/GIOStream.html#g-io-stream-close

g_io_stream_close() (#5) from glib just passes error unmodified to
g_tls_connection_gnutls_close() (#4) in glib-networking
which finally ends up calling handshake_internal() (#1) which perhaps
assumes that error is not NULL (it seems to be used in error messages)
and also calls g_tls_client_connection_gnutls_finish_handshake() which
tries to dereference the passed error.

I guess somewhere along the way error needs to be assigned a temporary
value to store the error or all functions should cope with error being
NULL.

Reassigning this bug to glib-networking since that is where the bug
seems to be. If glib shouldn't pass a NULL error to glib-networking,
please reassign.

From a quick glance through Glib docs and current code, I guess the
attached patch should fix the issue. I've tested it on my system and
liferea no longer crashes. However, since it touches TLS-related code
someone that is more familiar with the code should take a look before
blindly accepting this patch.

Also, I've limited this fix to only the
g_tls_client_connection_gnutls_finish_handshake() function. Perhaps it's
a good idea to also check other functions for similar assumptions.

-- 
-- arthur - adej...@debian.org - http://people.debian.org/~adejong --
CACHE: adding feed: source=http://lists.arthurdejong.org/nss-pam-ldapd-announce/feed.rss interval=-1 cacheLimit=
CACHE: adding feed: source=http://lists.arthurdejong.org/nss-pam-ldapd-users/feed.rss interval=-1 cacheLimit=
CACHE: adding feed: source=http://lists.arthurdejong.org/webcheck-announce/feed.rss interval=-1 cacheLimit=
CACHE: adding feed: source=http://lists.arthurdejong.org/webcheck-users/feed.rss interval=-1 cacheLimit=
CACHE: adding feed: source=http://lists.arthurdejong.org/openldap-announce/feed.rss interval=-1 cacheLimit=
CACHE: adding feed: source=http://lists.arthurdejong.org/openldap-commit/feed.rss interval=-1 cacheLimit=
CACHE: adding feed: source=http://lists.arthurdejong.org/openldap-software/feed.rss interval=-1 cacheLimit=
CACHE: adding feed: source=http://lists.arthurdejong.org/openldap-technical/feed.rss interval=-1 cacheLimit=
CACHE: adding feed: source=http://lists.arthurdejong.org/padl-nssldap/feed.rss interval=-1 cacheLimit=
CACHE: adding feed: source=http://arthurdejong.org/trac/python-stdnum/timeline?ticket=on&changeset=on&milestone=on&wiki=on&max=50&author=&daysback=90&format=rss interval=-1 cacheLimit=
PERF: export_OPML_feedlist took 0,005s
PERF: default_source_source_export took 0,005s

Program received signal SIGSEGV, Segmentation fault.
0xaed02e5a in g_tls_client_connection_gnutls_finish_handshake (conn=0x84d5960, inout_error=0x0) at gtlsclientconnection-gnutls.c:352
352	gtlsclientconnection-gnutls.c: No such file or directory.
	in gtlsclientconnection-gnutls.c
(gdb) info threads
  5 Thread 0xaeb54b70 (LWP 13716)  0xb7fe2424 in __kernel_vsyscall ()
  3 Thread 0xaf525b70 (LWP 13712)  0xb7fe2424 in __kernel_vsyscall ()
  2 Thread 0xafe4eb70 (LWP 13711)  0xb7fe2424 in __kernel_vsyscall ()
* 1 Thread 0xb4a30880 (LWP 13698)  0xaed02e5a in g_tls_client_connection_gnutls_finish_handshake (conn=0x84d5960, inout_error=0x0)
    at gtlsclientconnection-gnutls.c:352
(gdb) thread apply all bt

Thread 5 (Thread 0xaeb54b70 (LWP 13716)):
#0  0xb7fe2424 in __kernel_vsyscall ()
#1  0xb67f2703 in pthread_cond_timedwait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_cond_timedwait.S:236
#2  0xb679c01e in g_cond_timed_wait_posix_impl (cond=0x84f4ad0, entered_mutex=0x80cef38, abs_time=0xaeb54168)
    at /build/buildd-glib2.0_2.28.6-1-i386-A3fp41/glib2.0-2.28.6/./gthread/gthread-posix.c:242
#3  0xb66d6b3c in g_async_queue_pop_intern_unlocked (queue=0x80b8638, try=0, end_time=0xaeb54168)
    at /build/buildd-glib2.0_2.28.6-1-i386-A3fp41/glib2.0-2.28.6/./glib/gasyncqueue.c:423
#4  0xb66d767d in g_async_queue_timed_pop (queue=0x80b8638, end_time=0xaeb54168)
    at /build/buildd-glib2.0_2.28.6-1-i386-A3fp41/glib2.0-2.28.6/./glib/gasyncqueue.c:549
#5  0xb672f214 in g_thread_pool_wait_for_new_pool (data=0x80d8050) at /build/buildd-glib2.0_2.28.6-1-i386-A3fp41/glib2.0-2.28.6/./glib/gthreadpool.c:175
#6  g_thread_pool_thread_proxy (data=0x80d8050) at /build/buildd-glib2.0_2.28.6-1-i386-A3fp41/glib2.0-2.28.6/./glib/gthreadpool.c:378
#7  0xb672cb6f in g_thread_create_proxy (data=0x883e5d8) at /build/buildd-glib2.0_2.28.6-1-i386-A3fp41/glib2.0-2.28.6/./glib/gthread.c:1897
#8  0xb67edc39 in start_thread (arg=0xaeb54b70) at pthread_create.c:304
#9  0xb64fb8ee in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 3 (Thread 0xaf525b70 (LWP 13712)):
#0  0xb7fe2424 in __kernel_vsyscall ()
#1  0xb67f220a in __pthread_cond_wait (cond=0xaf55ade8, mutex=0xaf55add0) at pthread_cond_wait.c:153
#2  0xb77818c4 in WTF::ThreadCondition::wait (this=0xaf55ade8, mutex=...) at ../JavaScriptCore/wtf/ThreadingPthreads.cpp:355
#3  0xb75039bf in WebCore::IconDatabase::syncThreadMainLoop (this=0xaf55ad80) at ../WebCore/loader/icon/IconDatabase.cpp:1412
#4  0xb7505f24 in WebCore::IconDatabase::iconDatabaseSyncThread (this=0xaf55ad80) at ../WebCore/loader/icon/IconDatabase.cpp:1030
#5  0xb778159f in WTF::threadEntryPoint (contextData=0xaf54f4d8) at ../JavaScriptCore/wtf/Threading.cpp:65
#6  0xb67edc39 in start_thread (arg=0xaf525b70) at pthread_create.c:304
#7  0xb64fb8ee in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 2 (Thread 0xafe4eb70 (LWP 13711)):
#0  0xb7fe2424 in __kernel_vsyscall ()
#1  0xb67f220a in __pthread_cond_wait (cond=0xb7d70e50, mutex=0xb7d70e38) at pthread_cond_wait.c:153
#2  0xb7856dc7 in WTF::TCMalloc_PageHeap::scavengerThread (this=0xb7d6bd60) at ../JavaScriptCore/wtf/FastMalloc.cpp:2378
#3  0xb7856e01 in WTF::TCMalloc_PageHeap::runScavengerThread (context=0xb7d6bd60) at ../JavaScriptCore/wtf/FastMalloc.cpp:1501
#4  0xb67edc39 in start_thread (arg=0xafe4eb70) at pthread_create.c:304
#5  0xb64fb8ee in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 1 (Thread 0xb4a30880 (LWP 13698)):
#0  0xaed02e5a in g_tls_client_connection_gnutls_finish_handshake (conn=0x84d5960, inout_error=0x0) at gtlsclientconnection-gnutls.c:352
#1  0xaed04081 in handshake_internal (gnutls=0x84d5960, blocking=<value optimized out>, cancellable=0x0, error=0x0) at gtlsconnection-gnutls.c:886
#2  0xaed0448b in handshake_in_progress_or_failed (gnutls=<value optimized out>, blocking=<value optimized out>, cancellable=0x0, error=0x0)
    at gtlsconnection-gnutls.c:911
#3  0xaed04930 in close_internal (gnutls=0x84d5960, blocking=1, cancellable=0x0, error=0x0) at gtlsconnection-gnutls.c:1094
#4  0xaed04d6e in g_tls_connection_gnutls_close (stream=0x84d5960, cancellable=0x0, error=0x0) at gtlsconnection-gnutls.c:1114
#5  0xb62e6a8d in g_io_stream_close (stream=0x84d5960, cancellable=0x0, error=0x0)
    at /build/buildd-glib2.0_2.28.6-1-i386-A3fp41/glib2.0-2.28.6/./gio/giostream.c:428
#6  0xb62e6b0a in g_io_stream_dispose (object=0x84d5960) at /build/buildd-glib2.0_2.28.6-1-i386-A3fp41/glib2.0-2.28.6/./gio/giostream.c:110
#7  0xb67adf43 in g_object_unref (_object=0x84d5960) at /build/buildd-glib2.0_2.28.6-1-i386-A3fp41/glib2.0-2.28.6/./gobject/gobject.c:2697
#8  0xb6eb0e8a in disconnect_internal (sock=0x87eff70) at soup-socket.c:125
#9  0xb6eb2558 in soup_socket_disconnect (sock=0x87eff70) at soup-socket.c:1015
#10 0xb6e8ed21 in soup_connection_disconnect (conn=0x85710a8) at soup-connection.c:597
#11 0xb6e8eedb in idle_timeout (conn=0x85710a8) at soup-connection.c:337
#12 0xb6704b8c in g_timeout_dispatch (source=0x84e8500, callback=0xb6e8eec0 <idle_timeout>, user_data=0x85710a8)
    at /build/buildd-glib2.0_2.28.6-1-i386-A3fp41/glib2.0-2.28.6/./glib/gmain.c:3882
#13 0xb6703252 in g_main_dispatch (context=0x80cee20) at /build/buildd-glib2.0_2.28.6-1-i386-A3fp41/glib2.0-2.28.6/./glib/gmain.c:2440
#14 g_main_context_dispatch (context=0x80cee20) at /build/buildd-glib2.0_2.28.6-1-i386-A3fp41/glib2.0-2.28.6/./glib/gmain.c:3013
#15 0xb6703a30 in g_main_context_iterate (context=0x80cee20, block=1, dispatch=1, self=<value optimized out>)
    at /build/buildd-glib2.0_2.28.6-1-i386-A3fp41/glib2.0-2.28.6/./glib/gmain.c:3091
#16 0xb67040f3 in g_main_loop_run (loop=0x8535e60) at /build/buildd-glib2.0_2.28.6-1-i386-A3fp41/glib2.0-2.28.6/./glib/gmain.c:3299
#17 0xb6b95bd9 in IA__gtk_main () at /build/buildd-gtk+2.0_2.24.4-3-i386-ouUeDk/gtk+2.0-2.24.4/gtk/gtkmain.c:1256
#18 0x080785b1 in main (argc=1, argv=0xbffff3b4) at main.c:345
(gdb) thread apply all bt full

Thread 5 (Thread 0xaeb54b70 (LWP 13716)):
#0  0xb7fe2424 in __kernel_vsyscall ()
No symbol table info available.
#1  0xb67f2703 in pthread_cond_timedwait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_cond_timedwait.S:236
No locals.
#2  0xb679c01e in g_cond_timed_wait_posix_impl (cond=0x84f4ad0, entered_mutex=0x80cef38, abs_time=0xaeb54168)
    at /build/buildd-glib2.0_2.28.6-1-i386-A3fp41/glib2.0-2.28.6/./gthread/gthread-posix.c:242
        result = <value optimized out>
        end_time = {tv_sec = 1306702353, tv_nsec = 951829000}
        timed_out = <value optimized out>
        __PRETTY_FUNCTION__ = "g_cond_timed_wait_posix_impl"
#3  0xb66d6b3c in g_async_queue_pop_intern_unlocked (queue=0x80b8638, try=0, end_time=0xaeb54168)
    at /build/buildd-glib2.0_2.28.6-1-i386-A3fp41/glib2.0-2.28.6/./glib/gasyncqueue.c:423
        retval = <value optimized out>
        __PRETTY_FUNCTION__ = "g_async_queue_pop_intern_unlocked"
#4  0xb66d767d in g_async_queue_timed_pop (queue=0x80b8638, end_time=0xaeb54168)
    at /build/buildd-glib2.0_2.28.6-1-i386-A3fp41/glib2.0-2.28.6/./glib/gasyncqueue.c:549
        retval = <value optimized out>
        __PRETTY_FUNCTION__ = "g_async_queue_timed_pop"
#5  0xb672f214 in g_thread_pool_wait_for_new_pool (data=0x80d8050) at /build/buildd-glib2.0_2.28.6-1-i386-A3fp41/glib2.0-2.28.6/./glib/gthreadpool.c:175
        end_time = {tv_sec = 1306702353, tv_usec = 951829}
        pool = <value optimized out>
        local_max_idle_time = 15000
        local_wakeup_thread_serial = <value optimized out>
        local_max_unused_threads = 2
        last_wakeup_thread_serial = 0
        have_relayed_thread_marker = 0
#6  g_thread_pool_thread_proxy (data=0x80d8050) at /build/buildd-glib2.0_2.28.6-1-i386-A3fp41/glib2.0-2.28.6/./glib/gthreadpool.c:378
        free_pool = <value optimized out>
        task = 0xfffffdfc
        pool = <value optimized out>
#7  0xb672cb6f in g_thread_create_proxy (data=0x883e5d8) at /build/buildd-glib2.0_2.28.6-1-i386-A3fp41/glib2.0-2.28.6/./glib/gthread.c:1897
        thread = 0x883e5d8
        __PRETTY_FUNCTION__ = "g_thread_create_proxy"
#8  0xb67edc39 in start_thread (arg=0xaeb54b70) at pthread_create.c:304
        __res = <value optimized out>
        __ignore1 = <value optimized out>
        __ignore2 = <value optimized out>
        pd = 0xaeb54b70
        now = <value optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {-1233133580, 0, 4001536, -1363852584, 1158004837, -767675820}, mask_was_saved = 0}}, priv = {pad = {0x0, 
              0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
        not_first_call = <value optimized out>
        freesize = <value optimized out>
        __PRETTY_FUNCTION__ = "start_thread"
#9  0xb64fb8ee in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130
No locals.

Thread 3 (Thread 0xaf525b70 (LWP 13712)):
#0  0xb7fe2424 in __kernel_vsyscall ()
No symbol table info available.
#1  0xb67f220a in __pthread_cond_wait (cond=0xaf55ade8, mutex=0xaf55add0) at pthread_cond_wait.c:153
        __status = -512
        _val = 1
        futex_val = <value optimized out>
        buffer = {__routine = 0xb67f23a0 <__condvar_cleanup>, __arg = 0xaf5250bc, __canceltype = 0, __prev = 0x0}
        cbuffer = {oldtype = 0, cond = 0xaf55ade8, mutex = 0xaf55add0, bc_seq = 0}
        err = <value optimized out>
        pshared = 0
        val = <value optimized out>
        seq = 0
#2  0xb77818c4 in WTF::ThreadCondition::wait (this=0xaf55ade8, mutex=...) at ../JavaScriptCore/wtf/ThreadingPthreads.cpp:355
No locals.
#3  0xb75039bf in WebCore::IconDatabase::syncThreadMainLoop (this=0xaf55ad80) at ../WebCore/loader/icon/IconDatabase.cpp:1412
        didAnyWork = <value optimized out>
        shouldReenableSuddenTermination = <value optimized out>
#4  0xb7505f24 in WebCore::IconDatabase::iconDatabaseSyncThread (this=0xaf55ad80) at ../WebCore/loader/icon/IconDatabase.cpp:1030
        journalFilename = {m_impl = {<WTF::FastAllocBase> = {<No data fields>}, m_ptr = 0xaf561f00}}
#5  0xb778159f in WTF::threadEntryPoint (contextData=0xaf54f4d8) at ../JavaScriptCore/wtf/Threading.cpp:65
        context = 0xaf54f4d8
        entryPoint = 0xb7506060 <WebCore::IconDatabase::iconDatabaseSyncThreadStart(void*)>
        data = <value optimized out>
#6  0xb67edc39 in start_thread (arg=0xaf525b70) at pthread_create.c:304
        __res = <value optimized out>
        __ignore1 = <value optimized out>
        __ignore2 = <value optimized out>
        pd = 0xaf525b70
        now = <value optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {-1233133580, 0, 4001536, -1353559336, -1960460186, -767675820}, mask_was_saved = 0}}, priv = {pad = {0x0, 
              0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
        not_first_call = <value optimized out>
        freesize = <value optimized out>
        __PRETTY_FUNCTION__ = "start_thread"
#7  0xb64fb8ee in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130
No locals.

Thread 2 (Thread 0xafe4eb70 (LWP 13711)):
#0  0xb7fe2424 in __kernel_vsyscall ()
No symbol table info available.
#1  0xb67f220a in __pthread_cond_wait (cond=0xb7d70e50, mutex=0xb7d70e38) at pthread_cond_wait.c:153
        __status = -512
        _val = 1
        futex_val = <value optimized out>
        buffer = {__routine = 0xb67f23a0 <__condvar_cleanup>, __arg = 0xafe4e13c, __canceltype = -1207999024, __prev = 0x0}
        cbuffer = {oldtype = 0, cond = 0xb7d70e50, mutex = 0xb7d70e38, bc_seq = 0}
        err = <value optimized out>
        pshared = 0
        val = <value optimized out>
        seq = 0
#2  0xb7856dc7 in WTF::TCMalloc_PageHeap::scavengerThread (this=0xb7d6bd60) at ../JavaScriptCore/wtf/FastMalloc.cpp:2378
No locals.
#3  0xb7856e01 in WTF::TCMalloc_PageHeap::runScavengerThread (context=0xb7d6bd60) at ../JavaScriptCore/wtf/FastMalloc.cpp:1501
No locals.
#4  0xb67edc39 in start_thread (arg=0xafe4eb70) at pthread_create.c:304
        __res = <value optimized out>
        __ignore1 = <value optimized out>
        __ignore2 = <value optimized out>
        pd = 0xafe4eb70
        now = <value optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {-1233133580, 0, 4001536, -1343954216, -431636377, -767675820}, mask_was_saved = 0}}, priv = {pad = {0x0, 
              0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
        not_first_call = <value optimized out>
        freesize = <value optimized out>
        __PRETTY_FUNCTION__ = "start_thread"
#5  0xb64fb8ee in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130
No locals.

Thread 1 (Thread 0xb4a30880 (LWP 13698)):
#0  0xaed02e5a in g_tls_client_connection_gnutls_finish_handshake (conn=0x84d5960, inout_error=0x0) at gtlsclientconnection-gnutls.c:352
        gnutls = 0x84d5960
#1  0xaed04081 in handshake_internal (gnutls=0x84d5960, blocking=<value optimized out>, cancellable=0x0, error=0x0) at gtlsconnection-gnutls.c:886
        peer_certificate = 0x0
        peer_certificate_errors = 0
        ret = -53
#2  0xaed0448b in handshake_in_progress_or_failed (gnutls=<value optimized out>, blocking=<value optimized out>, cancellable=0x0, error=0x0)
    at gtlsconnection-gnutls.c:911
No locals.
#3  0xaed04930 in close_internal (gnutls=0x84d5960, blocking=1, cancellable=0x0, error=0x0) at gtlsconnection-gnutls.c:1094
No locals.
#4  0xaed04d6e in g_tls_connection_gnutls_close (stream=0x84d5960, cancellable=0x0, error=0x0) at gtlsconnection-gnutls.c:1114
        gnutls = 0x84d5960
#5  0xb62e6a8d in g_io_stream_close (stream=0x84d5960, cancellable=0x0, error=0x0)
    at /build/buildd-glib2.0_2.28.6-1-i386-A3fp41/glib2.0-2.28.6/./gio/giostream.c:428
        class = 0x88167d0
        res = 1
        __PRETTY_FUNCTION__ = "g_io_stream_close"
#6  0xb62e6b0a in g_io_stream_dispose (object=0x84d5960) at /build/buildd-glib2.0_2.28.6-1-i386-A3fp41/glib2.0-2.28.6/./gio/giostream.c:110
        stream = 0x84d5960
#7  0xb67adf43 in g_object_unref (_object=0x84d5960) at /build/buildd-glib2.0_2.28.6-1-i386-A3fp41/glib2.0-2.28.6/./gobject/gobject.c:2697
        object = 0x84d5960
        old_ref = 1
        __PRETTY_FUNCTION__ = "g_object_unref"
#8  0xb6eb0e8a in disconnect_internal (sock=0x87eff70) at soup-socket.c:125
        priv = 0x87eff80
#9  0xb6eb2558 in soup_socket_disconnect (sock=0x87eff70) at soup-socket.c:1015
        priv = 0x87eff80
        already_disconnected = 0
        __PRETTY_FUNCTION__ = "soup_socket_disconnect"
#10 0xb6e8ed21 in soup_connection_disconnect (conn=0x85710a8) at soup-connection.c:597
        priv = 0x85710b8
        old_state = SOUP_CONNECTION_IN_USE
        __PRETTY_FUNCTION__ = "soup_connection_disconnect"
#11 0xb6e8eedb in idle_timeout (conn=0x85710a8) at soup-connection.c:337
No locals.
#12 0xb6704b8c in g_timeout_dispatch (source=0x84e8500, callback=0xb6e8eec0 <idle_timeout>, user_data=0x85710a8)
    at /build/buildd-glib2.0_2.28.6-1-i386-A3fp41/glib2.0-2.28.6/./glib/gmain.c:3882
        timeout_source = 0x84e8500
        again = <value optimized out>
#13 0xb6703252 in g_main_dispatch (context=0x80cee20) at /build/buildd-glib2.0_2.28.6-1-i386-A3fp41/glib2.0-2.28.6/./glib/gmain.c:2440
        dispatch = 0xb6704b60 <g_timeout_dispatch>
        was_in_call = 0
        user_data = 0x85710a8
        callback = 0xb6e8eec0 <idle_timeout>
        cb_funcs = 0xb679859c
        cb_data = 0x87d8cf8
        current_source_link = {data = 0x84e8500, next = 0x0}
        need_destroy = <value optimized out>
        source = 0x84e8500
        current = 0x80b7a58
        i = <value optimized out>
#14 g_main_context_dispatch (context=0x80cee20) at /build/buildd-glib2.0_2.28.6-1-i386-A3fp41/glib2.0-2.28.6/./glib/gmain.c:3013
No locals.
#15 0xb6703a30 in g_main_context_iterate (context=0x80cee20, block=1, dispatch=1, self=<value optimized out>)
    at /build/buildd-glib2.0_2.28.6-1-i386-A3fp41/glib2.0-2.28.6/./glib/gmain.c:3091
        max_priority = 2147483647
        timeout = 105
        some_ready = 1
        nfds = <value optimized out>
        allocated_nfds = <value optimized out>
        fds = 0x88021e8
#16 0xb67040f3 in g_main_loop_run (loop=0x8535e60) at /build/buildd-glib2.0_2.28.6-1-i386-A3fp41/glib2.0-2.28.6/./glib/gmain.c:3299
        __PRETTY_FUNCTION__ = "g_main_loop_run"
#17 0xb6b95bd9 in IA__gtk_main () at /build/buildd-gtk+2.0_2.24.4-3-i386-ouUeDk/gtk+2.0-2.24.4/gtk/gtkmain.c:1256
        tmp_list = <value optimized out>
        functions = 0x0
        init = <value optimized out>
        loop = 0x8535e60
#18 0x080785b1 in main (argc=1, argv=0xbffff3b4) at main.c:345
        error = 0x0
        context = <value optimized out>
        debug = 0x80b7b70
        debug_flags = 63455
        dbus = 0x8342740
        initial_state = 0x80b0080 "shown"
        initialState = 3
        opt_session_arg = 0x0
        entries = {{long_name = 0x80a7fa1 "mainwindow-state", short_name = 119 'w', flags = 0, arg = G_OPTION_ARG_STRING, arg_data = 0xbffff2e4, 
            description = 0x80a8170 "Start Liferea with its main window in STATE. STATE may be `shown', `iconified', or `hidden'", 
            arg_description = 0x80a7fb2 "STATE"}, {long_name = 0x80b005c "session", short_name = 0 '\000', flags = 1, arg = G_OPTION_ARG_STRING, 
            arg_data = 0xbffff2e0, description = 0x0, arg_description = 0x0}, {long_name = 0x80a305a "version", short_name = 118 'v', flags = 8, 
            arg = G_OPTION_ARG_CALLBACK, arg_data = 0x8077ea0, description = 0x80a81cc "Show version information and exit", arg_description = 0x0}, {
            long_name = 0x0, short_name = 0 '\000', flags = 0, arg = G_OPTION_ARG_NONE, arg_data = 0x0, description = 0x0, arg_description = 0x0}}
        debug_entries = {{long_name = 0x80a7eab "debug-all", short_name = 0 '\000', flags = 8, arg = G_OPTION_ARG_CALLBACK, arg_data = 0x8077b50, 
            description = 0x80a81f0 "Print debugging messages of all types", arg_description = 0x0}, {long_name = 0x80a7eb7 "debug-cache", 
            short_name = 0 '\000', flags = 8, arg = G_OPTION_ARG_CALLBACK, arg_data = 0x8077b50, 
            description = 0x80a8218 "Print debugging messages for the cache handling", arg_description = 0x0}, {long_name = 0x80a7ec5 "debug-conf", 
            short_name = 0 '\000', flags = 8, arg = G_OPTION_ARG_CALLBACK, arg_data = 0x8077b50, 
            description = 0x80a8248 "Print debugging messages of the configuration handling", arg_description = 0x0}, {long_name = 0x80a7ed2 "debug-db", 
            short_name = 0 '\000', flags = 8, arg = G_OPTION_ARG_CALLBACK, arg_data = 0x8077b50, 
            description = 0x80a8280 "Print debugging messages of the database handling", arg_description = 0x0}, {long_name = 0x80a7edd "debug-gui", 
            short_name = 0 '\000', flags = 8, arg = G_OPTION_ARG_CALLBACK, arg_data = 0x8077b50, 
            description = 0x80a82b4 "Print debugging messages of all GUI functions", arg_description = 0x0}, {long_name = 0x80a7ee9 "debug-html", 
            short_name = 0 '\000', flags = 8, arg = G_OPTION_ARG_CALLBACK, arg_data = 0x8077b50, 
            description = 0x80a82e4 "Enables HTML rendering debugging. Each time Liferea renders HTML output it will also dump the generated HTML into ~/.liferea_1.6/output.xhtml", arg_description = 0x0}, {long_name = 0x80a7ef6 "debug-net", short_name = 0 '\000', flags = 8, arg = G_OPTION_ARG_CALLBACK, 
            arg_data = 0x8077b50, description = 0x80a8374 "Print debugging messages of all network activity", arg_description = 0x0}, {
            long_name = 0x80a7f02 "debug-parsing", short_name = 0 '\000', flags = 8, arg = G_OPTION_ARG_CALLBACK, arg_data = 0x8077b50, 
            description = 0x80a83a8 "Print debugging messages of all parsing functions", arg_description = 0x0}, {long_name = 0x80a7f12 "debug-performance", 
            short_name = 0 '\000', flags = 8, arg = G_OPTION_ARG_CALLBACK, arg_data = 0x8077b50, 
            description = 0x80a83dc "Print debugging messages when a function takes too long to process", arg_description = 0x0}, {
            long_name = 0x80a7f26 "debug-plugins", short_name = 0 '\000', flags = 8, arg = G_OPTION_ARG_CALLBACK, arg_data = 0x8077b50, 
            description = 0x80a8420 "Print debugging messages for the plugin loading", arg_description = 0x0}, {long_name = 0x80a7f36 "debug-trace", 
            short_name = 0 '\000', flags = 8, arg = G_OPTION_ARG_CALLBACK, arg_data = 0x8077b50, 
            description = 0x80a8450 "Print debugging messages when entering/leaving functions", arg_description = 0x0}, {long_name = 0x80a7f44 "debug-update", 
            short_name = 0 '\000', flags = 8, arg = G_OPTION_ARG_CALLBACK, arg_data = 0x8077b50, 
            description = 0x80a848c "Print debugging messages of the feed update processing", arg_description = 0x0}, {long_name = 0x80a7f53 "debug-verbose", 
            short_name = 0 '\000', flags = 8, arg = G_OPTION_ARG_CALLBACK, arg_data = 0x8077b50, description = 0x80a84c4 "Print verbose debugging messages", 
            arg_description = 0x0}, {long_name = 0x0, short_name = 0 '\000', flags = 0, arg = G_OPTION_ARG_NONE, arg_data = 0x0, description = 0x0, 
            arg_description = 0x0}}
        __PRETTY_FUNCTION__ = "main"
(gdb) 

--- glib-networking-2.28.7/tls/gnutls/gtlsclientconnection-gnutls.c.orig	2011-05-29 23:44:14.000000000 +0200
+++ glib-networking-2.28.7/tls/gnutls/gtlsclientconnection-gnutls.c	2011-05-29 23:45:17.000000000 +0200
@@ -349,7 +349,8 @@
 {
   GTlsClientConnectionGnutls *gnutls = G_TLS_CLIENT_CONNECTION_GNUTLS (conn);
 
-  if (g_error_matches (*inout_error, G_TLS_ERROR, G_TLS_ERROR_NOT_TLS) &&
+  if (inout_error &&
+      g_error_matches (*inout_error, G_TLS_ERROR, G_TLS_ERROR_NOT_TLS) &&
       gnutls->priv->cert_requested)
     {
       g_clear_error (inout_error);
@@ -361,7 +362,8 @@
     {
       gnutls_datum session_data;
 
-      if (!*inout_error &&
+      if (inout_error &&
+	  !*inout_error &&
 	  gnutls_session_get_data2 (g_tls_connection_gnutls_get_session (conn),
 				    &session_data) == 0)
 	{

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to