On 2012-06-04 8:10 PM, Dave Thompson wrote:
From: owner-openssl-us...@openssl.org On Behalf Of Jakob Bohm

Having no current access to the C89 standard or its
drafts, I am relying on the experience that many "C89"
real world systems I have encountered did not tolerate
free(NULL).  In contrast all recent C++ specifications
(starting with The C++ Programming Language 2nd Ed.
which preceded all published standards), insist that
delete (char*)NULL must be a safe NOP.

C89/90 is hard to find now, but it definitely did specify
free(NULL) is no-op. You say elsethread you may have confused
C89 free() with generally similar calls in OS or perhaps
libraries; those certainly might not be safe for NULL.

According to http://gcc.gnu.org/ml/gcc-patches/2011-03/msg00376.html the last widely-used platform that crashed on free(NULL) was SunOS 4, which "stopped being a reasonable portability target around 2007".

SunOS 4 was noncompliant with C89 in dozens of other ways as well.

zw
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to