Andrew Gierth <and...@tao11.riddles.org.uk> writes: > "Tom" == Tom Lane <t...@sss.pgh.pa.us> writes: > Tom> It's hardly surprising that datumCopy would segfault when given a > Tom> null "value" and told it is pass-by-reference. However, to get to > Tom> the datumCopy call, we must have passed the MemoryContextContains > Tom> check on that very same pointer value, and that would surely have > Tom> segfaulted as well, one would think.
> Nope, because MemoryContextContains just returns "false" if passed a > NULL pointer. Ah, right. So you could imagine getting here if the finalfn had returned PointerGetDatum(NULL) with isnull = false. We have some aggregate transfns that are capable of doing that for internal-type transvalues, I think, but the finalfn never should do it. In any case we still have the fact that this isn't being seen in our buildfarm; and that's not for lack of s390 machines. So I still think the most likely explanation is a compiler bug in bleeding-edge gcc. Probably what Christoph should be trying to figure out is why he can't reproduce it manually. There must be some discrepancy between his environment and the build machines; but what? regards, tom lane