1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2024-10-26 12:25:09 +03:00
Commit Graph

54 Commits

Author SHA1 Message Date
Nick Wellnhofer
8c2e508b5e gitlab-ci: Enable all "integer" sanitizers 2023-03-12 14:45:14 +01:00
Nick Wellnhofer
6fd8904108 malloc-fail: Fix use-after-free in xmlParseStartTag2
Fix error handling in xmlCtxtGrowAttrs.

Found with libFuzzer, see #344.
2023-01-24 11:47:33 +01:00
Ross Burton
b1b0df6e9b CI: disable modules in gcc:static build
When shared libraries are disabled we can't build loadable modules
either, so the testModule test can't work as the testdso.la target
doesn't build a module.
2022-12-06 17:23:12 +00:00
Nick Wellnhofer
138c897dbf gitlab-ci: Treat compiler warnings as errors on MSVC 2022-11-22 15:49:37 +01:00
Nick Wellnhofer
66f781cf38 gitlab-ci: Upgrade image to Ubuntu 22.10, reenable MSan
MSan and 64-bit stat was broken on Ubuntu 22.04 (glibc >= 2.33,
LLVM <= 14), see https://github.com/llvm/llvm-project/commit/1f82d0f7
2022-10-25 19:34:38 +02:00
Nick Wellnhofer
80e43d1b76 gitlab-ci: Reenable LeakSanitizer
Let's hope it works on the asan runners.
2022-10-25 19:34:38 +02:00
Nick Wellnhofer
d767c6bea1 gitlab-ci: Fix llvm-symbolizer
Newer versions of llvm-symbolizer require libxml2 themselves. Running
a test program with LD_LIBRARY_PATH set to .libs makes llvm-symbolizer
pick up the tested development version of libxml2 which breaks
completely if the build is instrumented with ASan. Add a wrapper script
that invokes llvm-symbolizer with an empty LD_LIBRARY_PATH.
2022-10-25 19:34:38 +02:00
Nick Wellnhofer
f2392dc464 gitlab-ci: Allow cast-align warnings from clang 2022-09-09 14:03:01 +02:00
Nick Wellnhofer
f597eff8dd autotools: Fix winsock detection
Hardcode the required library on MinGW because winsock uses non-standard
calling conventions on 32-bit Windows which makes AC_SEARCH_LIBS fail.

Should fix #406.
2022-09-07 18:26:44 +02:00
Nick Wellnhofer
c52dd49473 gitlab-ci: Move MSVC test to separate script 2022-09-06 23:27:01 +02:00
Nick Wellnhofer
ea78427dca gitlab-ci: Fix SUFFIX, remove MINGW_PATH 2022-09-06 22:46:07 +02:00
Nick Wellnhofer
e4bdbf3ddb gitlab-ci: Consolidate CMake test scripts 2022-09-06 21:37:17 +02:00
Nick Wellnhofer
861466bf4e gitlab-ci: Only install MinGW autotools if needed 2022-09-06 20:32:08 +02:00
Nick Wellnhofer
e86ede09d4 gitlab-ci: Only install cmake MinGW package if needed
On MinGW, cmake requires curl which requires nghttp2 which requires
libxml2. But having a system libxml2 interferes with the Python tests
for now. Ultimately, we should use Python's os.add_dll_directory() on
Windows. I'm not sure why the current solution using PATH even works.
2022-09-06 19:33:32 +02:00
Nick Wellnhofer
7ab3228f21 gitlab-ci: Install 7-Zip using the .msi
So we don't need cmake to extract a file.
2022-09-06 19:33:32 +02:00
Nick Wellnhofer
c63b2692c9 gitlab-ci: Disable MSan for now
MSan seems broken on Ubuntu 22.04.
2022-09-05 22:50:45 +02:00
Nick Wellnhofer
98acf28f71 Use $MSYSTEM and 'bash -lc' in MinGW CI
Setting the $MSYSTEM environment variable and invoking shell scripts
with 'bash -lc' sets up the correct MinGW environment.

See https://www.msys2.org/docs/ci/
2022-09-04 22:42:46 +02:00
Nick Wellnhofer
460ba0cb7e Add CI job for MinGW/Autotools 2022-09-04 22:00:57 +02:00
Nick Wellnhofer
0cc9c1d1b7 Consolidate CI scripts 2022-09-04 20:27:27 +02:00
Nick Wellnhofer
89aeb4df44 Allow empty MINGW_PACKAGE_PREFIX 2022-09-04 20:27:27 +02:00
Nick Wellnhofer
efc0e85c02 Move Dockerfile to .gitlab-ci directory 2022-09-04 20:27:27 +02:00
Nick Wellnhofer
243fdbc31c cmake: Don't check for Python 2 2022-09-04 20:27:27 +02:00
Nick Wellnhofer
f9fcb2c47a Revert "CI job for MingW64/Autotools"
This reverts commit 6bfebf4d58.
2022-09-04 04:47:48 +02:00
Nick Wellnhofer
6bfebf4d58 CI job for MingW64/Autotools 2022-09-04 04:04:45 +02:00
Nick Wellnhofer
202b8e1954 cmake: Enable GCC compiler warnings 2022-09-02 18:44:59 +02:00
Nick Wellnhofer
b1a0961858 Migrate from PyEval_ to PyObject_
PyEval_ functions are deprecated.

