shm_open failed:Invalid argument in glibc 2.20

Carlos O'Donell carlos@systemhalted.org
Thu Feb 18 18:18:00 GMT 2016


On Wed, Feb 17, 2016 at 9:29 PM, Cui Bixuan <cuibixuan@huawei.com> wrote:
>         fd = shm_open("./a", O_RDWR|O_CREAT, 00700);

This is an invalid shared memory object name for the glibc implementation.

Slashes that are not the first slash are implementation defined.

The glibc manual clearly states:
~~~
In the GNU C Library it must be a string smaller than NAME_MAX bytes starting
with an optional slash but containing no other slashes.
~~~

The fix that restricts this was for this bug:
https://sourceware.org/bugzilla/show_bug.cgi?id=15763

Cheers,
Carlos.



More information about the Libc-help mailing list