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

Re: PATCH: $Header$ keyword support (now with proper log message)

From: Garrett Rooney <rooneg_at_electricjellyfish.net>
Date: 2004-09-15 16:43:49 CEST

Alexander L. Belikoff wrote:

>The long winded point here is that the 'client' of the API should treat the
>data structure just for what it is - an opaque data structure provided by the
>API, where the client is being offered just a bunch of members (potentially
>having other hidden members). If the client then builds with the same version
>of API headers as the API libraries, he should be OK (save for the forward
>incompatibility issue outlined in the beginning).
The problem is that the client migh thave built with a different version
of the header files, and according to our versioning rules it's
perfectly valid for them to have done so.

>Let me know if I am wrong in my interpretation of svn_keywords_t.
Client of the subversion libraries writes code like this:

svn_subst_keywords_t kw;
int some_other_variable;

svn_subst_build_keyworkds (&kw, ... (other args here) ...);

Note that the svn_subst_keywords_t is declared on the stack. They then
build it with a version of subversion that uses the old definition of
svn_subst_keywords_t, so their binary is created assuming that size for
svn_subst_keywords_t. They ship this binary to thier users who already
have Subversion isntalled on their machine, and everything works.

Then your patch gets applied, which changes the size of
svn_subst_keywords_t, and several of the underlying functions in
libsvn_subr (or wherever the subst functions live, I forget) now assume
the new size. The users (who only have the binary compiled with the old
definition of svn_subst_keywords_t) upgrade to the new version of
Subversion, which assumes the new size.

The program now calls the new version of svn_subst_build_keywords, which
assumes the svn_subst_keywords_t pointer it's given points to an area of
memory large enough to hold the new version. In reality the area of
memory is not large enough, so we just smashed the variables allocated
on the stack after the kw variable, causing their program to crash and
everyone to become afraid of upgrading to new versions of Subversion
because their old programs will break when they do.

We don't want people to be afraid of upgrading within the same major
version, so we don't make those kind of changes.


To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Sep 15 16:44:23 2004

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.