Removes the Ubuntu/MSVC builds from the GitHub Actions as MSVC is obviously not supported on Ubuntu but it still runs the tests. This should reduce the CI resources and failure modes.
escape.d: Refactor `EscapeByResults` more
Signed-off-by: Nicholas Wilson <thewilsonator@users.noreply.github.com>
Merged-on-behalf-of: Dennis <dkorpel@users.noreply.github.com>
I am fairly convinced that no possible arguments to or global state at the time
of any call to Thread.sleep can result in memory corruption.
There is a precondition on Thread.sleep, that the duration must be
non-negative. On Windows, Thread.sleep calls Sleep, which takes an unsigned
integer. On POSIX, Thread.sleep calls nanosleep, which is specified to handle
negative durations gracefully. As such, violating this precondition should not
be a source of undefined behavior.
* Remove the interface function fullCollectNoStack from the gcinterface
* Fix tests that depend on the GC not scanning the stack.
* Remove all nostack remnants
* Add changelog entry
FreeBSD 14 changed the signature of qsort_r to be POSIX-compliant with
POSIX, making it so that our binding for it no longer matches, resulting
in a crash when it's used.
This implements a fix similar to what the FreeBSD headers do to avoid
breaking code (they provide a static inline extern(C++) overload for the
old signature). This provides a deprecated extern(D) overload for the
old signature. The extern(C) overload now matches the new signature. The
changes have been versioned so that they only affect FreeBSD 14 and
newer.
Technically, if someone used Cmp when declaring their function for
qsort_r, this would still break them (though with a compilation error
that should be easy to fix rather than silent breakage or a crash), but
I don't really see a way around that, and Cmp is not part of the POSIX
API, so no one would have a clue that it was a thing without digging
through the bindings. Arguably, we should make it private, since it's
not part of POSIX, but I haven't done anything with that in this commit.
My guess is that in reality, no D programs are both written to use
qsort_r and run on FreeBSD (outside of the druntime tests), but this
way, they won't break unless they use Cmp to declare their comparator
function. They'll just get a deprecation message that they should update
their code.
Regardless, we have to change the signature for FreeBSD 14 for it to
work, and this does that.
* Fix Issue 14128 - AliasDeclaration allows expressions, causing false code for ThisExp
* Add test case
* Fix deprecation comment
* Add changelog
* Use dummy out param, not null
* Change to error with __edition_latest_do_not_use
Apparently, there were two problems that needed fixing.
1. The code for the FreeBSD_14 version identifier had not been added
yet.
2. The build did nothing to detect the version of FreeBSD, which makes
it very easy to build for the wrong version. The CI apparently sets
the version - e.g. TARGET_FREEBSD13 - but unless one of those
TARGET_FREEBSD* versions is set, the build defaults to FreeBSD 11,
which isn't even supported any longer.
So, this adds the code for the FreeBSD_14 identifier, and it makes it so
that the build queries the OS version on FreeBSD if TARGET_FREEBSD* has
not been set. So, anything that sets the TARGET_FREEBSD* version when
building will control the target version as before, but if it's not set,
then it will target whatever the current system is.
* [editions] Make `body` after contract an error
* Mention --help in build.d module comment
* Add ASTBase.Module.edition property, always Edition.legacy for now