Repository navigation
Abla 0.2.78
Behaviour changes and migration (read first)
-
Two ways a dependency's compile-time code could use your project's
compile-time grants are closed (high; fixes the known issues of v0.2.68
to v0.2.77):- v0.2.74 limited a dependency's
$handler to the grants of the file
that declares it, but a#site that the handler built into your file
still ran with your file's grants (environment, process, file writes,
network, native code, whichever your project authorizes). Such a site
now runs within the grants of both files, however many handlers it
passed through. The standard library's handlers ($json,$htmland
the rest) are unchanged. - A dependency's module generated with
compilerGenerateModulecould add
an extension function, an extension field or anextendto a type of
another package, whichcompiler.addExtensionFieldand
addConformancealready refused (medium; since v0.2.74). It now fails
withE_COMPILER_TRANSFORM_PROGRAMunless the dependency has
transform.program.
(7468889, #1139 area 1)
- v0.2.74 limited a dependency's
-
abla/tls/hostedandabla/crypto/hostedare removed (decision
#149). The OpenSSL-based TLS and crypto modules are gone. Change TLS
imports toabla/tls/pure, now the only TLS in the standard library, and
useabla/crypto/aesandabla/crypto/rsa(orabla/crypto/purefor
both) for crypto. Most calls keep their names. Certificates need a
matching DNS or IP subject alternative name (the pure verifier doesn't
fall back to the Common Name), and keys in OpenSSL's traditional
encrypted PEM (Proc-Type: 4,ENCRYPTED) need converting to encrypted
PKCS#8. There is no replacement for exporting an RSA key as SPKI.
docs/migrating-from-tls-hosted.md maps each removed function and type.
The standard library no longer uses OpenSSL (a project that declares
libssl or libcrypto functions itself still links them), and the SBOM no
longer lists it. (1592a94) -
HTTP event servers hold at most 256 MiB of buffered requests in total
(medium-low; decision #146). The per-connection limits bounded each
connection, but a server takes up to 1023 of them, so many unauthenticated
connections together could make it hold 12 to 22 GB. Now
HttpEventServerOptions.maximumBufferedRequestBytes(default 256 MiB, 0
turns it off) bounds the request bytes held, across all connections, for
requests whose handler hasn't run yet, over plain HTTP, HTTPS and
HTTP/2. Past it, new HTTP/2 streams are refused (clients retry them),
HTTP/1 bodies wait for room, and a fresh small request is still
answered. If the server is still full after the idle timeout, the
longest-idle connection holding request bytes is closed. A server that
takes many large uploads at once may need a higher value. Throughput
is unchanged within measurement noise. (303985c, #1139 area 4)
Language
&&=and||=on a mutable Boolean local or field:ok &&= check()
callscheck()only whileokis true, and a field's receiver is
evaluated once. For a local, the editor offers to rewrite
ok = ok && check().
(0d4158d, decision #147)
Fixes
- TLS session tickets (low hardening): the pure TLS server replaces its
session-ticket key every 24 hours by default, as Go does. Tickets sealed
with the retired key still resume until they expire. Pass
rotateAfter = 0to keep one key for the life of the process.
(764b073, decision #151) - GPU kernels (experimental):
CudaKernelDevice.close()destroys the
device's context even after a refused launch. Before, each refused
launch left a context behind until the program exited. (447310e) - Regex (low-medium): a character class is tested by binary search over
its sorted ranges, and each probe counts as a step, so
regexCompileWithinandfindWithinnow bound search time as
documented. Before, a class with thousands of ranges was scanned range
by range and not counted: a 24 KB pattern that passed
regexCompileWithintook seconds on a few kilobytes of text. A small
class can now take one or two more steps, so amaximumStepsset
exactly at an old count can run out. TheRegexof a failed compile no
longer panics inmatches,find,findAllorreplace: it matches
nothing, as documented (low). (18396f8, #1139 area 4)
Improvements
- Editor: "add all missing imports" adds every import a file needs in
one edit, the same wayablac fix-importsdoes. (a123b69, decision
#148)
Known issue
- 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. - Safe code can make the GPU kernel runtime (
abla/kernel,abla/kernel/cuda) read or write memory it doesn't own. Until v0.2.79, don't run kernel code from dependencies you don't trust, open one CUDA device at a time, and don't upload to or download into a buffer you have closed. 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.
Docs
- docs/language.md's GPU kernel section says to convert a small integer to
f32 from an i32. (6b78baa) - docs/debugging.md says how to use rr, perf and heaptrack on Linux debug
builds. (e7ad688, #1217) - With hosted TLS gone, the install and platform docs no longer ask for
OpenSSL (openssl@3on macOS), and say that current macOS archives
bundle the patched LLVM and LLD. (5495766)
Bootstrap convergence
Two fresh Linux builders bootstrapped the source of v0.2.78 (648cf072a454ae1f7d172cd9bc484976ac567054) from different seeds and reached the same compiler:
- route A: v0.2.77 (
ablac-x86_64-linuxsha2563ec18350dc1c09f8d5d3920ed7a65d2a23a6f9f72c50a73f66f82366f84dd3d8) -> stage 1, 2, 3 - route B: v0.2.74 (sha256
03337bf89f919b8506497894ecf20723a8e04e9f3a4f86a42a9e3d9ac7bc7471) -> the sources of v0.2.77 (780cc519c789b2c99a60b2867e3aa6481b3af91f), twice -> stage 1, 2, 3 - canonical IR (raw, non-debug, pre-prune
--emit-llvm src/orc_main.abat/build/source): sha256611d9c9a4f74f77f955807396add35ccfca45ffb6473f0d84e4184b0d8e8136f - stage 2 executable
92db0b9491b993c4cef8ddffe683b1b9da98ac94a246e1affd8ebfee12ac66c3, object1b26379301c5729587174d6e0694ea350d5d58e31cfccadd91fbc85f5bc59e29 - toolchain: environment
af5f2ced5b6bcfdab3d335ce55c899e0416169cfa683d20a5ba8712fca1b6474, closureb1872f918c677d4b376f11826949774047bafeac6c208592b89a05f2dc4640aa - run: https://github.com/AndreBaltazar8/ablac/actions/runs/45897365512
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).