forked from zeux/pugixml
-
Notifications
You must be signed in to change notification settings - Fork 1
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
Merge upstream into dev #4
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Fix memory leak
This is the same fix as #497, but we're using auto_deleter instead because if allocation function throws, we can't rely on an explicit call to deallocate. Comes along with two tests that validate the behavior.
Fix memory leak during OOM in convert_buffer
Optimize compact mode
sprintf now results in a deprecation warning in Xcode 14 beta.
... I forgot we still support platforms without C99, 23 years later.
Enable usage of nullptr for MSVC 16 and newer (MSVS 2010)
This fixes compilation of pugixml with -fvisibility=hidden. Without this patch, one would get lots of unresolved symbols when consuming pugixml as a shared library.
Correctly set default visibility on non-windows compilers
* xml_node::set_value(const char_t* rhs, size_t sz) * xml_text::set(const char_t* rhs, size_t sz) Signed-off-by: Ferenc Géczi <[email protected]>
Followup on pr 490
This cleans up xml_attribute::set_value to be uniform wrt xml_node::set_value and xml_text::set_value - for now we duplicate the body since the logic is trivial and this keeps debug performance excellent.
There were two conditions under which xml_document::save_file could previously return true even though the saving failed: - The last write to the file was buffered in stdio buffer, and it's that last write that would fail due to lack of disk space - The data has been written correctly but fclose failed to update file metadata, which can result in truncated size / missing inode updates. This change fixes both by adjusting save_file to fflush before the check, and also checking fclose results. Note that while fflush here is technically redundant, because it's implied by fclose, we must check ferror explicitly anyway, and so it feels a little cleaner to do most of the error handling in save_file_impl, so that the changes of fclose() failing are very slim. Of course, neither change guarantees that the contents of the file are going to be safe on disk following a power failure.
Fix error handling in xml_document::save_file
This also turns the define for PUGIXML_API into an `$<IF:>`, instead of an `$<IF:>` with an empty true condition. If this is inadequate, I will undo it, and place them on separate lines as they were before, but will most likely use an inverse `$<NOT:>` instead of an `$<IF:>`.
Fix exported symbols under clang-cl (Closes #503)
This includes a previously unnoticed link fix for xml_text::set
Prepare for 1.13 release
We use snprintf when stdc is set to C++11, however in C++98 mode we can't use variadic macros, and Xcode 14 complains about the use of sprintf. It should be safe however to use variadic macros on any remotely recent version of clang on Apple, unless -pedantic is defined which warns against the use of variadic macros in C++98 mode... This change fixes the problem for the builds that don't specify -pedantic, which is a problem for another day.
Fix Xcode 14 sprintf deprecation warning
The feature was added in 2015 but somehow was never documented.
Signed-off-by: David Korczynski <[email protected]>
Signed-off-by: David Korczynski <[email protected]>
Add Github CIFuzz action
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.