Modify

Opened 8 years ago

Closed 8 years ago

#3138 closed Bugs (fixed)

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 (1)

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

Download all attachments as: .zip

Change History (4)

comment:1 Changed 8 years ago by igaztanaga

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

Fixed for Boost 1.40

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

  • Resolution fixed deleted
  • Status changed from closed to reopened

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 8 years ago by Niklas Angare <li51ckf02@…>

Ugly patch to ifdef out the include

comment:3 Changed 8 years ago by igaztanaga

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

Fixed for Boost 1.40

Add Comment

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain igaztanaga.
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.