Commit graph

23 commits

Author SHA1 Message Date
Iain Buclaw
48acb53296 druntime: Move syscall bindings in perf_event to own module 2025-04-22 06:30:55 +08:00
Elias Batek
b7e3b3b617
Add core.sys.windows.bcrypt to the build process (#20780) 2025-01-25 21:54:49 +01:00
Johan Engelen
047dfb5703
druntime: Upstream exception stack traces on musl platforms from LDC (#20758)
Based on:
* https://github.com/ldc-developers/ldc/pull/4639
* https://github.com/ldc-developers/ldc/pull/4691

Co-authored-by: Martin Kinkelin <noone@nowhere.com>
2025-01-23 15:44:45 +08:00
Steven Schveighoffer
613394c539 Migrate block metadata facilities into the GC package. 2024-11-16 22:47:43 -05:00
Steven Schveighoffer
2c420d94af Update block caching feature to use member in thread.
Abstract tls handling routine in thread to decouple thread from knowing
the GC's TLS specific data layout.
2024-11-17 05:55:21 +08:00
Denis Feklushkin
b13c0cd223
Split core.thread.fiber to package.d and base.d (#16695) 2024-07-21 17:09:57 +08:00
zopsicle
5eb426e588 Add module core.sys.linux.sys.mount
The new module core.sys.linux.sys.mount provides definitions corresponding to
those in the header <sys/mount.h> on Linux.
2024-05-07 02:02:11 +02:00
Jonathan M Davis
e9c6884046 Add mqueue declarations for FreeBSD.
The glibc declarations are unchanged, but they had to be put in a proper
version block instead of using : with the version statement.
2024-04-06 14:50:47 +02:00
Walter Bright
2fddac39b8
rename __builtins.di to __importc_builtins.di (#16317) 2024-03-20 20:48:42 -07:00
Jonathan M Davis
17293af33a Add core.sys.freebsd.net.if_.
https://cgit.freebsd.org/src/tree/sys/net/if.h?h=stable/14
2024-02-24 16:25:15 +08:00
Adam D. Ruppe
d8dcb940ab
Enhanced version of dip1036 implementation (#15715)
This implements the Enhanced Interpolated Expression Sequence proposal:

i"" or iq{} or q`` with a $(expression) in the middle are converted to a tuple of druntime types for future processing by library code.
2024-01-19 22:21:40 -08:00
richard (rikki) andrew cattermole
2625a1607c Initial attempt at stdatomic.h 2023-12-08 12:45:28 +01:00
Jonathan M Davis
380efa672d Add core.sys.linux.linux.if_arp. 2023-10-30 16:04:13 +01:00
Jonathan M Davis
e6139f869c Add core.sys.linux.linux.if_packet. 2023-10-29 21:34:56 +01:00
Jonathan M Davis
08821bb7e5
Add core.sys.freebsd.net.if_dl. (#15739) 2023-10-28 09:22:45 +08:00
Jonathan M Davis
b4a2c33f65
Add core.sys.freebsd.sys.types. (#15737)
In addition to adding the non-standard declarations in
core.sys.freebsd.sys.types, I also commented a couple of the ones in
core.sys.posix.sys.types as non-standard, since they are and really
should have been in core.sys.freebsd.sys.types. Unfortunately, moving
them to the right place risks breaking existing code.
2023-10-28 08:08:36 +08:00
Jonathan M Davis
d936f1dfef
Add core.sys.freebsd.sys.socket. (#15734)
This adds FreeBSD's extensions to the POSIX sys/socket.h.
2023-10-27 07:40:01 +08:00
Jonathan M Davis
1cba646b2d
Add bindings for FreeBSD's ifaddrs.h. (#15730) 2023-10-25 20:23:29 +08:00
Dennis
243aaef2f8
Fix 23103 - static initialization of associative arrays is not implemented (#15468)
* Fix 23103 - static initialization of associative arrays is not implemented

* Remove Phobos references in newaa.d

* Expand static AA support and tests

* Use minimized newaa implementation

* Test AA with immutable key/value

* Add semantic2done check before class initsem

* Add test for layout compatibility

* Address review comments
2023-08-31 15:18:22 +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
Walter Bright
481e169269
add core.factory (#14888) 2023-02-22 11:13:32 +02:00
Teodor Dutu
c83dff2e1b
Translate _d_arrayassign{,_l,_r} to templates (#14310)
- Implement template `_d_arrayassign{_l,_r}`
- Lower array asignment expressions to the above templates
- Remove old lowering from e2ir.d
- Remove the old `_d_arrayassign{,_l,_r}` hooks
- Merge the usage of `_d_arrayassign` with that of `_d_arrayassign_l`

Signed-off-by: Teodor Dutu <teodor.dutu@gmail.com>
2022-08-02 11:11:40 +03:00
Iain Buclaw
69ab16a7e8 Merge dlang/druntime repository into dlang/dmd 2022-07-09 18:53:15 +02:00