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

async_read not returning with -DNDEBUG cpp flag on arm64 (but normal on x86 cpu) #2989

Open
voidiii opened this issue Feb 26, 2025 · 2 comments

Comments

@voidiii
Copy link

voidiii commented Feb 26, 2025

I have been working an http server built with beast and until recently I have decided to remove the -DNDEBUG cpp flag during compile and noticed on arm64 machine the async_read() function is not returning immediately as it shoud be. Has anyone else encountered similiar problems? I am sure the only difference is the -DNDEBUG cpp flag.

@voidiii
Copy link
Author

voidiii commented Feb 26, 2025

I did some digging and found it was

 template <typename Initiation,
      BOOST_ASIO_COMPLETION_HANDLER_FOR(Signatures...) RawCompletionToken,
      typename... Args>
  static return_type initiate(
      BOOST_ASIO_MOVE_ARG(Initiation) initiation,
      BOOST_ASIO_MOVE_ARG(RawCompletionToken) token,
      BOOST_ASIO_MOVE_ARG(Args)... args)
  {
    BOOST_ASIO_MOVE_CAST(Initiation)(initiation)(
        BOOST_ASIO_MOVE_CAST(RawCompletionToken)(token),
        BOOST_ASIO_MOVE_CAST(Args)(args)...);
  }

that hangs up

@ashtum
Copy link
Collaborator

ashtum commented Feb 27, 2025

Does this happen only in your code, or can you reproduce it using the existing examples?

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

2 participants