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

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



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.

-- 
Jan Synacek
Software Engineer, Red Hat