0
0
mirror of https://github.com/zeux/pugixml.git synced 2024-12-25 20:14:10 +08:00

48 Commits

Author SHA1 Message Date
dantargz
4d0043fb6c
Update VERSION in Makefile and add documentation for string_view_t (#641)
We now document PUGIXML_HAS_STRING_VIEW and PUGIXML_STRING_VIEW (the latter will be removed in the future) configuration as well as string_view_t type and overloads.

Makefile also had to be fixed to recognize the version properly after pugixml.hpp changes.
2024-10-28 08:06:42 -07:00
Arseny Kapoulkine
2729d80c94
Makefile now defaults to cxxstd=any (#639)
This means that by default we inherit the default language version
supported by the compiler; this will help with string_view testing
in the future as it will "just work" out of the box once the define is
set.

This should also automatically enable CI coverage for string_view; C++11
is still explicitly tested in CI via cxxstd=c++11.
2024-10-28 08:05:36 -07:00
Arseny Kapoulkine
b15bc6bf1f Update config=sanitize and fuzz targets
We used to need to silence float-divide-by-zero and float-cast-overflow
sanitizers since clang used a finite valid floating point value range.
Fortunately, since clang-9 UBSAN properly handles various primitive
operations per IEEE-754 so we no longer need this workaround.

Also use fork=16 mode for fuzz targets to make it easier to run fuzzing
locally.
2023-10-22 10:07:52 -07:00
jiangqucheng
ddd3cfa4bf #556 fix makefile err in some env 2023-03-16 05:05:16 +00:00
Arseny Kapoulkine
7a9da11d8b scripts: Convert archive.py to Python 3
The changes are mostly mechanically converting str to bytes.
2020-11-26 01:08:07 -08:00
Wolfgang Stöggl
ccb63a9186 Add LICENSE.md to RELEASE (#295) 2019-09-16 14:21:48 -07:00
Arseny Kapoulkine
29f3177d10 Remove contrib from Makefile and readme.txt 2019-03-13 23:17:23 -07:00
Arseny Kapoulkine
ba84465d2e Move unreachable line handling to Makefile
This allows us to reuse this code for MinGW builds.

Additionally disable coverage step for Linux clang - it looks like
Travis has a mismatch in the version of gcov info between clang and gcov
which causes gcov to crash - somehow this crash isn't picked up as a
build error.
2018-12-10 11:12:13 -08:00
Arseny Kapoulkine
1a9c3f66db Enable config=sanitize in Travis CI
This commit changes sanitize configuration to fail on the first error
and ignore floating-point division and overflow "errors" that trigger
when we test the corresponding functionality. This makes it possible to
run this on all commits - if new UB or memory safety issues are introduced,
asan/ubsan will catch them.
2018-11-27 08:07:31 -08:00
Arseny Kapoulkine
f9a2a7d19e Fix Wdouble-promotion warnings
We had a few places in test code and library source where we used an
implicit float->double cast; while it should preserve the value exactly,
gcc/clang implement this warning to make sure uses of double are intentional.

This change also adds the warning to Makefile to make sure we don't
regress on this warning.

Fixes #243.
2018-11-23 23:39:22 -08:00
Arseny Kapoulkine
7c6d0010b3
Merge pull request #170 from zeux/move
This change implements move ctor and assign support for xml_document.

All node handles remain valid after the move and point to the new document; the only exception is the document node itself (that remains unmoved).

Move is O(document size) in theory because it needs to relocate immediate document children (there is just one in conformant documents) and all memory pages; in practice the memory pages only need the header adjusted, which is ~0.1% of the actual data size.

Move requires no allocations in general, except when using compact mode where some moves need to grow the hash table which can fail (throw).

Fixes #104
2017-11-13 13:24:43 -08:00
Arseny Kapoulkine
6fe31d1477 build: Simplify config=sanitize
These days OSX clang supports UB sanitizer so we can just use the same
settings for all systems.
2017-10-29 21:24:04 -07:00
Arseny Kapoulkine
ba9504325e build: Switch fuzz builds to use Clang 5.0 sanitize=fuzzer
The old fuzzer location is deprecated; this also makes it almost trivial
to fuzz, provided that the clang is set up correctly... on Ubuntu 17.10,
a command sequence like this works now:

    sudo apt install clang-5.0
    sudo apt install libfuzzer-5.0
    sudo cp /usr/lib/llvm-5.0/lib/libFuzzer.a /usr/lib/libLLVMFuzzer.a
    CXX=clang++-5.0 make fuzz_parse
2017-10-29 19:54:48 -07:00
Arseny Kapoulkine
24d1a4562b Move libFuzzer build to Makefile
Now the only thing fuzz_setup.sh does is installing new clang; if system
clang supports -fsanitize-coverage then fuzz_setup.sh is not required.
2017-04-03 21:09:37 -07:00
Arseny Kapoulkine
db98a7e28b Fix path to fuzzing corpus 2017-03-21 10:28:20 -07:00
Arseny Kapoulkine
ea544eb48b tests: Add fuzzing dictionaries
Hopefully this will allow for better fuzzing coverage
2017-02-11 13:17:02 -08:00
Arseny Kapoulkine
00ef791078 fuzz: Use libFuzzer instead of afl-fuzz
This allows us to have faster fuzz cycles since the fuzzer is in-process.
2017-02-09 07:36:32 -08:00
Arseny Kapoulkine
298996df11 Enable branch probabilities for gcov 2017-01-30 11:51:07 -08:00
Arseny Kapoulkine
e3524c90de scripts: Make archive build reproducible
We used to use the current timestamp when building the archive; switch to using
the timestamp of the tag with the version we're packaging.

This requires some monkey patching since tarfile module is always using current
timestamp when writing gzip header...

Also exclude archive.py from archive and simplify release file list in Makefile.
2016-11-28 23:24:27 -08:00
Arseny Kapoulkine
86ed1cf3b9 scripts: Move archive.py from tests 2016-11-27 17:55:41 -08:00
Arseny Kapoulkine
5ca7e7cffc Rewrite archive script into Python
Perl version needed Archive::Zip that for some reason is not installed on WSL by
default. Use this as an opportunity to remove the last Perl script.
2016-11-13 16:52:38 -08:00
Arseny Kapoulkine
bda8b72f81 Remove -b gcov argument
It interferes in a somewhat strange way with codecov reporting
2016-07-28 00:07:41 -05:00
Arseny Kapoulkine
1d3befeaf8 Makefile: Add -Wcast-qual
It is probably redundant given that we have -Wold-style-cast, but it's better
to warn about casts like this in case we ever need to remove the latter flag.
2016-07-10 18:19:18 -07:00
Arseny Kapoulkine
7699499f25 Add CMakeLists to 'make release' now that it's top-level 2016-06-10 21:12:00 -07:00
Stephan Beyer
6bbbdb7d7e Make cxxstd an argument to Makefile
This determines the used C++ standard.
If you do not want to use a specific C++ standard, use cxxstd=any.
The default is set to c++11.

The "define" PUGIXML_NO_CXX11 is removed from the Makefile
since it is not used in the code anyways.
2016-01-26 22:14:58 +01:00
Arseny Kapoulkine
af3cd2e7b6 Add config=analyze 2015-10-18 18:00:17 -07:00
Arseny Kapoulkine
cd4eadcc2b Use -pedantic instead of -Wpedantic
Travis CI strikes once more.
2015-10-17 14:24:20 -07:00
Arseny Kapoulkine
3ac9555d8d Enable a few more warnings 2015-10-17 14:21:56 -07:00
Arseny Kapoulkine
285fec31fc Fix 'make release' after clean checkout 2015-10-10 12:35:40 -07:00
Arseny Kapoulkine
abdba2235d build: Fix -o gcov option
Also upload just pugixml.cpp.gcov to codecov to avoid issues the script has
with old gcov.
2015-08-25 10:36:44 -07:00
Arseny Kapoulkine
c7acc6d1f4 build: Rework config=coverage to be more robust
Use find -exec instead of xargs to work around differences between xargs on OSX
and Linux.

Use -b option of gcov - for some reason gcov on Travis can't find .gcno files
otherwise (old version?).

And finally enable config=coverage again.
2015-08-25 09:57:21 -07:00
Arseny Kapoulkine
1d854cd420 build: Simplify coverage configuration
Use -coverage option and keep NDEBUG off
2015-08-25 08:14:20 -07:00
Arseny Kapoulkine
238b786bfe Makefile now supports Xcode 7 ASAN
All other sanitizers are still unavailable so only enable them on non-OSX
systems.
2015-06-13 00:00:08 -07:00
Arseny Kapoulkine
107239c927 Add config=sanitize support to Makefile 2015-05-12 20:57:57 -07:00
Arseny Kapoulkine
250d020e9b Use -std=c++0x instead of -std=c++11 2015-04-21 20:46:33 -07:00
Arseny Kapoulkine
8d4544f2e1 Enable C++11 in Makefile 2015-04-21 20:32:40 -07:00
Arseny Kapoulkine
e2e5bc906a Use -fno-exceptions flag for PUGIXML_NO_EXCEPTIONS build
This makes sure that no exception handling mechanisms are used if
PUGXML_NO_EXCEPTIONS is defined.
2015-04-11 22:42:27 -07:00
Arseny Kapoulkine
10ff488eb9 docs: Use automatically retrieved version for docs
This eliminates one more hardcoded version from the repo, yay!
2015-03-24 20:59:04 -07:00
Arseny Kapoulkine
fc20b0afbb Update Makefile to exclude docs/manual folder from release 2015-03-24 20:08:06 -07:00
Arseny Kapoulkine
704d27622b Add include dependencies to HTML targets 2015-03-22 11:34:06 -07:00
Arseny Kapoulkine
d8f900f148 Add docs target to Makefile 2015-03-21 21:06:48 -07:00
Arseny Kapoulkine
5642f4d6e2 Add release target to Makefile 2015-03-20 00:36:10 -07:00
Arseny Kapoulkine
d1aad862d6 Makefile refactoring
Simplify test source specification, disable built-in rules and suffixes
2015-03-20 00:34:37 -07:00
Arseny Kapoulkine
15fba1debc tests: Add support for afl-fuzz
With the current setup it successfully finds the (fixed) DOCTYPE buffer overrun
in ~50 minutes (on a single core).
2015-03-13 00:18:30 -07:00
Arseny Kapoulkine
35a63cb1e6 Don't use xargs -r since it's a GNU extensions.
Instead just ignore the result of xargs.
2015-02-12 08:55:45 -08:00
Arseny Kapoulkine
97893ad738 Fix first-time make config=coverage test
Not sure why xargs -r is not the default...
2014-11-01 08:59:49 +01:00
Arseny Kapoulkine
503abf607a Add 'coverage' configuration to Makefile.
git-svn-id: https://pugixml.googlecode.com/svn/trunk@1079 99668b35-9821-0410-8761-19e4c4f06640
2014-10-25 05:28:37 +00:00
Arseny Kapoulkine
543fa8268d Add Makefile for building and running tests.
This expands and replaces the Travis-specific makefile by adding more options and correctly tracking header dependencies.
Also add wchar_t mode test to Travis configuration.



git-svn-id: http://pugixml.googlecode.com/svn/trunk@971 99668b35-9821-0410-8761-19e4c4f06640
2014-02-09 21:56:30 +00:00