[haiku-commits] Re: haiku: hrev53346 - src/add-ons/kernel/drivers/network/emulex_oce/dev/oce
- From: "Adrien Destugues" <pulkomandy@xxxxxxxxxxxxx>
- To: haiku-commits@xxxxxxxxxxxxx
- Date: Tue, 06 Aug 2019 12:05:36 +0000
6 août 2019 13:27 "Axel Dörfler" <axeld@xxxxxxxxxxxxxxxx> a écrit:
Am 06/08/2019 um 10:07 schrieb Adrien Destugues:
- POCE_INTR_INFO ii = &sc->intrs[vector];
to something that would be out of bounds only if you'd actually try
This doesn't really access anything yet, though; it just sets 'ii'
to access it, which wasn't done yet. IOW it just pleases the tool.
Yes, but it makes things more readable for humans as well, I think.
Maybe I'm not human after all ;-) In any case, I don't mind this change at
I would just report this as false positive, though (if possible), and I don't
think it's worth
This looks similar to https://www.viva64.com/en/b/0301/
The analyzer is correct in the sense that doing pointer arithmetics outside of
array bounds is
But, it could lead to strange optimizations. I can imagine the if() check being
example, because the compiler "knows" that the index into the array was valid,
the condition can be true only in undefined behavior cases, so it is safe to
It may be that this never happens, or that gcc is not smart enough yet to
optimization (or they don't do it on purpose because it would break too much
Other related posts: