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

Application stalls indefinitely with message byte size 10 #2293

Closed
jprochazk opened this issue Jul 19, 2020 · 1 comment · Fixed by #2294
Closed

Application stalls indefinitely with message byte size 10 #2293

jprochazk opened this issue Jul 19, 2020 · 1 comment · Fixed by #2294
Labels
aspect: binary formats BSON, CBOR, MessagePack, UBJSON confirmed kind: bug release item: 🐛 bug fix solution: proposed fix a fix for the issue has been proposed and waits for confirmation
Milestone

Comments

@jprochazk
Copy link
Contributor

#include <vector>
#include <cstdint>
#include <nlohmann/json.hpp>

int main()
{
	std::vector<uint8_t> data = {
		0x7B, 0x6F, 0x62, 0x6A, 0x65, 0x63, 0x74, 0x20, 0x4F, 0x42
	};
	nlohmann::json result = nlohmann::json::from_cbor(data, true, false);

	return 0;
}

When running the above code with library versions 3.7.3 or 3.8.0, the application stalls (seemingly) forever. Memory consumption also continues growing.

@jprochazk jprochazk changed the title Application hangs when length is too large Application stalls indefinitely with message byte size 10 Jul 19, 2020
@nlohmann
Copy link
Owner

No, this looks fine. Please open a PR.

@nlohmann nlohmann added state: waiting for PR aspect: binary formats BSON, CBOR, MessagePack, UBJSON labels Jul 19, 2020
@nlohmann nlohmann added this to the Release 3.9.0 milestone Jul 26, 2020
@nlohmann nlohmann added release item: 🐛 bug fix solution: proposed fix a fix for the issue has been proposed and waits for confirmation and removed state: waiting for PR labels Jul 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
aspect: binary formats BSON, CBOR, MessagePack, UBJSON confirmed kind: bug release item: 🐛 bug fix solution: proposed fix a fix for the issue has been proposed and waits for confirmation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants