-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On 02/27/2014 03:11 PM, Karl Tomlinson wrote:
> Daniel Holbert writes:
> 
>> On 02/27/2014 10:26 AM, Zack Weinberg wrote:
>>> Does that mean a patch to squelch the uninitialized variable 
>>> warnings in layout will now be accepted?  Those are the only 
>>> warnings in layout on my (Linux, debug) builds.
>>> 
>>>> layout/base/FrameLayerBuilder.cpp:3462:56 
>>>> [-Wmaybe-uninitialized] ?last? may be used uninitialized in
>>>> this function
>> 
>> If there's no perf impact, then probably, for at least some of
>> them!
>> 
>> The merits of maybe-uninitialized warning-fixes can vary on a 
>> case-by-case basis, because in some cases, it's just a false
>> positive and the only way to "fix" it has a (small) perf cost.
>> (which is why we don't treat it as an error in warnings-as-errors
>> builds)
> 
> More that just a perf cost.
> 
> Explicitly initializing variables to garbage can hide real bugs 
> from tools such as valgrind if they really are never set correctly 
> later.
> 
> Treating these as warnings, not errors, is probably the best thing 
> here.  If you see the warning and you've recently changed that 
> code, then check it.  If you haven't, you see the "may be" and 
> ignore it.

This is exactly the same thing dbaron said the last time I brought
this up (quite some time ago - 2010, maybe?)  I didn't buy it then and
I don't buy it now.  I think it is far more likely that a
maybe-used-uninitialized true positive will *go unnoticed* because
we've trained ourselves to ignore those warnings, and I don't think
better precision in a valgrind run is worth the risk of letting a true
positive slip through in a release build.  Those bugs tend to be
security critical.

I also defy anyone to demonstrate a measurable performance impact from
the tiny amount of additional machine code that might be emitted if we
added initializations to squelch all those warnings.

zw
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: Using GnuPG with Icedove - http://www.enigmail.net/

iQIcBAEBCAAGBQJTD6OyAAoJEJH8wytnaapkaesQAI41/f22D3qEkEklw9WctsAp
yJ2SpQ3fRu+HWenONIRNyKLWYZoYFX876Ef4oOJ9ebBVqx0DjwOS8NZjZRhZDZ89
DSLMpZUpgn4ZdEG+FWYAhV0deSdC6VeYnwrb2VB2exKr+rcoaLN9ksWDg8YkDyWo
2DO2rbL4QUj49OeECAQ8HP+iuEO9pqQsGowz5vK2wqr4cMiJVLXajM1QLWht+fVE
JW5caOWmp9sJ9raG9C7OucFM7sgdAbe/Y3mi7WTKPMgv0Bq7FUFxxFM45aiV54c6
6l6oNJPN1Gmwv7YHW+J/jRqaTqJL2i6Uu3vorY4Vm2eF8V7DwkK/NVV8xnRumCEO
NzFh67UCIVdSm6Ae5+UyRK0n5yPtRnSu13xbloe6glnBFqhYeQMrY1ouNqc6431Q
8662zVuFgL0swl7rJv9Wtz+5QpJesOPUrlPouRf8I4yxHwz/6OYW/wYg6QuDs4qa
/R0mk7TSk0lKSCjSZzrWWo5M/6INSTbOtrfy7brsSy5LjnWKEVST0sBBvb4W3nqA
TP0JNCm9KariKz8V8IUB5JI/LIl7J8//Sl5lsZ6q/ySn+tjzzIvWYnH3LE1i0TSk
l3SYstBMf5msC0whXGCdZ8/JqCwWr+GNIjJSAKXkMNctRSileo4grvaftU5YZ7C3
O31oxvtOd7EfYvzstgDh
=jHW4
-----END PGP SIGNATURE-----
_______________________________________________
dev-platform mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to