Index: lib/scudo/standalone/tests/combined_test.cpp =================================================================== --- lib/scudo/standalone/tests/combined_test.cpp +++ lib/scudo/standalone/tests/combined_test.cpp @@ -101,7 +101,7 @@ // returns the same chunk. This requires that all the sizes we iterate on use // the same block size, but that should be the case for 2048 with our default // class size maps. - P = Allocator->allocate(DataSize, Origin); + P = Allocator->allocate(DataSize, Origin); memset(P, Marker, DataSize); for (scudo::sptr Delta = -32; Delta < 32; Delta += 8) { const scudo::uptr NewSize = DataSize + Delta; Index: lib/scudo/standalone/tests/wrappers_c_test.cpp =================================================================== --- lib/scudo/standalone/tests/wrappers_c_test.cpp +++ lib/scudo/standalone/tests/wrappers_c_test.cpp @@ -281,3 +281,15 @@ free(P); } + +TEST(ScudoWrappersCTest, MallocInfo) { + char Buffer[64]; + FILE *F = fmemopen(Buffer, sizeof(Buffer), "w+"); + EXPECT_NE(F, nullptr); + errno = 0; + EXPECT_EQ(malloc_info(0, F), 0); + EXPECT_EQ(errno, 0); + fflush(F); + EXPECT_EQ(strncmp(Buffer, "", stream); + fputs("", stream); + return 0; }