Re: standard error handling for malloc() broken for user root and group wheel

From: Tim Kientzle (tim_at_kientzle.com)
Date: 02/19/04

  • Next message: Poul-Henning Kamp: "Re: standard error handling for malloc() broken for user root and group wheel"
    Date: Thu, 19 Feb 2004 00:13:00 -0800
    To: Bruce Evans <bde@zeta.org.au>
    
    

    On Wed, 18 Feb 2004, Poul-Henning Kamp wrote:
    >
    >The situations which can result in the 'a' vs 'A' flag making a
    >difference in malloc(3) behavior are all violations of the malloc(3)
    >API as defined by ISO C and as such the standard defines the behaviour
    >as "undefined".

    ANSI/ISO 9899-1990, Section 7.10.3.3 clearly states:

        "The malloc function returns either a null pointer
         or a pointer to the allocated space."

    There are no "undefined" possibilities here. Aborting the program
    on a failure to allocate memory is pretty clearly a violation
    of the standard, which requires the malloc function to
    always return.

    Tim Kientzle

    _______________________________________________
    freebsd-current@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-current
    To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"


  • Next message: Poul-Henning Kamp: "Re: standard error handling for malloc() broken for user root and group wheel"

    Relevant Pages

    • Re: Pixel policy
      ... Or Class Anything compliant? ... If the class is not clearly mentioned the ISO ... According to the ISO standard all LCD screens are sold as Class 1 ... screens unless it is stated clearly and prominently that they are not. ...
      (uk.tech.digital-tv)
    • Re: Why are Digital camera images made wrong?
      ... proportion as usually not as pleasing as the metric paper ratio - it's ... It is an ISO size, but does not divide neatly by 10. ... The international paper size standard, ISO 216, is based on the German DIN 476 standard for paper sizes. ... Successive paper sizes in the series A1, A2, A3, etc., are defined by halving the preceding paper size parallel to its shorter side. ...
      (alt.photography)
    • Re: UTF-8 Erkennung
      ... ISO 8859-1 und ISO-8859-1? ... Charset-Bezeichner dürfen nämlich keine Leerzeichen enthalten. ... Alias: ISO-8859-1 ... Diese Belegung der Steuerzeichen nach ECMA-48, insbesondere die Control-Sets C0 und C1, setzte sich aber zumindest im Computerbereich als Standard tatsächlich durch. ...
      (de.comp.lang.java)
    • Re: Cobol books & experiences
      ... adopted by ISO) ... For the '02 COBOL Standard, ... It went thru the ISO process and ANSI then adopted it. ... Just as ANSI can adopt the current ISO Standard, so can "DIN" (the German ...
      (comp.lang.cobol)
    • Re: Pixel policy
      ... If the class is not clearly mentioned the ISO ... According to the ISO standard all LCD screens are sold as Class 1 screens ... You have the right to a product without defects and if you don't like ...
      (uk.tech.digital-tv)