[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: crash in svn_client_status()

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: 2005-01-26 20:31:51 CET

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
Received on Wed Jan 26 20:33:08 2005

This is an archived mail posted to the Subversion Dev mailing list.