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

UB in static variables initialization #41

Closed
astepanov83 opened this issue Aug 21, 2020 · 4 comments
Closed

UB in static variables initialization #41

astepanov83 opened this issue Aug 21, 2020 · 4 comments

Comments

@astepanov83
Copy link

codec::CRLF is initialized in codec.cpp
mime::END_OF_LINE is initialized in mime.cpp and depends on codec::CRLF
I exactly ran into a situation where CRLF was \r\n, but END_OF_LINE was empty

@karastojko
Copy link
Owner

Hi,
Thanks for the reporting. I believe the root cause is also reported here.

@astepanov83
Copy link
Author

Yeah, I also changed it to static linking + openssl static linking. Might have caused problems as well

@karastojko
Copy link
Owner

karastojko commented Aug 21, 2020

Yes, the static linking seems to manifest the issue. The dynamic one does not suffer so far, but it has to be fixed anyway. Commits before 1f07964 seems not to suffer of the issue, so you can use an older version until I fix this one.

@karastojko
Copy link
Owner

@astepanov83 Please check the latest commit, it works for me in both static and dynamic linking.

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