Fixes #208.
2022-08-29 17:21:19 +02:00
Nick Wellnhofer
47803697b2 Work around strange -fsanitize=integer issue
With clang 14, __attribute__ ((nosanitize)) stops working with

    -fsanitize=undefined,integer

Using the following works (and should be equivalent)

    -fsanitize=undefined,unsigned-integer-overflow,implicit-conversion
2022-08-26 16:37:46 +02:00
Nick Wellnhofer
ebc04fec23 Allow Python deprecation warnings for now
See #208.
2022-08-26 15:10:06 +02:00
Nick Wellnhofer
65b01647bf Build Autotools CI tests out of source tree (VPATH) 2022-04-21 06:59:02 +02:00
Nick Wellnhofer
ad098030ad Add --with-minimum build to CI tests 2022-04-21 06:59:02 +02:00
Nick Wellnhofer
670701075b Add configuration flag for XPointer locations support
Add a new configuration flag that controls whether the outdated support
for XPointer locations (ranges and points) is enabled.

    --with-xptr-locs          # Autotools
    LIBXML2_WITH_XPTR_LOCS    # CMake

The latest spec for what it essentially an XPath extension seems to be
this working draft from 2002:

    https://www.w3.org/TR/xptr-xpointer/

The xpointer() scheme is listed as "being reviewed" in the XPointer
registry since at least 2006. libxml2 seems to be the only modern
software that tries to implement this spec, but the code has many bugs
and quality issues.

The flag defaults to "off" and support for this extensions has to be
requested explicitly. The relevant API functions are deprecated.
2022-04-21 02:41:58 +02:00
Nick Wellnhofer
dbc23ed301 Also build CI tests with -Werror 2022-04-13 17:02:50 +02:00
Nick Wellnhofer
e13c808124 Run CI tests with FTP and legacy modules
These modules are disabled by default. Enable them when testing.
2022-04-13 16:45:57 +02:00
Nick Wellnhofer
f0ba4da18c Add CI job for static build 2022-04-03 14:37:57 +02:00
Nick Wellnhofer
c2ee4a2091 Fix GitLab pages job 2022-04-02 16:55:18 +02:00
David Seifert
d9335077dd
Use AM_PATH_PYTHON/PKG_CHECK_MODULES for python bindings
* `AM_PATH_PYTHON` is a much more common idiom for building
  and installing python modules than writing your own.
* It also makes cross-compiling the python bindings possible.
  Previously the `PYTHON_CFLAGS`/`PYTHON_LIBS` would have been
  based on the `--build` python and not the `--host` python.
  By using `pkg-config`, we can always redirect the python-X.Y.pc.

Bug: https://bugs.gentoo.org/582130
2022-03-29 13:37:16 +02:00
Nick Wellnhofer
ff36770845 Make examples a standalone HTML page
Also upload to GitLab Pages.
2022-03-05 17:51:58 +01:00
Nick Wellnhofer
0a6a79b218 Try again to only build GitLab Pages on main repo 2022-02-12 21:36:27 +01:00
Nick Wellnhofer
a3aca20316 Try again to only build GitLab Pages on main repo 2022-02-12 21:33:53 +01:00
Nick Wellnhofer
15111c82c2 Only build GitLab Pages on main repo 2022-02-12 21:25:25 +01:00
Nick Wellnhofer
2017cae6df Upload documentation to GitLab pages 2022-02-12 20:04:48 +01:00
Nick Wellnhofer
53983804ce Run CI tests with UBSan implicit-conversion checks
This enables the remaining checks from the "integer" group:

- implicit-unsigned-integer-truncation
- implicit-signed-integer-truncation
- implicit-integer-sign-change

These checks can find all kinds of bugs and only require explicit casts
if integer truncation or sign change is really intended.
2022-01-25 03:20:28 +01:00
Nick Wellnhofer
ce2fbaa89d Only run a few CI tests unless scheduled
Only run the following tests by default

- gcc
- clang:asan
- cmake:mingw:w64-x86_64:shared
- cmake:msvc:v141:x64:shared
2021-02-22 22:29:28 +01:00
Markus Rickert
09320f0551 Add CI for MSVC x86 2021-02-21 14:26:40 +01:00
Markus Rickert
2065d34090 Add CI for CMake on MSVC 2021-02-08 17:15:44 +01:00
Markus Rickert
1c4f9a6db5 Require dependencies based on enabled CMake options 2020-11-30 12:43:48 +01:00
Markus Rickert
e028d29379 Add CI for CMake on Linux and MinGW 2020-11-30 11:07:46 +01:00
Nick Wellnhofer
0ace6c4d7e Add CI test for Python 3 2020-11-19 18:09:22 +01:00
Nick Wellnhofer
af893a58c6 Update GitLab CI container 2020-06-11 16:08:16 +02:00
Nick Wellnhofer
2a7b66846e Disable LeakSanitizer
The GitLab runner doesn't run in privileged mode anymore [1], at least
for projects outside the GNOME group. Disable LeakSanitizer for now
as it needs the ptrace capability.

[1] https://gitlab.gnome.org/Infrastructure/Infrastructure/issues/251
2020-03-02 12:20:23 +01:00