Snild Dolkow
3484383fa7
Add aaaaaa_*.xml with unreasonably large tokens
...
Some of these currently take a very long time to parse. I set those to
only run one loop in the run-benchmark make target.
4096 may be a fairly small buffer, and definitely make the problem worse
than it otherwise would've been, but similar sizes exist in real code:
* 2048 bytes in cpython Modules/pyexpat.c
* 4096 bytes in skia SkXMLParser.cpp
* BUFSIZ bytes (8192 on my machine) in expat/examples
The files, too, are inspired by real-life examples: Android stores
depth and gain maps as base64-encoded JPEGs inside the XMP data of
other JPEGs. Sometimes as a text element, sometimes as an attribute
value. I've seen attribute values slightly over 5 MiB in size.
2024-01-29 17:09:35 +01:00
Sebastian Pipping
183270d565
Merge pull request #810 from libexpat/clang-18
...
CI: Upgrade to Clang 18 (except clang-tidy and clang-format)
2024-01-26 19:10:31 +01:00
Sebastian Pipping
f7ada131b7
Merge pull request #808 from libexpat/clang-tidy-18
...
CI: Upgrade to clang-tidy 18
2024-01-26 18:30:17 +01:00
Sebastian Pipping
6880fe4948
CI: Upgrade to Clang 18 (except clang-tidy and clang-format)
2024-01-26 16:20:04 +01:00
Sebastian Pipping
fc0b026ce5
clang-format.yml: De-couple clang-format from Clang
...
.. so that we can bump their versions independently
2024-01-26 16:19:59 +01:00
Sebastian Pipping
7acda8d16a
clang-tidy.yml: Upgrade to clang-tidy 18
2024-01-26 16:19:02 +01:00
Sebastian Pipping
737e8ea183
tests/misc_tests.c: Address clang-tidy 18 warning EnumCastOutOfRange
...
clang-tidy output was:
> [..]/libexpat/expat/tests/misc_tests.c:112:23: note: The value '-1' provided to the cast expression is not in the valid range of values for 'XML_Error'
> 112 | if (XML_ErrorString((enum XML_Error) - 1) != NULL)
> | ^~~~~~~~~~~~~~~~~~~~
> [..]/libexpat/expat/tests/misc_tests.c:114:23: error: The value '100' provided to the cast expression is not in the valid range of values for 'XML_Error' [clang-analyzer-optin.core.EnumCastOutOfRange,-warnings-as-errors]
> 114 | if (XML_ErrorString((enum XML_Error)100) != NULL)
> | ^~~~~~~~~~~~~~~~~~~
2024-01-26 16:19:02 +01:00
Sebastian Pipping
abd9542b32
Merge pull request #806 from libexpat/dependabot/github_actions/actions/upload-artifact-4.2.0
...
Actions(deps): Bump actions/upload-artifact from 4.0.0 to 4.2.0
2024-01-22 14:52:20 +01:00
dependabot[bot]
2c37fc7d7d
Actions(deps): Bump actions/upload-artifact from 4.0.0 to 4.2.0
...
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact ) from 4.0.0 to 4.2.0.
- [Release notes](https://github.com/actions/upload-artifact/releases )
- [Commits](https://github.com/actions/upload-artifact/compare/v4...694cdabd8bdb0f10b2cea11669e1bf5453eed0a6 )
---
updated-dependencies:
- dependency-name: actions/upload-artifact
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-01-22 12:09:43 +00:00
Sebastian Pipping
86a3623a9a
Merge pull request #801 from catenacyber/fuzzcovstop
...
fuzz: Improve coverage by maybe stopping the parser
2024-01-17 17:36:43 +01:00
Sebastian Pipping
5b70d3ac44
fuzz/xml_parsebuffer_fuzzer.c: Be more robust towards ouf-of-memory
2024-01-17 10:08:42 +01:00
Philippe Antoine
34af886238
fuzz: improve coverage by maybe stopping parser
2024-01-16 11:08:44 +01:00
Sebastian Pipping
2640b1d97c
Merge pull request #799 from libexpat/ci-fuzzing
...
Make CI run fuzzing regression tests (fixes #367 )
2024-01-16 02:26:43 +01:00
Sebastian Pipping
c47e191797
Merge pull request #803 from libexpat/fix-cppcheck-ci
...
Fix Cppcheck CI for Cppcheck 2.13.0
2024-01-16 01:14:12 +01:00
Sebastian Pipping
24ffba44bd
Make CI run fuzzing regression tests
2024-01-15 23:57:02 +01:00
Sebastian Pipping
73ebe0bfb3
fuzz: Address warning -Wunused-function with regard to sip24_valid
2024-01-15 23:57:02 +01:00
Sebastian Pipping
ed38687779
mass-cppcheck.sh: Fix for Cppcheck 2.13.0
...
Cppcheck output was:
> expat/lib/xmlparse.c:67:4: error: #error XML_GE (for general entities) must be defined, [..]
> # error XML_GE (for general entities) must be defined, [..]
> ^
2024-01-15 23:29:19 +01:00
Sebastian Pipping
3ff1d00dc2
cppcheck.yml: Bump to macOS 12
...
Homebrew output was:
> Warning: You are using macOS 11.
> We (and Apple) do not provide support for this old version.
> [..]
2024-01-15 23:29:19 +01:00
Sebastian Pipping
9e603b35e0
Merge pull request #802 from libexpat/dependabot/github_actions/actions/upload-artifact-4.1.0
...
Actions(deps): Bump actions/upload-artifact from 4.0.0 to 4.1.0
2024-01-15 17:06:21 +01:00
dependabot[bot]
2d9bc9aec6
Actions(deps): Bump actions/upload-artifact from 4.0.0 to 4.1.0
...
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact ) from 4.0.0 to 4.1.0.
- [Release notes](https://github.com/actions/upload-artifact/releases )
- [Commits](c7d193f32e...1eb3cb2b3e
)
---
updated-dependencies:
- dependency-name: actions/upload-artifact
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-01-15 12:39:38 +00:00
Sebastian Pipping
19af57f2dd
Merge pull request #800 from libexpat/clang-tidy-more
...
clang-tidy: Address warnings `readability-avoid-const-params-in-decls` and `readability-named-parameter`
2024-01-13 01:59:22 +01:00
Sebastian Pipping
226a1527cf
clang-tidy: Address warning readability-named-parameter
2024-01-12 23:27:19 +01:00
Sebastian Pipping
225ebd45e1
clang-tidy: Address warning readability-avoid-const-params-in-decls
...
clang-tidy output was:
> [..]/tests/handlers.h:502:64: error: parameter 'index' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls,-warnings-as-errors]
> 502 | _handler_record_get(const struct handler_record_list *storage, const int index,
> | ^~~~~
> [..]/tests/handlers.h:503:39: error: parameter 'line' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls,-warnings-as-errors]
> 503 | const char *file, const int line);
> | ^~~~~
2024-01-12 22:19:05 +01:00
Sebastian Pipping
7664ecdbae
Merge pull request #798 from libexpat/clang-tidy
...
Make GitHub Actions enforce clang-tidy clean code + address current clang-tidy warnings
2024-01-12 21:38:35 +01:00
Sebastian Pipping
f832f7b981
Make GitHub Actions enforce clang-tidy clean code
2024-01-12 17:26:50 +01:00
Sebastian Pipping
10cded2493
tests/basic_tests.c: Address clang-tidy warning clang-analyzer-core.NullDereference
...
clang-tidy output was:
> [..]/tests/basic_tests.c:2083:19: warning: Dereference of null pointer [clang-analyzer-core.NullDereference]
> 2083 | errorFlags |= ((model[0].type == XML_CTYPE_SEQ) ? 0 : (1u << 2));
> | ^~~~~~~~~~~~~
2024-01-12 17:25:27 +01:00
Sebastian Pipping
e23c300f25
tests/acc_tests.c: Address clang-tidy warning clang-analyzer-core.NonNullParamChecker
...
clang-tidy output was:
> [..]/tests/acc_tests.c:368:9: warning: Null pointer passed to 1st parameter expecting 'nonnull' [clang-analyzer-core.NonNullParamChecker]
> 368 | if (strlen(printable) < (size_t)1)
> | ^ ~~~~~~~~~
Note: It was harmless because fail(..) right before catches that case.
2024-01-12 17:25:27 +01:00
Sebastian Pipping
0b424cb9ae
examples/element_declarations.c: Simplify first call to stackPushMalloc
...
.. where stackTop is NULL anyway
2024-01-12 17:25:27 +01:00
Sebastian Pipping
0ebca2b10f
examples/element_declarations.c: Fix memleak in dumpContentModel on OOM
...
clang-tidy output was:
> [..]/examples/element_declarations.c:163:16: warning: Potential leak of memory pointed to by 'stackTop' [clang-analyzer-unix.Malloc]
> 163 | return false;
> | ^
2024-01-12 04:46:47 +01:00
Sebastian Pipping
716fd10bd4
Merge pull request #797 from catenacyber/fuzzcov
...
fuzz: improve coverage
2024-01-10 23:07:00 +01:00
Philippe Antoine
bb58abd4e0
fuzz: improve coverage
2024-01-10 22:06:37 +01:00
Sebastian Pipping
be47f6d5e8
Merge pull request #796 from libexpat/ci-control-flow-integrity
...
Make CI cover Clang's Control Flow Integrity sanitizer
2023-12-19 18:39:44 +01:00
Sebastian Pipping
64912b70fb
Merge pull request #795 from libexpat/autotools-install-shipped-xmlwf-manpage
...
Autotools: Make installation of shipped `doc/xmlwf.1` independent of docbook2man availability
2023-12-19 18:38:44 +01:00
Sebastian Pipping
18b44c980e
linux.yml: Cover Clang's Control Flow Integrity sanitizer
2023-12-19 01:31:10 +01:00
Sebastian Pipping
9495cefd94
qa.sh: Fix dropping of QA_SANITIZER
2023-12-19 01:31:10 +01:00
Sebastian Pipping
4b878938bb
qa.sh: Support Clang's Control Flow Integrity sanitizer
...
https://clang.llvm.org/docs/ControlFlowIntegrity.html
2023-12-19 01:31:10 +01:00
Sebastian Pipping
7384c88f9a
configure.ac: Make installation of shipped doc/xmlwf.1 independent of docbook2man availability
2023-12-18 23:59:25 +01:00
Sebastian Pipping
822d1706b2
Merge pull request #794 from libexpat/dependabot/github_actions/actions/upload-artifact-4.0.0
...
Actions(deps): Bump actions/upload-artifact from 3.1.3 to 4.0.0
2023-12-18 17:48:34 +01:00
dependabot[bot]
8c87ca470d
Actions(deps): Bump actions/upload-artifact from 3.1.3 to 4.0.0
...
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact ) from 3.1.3 to 4.0.0.
- [Release notes](https://github.com/actions/upload-artifact/releases )
- [Commits](a8a3f3ad30...c7d193f32e
)
---
updated-dependencies:
- dependency-name: actions/upload-artifact
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
2023-12-18 12:12:08 +00:00
Sebastian Pipping
b9fcca0aaa
Merge pull request #793 from libexpat/fix-bug-report-target
...
CMake|Autotools: Fix `PACKAGE_BUGREPORT` variable to something working
2023-12-17 23:09:46 +01:00
Sebastian Pipping
5a3c419e6a
CMake|Autotools: Fix PACKAGE_BUGREPORT variable to something working
2023-12-17 03:34:27 +01:00
Sebastian Pipping
85ee77d31f
Merge pull request #792 from libexpat/autotools-sync-cmake-files
...
autotools: Sync CMake templates with CMake 3.26
2023-12-16 16:50:45 +01:00
Sebastian Pipping
141cdab714
autotools: Sync CMake templates with CMake 3.26
2023-12-15 05:02:23 +01:00
Sebastian Pipping
fb702e6c0e
Merge pull request #790 from libexpat/cmake-build-benchmark-also
...
CMake: Build `tests/benchmark/benchmark.c` for `EXPAT_BUILD_TESTS`
2023-11-22 13:04:23 +01:00
Sebastian Pipping
a55b7925b2
benchmark.c: Address MSVC warnings C4267 and C4244
...
Compiler output was:
> tests\benchmark\benchmark.c(102): warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data
> tests\benchmark\benchmark.c(117): warning C4244: 'initializing': conversion from '__int64' to 'int', possible loss of data
2023-11-21 21:42:50 +01:00
Sebastian Pipping
038040447e
CMake: Build tests/benchmark/benchmark.c for EXPAT_BUILD_TESTS
...
.. like the Autotools build system does.
2023-11-21 20:27:24 +01:00
Sebastian Pipping
3588720613
Merge pull request #787 from libexpat/tests-more-chunk-size-coverage
...
tests: Migrate more tests to variable chunk size parsing
2023-11-13 15:21:37 +01:00
Sebastian Pipping
d2b31760cd
tests: Simplify _XML_Parse_SINGLE_BYTES
...
Co-authored-by: Snild Dolkow <snild@sony.com>
2023-11-11 02:15:44 +01:00
Sebastian Pipping
3e5f6d6601
tests: Migrate more tests to variable chunk size parsing
2023-11-09 20:27:20 +01:00
Sebastian Pipping
795cf99922
tests: Make _XML_Parse_SINGLE_BYTES deny use with pathological input
2023-11-09 20:26:38 +01:00