Boost Testing :
From: Ion Gaztañaga (igaztanaga_at_[hidden])
Date: 2007-11-13 12:14:42
Boris Gubenko escribió:
> Hi Ion,
> thank you for the willingness to help with Interprocess library on HP-UX.
> What kind of information do you need? Do you want me to walk through the
> code with the debugger to see which libc function fails, presumably with
> EACCES ? Do you have an example, a simple C program, showing how the
> Interprocess library calls shared memory functions or mmap, if this is
> what you suspect is failing on HP-UX?
Yes, I would need the call stack to the point where the exception is
being thrown. I suspect that either shm_open or mmap are failing so:
-> mmap is called in file boost/interprocess/mapped_region.hpp line 469.
-> shm_open in boost/interprocess/shared_memory_object.hpp line 327.
You will see error handling code there, so you can put a breakpoint when
shm_open/mmap returns an error. A simple example to test if shared
memory creation is failing is to test something like this:
using namespace boost::interprocess;
const char *name = "/shm_name";
shared_memory_object shm(create_only, name, read_write)
To execute a little more complicated example (including mmap use) try