RE: Administrivia: List Announcement

From: Michael Wojcik (Michael.Wojcikat_private)
Date: Wed May 14 2003 - 07:44:15 PDT

  • Next message: Kenji Cronos: "Re: vulndev1.c solution (warning SPOILER)"

    > From: Wynn Fenwick [mailto:wynn.fenwickat_private] 
    > Sent: Tuesday, May 13, 2003 4:44 PM
    
    > The program uses malloc() then iterates through each memory
    > location, assuming that malloc() would give them a contiguous block 
    > of memory.
    
    It may not *actually* be the case that memory returned by a single call to
    malloc will be a "contiguous block".  In fact, for various interpretations
    of "contiguous block", this will frequently be the case in many modern
    implementations.  However, by the as-if rule, within any C program that
    doesn't invoke Undefined Behavior, running on a conforming implementation,
    it must be valid to access the contents of a block returned by malloc as the
    members of an array that fits in that block, or as an array of unsigned
    char.  From the program's point of view, such arrays are always contiguous.
    
    Michael Wojcik
    Principal Software Systems Developer, Micro Focus
    



    This archive was generated by hypermail 2b30 : Wed May 14 2003 - 15:55:20 PDT