[Gluster-devel] Crashes with latest git code

Raghavendra Bhat rabhat at redhat.com
Thu May 17 09:46:20 UTC 2012


In getxattr name is NULL means its equivalent listxattr. So args->name being NULL is ok. Process was crashing because it tried to do strdup (actually strlen in the gf_strdup) of the NULL pointer to a string.

On wire we will send it as a null string with namelen set to 0 and protocol/server will understand it.

On client side:

    req.name = (char *)args->name;
        if (!req.name) {
        req.name = "";
                req.namelen = 0;
    }


On server side:
    if (args.namelen)
                state->name = gf_strdup (args.name);



----- Original Message -----
From: "Emmanuel Dreyfus" <manu at netbsd.org>
To: "Raghavendra Bhat" <rabhat at redhat.com>
Cc: gluster-devel at nongnu.org
Sent: Thursday, May 17, 2012 2:48:29 PM
Subject: Re: [Gluster-devel] Crashes with latest git code

Raghavendra Bhat <rabhat at redhat.com> wrote:

> A bug has already been filed for this (822385) and patch has been sent for
> the review (http://review.gluster.com/#change,3353).

I looked at the patch, it does not fix the problem I reported:
args->name is still NULL.

-- 
Emmanuel Dreyfus
http://hcpnet.free.fr/pubz
manu at netbsd.org




More information about the Gluster-devel mailing list