Maximum large object size should be limited by SSIZE_MAX not SIZE_MAX.
The latter appears to be a hangover from 32-bit systems.