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

Re: slaptest segfaults on exit after successful check (ITS#3326)



The problem is known, and there are other subtleties your patch doesn't
consider.  It should be fixed in HEAD, pending backporting to re22. 
Please check if you can reproduce it with HEAD code.

Thanks, p.

> What happens:
>
> # slaptest
> config file testing succeeded
> Segmentation fault
> #
>
> Always reproduceable.
>
>   The problem is `slap_tool_destroy()' (see "servers/slapd/slapcommon.c")
> always
> invoke `slap_shutdown()', but for SLAPTEST/SLAPDN appropriate
> `slap_startup()'
> is never used.
>
>   The patch against 2.2.15 version:
>
> diff -Nrbu openldap-2.2.15/servers/slapd/slapcommon.c
> openldap-2.2.15-OK/servers/slapd/slapcommon.c
> --- openldap-2.2.15/servers/slapd/slapcommon.c  2004-07-18
> 10:35:47.000000000
> +0400
> +++ openldap-2.2.15-OK/servers/slapd/slapcommon.c       2004-09-10
> 16:36:32.000000000 +0400
> @@ -456,7 +456,7 @@
>
>
>  void slap_tool_destroy( void )
>  {
> -       if ( !dryrun ) {
> +       if ( !dryrun && be != NULL ) {
>                 slap_shutdown( be );
>         }
>         slap_destroy();
>


-- 
Pierangelo Masarati
mailto:pierangelo.masarati@sys-net.it


    SysNet - via Dossi,8 27100 Pavia Tel: +390382573859 Fax: +390382476497