drogonframework / drogonframework/drogon

String mutation while passing value in addListener()

Open
#2,480 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
14.3k
Forks
1.4k
Avg merge
1d 13h
Merged PRs (30d)
14

Description

**Notice**
If you need support or clarification regarding the usage of Drogon in your project, visit the official Drogon support channel at [gitter](https://gitter.im/drogon-web/community)

Please create a new issue only if you think you have found a bug or if have a feature request/enhancement.

**Describe the bug**
In the screenshots it can be seen that the string is mutating unexpectedly.
I have already tried using a separate variable to provide container for data instead of passing string by value. But that didn't fixed. In the previous version on MSVC, it was working well. But after update I am facing this problem.
My current repo: https://github.com/Jyotipm05/black-shores-server
for testing simplicity, currently using with localhost.

**To Reproduce**
Steps to reproduce the behavior:
1. Use MSVC 19.44 to build the library in vcpkg.
2. use 'addListener()' to add any IP address with port.
3. Build and run the program in debug mode.

**Expected behavior**
Run without crash and no mutation of string data.

**Screenshots**

Image

Image

**Desktop (please complete the following information):**
- OS: Windows 11
- Browser: Chrome
- Version 146.0.7680.165

**Additional context**
According to online sources it is happening due to ABI version mismatch as MSVC is using new ABI version than that of drogon.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.