[sldev] VWR-1396

Kelly Washington kelly at lindenlab.com
Tue Jun 26 15:47:44 PDT 2007


I personally advocated not changing linked_lists.h - the other patch is
sufficient to stop the crash.  Our home brewed container classes are
arcane code used in arcane ways that needs to be excised from our code. 
Maintaining them is a Pandora's box I hope to avoid.  Although I may be
paranoid and I think I have already been accused of spreading FUD in
this regard, although the accuser was rather subtle in the accusation.

In this case, as scary as this is, the mCurrentOperatingp->deleteData()
appears to be what is invalidating mCurrentOperatingp.  This is
obviously bad, and the fixes (both of them) are quick ones so they can
be tested and included in tomorrow's release.

I'll state it again: anyone willing to take the time to port any use of
a LL home-brewed container class to an appropriate STL container will
get my support and help.  And again, be warned it is *not a trivial
task*.  It needs serious thought and understanding of all the code that
uses the container class, including probably writing of some code to do
magic the home brewed containers do internally.

 - Kelly

Nicholaz Beresford wrote:
>
> I just saw the patch on 1396 (didn't even apply it, was
> just looking at the .patch), so I'm not hoping I'm making
> a fool of myself but ...
>
> If you enclose the code in an "if (mCurrentOperatingp)"
> to check for null pointers, what about the line above that?
> "mCurrentOperatingp->deleteData();" wouldn't
> when mCurrentOperatingp still crash if it is null?
>
>
> Nick
>
>
> Index: linked_lists.h
> ===================================================================
> --- linked_lists.h    (revision 64028)
> +++ linked_lists.h    (working copy)
> @@ -908,9 +908,12 @@
>          mCurrentp = mCurrentOperatingp->mNextp;
>
>          mCurrentOperatingp->deleteData();   <<<--- ????
> +        if(mCurrentOperatingp)
> +        {
> +            if (mCurrentOperatingp->mDatap)
> +                llerror("This is impossible!", 0);
> +            delete mCurrentOperatingp;
> +        }
>          mCurrentOperatingp = mCurrentp;
>          mCount--;
>      }
>
>



More information about the SLDev mailing list