You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by SteveKing <st...@gmx.ch> on 2005/01/26 18:57:29 UTC

crash in svn_client_status()

Hi,

Another stacktrace, this time without TSVN passing invalid params.
(this one's bothering me for quite a while, but I was never able to 
provide you with a complete stacktrace. Now that I can, I hope you guys 
can figure out what exactly is wrong here).

the stacktrace (linenumbers are valid for the 1.1.3 release):
subversion\libsvn_client\status.c : line 240
subversion\libsvn_wc\adm_crawler.c : line 606
subversion\libsvn_ra_dav\fetch.c : line 2415
subversion\libsvn_ra_dav\util.c : line 695
subversion\libsvn_ra_dav\util.c : line 603
_ne_request_dispatch() + 0x22
_ne_read_response_block() + 0x92
_ne_sock_close() + 0x3b4
_ne_xml_parse() + 0x30
apr-util\xml\expat\lib\xmlparse.c : line 1145
apr-util\xml\expat\lib\xmlparse.c : line 1156
apr-util\xml\expat\lib\xmlparse.c : line 1354
apr-util\xml\expat\lib\xmlparse.c : line 1744
_ne_xml_currentline() + 0x1d2
subversion\libsvn_ra_dav\fetch.c : line 2080
subversion\libsvn_wc\status.c : line 1345
subversion\libsvn_wc\status.c : line 1030

here in the line 1030
if (status->repos_text_status != svn_wc_status_none)
the 'status' is NULL.


Stefan


-- 
        ___
   oo  // \\      "De Chelonian Mobile"
  (_,\/ \_/ \     TortoiseSVN
    \ \_/_\_/>    The coolest Interface to (Sub)Version Control
    /_/   \_\     http://tortoisesvn.tigris.org

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: crash in svn_client_status()

Posted by Julian Foad <ju...@btopenworld.com>.
Philip Martin wrote:
> Julian Foad <ju...@btopenworld.com> writes:
> 
>>>1382   if (dir_status && is_sendable_status (dir_status, eb))
>>>        (eb->status_func) (eb->status_baton, db->path, dir_status);
>>>      apr_hash_set (pb->statii, db->path, APR_HASH_KEY_STRING, NULL);
>>
>>No way am I going to try to suggest a fix, though :-)
> 
> How about r11876?

Oh!  Duh!  I can't believe I didn't notice - I even quoted the fixed line!  So 
it's been fixed on trunk already.  Good.

- Julian

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: crash in svn_client_status()

Posted by Philip Martin <ph...@codematters.co.uk>.
Julian Foad <ju...@btopenworld.com> writes:

>>1382   if (dir_status && is_sendable_status (dir_status, eb))
>>         (eb->status_func) (eb->status_baton, db->path, dir_status);
>>       apr_hash_set (pb->statii, db->path, APR_HASH_KEY_STRING, NULL);
>
> No way am I going to try to suggest a fix, though :-)

How about r11876?

-- 
Philip Martin

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: crash in svn_client_status()

Posted by Julian Foad <ju...@btopenworld.com>.
SteveKing wrote:
> Another stacktrace, this time without TSVN passing invalid params.
> (this one's bothering me for quite a while, but I was never able to 
> provide you with a complete stacktrace. Now that I can, I hope you guys 
> can figure out what exactly is wrong here).

Thanks.

> the stacktrace (linenumbers are valid for the 1.1.3 release):
> subversion\libsvn_client\status.c : line 240
> subversion\libsvn_wc\adm_crawler.c : line 606
> subversion\libsvn_ra_dav\fetch.c : line 2415
> subversion\libsvn_ra_dav\util.c : line 695
> subversion\libsvn_ra_dav\util.c : line 603
> _ne_request_dispatch() + 0x22
> _ne_read_response_block() + 0x92
> _ne_sock_close() + 0x3b4
> _ne_xml_parse() + 0x30
> apr-util\xml\expat\lib\xmlparse.c : line 1145
> apr-util\xml\expat\lib\xmlparse.c : line 1156
> apr-util\xml\expat\lib\xmlparse.c : line 1354
> apr-util\xml\expat\lib\xmlparse.c : line 1744
> _ne_xml_currentline() + 0x1d2
> subversion\libsvn_ra_dav\fetch.c : line 2080
> subversion\libsvn_wc\status.c : line 1345

That looks like the problem line (and is line 1382 on the trunk): it passes 
"dir_status" to "is_sendable_status()" without checking that it is non-null, 
whereas the previous two statements do both check for null.

Trunk:
>1372   /* See if the directory was deleted or replaced. */
>       dir_status = apr_hash_get (pb->statii, db->path, APR_HASH_KEY_STRING);
>       if (dir_status &&
>           ((dir_status->repos_text_status == svn_wc_status_deleted)
>            || (dir_status->repos_text_status == svn_wc_status_replaced)))
>         was_deleted = TRUE;
> 
>       /* Now do the status reporting. */
>       SVN_ERR (handle_statii (eb, dir_status ? dir_status->entry : NULL,
>                               db->path, db->statii, was_deleted, TRUE, pool));
>1382   if (dir_status && is_sendable_status (dir_status, eb))
>         (eb->status_func) (eb->status_baton, db->path, dir_status);
>       apr_hash_set (pb->statii, db->path, APR_HASH_KEY_STRING, NULL);

No way am I going to try to suggest a fix, though :-)

- Julian


> subversion\libsvn_wc\status.c : line 1030
> 
> here in the line 1030
> if (status->repos_text_status != svn_wc_status_none)
> the 'status' is NULL.
> 
> 
> Stefan


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org