-
-
Notifications
You must be signed in to change notification settings - Fork 163
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
constructor call on misaligned address #441
Labels
Comments
Hi @danielaparker - just wondering if you also saw this behavior? |
@chakaz - apologies for the late response. This hasn't come up before, possibly because many implementations of |
This should be addressed on master |
Thanks @danielaparker! |
danielaparker
added
Resolved pending review
Resolved
and removed
Resolved pending review
labels
Oct 15, 2023
7 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi there!
Our unit test show some runtime errors while using jsoncons with pmr:
Specifically such prints are printed by this line:
https://github.com/dragonflydb/dragonfly/blob/3b0bd212f46f84e8eda3a02fe99de24f319c9725/src/core/json_test.cc#L127C1-L127C1
The prints are coming from here:
https://github.com/danielaparker/jsoncons/blob/a414677d1333abd110e78c5eec950589956eee54/include/jsoncons/detail/heap_string.hpp#L134C1-L134C1
I think that the issue is actually within jsoncons rather than in our code, and the reason is that the allocation done internally in jsoncons is in byte (
byte_alloc.allocate(mem_size);
), while later we try to construct a struct in that memory (new(storage)heap_string_type(extra, byte_alloc);
), but it's not guaranteed to be aligned (and indeed in my setup it is not)The text was updated successfully, but these errors were encountered: