Commit graph

8 commits

Author SHA1 Message Date
Martin Kinkelin
130e6aa1d4
GHA main: Add Alpine Linux job, to CI-test musl libc (#20741)
* GHA main: Add Alpine Linux job, to CI-test musl libc

Incl. some test fixes.

* [refactor common isDlcoseNoop logic and prepare for Darwin support]
2025-01-28 00:28:20 +01:00
Martin Kinkelin
dbba866c71
macOS CI: Upgrade GNU make in ci/cirrusci.sh (#17034)
This should fix Phobos CI, which expects such prerequisites provisioning
to happen in DMD's ci/cirrusci.sh. Because this YAML addition hasn't been
duplicated in Phobos, Phobos CI is still using the default make on macOS,
which is too old and doesn't support the newly required `private` modifier.
2024-10-27 14:27:05 +01:00
Martin Kinkelin
6662f4a7f6
macOS CI: Don't brew-install packages provided in the base image already (#15877)
It's slow and prone to sporadic failures (possibly caused by a missing
initial `brew update` invocation), and seems superfluous for the
used macOS 12+13 GitHub Actions images, according to the CI logs.
2023-12-04 15:05:17 +02:00
Martin Kinkelin
ed22f5c28f
ci/run.sh: Avoid deprecated Makefiles (#15832)
* ci/run.sh: Avoid deprecated Makefiles

* ci/run.sh: Streamline OS_NAME from `darwin` to `osx` on macOS

As DMD uses `osx` as OS in most other places, including the
`generated/osx/release/64` output dir, which is currently wrong
in run.sh's `build_path` and leads to CI failures on macOS.

* GHA: Disable `-debug` for DMD unittests with old host compilers

* GHA: Work around linker errors with -g on macOS 13

See https://issues.dlang.org/show_bug.cgi?id=23517.

compiler/src/posix.mak sets it to 10.9, compiler/test/Makefile to 11.
2023-11-22 11:41:16 +02:00
Vladimir Panteleev
7cdae6e3bb
Add Valgrind GC integration (#15304)
* rt.minfo: Avoid calling realloc with size 0

This is not portable, and memcheck complains about this.

* Add C Valgrind API

Add the BSD-licensed C header files which provide the API for
controlling Valgrind from within programs executed under it.

The files are from Valgrind v3.21.0.

* Add some D bindings for the Valgrind C API

We will use these in the GC implementation to tell Valgrind which
memory operations are OK or not.

* Silence Valgrind warnings caused by GC marking

Allow the conservative GC to scan memory, whether it has been
initialized by the application or not.

* Add test suite for Valgrind

* Unify VALGRIND with MEMSTOMP

The two share the same goal: mark memory which should not be accessed
any more.

* Mask "invalid" access to free lists

The GC stores free lists in the cells of the objects on the list.

We would like to allow the GC to work with these lists, but still
raise a warning if application code attempts to access them.

* Distinguish between writable and unwritable invalidation

Freshly allocated memory should be writable but not readable.

Explicitly deallocated or GC-ed memory should be neither readable or
writable.

* Add use-after-free test

* Invalidate freshly-allocated memory

* Integrate VALGRIND with SENTINEL

* Fix reporting of arrays of structs with destructors

* Re-invalidate reused blocks during malloc/calloc

* Add Changelog entry

* .pre-commit-config.yaml: Exempt vendored files

* etc.valgrind.valgrind: Propagate return values of the vbits functions

* etc.valgrind.valgrind: Add documentation for functions

Copy/adapt the documentation in memcheck.h.

* druntime/test/valgrind: Add no_use_after_gc test

* ci/cirrusci.sh: Install Valgrind on Linux

Run the Druntime Valgrind integration tests.

libc6-dbg is needed to allow Valgrind to redirect certain functions.

* etc.valgrind.valgrind: Add @nogc

Although the GC is the primary user, this is not a restriction of
these Valgrind API wrappers.

* druntime/test/valgrind: Fix no_use_after_gc test with -release

Trick the optimizer to pretend we're doing something with the result
of those invalid memory accesses.
2023-06-15 01:01:42 -07:00
Iain Buclaw
14ab349b82 ci/cirrusci.sh: Remove brew update-reset from cirrusci script 2022-05-26 02:06:26 +02:00
Luís Ferreira
1bec274d82
feat(test): Add DWARF_VERIFY flag on DWARF tests (#13754)
* ci(cirrusci): add llvm package

Signed-off-by: Luís Ferreira <contact@lsferreira.net>

* feat(test): Add DWARF_VERIFY flag on DWARF tests

DWARF readers and debuggers tend to ignore errors and try to proceed as much as
possible. objdump dumping the tags, doesn't necessarily mean that the DWARF
abbreviations are correct -- e.g. the reader could halt in the end, with the
last abbreviation, in which the output test can't verify. Introducing a DWARF
verifier is a good way to check conformancy with the standard.

Signed-off-by: Luís Ferreira <contact@lsferreira.net>
2022-03-08 14:04:15 +02:00
Luís Ferreira
a7dc8f487b
ci: move ci.sh and cirrusci.sh script to ci/ folder
Signed-off-by: Luís Ferreira <contact@lsferreira.net>
2022-02-20 23:20:01 +00:00
Renamed from cirrusci.sh (Browse further)