diff --git a/src/ble/tests/BUILD.gn b/src/ble/tests/BUILD.gn index 658f5094cc3141..760027c2f5e94c 100644 --- a/src/ble/tests/BUILD.gn +++ b/src/ble/tests/BUILD.gn @@ -31,6 +31,7 @@ chip_test_suite("tests") { public_deps = [ "${chip_root}/src/ble", "${chip_root}/src/lib/support:testing", + "${chip_root}/src/platform", "${nlunit_test_root}:nlunit-test", ] } diff --git a/src/lib/core/tests/BUILD.gn b/src/lib/core/tests/BUILD.gn index 295f7a337d09dd..ec83bc715411c1 100644 --- a/src/lib/core/tests/BUILD.gn +++ b/src/lib/core/tests/BUILD.gn @@ -37,6 +37,7 @@ chip_test_suite("tests") { public_deps = [ "${chip_root}/src/lib/core", "${chip_root}/src/lib/support:testing", + "${chip_root}/src/platform", "${nlunit_test_root}:nlunit-test", ] } diff --git a/src/lib/support/ErrorStr.cpp b/src/lib/support/ErrorStr.cpp index 440bc001c213bc..e41f8f4f0f0522 100644 --- a/src/lib/support/ErrorStr.cpp +++ b/src/lib/support/ErrorStr.cpp @@ -32,6 +32,7 @@ #include #include +#include namespace chip { @@ -56,6 +57,7 @@ static ErrorFormatter * sErrorFormatterList = nullptr; */ DLL_EXPORT const char * ErrorStr(CHIP_ERROR err) { + assertChipStackLockedByCurrentThread(); char * formattedError = sErrorStr; uint16_t formattedSpace = sizeof(sErrorStr);