#6758: [with spkg; needs review] visibility.c in libgcrypt attempts to return
value from void function.
--------------------------+-------------------------------------------------
 Reporter:  drkirkby      |       Owner:  somebody  
     Type:  defect        |      Status:  new       
 Priority:  major         |   Milestone:  sage-4.1.2
Component:  cryptography  |    Keywords:            
 Reviewer:                |      Author:            
   Merged:                |  
--------------------------+-------------------------------------------------

Comment(by drkirkby):

 By looking at the latest source code for libgcrypt this code has been
 changed. It would appear the intension was to just execute the functions
 _gcry_md_hash_buffer and _gcry_ac_io_init_va, but not return their value.
 Here are the relevant functions from the latest release (1.4.4):
 {{{
 void
 gcry_ac_io_init_va (gcry_ac_io_t *ac_io, gcry_ac_io_mode_t mode,
                     gcry_ac_io_type_t type, va_list ap)
 {
   _gcry_ac_io_init_va (ac_io, mode, type, ap);
 }
 }}}

 The code for function gcry_md_hash_buffer has changed a little more, but
 it is obvious the intension here two was to execute _gcry_md_hash_buffer
 and not return the value.

 {{{

 void
 gcry_md_hash_buffer (int algo, void *digest,
                      const void *buffer, size_t length)
 {
   if (!fips_is_operational ())
     {
       (void)fips_not_operational ();
       fips_signal_error ("called in non-operational state");
     }
   _gcry_md_hash_buffer (algo, digest, buffer, length);
 }

 }}}

 So I removed the 'return' from the code in Sage, and made a patch. Since
 this is just buggy code, and not-Solaris specific, I've made the patch on
 all platforms. It is only seen on Solaris with the Sun compiler, as the
 Sun compiler is more fussy than gcc.

 See: http://sage.math.washington.edu/home/kirkby/Solaris-
 fixes/libgcrypt-1.4.3.p2/


 Sinve there are some license issues here, I have not updated the package.
 This code currently in Sage is GPL3 - see #6757

 Dave

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/6758#comment:1>
Sage <http://sagemath.org/>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to