Refactor error reporting for bounds checks. (#464)
This introduces a very limited formatter that can embed strings and hex representations of pointers / integers in an internal buffer. This is used to format error strings for passing to `Pal::error`. This is used, in turn, by a wrapper for reporting bounds checks, which can be used by external functions to implement bounds checks. This removes the sprintf_l usage from the bounds checks. This provides enough of a format implementation that the tests introduced in #465 can be refactored to use this, instead of their custom `printf` wrapper and that can be used by SNMALLOC_CHECK. This will be a follow-on PR.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include "../backend/backend_concept.h"
|
||||
#include "../ds/mpmcstack.h"
|
||||
#include "../ds/spmcstack.h"
|
||||
#include "../mem/metaslab.h"
|
||||
|
||||
Reference in New Issue
Block a user