HomeFreeBSD

Fix bad libbxo format strings in jls

Description

Fix bad libbxo format strings in jls

The existing format string for the empty case was trying to read varargs
values that weren't passed to xo_emit. This appears to work on x86 (since
the next argument is probably a pointer an empty string), but for CHERI
we can bound variadic arguments and detect a read past the end.

While touching these lines also use the libxo 'a' modifier to avoid having to
construct the libxo format string using asprintf.

Found by: CHERI
Reviewed By: allanjude
Differential Revision: https://reviews.freebsd.org/D26885

(cherry picked from commit d24f17df969107b47af60e5ccc1ed0f1a467fc6f)

Details

Provenance
arichardsonAuthored on Nov 4 2020, 2:31 PM
kevansCommitted on Jan 2 2021, 5:27 AM
Reviewer
allanjude
Differential Revision
D26885: Fix bad libbxo format strings in jls
Parents
rG25a6b709b6b6: Also pass SKEIN_USE_ASM to the assembler, via AFLAGS
Branches
Unknown
Tags
Unknown