CheriBSD bugs workarounds
The correct thing to do, of course, is to fix these upstream, but that requires understanding exactly what's wrong, and that's harder than just not tickling the bugs.
This commit is contained in:
committed by
Nathaniel Wesley Filardo
parent
6ddd11faee
commit
342d826310
@@ -14,8 +14,13 @@ namespace snmalloc
|
||||
* - using_readonly
|
||||
* - not_using
|
||||
* model.
|
||||
*
|
||||
* TODO: There is a known bug in CheriBSD that means round-tripping through
|
||||
* PROT_NONE sheds capability load and store permissions (while restoring data
|
||||
* read/write, for added excitement). For the moment, just force this down on
|
||||
* CHERI.
|
||||
*/
|
||||
#ifdef SNMALLOC_CHECK_CLIENT
|
||||
#if defined(SNMALLOC_CHECK_CLIENT) && !defined(__CHERI_PURE_CAPABILITY__)
|
||||
static constexpr bool PalEnforceAccess = true;
|
||||
#else
|
||||
static constexpr bool PalEnforceAccess = false;
|
||||
|
||||
@@ -146,7 +146,10 @@ namespace snmalloc
|
||||
|
||||
static void print_stack_trace()
|
||||
{
|
||||
#ifdef SNMALLOC_BACKTRACE_HEADER
|
||||
// TODO: the backtrace mechanism does not yet work on CHERI, and causes
|
||||
// tests which expect to be able to hook abort() to fail. Skip it until
|
||||
// https://github.com/CTSRD-CHERI/cheribsd/issues/962 is fixed.
|
||||
#if defined(SNMALLOC_BACKTRACE_HEADER) && !defined(__CHERI_PURE_CAPABILITY__)
|
||||
constexpr int SIZE = 1024;
|
||||
void* buffer[SIZE];
|
||||
auto nptrs = backtrace(buffer, SIZE);
|
||||
|
||||
Reference in New Issue
Block a user