[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: (ITS#8084) Segfault on ppc64 caused by commit 6ad38fef3fe63ff86c1e6cff3c6330353b21cc24



jsynacek@redhat.com wrote:
> jsynacek@redhat.com writes:
>
>> I bisected the problem and the following commit is the problem:
>> commit 6ad38fef3fe63ff86c1e6cff3c6330353b21cc24
>> Author: Howard Chu <hyc@openldap.org>
>> Date:   Wed Jan 14 19:05:17 2015 +0000
>>
>>      Fix typo in 45146ba21a9ee494e7058ca7a173fcc6b27df744
>>
>> diff --git a/servers/slapd/schema_init.c b/servers/slapd/schema_init.c
>> index 46d1c6d..08e733f 100644
>> --- a/servers/slapd/schema_init.c
>> +++ b/servers/slapd/schema_init.c
>> @@ -1826,7 +1826,7 @@ UTF8StringValidate(
>>                  if( LDAP_UTF8_OFFSET( (char *)u ) != len ) return
>> LDAP_INVALID_SYNTAX;
>>          }
>>
>> -       if( u >= len ) {
>> +       if( u > end ) {
>>                  return LDAP_INVALID_SYNTAX;
>>          }
>
> This commit obviously doesn't have anything to do with the crash. I'm
> not sure why the crash is triggered from this commit onward.
>
> The real issue seems to be the attribute usage in mdb.c:
>
> #  define      ESECT   __attribute__ ((section("text_env")))
>
> If ESECT is simply removed, the crash goes away.

Sounds like a ppc64 binutils bug then. You can #if 0 that definition for ppc64 if you want, since it's only a small optimization for text segment size. But if ppc64 is using standard ELF binary format, this should not be breaking.

-- 
   -- Howard Chu
   CTO, Symas Corp.           http://www.symas.com
   Director, Highland Sun     http://highlandsun.com/hyc/
   Chief Architect, OpenLDAP  http://www.openldap.org/project/