Email List: Xaustin-review-lX
[All Lists]

Defect in XSH shm_open

To: yyyyyyyyyyyyyyy@xxxxxxxxxxxxx
Subject: Defect in XSH shm_open
From: Geoff Clare <yyy@xxxxxxxxxxxxx>
Date: Mon, 9 Jan 2006 11:55:48 +0000
@ page 1347-1348 line 41993-42052 section shm_open objection [gwc sharedmem 
names]

Problem:

Defect code :  1. Error

The issues identified in XSH ERN 112 and 113 for semaphore and message
queue names also affect shared memory object names.

Equivalent changes are needed to the shm_open() and shm_unlink() pages.

Action:

On lines 41993-41994 change:

    "The name argument conforms to the construction rules for a pathname."

to:

    "The name argument conforms to the construction rules for a pathname,
    except that the interpretation of slash characters other than the
    leading slash character in name is implementation-defined, and that
    the length limits for the name argument are implementation-defined
    and need not be the same as the pathname limits {PATH_MAX} and
    {NAME_MAX}."

On lines 41997-41998 delete:

    "The interpretation of slash characters other than the leading slash
    character in name is implementation-defined."

Delete lines 42050-42052:

    "[ENAMETOOLONG]
        The length of the name argument exceeds {PATH_MAX} or a
        pathname component is longer than {NAME_MAX}."

After line 42055 add:

    "The shm_open() function may fail if:

       [ENAMETOOLONG]
          The length of the name argument exceeds _POSIX_PATH_MAX on
          systems that do not support the XSI option [XSI]or
          exceeds _XOPEN_PATH_MAX on XSI systems[/XSI], or has a
          pathname component that is longer than _POSIX_NAME_MAX on
          systems that do not support the XSI option [XSI]or
          longer than _XOPEN_NAME_MAX on XSI systems[/XSI]."


On page 1351 line 42179-42181 section shm_unlink:

Delete lines 42179-42181:

    "[ENAMETOOLONG]
        The length of the name argument exceeds {PATH_MAX} or a
        pathname component is longer than {NAME_MAX}."

After line 42182 add:

    "The shm_unlink() function may fail if:

       [ENAMETOOLONG]
          The length of the name argument exceeds _POSIX_PATH_MAX on
          systems that do not support the XSI option [XSI]or
          exceeds _XOPEN_PATH_MAX on XSI systems[/XSI], or has a
          pathname component that is longer than _POSIX_NAME_MAX on
          systems that do not support the XSI option [XSI]or
          longer than _XOPEN_NAME_MAX on XSI systems[/XSI].
          A call to shm_unlink() with a name argument that contains
          the same shared memory object name as was previously used
          in a successful shm_open() call shall not give an
          ENAMETOOLONG error."

<Prev in Thread] Current Thread [Next in Thread>
  • Defect in XSH shm_open, Geoff Clare <=