boost::interprocess::node_allocator & VC8 run-time problem

I have the problem with VC8 release build (all release build options - by
default, i.e., optimization is "Maximize speed /O2" and so on).
A run of "repro" output executable finishes with the exception on attempt to
read data from address 0.
I noticed it for boost::interprocess (and boost::shmem too) allocators of
type:
- node_allocator
- cached_node_allocator
and not to:
- allocator
- private_node_allocator
The way out I found (for "problematic" allocator types) is to set additional
compiler option "/Og-" (already declared deprecated).
With VC7.1 it all is ok for any allocator type w/o setting /Og- or any other
additional options.
Have anyone noticed this problem? Where the problem originates from? VC8
optimization specifics (NRVO is affected by /Og option)?
Or smth. wrong in "repro" code?
Thanks.
//////////////
The "repro" code is the following:
#include "stdafx.h"
#include

Hi, alexmark wrote:
I have the problem with VC8 release build (all release build options - by default, i.e., optimization is "Maximize speed /O2" and so on). A run of "repro" output executable finishes with the exception on attempt to read data from address 0.
I noticed it for boost::interprocess (and boost::shmem too) allocators of type: - node_allocator - cached_node_allocator and not to: - allocator - private_node_allocator
The way out I found (for "problematic" allocator types) is to set additional compiler option "/Og-" (already declared deprecated). With VC7.1 it all is ok for any allocator type w/o setting /Og- or any other additional options.
Have anyone noticed this problem? Where the problem originates from? VC8 optimization specifics (NRVO is affected by /Og option)? Or smth. wrong in "repro" code? Thanks.
The code seems correct. I will try to investigate this as soon as I have a bit of time. Thanks for the report! Ion
participants (2)
-
alexmark
-
Ion Gaztañaga