Modify

Ticket #3138 (closed Bugs: fixed)

Opened 5 years ago

Last modified 5 years ago

Interprocess dependency on sys/shm.h

Reported by: Niklas Angare <li51ckf02@…> Owned by: igaztanaga
Milestone: Boost 1.40.0 Component: interprocess
Version: Boost 1.39.0 Severity: Regression
Keywords: QNX Cc:

Description

Since 1.39, boost/interprocess/mapped_region.hpp depends on sys/shm.h (from POSIX XSI). The QNX 6 operating system doesn't have this header and thus Interprocess no longer works.

boost/interprocess/shared_memory_object.hpp only conditionally includes sys/shm.h, like this:
#if defined(BOOST_INTERPROCESS_SYSTEM_V_SHARED_MEMORY_OBJECTS)
# include <sys/shm.h> System V shared memory...
#elif defined(BOOST_INTERPROCESS_POSIX_SHARED_MEMORY_OBJECTS)

mapped_region.hpp uses a bunch of stuff from sys/shm.h though so the fix won't be quite that easy.

Here are the rest of the errors from my NA-QNX641-qcc-gnu0x test runner:
mapped_region.hpp:402: error: '::shmid_ds' has not been declared
mapped_region.hpp:402: error: expected `;' before 'xsi_ds'
mapped_region.hpp:403: error: '::shmctl' has not been declared
mapped_region.hpp:403: error: 'IPC_STAT' was not declared in this scope
mapped_region.hpp:403: error: 'xsi_ds' was not declared in this scope
mapped_region.hpp:419: error: 'SHM_RDONLY' was not declared in this scope
mapped_region.hpp:426: error: '::shmat' has not been declared
mapped_region.hpp:552: error: '::shmdt' has not been declared

Full log:  http://tinyurl.com/onnn2t

Attachments

mapped_region.hpp.patch Download (509 bytes) - added by Niklas Angare <li51ckf02@…> 5 years ago.
Ugly patch to ifdef out the include

Change History

comment:1 Changed 5 years ago by igaztanaga

  • Status changed from new to closed
  • Resolution set to fixed

Fixed for Boost 1.40

comment:2 Changed 5 years ago by Niklas Angare <li51ckf02@…>

  • Status changed from closed to reopened
  • Resolution fixed deleted

Thanks! You forgot to ifdef out the actual include but if I do that almost all interprocess tests pass on QNX 6.4.1.

As a side note, there's a bug in the QNX kernel that I found when running the interprocess regression tests six months ago, that forces me to disable managed_mapped_file_test, managed_shared_memory_test and doc_managed_copy_on_write:
If you create a shared memory object, mmap() it with MAP_SHARED, create a synchronization object (e.g. a mutex) in it, and then mmap() with MAP_PRIVATE to the same offset in the shared object, then the application and some some programs such as pidin and shutdown may hang. (Ref# 63369)

Changed 5 years ago by Niklas Angare <li51ckf02@…>

Ugly patch to ifdef out the include

comment:3 Changed 5 years ago by igaztanaga

  • Status changed from reopened to closed
  • Resolution set to fixed

Fixed for Boost 1.40

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.