Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix using pmr::polymorphic_allocator in pre-main #232

Merged
merged 1 commit into from
Dec 11, 2022

Commits on Oct 1, 2022

  1. Fix using pmr::polymorphic_allocator in pre-main

    A similar problems for the above (i. e. non-atomic) branch was addressed in boostorg#148, yet the default C++11 branch causes segault with the following stacktrace:
    
    ```
    (gdb) bt
    #0  0x000000000e1c3d28 in boost::container::pmr::memory_resource::allocate (this=0x0, bytes=92, alignment=4)
        at boost/container/include/boost/container/pmr/memory_resource.hpp:48
    boostorg#1  0x000000000e2e9e59 in boost::container::pmr::polymorphic_allocator<float>::allocate (this=0x7fffffffd148, n=23)
        at boost/container/include/boost/container/pmr/polymorphic_allocator.hpp:92
    boostorg#2  0x000000000e2e9cdd in std::__y1::allocator_traits<boost::container::pmr::polymorphic_allocator<float> >::allocate (__a=..., __n=23)
        at libcxx/include/__memory/allocator_traits.h:262
    boostorg#3  0x000000000e2e9b13 in std::__y1::vector<float, boost::container::pmr::polymorphic_allocator<float> >::__vallocate (this=0x7fffffffd130, __n=23)
        at libcxx/include/vector:958
    boostorg#4  0x000000000e33c591 in std::__y1::vector<float, boost::container::pmr::polymorphic_allocator<float> >::vector (this=0x7fffffffd130, __n=23)
        at libcxx/include/vector:1106
    ```
    georgthegreat committed Oct 1, 2022
    Configuration menu
    Copy the full SHA
    488500e View commit details
    Browse the repository at this point in the history