gnutls-devel
[Top][All Lists]
Advanced

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

[gnutls-dev] gnutls-0.9.96 build failure on Solaris


From: Dimitri Papadopoulos-Orfanos
Subject: [gnutls-dev] gnutls-0.9.96 build failure on Solaris
Date: Wed, 12 Nov 2003 14:50:32 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031007

Hi,

GnuTLS 0.9.96 fails to build on Solaris 8 using the Sun ONE Studio 7 compiler.

The problem seems to be that the bundled minitasn1 library doesn't include <alloca.h> prior to using alloca():

        #ifdef HAVE_ALLOCA
        # define _asn1_alloca alloca
        # define _asn1_afree(x)
        #else
        # define _asn1_alloca _asn1_malloc
        # define _asn1_afree _asn1_free
        #endif /* HAVE_ALLOCA */

Instead the source code should look like:

        #ifdef HAVE_ALLOCA
        # ifdef HAVE_ALLOCA_H
        #  include <alloca.h>
        # endif
        # define _asn1_alloca alloca
        # define _asn1_afree(x)
        #else
        # define _asn1_alloca _asn1_malloc
        # define _asn1_afree _asn1_free
        #endif /* HAVE_ALLOCA */

By the way, are you sure you really need to use alloca()?
http://sources.redhat.com/ml/gdb/2000-11/threads.html#00053
http://www.gnu.org/software/libc/manual/html_mono/libc.html#Disadvantages%20of%20Alloca
I really don't know much about all that, so bear with me if I'm talking complete nonsense, but can't alloca() result in security issues, if somehow the software is tricked into allocating more memory than the machine can provide?


There were also warnings that could point to real problems, such as src/common.h defining:
        void socket_init( void);
instead of
        void sockets_init( void);

Here are some of these warnings:
"gnutls_auth.c", line 98: warning: enum type mismatch: op "="
"gnutls_auth.c", line 122: warning: enum type mismatch: op "="
"auth_cert.c", line 1234: warning: enum type mismatch: arg #2
"serv.c", line 553: warning: implicit function declaration: sockets_init
"serv.c", line 947: warning: statement not reached


Finally there were the usual signed/unsigned warnings you already know about. See attached build log.

--
Dimitri

Attachment: gnutls-0.9.96.log.gz
Description: GNU Zip compressed data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]