GNUTLS 2.8.5: Assertion failed on Solaris 8 Sparc

View: New views
4 Messages — Rating Filter:   Alert me  

GNUTLS 2.8.5: Assertion failed on Solaris 8 Sparc

by Dagobert Michelsen-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I have a failed test in 2.8.5 on Solaris 8 Sparc with Sun Studio 11:

> gmake  check-TESTS
> gmake[9]: Entering directory `/home/dam/mgar/pkg/gnutls/trunk/work/
> solaris8-sparc/build-isa-sparcv8/gnutls-2.8.5/lib/gl/tests'
> PASS: test-alloca-opt
> PASS: test-byteswap
> PASS: test-c-ctype
> PASS: test-errno
> PASS: test-fseeko.sh
> PASS: test-fseeko2.sh
> test-func.c:40: assertion failed
> FAIL: test-func
> PASS: test-netdb
> PASS: test-read-file
> PASS: test-snprintf


I adjust the code to show what exactly is failing:

> int
> main ()
> {
>   printf( "%d %d\n", strlen (__func__), sizeof __func__ );
>   ASSERT (strlen (__func__) + 1 == sizeof __func__);
>   return 0;
> }
> build8s% ./test-func
> 4 0
> test-func.c:41: assertion failed
> zsh: IOT instruction (core dumped)  ./test-func

I guess __func__ is kindof empty... Should this concern me?


Best regards

   -- Dago




_______________________________________________
Gnutls-devel mailing list
Gnutls-devel@...
http://lists.gnu.org/mailman/listinfo/gnutls-devel

Re: GNUTLS 2.8.5: Assertion failed on Solaris 8 Sparc

by Simon Josefsson-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Dagobert Michelsen <dam@...> writes:

> Hi,
>
> I have a failed test in 2.8.5 on Solaris 8 Sparc with Sun Studio 11:
>
>> gmake  check-TESTS
>> gmake[9]: Entering directory `/home/dam/mgar/pkg/gnutls/trunk/work/
>> solaris8-sparc/build-isa-sparcv8/gnutls-2.8.5/lib/gl/tests'
>> PASS: test-alloca-opt
>> PASS: test-byteswap
>> PASS: test-c-ctype
>> PASS: test-errno
>> PASS: test-fseeko.sh
>> PASS: test-fseeko2.sh
>> test-func.c:40: assertion failed
>> FAIL: test-func
>> PASS: test-netdb
>> PASS: test-read-file
>> PASS: test-snprintf
>
>
> I adjust the code to show what exactly is failing:
>
>> int
>> main ()
>> {
>>   printf( "%d %d\n", strlen (__func__), sizeof __func__ );
>>   ASSERT (strlen (__func__) + 1 == sizeof __func__);
>>   return 0;
>> }
>> build8s% ./test-func
>> 4 0
>> test-func.c:41: assertion failed
>> zsh: IOT instruction (core dumped)  ./test-func
>
> I guess __func__ is kindof empty... Should this concern me?

__func__ is only used in the guile wrapper:

guile/src/utils.c:    scm_gnutls_error (GNUTLS_E_UNIMPLEMENTED_FEATURE, __func__);

If you don't build the guile libraries, you could ignore it.

A sizeof(__func__) == 0 seems odd.  What is __func__ on Solaris?  Is
there some other variable that contains the current function name on
Solaris?

I think this is a bug in gnulib's func module, so let's continue
discussion on the gnulib list.

/Simon


_______________________________________________
Gnutls-devel mailing list
Gnutls-devel@...
http://lists.gnu.org/mailman/listinfo/gnutls-devel

Re: GNUTLS 2.8.5: Assertion failed on Solaris 8 Sparc

by Eric Blake :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Simon Josefsson on 11/5/2009 6:02 AM:
> A sizeof(__func__) == 0 seems odd.  What is __func__ on Solaris?  Is
> there some other variable that contains the current function name on
> Solaris?

This is a known bug in the Solaris compiler, and gnulib just ignores the
error.  This line from test-func.c is telling:

>   /* On SunPRO C 5.9, sizeof __func__ evaluates to 0.  The compiler warns:
>      "warning: null dimension: sizeof()".  */
> #if !defined __SUNPRO_C
>   ASSERT (strlen (__func__) + 1 == sizeof __func__);
> #endif

- --
Don't work too hard, make some time for fun as well!

Eric Blake             ebb9@...
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkry0KMACgkQ84KuGfSFAYCPIgCeLJ0jmtbSKx/+UnvwX/IWEt1Q
5OYAn3oUOpCdSTukmrU4HZXP4dwZTIOk
=lVxd
-----END PGP SIGNATURE-----


_______________________________________________
Gnutls-devel mailing list
Gnutls-devel@...
http://lists.gnu.org/mailman/listinfo/gnutls-devel

Re: GNUTLS 2.8.5: Assertion failed on Solaris 8 Sparc

by Simon Josefsson-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Eric Blake <ebb9@...> writes:

> According to Simon Josefsson on 11/5/2009 6:02 AM:
>> A sizeof(__func__) == 0 seems odd.  What is __func__ on Solaris?  Is
>> there some other variable that contains the current function name on
>> Solaris?
>
> This is a known bug in the Solaris compiler, and gnulib just ignores the
> error.  This line from test-func.c is telling:
>
>>   /* On SunPRO C 5.9, sizeof __func__ evaluates to 0.  The compiler warns:
>>      "warning: null dimension: sizeof()".  */
>> #if !defined __SUNPRO_C
>>   ASSERT (strlen (__func__) + 1 == sizeof __func__);
>> #endif

Ah, thanks.  But does __func__ work on Solaris?  Would it make sense to
improve the self-test like this?

/Simon

diff --git a/tests/test-func.c b/tests/test-func.c
index 8a3c465..3c2de3c 100644
--- a/tests/test-func.c
+++ b/tests/test-func.c
@@ -45,5 +45,8 @@ main ()
   ASSERT (strlen (__func__) + 1 == sizeof __func__);
 #endif
 
+  assert (strcmp (__func__, "main") == 0
+  || strcmp (__func__, "<unknown function>") == 0);
+
   return 0;
 }


_______________________________________________
Gnutls-devel mailing list
Gnutls-devel@...
http://lists.gnu.org/mailman/listinfo/gnutls-devel