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

SIGSEGV if linked to jemalloc #1580

Open
grapland0 opened this issue Dec 26, 2024 · 0 comments
Open

SIGSEGV if linked to jemalloc #1580

grapland0 opened this issue Dec 26, 2024 · 0 comments

Comments

@grapland0
Copy link

grapland0 commented Dec 26, 2024

Sample code:

#include <iostream>

#include <boost/asio.hpp>
#include <boost/asio/spawn.hpp>

int main() {
  boost::asio::io_context ioc;
  boost::asio::spawn(
      ioc,
      [&](boost::asio::yield_context y) {
        auto wg = boost::asio::make_work_guard(ioc);
        return boost::asio::async_initiate<boost::asio::yield_context,
                                           void(boost::system::error_code)>(
            [](auto handler) { std::move(handler)({}); }, y);
      },
      boost::asio::detached);
  ioc.run();
  std::cout << "I'm good." << std::endl;
  return 0;
}

it crashes at ioc.run(); with SIGSEGV when linked to jemalloc. Otherwise everything is good. g++=14.2 and boost=1.87

I created a reproduce container at https://github.com/grapland0/demo/tree/main/asio_jemalloc. just check it out and run docker buildx build . on this folder to preview the error.

@grapland0 grapland0 changed the title SIGSEGV when linked to jemalloc SIGSEGV if linked to jemalloc Dec 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant