[Live-devel] I found a critical potential error in file MatroskaFileParser.cpp

Warren Young warren at etr-usa.com
Mon Dec 9 16:22:22 PST 2013


On 12/9/2013 14:19, Ross Finlayson wrote:
>
> No, this is not a "critical potential error".  It's not even an "error".
>   It is a compiler *warning* (usually given by some old versions of
> Microsoft's Visual C++ compiler).

I don't think VC++ is wholly wrong to warn about this.  The object isn't 
completely constructed when the initializer list is processed, but 
'this' is assumed to point to a constructed object.

If all the parent ctor does with the value is hold it for use *after* 
all the ctors run, it's fine.

If the base ctor dereferences the pointer, though, it's a potential bug.


More information about the live-devel mailing list