You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is related to the issue you mentioned earlier, but it's certainly NOT a documentation issue. ordered_json must have working push_back function without any pointer corruption or this function must be private if it can cause such behaviour. Please fix this
If after the operation the new size() is greater than old capacity() a reallocation takes place, in which case all iterators (including the end() iterator) and all references to the elements are invalidated. Otherwise only the end() iterator is invalidated.
Description
When using ordered json with
push_back
call, pointer to previous structure gets corruptedReproduction steps
Use the code bellow with
nlohmann::ordered_json
to get corrupted pointerExpected vs. actual results
Expected output (same code, without ordered json):
Actual output (corrupted pointer):
Minimal code example
Error messages
No response
Compiler and operating system
Tested on ARM Windows and X64 Windows in Debug and Release modes
Library version
3.11.3
Validation
develop
branch is used.The text was updated successfully, but these errors were encountered: