You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by kf...@collab.net on 2003/09/19 20:14:07 UTC

Re: NULL pointers.

Mark Grosberg <ma...@nolab.conman.org> writes:
> I noticed some changes to the trail functions. In particular, in
> begin_trail the trail->db_txn pointer is not explicitly set to NULL if no
> transaction is to be used. In particular this can cause abort_trail() or
> commit_trail() to get confused later on for certain platforms.
> 
> In particular, even though the trail structure is allocated with
> pcalloc(), ANSI states that all-zero-bits does not equal a NULL pointer.
> So, much like the undo pointer, this must be set to NULL manually.

Hmmm.  We depend on this equivalence all over Subversion, not just in
the trail code.  Are you experiencing an actual problem on a platform
where all zero bits is not the same as NULL?

-Karl

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

Re: NULL pointers.

Posted by kf...@collab.net.
Mark Grosberg <ma...@nolab.conman.org> writes:
> No (for the moment all my "wierd" architectures are in a state of
> disrepair). However, I figured I would point it out and at least prevent
> N+1 instances. Technically, to be portable, that assumption eventually
> needs to be changed though. I know, not exactly pre-1.0 issues, but
> nevertheless maybe it should be filed in the issue tracker as a
> long-standing cleanup project for post-1.0.

I think we should wait until someone encounters the bug in the wild --
that is, they're able to build all of Subversion's prerequisites on
architecture X, but not Subversion itself, because of this assumption
in our code.  _Then_ we have a bug to file :-).

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

Re: NULL pointers.

Posted by Mark Grosberg <ma...@nolab.conman.org>.

On Fri, 19 Sep 2003 kfogel@collab.net wrote:

> Hmmm.  We depend on this equivalence all over Subversion, not just in
> the trail code.  Are you experiencing an actual problem on a platform
> where all zero bits is not the same as NULL?

No (for the moment all my "wierd" architectures are in a state of
disrepair). However, I figured I would point it out and at least prevent
N+1 instances. Technically, to be portable, that assumption eventually
needs to be changed though. I know, not exactly pre-1.0 issues, but
nevertheless maybe it should be filed in the issue tracker as a
long-standing cleanup project for post-1.0.

I've seen some funky architectures in my time.

L8r,
Mark G.


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