Opened 9 years ago
Closed 9 years ago
#9334 closed Bugs (fixed)
Boost 1.55.0 beta1: circular_buffer incompatible with shared memory allocators?
Reported by: | Owned by: | Antony Polukhin | |
---|---|---|---|
Milestone: | Boost 1.56.0 | Component: | circular_buffer |
Version: | Boost 1.55.0 | Severity: | Regression |
Keywords: | circular buffer interprocess shared memory allocator | Cc: |
Description
Apparently, because of the use of "placement new" instead of "m_alloc.construct()" used in previous versions, Circular Buffer can no longer be used with allocators which return a pointer type different from void*. In particular, shared memory allocators provided by the Interprocess library result in a compile-time error. This seems to be a serious regression.
Attachments (2)
Change History (15)
comment:1 by , 9 years ago
Owner: | changed from | to
---|
comment:2 by , 9 years ago
by , 9 years ago
Attachment: | circular_buffer.patch added |
---|
Patch that fixes reported issue with circular buffer
comment:4 by , 9 years ago
Who is in charge of maintaining this project, can we get this fix applied to to the new release?
follow-up: 6 comment:5 by , 9 years ago
Sure, you can fix the issue and also you can start maintaining the library if you wish.
comment:6 by , 9 years ago
Replying to jano_gaspar:
Sure, you can fix the issue and also you can start maintaining the library if you wish.
Do you mind pushing this fix into the release area? Aside from fixing this issue, unfortunately, I have no resources to be able to become the maintainer of this project.
comment:7 by , 9 years ago
You need to ask someone at boost dev mailing list to push it for you I'm afraid.
comment:8 by , 9 years ago
Owner: | changed from | to
---|
follow-up: 11 comment:9 by , 9 years ago
This issue is not as easy as it looks like:
- Replacing placement new with allocator's
construct()
breaks move emulation under C++03, whereconstruct
accepts parameter by const reference, while Boost.Move requires nonconst reference.
- Older versions of circular buffer did not work well in DEBUG mode:
std::memset
was attempting to converttypename Allocator::pointer
tovoid*
.
Attached a patch that fixes the issue. Will be applied as soon as the GIT migration will be finished.
comment:10 by , 9 years ago
Status: | new → assigned |
---|
comment:11 by , 9 years ago
Thanks for looking into it!
Replying to apolukhin:
This issue is not as easy as it looks like:
- Replacing placement new with allocator's
construct()
breaks move emulation under C++03, whereconstruct
accepts parameter by const reference, while Boost.Move requires nonconst reference.
- Older versions of circular buffer did not work well in DEBUG mode:
std::memset
was attempting to converttypename Allocator::pointer
tovoid*
.Attached a patch that fixes the issue. Will be applied as soon as the GIT migration will be finished.
comment:12 by , 9 years ago
comment:13 by , 9 years ago
Milestone: | To Be Determined → Boost 1.56.0 |
---|---|
Resolution: | → fixed |
Status: | assigned → closed |
I am afraid that this bug has now been hidden away from view because of the owner change, and no Cc: added.
This isssue is making it impossible for me to use the circular_buffer from 1.55.