crypto::cipher: add gcm_unlink_block
For cases where the gcm state must be cleared but the block is going to
be reused.
Signed-off-by: Armin Preiml <apreiml@strohwolke.at>
cmd/hare: limit executability error to exe output
as reported by Max on hare-users
Signed-off-by: Ember Sawady <ecs@d2evs.net>
cmd/hare: rebuild on binary change based on mtime
previously, the complete binary was hashed. this takes a very long time at
least on openbsd, mostly because the size of $(CC) is 96.6M, which resulted
in a time increase for a simple "hare run" from 0.1 seconds to 3 seconds (fast
machine) or 15 seconds (slow machine).
using the mtime of the binary has almost the same effect but is much faster.
Signed-off-by: Lorenz (xha) <me@xha.li>
debug: swap in default abort handler on begin_fatal
Signed-off-by: Drew DeVault <sir@cmpwn.com>
test: store backtrace on abort
And print it with the test summary.
Signed-off-by: Drew DeVault <sir@cmpwn.com>
rt: add heap management utilities
This allows modules like debug:: to use a dedicated heap, so that they
can have access to alloc/insert/etc and work reliably when providing
debugging tools for misbehaving programs which might have, for example,
trashed the default heap.
Signed-off-by: Drew DeVault <sir@cmpwn.com>
debug: add stack trace storage solution
This provides a means of storing back traces and associating them with a
unique 64-bit ID, which can be used to annotate data structures with
backtraces -- say, for example, malloc metadata.
Signed-off-by: Drew DeVault <sir@cmpwn.com>
scripts/genbootstrap: respect $HARE
Signed-off-by: Ember Sawady <ecs@d2evs.net>
os::exec: update pipe() code examples
in order to clarify the pipe direction.
Signed-off-by: Armin Preiml <apreiml@strohwolke.at>
malloc+libc: ensure that malloc(0) returns null
on openbsd, for example, malloc(0) will return a pointer. we don't
want this.
Signed-off-by: Lorenz (xha) <me@xha.li>
hare::doc: don't introduce own error type
The problem with this is that Harec used to (incorrectly) do a full
dealias upon encountering a ... operator, and doc::error relied on this
behavior in function return types. This could be fixed by introducing
some casts, but there is really no good reason to have another separate
error type there at all.
Signed-off-by: Bor Grošelj Simić <bgs@turminal.net>
NetBSD: fix rt::sigaction
Thanks to M. Levinson for a very detailed bug report! And thanks to
Lorenz and Drew for feedback on the patch.
Signed-off-by: Mallory Adams <malloryadams@fastmail.com>
all: update for removal of switching on pointers
Signed-off-by: Bor Grošelj Simić <bgs@turminal.net>
regex: fix `jump_idxs` interference
Take this case: a|(b)
We need to remember the position of the `|`, because we will need it
when we reach the end of the string.
However, when we encounter the `)`, all `jump_idxs` are deleted; uh oh!
This commit makes it so that `jump_idxs` are stored per `group_level`,
so as not to interfere with each other.
Signed-off-by: Vlad-Stefan Harbuz <vlad@vlad.website>