Skip to content

Commit 11506f8

Browse files
committed
Move malloc_in_sandbox test later in the test suite
1 parent fbd3482 commit 11506f8

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

code/tests/rlbox_glue/test_sandbox_glue.inc.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -152,12 +152,6 @@ TEST_CASE("sandbox glue tests " TestName, "[sandbox_glue_tests]")
152152
const int test_iterations = 1000000;
153153
#endif
154154

155-
tainted<char*, TestType> sb_string =
156-
sandbox.template malloc_in_sandbox<char>(upper_bound);
157-
// strcpy is safe here
158-
// NOLINTNEXTLINE(clang-analyzer-security.insecureAPI.strcpy)
159-
std::strcpy(sb_string.UNSAFE_unverified(), "Hello");
160-
161155
SECTION("test simple function invocation") // NOLINT
162156
{
163157
const int val1 = 20;
@@ -278,6 +272,12 @@ TEST_CASE("sandbox glue tests " TestName, "[sandbox_glue_tests]")
278272
sandbox.free_in_sandbox(pa);
279273
}
280274

275+
tainted<char*, TestType> sb_string =
276+
sandbox.template malloc_in_sandbox<char>(upper_bound);
277+
// strcpy is safe here
278+
// NOLINTNEXTLINE(clang-analyzer-security.insecureAPI.strcpy)
279+
std::strcpy(sb_string.UNSAFE_unverified(), "Hello");
280+
281281
SECTION("test callback 1 and re-entrancy") // NOLINT
282282
{
283283
const unsigned cb_val_param = 4;

0 commit comments

Comments
 (0)