GNU bug report logs - #8556
recent gnutls.c changes broke build on Ubuntu 10.10

Previous Next

Package: emacs;

Reported by: Paul Eggert <eggert <at> cs.ucla.edu>

Date: Tue, 26 Apr 2011 07:19:01 UTC

Severity: normal

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 8556 in the body.
You can then email your comments to 8556 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8556; Package emacs. (Tue, 26 Apr 2011 07:19:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Paul Eggert <eggert <at> cs.ucla.edu>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 26 Apr 2011 07:19:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: bug-gnu-emacs <at> gnu.org
Cc: Ted Zlatanov <tzz <at> lifelogs.com>
Subject: recent gnutls.c changes broke build on Ubuntu 10.10
Date: Tue, 26 Apr 2011 00:18:16 -0700
bzr 103998 introduced a bug in emacs_gnutls_handshake: it has
a 'return;' statement in a function returning an integer, which
violates the C standard.  I plan to fix this with the following
patch, for lack of a better idea, but it would be nice if someone
with more expertise in gnutls could double-check this.

* gnutls.c (emacs_gnutls_handshake): Always return a value.
Expect the caller to check whether GNUTLS_STAGE_HANDSHAKE_CANDO <=
proc->gnutls_initstage, if the check is needed.  The check isn't
needed for one caller, Fgnutls_boot.
(emacs_gnutls_read): Do that check.  This is the other caller.
=== modified file 'src/gnutls.c'
--- src/gnutls.c	2011-04-26 06:17:52 +0000
+++ src/gnutls.c	2011-04-26 07:05:42 +0000
@@ -73,9 +73,6 @@
   gnutls_session_t state = proc->gnutls_state;
   int ret;

-  if (proc->gnutls_initstage < GNUTLS_STAGE_HANDSHAKE_CANDO)
-    return;
-
   if (proc->gnutls_initstage < GNUTLS_STAGE_TRANSPORT_POINTERS_SET)
     {
 #ifdef WINDOWSNT
@@ -179,7 +176,8 @@

   if (proc->gnutls_initstage != GNUTLS_STAGE_READY)
     {
-      emacs_gnutls_handshake (proc);
+      if (GNUTLS_STAGE_HANDSHAKE_CANDO <= proc->gnutls_initstage)
+	emacs_gnutls_handshake (proc);
       return -1;
     }
   rtnval = gnutls_read (state, buf, nbyte);





Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8556; Package emacs. (Tue, 26 Apr 2011 13:06:01 GMT) Full text and rfc822 format available.

Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Ted Zlatanov <tzz <at> lifelogs.com>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: bug-gnu-emacs <at> gnu.org
Subject: Re: recent gnutls.c changes broke build on Ubuntu 10.10
Date: Tue, 26 Apr 2011 08:05:00 -0500
On Tue, 26 Apr 2011 00:18:16 -0700 Paul Eggert <eggert <at> cs.ucla.edu> wrote: 

PE> bzr 103998 introduced a bug in emacs_gnutls_handshake: it has
PE> a 'return;' statement in a function returning an integer, which
PE> violates the C standard.  I plan to fix this with the following
PE> patch, for lack of a better idea, but it would be nice if someone
PE> with more expertise in gnutls could double-check this.

I committed a different fix, because I *think* your fix would loop
forever: we just return -1 instead, now (this doesn't overlap with
EAGAIN or GNUTLS_E_AGAIN).  But maybe I misunderstood something in your
suggestion.  

I won't be able to commit for a few days so if you still think your fix
is better or have further suggestions, please go ahead and make them.

Thanks
Ted




Reply sent to Paul Eggert <eggert <at> cs.ucla.edu>:
You have taken responsibility. (Tue, 26 Apr 2011 17:58:02 GMT) Full text and rfc822 format available.

Notification sent to Paul Eggert <eggert <at> cs.ucla.edu>:
bug acknowledged by developer. (Tue, 26 Apr 2011 17:58:02 GMT) Full text and rfc822 format available.

Message #13 received at 8556-done <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Ted Zlatanov <tzz <at> lifelogs.com>
Cc: 8556-done <at> debbugs.gnu.org
Subject: Re: recent gnutls.c changes broke build on Ubuntu 10.10
Date: Tue, 26 Apr 2011 10:57:39 -0700
On 04/26/11 06:05, Ted Zlatanov wrote:
> I committed a different fix, because I *think* your fix would loop
> forever

Thanks for looking into it.  I'm sure your fix is better, because
I didn't really follow the code.  I'll mark this bug as done.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 25 May 2011 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 14 years and 87 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.