This is the mail archive of the cygwin-apps mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [64bit] openldap compilation doesn't produce shared libraries

On 2013-06-10 07:46, Dr. Volker Zell wrote:
I think the stack trace translates to the following:

Stack trace:
Frame        Function    Args

The offending code line
	case BvOff: = (char *) b->result + b->off;
		((struct berval *) ( + tot_size))->bv_val = NULL;   <- line 414
		tot_size = 0;

That is where it is crashing, but after some debugging, AFAICS the real culprit is the call to ber_scanf() in ldap_get_attribute_ber(). Presumably because this is a varargs function, the compiler wasn't able to handle the necessary type promotion automatically (ber_len_t is an unsigned long); so b->off was showing here as 0x600000000, taking line 414 off to la-la land. Patch attached and pushed to Ports git.


--- origsrc/openldap-2.4.35/libraries/libldap/getattr.c	2013-03-28 10:41:51.000000000 -0500
+++ src/openldap-2.4.35/libraries/libldap/getattr.c	2013-06-12 19:07:31.378388100 -0500
@@ -147,7 +147,7 @@ ldap_get_attribute_ber( LDAP *ld, LDAPMe
 		/* skip sequence, snarf attribute type */
 		tag = ber_scanf( ber, vals ? "{mM}" : "{mx}", attr, vals,
-			&siz, 0 ); 
+			&siz, (ber_len_t) 0 );
 		if( tag == LBER_ERROR ) {
 			rc = ld->ld_errno = LDAP_DECODING_ERROR;

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]