PR# 14575 Postcondition of sprealloc can be violated on 64-bit system
Problem Report Summary
Environment: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:188.8.131.52) Gecko/20080421 Firefox/184.108.40.206
Synopsis: Postcondition of sprealloc can be violated on 64-bit system
Based on code inspection only, it appears that one of the postconditions of `sprealloc' (in malloc.c) can be violated on a 64-bit system. The postcondition that seems to be wrong is: ENSURE ("Valid new size", (int)(HEADER (object)->ov_size & B_SIZE) >= new_size); It looks like the cast "(int)" is unnecessary and wrong. If the size of the special object exceeds 2^32 (or maybe even 2^31), which is possible on a 64-bit system, and if sizeof(int) == 4 (it does on Solaris SPARC 64), then the postcondition will be violated.
Problem Report Interactions