@elextr for the moment your hint doesn't make much sense to me, you're just point out that a 0×H image will have 0 bytes of data, which makes sense. I don't see how it would account for accessing past the buffer, as the given size is 0 in one direction. Well, of course the can be a bug some other place, and likely is, but it makes perfect sense the data is 0 bytes.
Or maybe I'm just not C++-literate enough, but `&zeroLengthMemory[0]` should not cause any issue. Though, maybe the problem is that `operator[0]` actually checks the value can be dereferenced, in which case it cannot…
Meh, writing this makes me think that either: * with a C++ vector, `&vector[0]` is not equivalent to getting a raw pointer on the vector's data * glibc++ has a bug in that it should not assert in this case (yet, I don't see how it could then assert for valid cases)
I don't think there is an actual bug in accessing the memory as Valgrind's memcheck doesn't report errors; so I guess the calling code (at which I didn't look) does not access the memeory past its size. I guess we *could* special-case the code not to dereference, but that sounds weird to the C guy I am :)