Closed arichardson closed 6 years ago
Reduced test case:
// RUN: %cheri_cc1 -emit-obj -mrelocation-model pic -pic-level 2 -mthread-model posix -target-abi n64 -mllvm -mips-ssection-threshold=0 -sys-header-deps -O2 -std=gnu99 -fconst-strings -ftls-model=initial-exec -fcolor-diagnostics -vectorize-loops -vectorize-slp -cheri-linker -mllvm -mxmxgot -x c -o - -O0 -emit-llvm %s
struct a;
b(struct a *);
b(__capability struct a *c) {}
Is there a function in that file declared with a pointer parameter and defined with __capability qualified parameter?
cheri_ccall.h:
struct cheri_object cheri_sandbox_make_sealed_invoke_object(
struct sandbox_object *sbop);
struct cheri_object cheri_sandbox_make_sealed_rtld_object(
struct sandbox_object *sbop);
cheri_ccall.c:
struct cheri_object
cheri_sandbox_make_sealed_invoke_object(
__capability struct sandbox_object *sbop)
{
...
}
struct cheri_object
cheri_sandbox_make_sealed_rtld_object(
__capability struct sandbox_object *sbop)
{
...
}
Yes -- fixed in my local checkout and about to rebuild with that fixed.
Fixed in 80c3585410e1ddf6c0d2c934db058544c5e15616.
Migrated from CTSRD-CHERI/llvm#252:
While hacking on
libcheri
locally, adding new use of__cheri_cast
:cheri_ccall-aeeaf9.sh: https://gist.github.com/rwatson/2a00269b563ba539f14267283eea8739
cheri_ccall-aeeaf9.c: https://gist.github.com/rwatson/4e9ccabfb8cdfdb9cd37b4468dd1998c