Boost logo

Boost :

Subject: [boost] [interprocess] Arithmetic error
From: Henrik Sundberg (storangen_at_[hidden])
Date: 2009-01-16 17:32:25


Disclaimer: I have no minimal reproducing program.

The problem occurs at line 458 in mapped_region.hpp:
       456 //We calculate the difference between demanded and valid offset
       457 std::size_t page_size = this->get_page_size();
       458 m_extra_offset = (offset - (offset / page_size) * page_size);

I've found out that page_size gets the value 0. It only seems to
happen in my single core computer. It works for other Kubuntu 8.10
systems.

The code is needed during so-load. The library is used from two other
libraries that are loaded by the program (like a diamond library
load).

I've been discussing the problem in this forum:
http://www.safirsdk.com/forum/phpBB3/viewtopic.php?f=4&t=61

The code is open (available from the site of the forum). It is a whole
framework though, not just a small program.

I don't know if this is a compiler bug, a Boost bug or a bug in the program.
I think that the page size is supposed to be cached, but that this
somehow doesn't happen in this setup. I get the error every time.
Preloading the library avoids the problem. I.e. starting like this
works: LD_PRELOAD=libdots_kernel.so dobexplorer

/$


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk