Repository navigation
Abla 0.2.71
·
655 commits
to master
since this release
Behaviour changes and migration (read first)
- A bare program name is never looked up in the current directory (Linux
and macOS). When a program, or the compiler, starts another program by a
bare name (ld.lld,clang,git), only the absolute directories on
PATHare searched. An empty entry (a::b, or a leading or trailing
:),.and relative entries are ignored, and a name that noPATH
directory has fails withENOENTinstead of running./name. Before, on
a host without one of the compiler's tools onPATH, building an
untrusted project ran that project's file of the same name. To run a
program from the current directory, name it with a path (./tool).
Windows got the same fix in v0.2.70. (39e8bd5; closes the known issue
of v0.2.70 and earlier) - Windows: a started program inherits only its standard streams. Before,
a child process inherited every inheritable handle of its parent, such as
a listening socket or an open file. Now only its stdin, stdout and stderr
are passed. Compile-time paths on Windows also refuse DOS device names
(CON,NUL,COM1, with or without an extension) and names ending in
a dot or a space. (2a1c45b, 83e9494)
Fixes
- Frozen values (medium): freezing several very large lazily joined
strings could add their sizes past the largest integer and write past
the frozen heap's memory; page protection stopped the program. A freeze
that would not fit is now refused. (af8d12e) - macOS socket flags:
MSG_DONTWAITwas passed to macOS as its
MSG_WAITALL, so sends that must not block (every write with a deadline,
and the pure TLS session's sends) blocked until the peer read, and a
deadline did not hold against a peer that reads nothing. Each flag is now
translated bit by bit, for receives too, and because macOS'ssend
ignoresMSG_DONTWAIT, such a send on a blocking socket is made
non-blocking for that one call. (01c4d5a, 6071f3d) - macOS file identity:
statreported 0 for a file's device, inode,
link count, owner, block size and access and change times. The build
cache and file watches use the inode and change time to notice a file
replaced by one of the same size; on macOS such a change could go
unnoticed. (a7610e3) - macOS signalfd: closing one from two threads no longer leaves the
table's count wrong. (2ddf979) - Contract imports (closes v0.2.70's known issue): a module brought in
withimport contracttakes the package of the module it describes, so
itstrustedorexterndeclarations no longer fail with
E_PACKAGE_TRUSTED_DENIEDin your own project. (2ae5e68) - macOS package cache (closes the known issue of v0.2.69 and v0.2.70):
a freshly fetched dependency or new content-provider entry is added to
the cache again; the compiler no longer passeschmodan argument that
BSDchmodreads as a file name, and you can drop the GNUchmod
workaround. (aac933c) - Android libraries from the release compiler (closes the known issue of
v0.2.66 to v0.2.70): the compiler's own code generation read the
Android target as plain Linux on arm64, so libraries used native ELF
thread-local storage (which fails to load on Android 7 to 9) and used
register x18, which Android reserves. They are built for Android again:
emulated TLS, and x18 left alone. You can drop the
ABLA_CODEGEN_INPROCESS=0workaround; rebuild Android libraries made
with v0.2.66 to v0.2.70. (0d4a6cd)
Known issue
await task { ... }orawait thread { ... }, with the task or thread written directly afterawait, doesn't keep it alive while it runs: a garbage collection inside its body can free it, and the program crashes or uses freed memory. Until v0.2.77, bind the task or thread to avalfirst (val t = task { ... }; await t). Fixed in v0.2.77.- Reading a very long number as a floating-point value (
parseFloat, JSON'sasF64orreadNumber,strtod) takes time quadratic in its digits, so one request carrying a JSON number of about a megabyte can keep a server busy for minutes. Until v0.2.77, reject or truncate numbers longer than a few hundred digits before converting them, or keep request bodies small. Fixed in v0.2.77. - A dependency's compile-time transform, or its custom
$syntax handler, can run compile-time code with your project's own compile-time grants (process, environment, file writes, network, native code), not the dependency's. Until v0.2.74, don't authorize those capabilities for your own project when you build with dependencies you don't trust. Fixed in v0.2.74, except for the case below. - A compile-time
#site that a dependency's custom$syntax handler builds into your file runs with your project's own compile-time grants (process, environment, file writes, network, native code), not the dependency's. Until v0.2.78, don't authorize those capabilities in a file that uses$syntax from a dependency you don't trust. Fixed in v0.2.78. ablac package updatecan run a dependency's compile-time import-provider code with your project's own compile-time grants (process, file writes, network), before the dependency is locked. Until v0.2.74, don't authorize those capabilities for your own project while you update dependencies you don't trust. Fixed in v0.2.74.- On Windows on ARM64 (aarch64-windows) only, a program that uses AES-GCM ends on its first call with "fatal signal: Windows exception 0xc000001d". That includes every TLS client and server, and anything using abla/crypto/aes: the CPU feature check reads a register Windows does not let programs read. There is no workaround in the program. Rebuild with v0.2.72. x86-64 Windows, Linux and macOS are not affected. (Found by the Windows ARM64 CI lane; no user has reported it.) Fixed in v0.2.72.
- Ordinary code can write fields that the standard library's native buffers and cells rely on (
closedof aNativeByteBuffer,NativeI64CellorNativePointerCell), so safe code can reach memory it doesn't own. Until v0.2.79, don't write those fields outside the standard library, and check that your dependencies don't. Fixed in v0.2.79. - A dependency's custom
$syntax handler can have code of its own run at compile time with the grants of your file that uses the syntax (process, environment, file writes, network, native code). Until v0.2.79, don't authorize those capabilities in a file that uses$syntax from a dependency you don't trust. Fixed in v0.2.79. - A dependency's prepared copy in
.abla/packages/is trusted by its marker files without checking its contents againstabla.lockin single-file builds, and in project builds that also have a vendored copy, so a changed copy (from a restored CI cache, or committed next to a reviewed lock) is built as is. Until v0.2.79, delete.abla/packages/before building when it may come from somewhere you don't control (it is fetched again and checked), and don't cache or commit it. Fixed in v0.2.79. - The HTTP clients (
HttpClient.send,HttpAsyncClient, and the WebSocket TLS client's upgrade request) write the method, path and header values they are given without checking them, so a line break in a value that came from user input can add headers or a second request. Until v0.2.79, percent-encode user input in paths and queries (percentEncode) and refuse CR, LF and other control bytes in header values before passing them to a client. Fixed in v0.2.79. - The static Linux compiler's own hardening was weaker than a glibc build's: its stack-protector canary was a fixed value on AArch64, its
_FORTIFY_SOURCEbuffer checks did nothing, andrealpathcould overrun its caller's buffer with a very deep working directory plus a long relative path. None of these is reachable alone; each makes a separate overflow bug in LLVM or lld easier to exploit when compiling code you don't trust. On AArch64 itsprintffamily also read arguments from the wrong place, so text that LLVM formats could show stack contents or crash the compiler. Until v0.2.79, on x86-64 Linux the dynamic compiler asset (ablac-dynamic-x86_64-linux, built on glibc) avoids them; elsewhere, build code you don't trust from a shallow directory. Fixed in v0.2.79.
Bootstrap convergence
Two fresh Linux builders bootstrapped the source of v0.2.71 (4f73994cff344c5d11500ab416ac8512232b2548) from different seeds and reached the same compiler:
- route A: v0.2.70 (
ablac-x86_64-linuxsha256a6d6fb279ab6cf8a93703e36d6d5fbece49229fc416cb8a2c4a5b75504a96ad4) -> stage 1, 2, 3 - route B: v0.2.69 (sha256
eeddb7c09e282df4b9b7c79714dac68d2ebb21f9a4e7e90c1211f110c7be8f61) -> the sources of v0.2.70 (93841eec824233d18cfa987bd1bb7d430deac016), twice -> stage 1, 2, 3 - canonical IR (raw, non-debug, pre-prune
--emit-llvm src/orc_main.abat/build/source): sha256c51c11041593f01ede54506587c3bb0c58ed575f2f65d90070878cca13d4ea73 - stage 2 executable
ad4739e81eba0f8673698d6da3b256b3fd9c9260fe5c4a3ee38662d0722bb9f8, object24f48615d289a1609043f9e7da670999f6db23c1fa95ec731c25105528f4a89d - toolchain: environment
d00897b2d6cc51118a9495656126ec6b32b87504a2eb780e173bac4eec54f68b, closureb1872f918c677d4b376f11826949774047bafeac6c208592b89a05f2dc4640aa - run: https://github.com/AndreBaltazar8/ablac/actions/runs/45520691361
This is route convergence within one compiler lineage: it is not an independent implementation, and it does not exclude a seed compromise shared by both routes (docs/bootstrap.md).