vasprintf core dump problem on Solaris 2.8

Andrzej Cuper ACuper at edgewater.com
Wed Aug 7 18:46:02 CEST 2002


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

Hello,
I'm running into core dump problems with test programs t-encrypt, t-decrypt etc, when runing 'make check' (on Solaris 2.8). The problem seems to be with vasprintf (vasprintf.c in gpgme directory) implementation and more specifically with the following fragment of code. Also enclosed call stack from gdb. Please help!

Also, can somebody explain the use of  DEBUG_BEGIN, DEBUG_ADD1, DEBUG_END.  Do I need to set up some environemnt variable to be able to see this. Which file does it go to?

Regards,
Andrzej



static int
int_vasprintf (result, format, args)
     char **result;
     const char *format;
     va_list *args;
{
...
  while (*p != '\0')
    {
      if (*p++ == '%')
	{
	...
	  switch (*p)
	    {
	    case 'd':
		...
	      break;
	    case 's':
======>	      total_width += strlen (va_arg (ap, char *));	<=============
	      break;
		...
	    }
	  p++;
	}
    }
	...
    return 0;
}


(gdb) where
#0  0xff2b3084 in strlen () from /usr/lib/libc.so.1
#1  0xff374d08 in int_vasprintf (result=0xffbeef18, format=0xff3768f0 "%s%s", 
    args=0xffbeee94) at vasprintf.c:100
#2  0xff374e50 in vasprintf (result=0xffbeef18, format=0xff3768f0 "%s%s", 
    args=0xffbeef04) at vasprintf.c:130
#3  0xff374e7c in asprintf (buf=0xffbeef18, fmt=0xff3768f0 "%s%s")
    at vasprintf.c:141
#4  0xff373ef8 in _gpgme_debug_add (line=0xffbeefa4, format=0xff3768f0 "%s%s")
    at debug.c:189
#5  0xff37387c in _gpgme_io_select (fds=0x23c28, nfds=10, nonblock=1456)
    at posix-io.c:325
#6  0xff3679a0 in do_select (fdt=0x21d90) at wait.c:155
#7  0xff367de0 in _gpgme_wait_on_condition (ctx=0x21d08, cond=0x0)
    at wait.c:291
#8  0xff367d80 in _gpgme_wait_one (ctx=0x21d08) at wait.c:279
#9  0xff36868c in gpgme_op_encrypt (ctx=0x21d08, recp=0x217d0, plain=0x21dc0, 
    cipher=0x21df8) at encrypt.c:251
#10 0x11004 in main ()




-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (MingW32)
Comment: For info see http://www.gnupg.org

iEYEARECAAYFAj1RQEIACgkQBbTyHSd8yPx68wCeNQphGxd8Jh5hg9PGK8j9kaaX
L6oAn1Ux86wM4wGDq/X6itGv/ydygYkB
=n1pG
-----END PGP SIGNATURE-----




More information about the Gnupg-devel mailing list