Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 745c351b authored by Jordan R Abrahams-Whitehead's avatar Jordan R Abrahams-Whitehead
Browse files

vts: Upsize 8bit uniform_int_distribution

uniform_int_distribution<a> for types sizeof(a) < 2 are
not valid by the C++ library standard. Newer versions of LLVM
(particularly spurred on by ChromeOS toolchain changes)
require at least std::uniform_int_distribution<uint16_t>.

This is a required change for rolling LLVM to r458507.
This is necessary, but may not be sufficient to resolve
the issue.

Bug: 231351802
Test: mma
Change-Id: I04c3cc91507f3467c432b9a25effdac3f5fb56f3
parent 7fc26b99
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1262,7 +1262,7 @@ class CompilationCachingSecurityTest
        FILE* pFile = fopen(filename.c_str(), "a");
        uint32_t appendLength = getRandomInt(1, 256);
        for (uint32_t i = 0; i < appendLength; i++) {
            ASSERT_NE(fputc(getRandomInt<uint8_t>(0, 255), pFile), EOF);
            ASSERT_NE(fputc(getRandomInt<uint16_t>(0, 255), pFile), EOF);
        }
        fclose(pFile);
        *skip = false;
+1 −1
Original line number Diff line number Diff line
@@ -1253,7 +1253,7 @@ class CompilationCachingSecurityTest
        FILE* pFile = fopen(filename.c_str(), "a");
        uint32_t appendLength = getRandomInt(1, 256);
        for (uint32_t i = 0; i < appendLength; i++) {
            ASSERT_NE(fputc(getRandomInt<uint8_t>(0, 255), pFile), EOF);
            ASSERT_NE(fputc(getRandomInt<uint16_t>(0, 255), pFile), EOF);
        }
        fclose(pFile);
        *skip = false;
+1 −1
Original line number Diff line number Diff line
@@ -1068,7 +1068,7 @@ class CompilationCachingSecurityTest
        FILE* pFile = fopen(filename.c_str(), "a");
        uint32_t appendLength = getRandomInt(1, 256);
        for (uint32_t i = 0; i < appendLength; i++) {
            ASSERT_NE(fputc(getRandomInt<uint8_t>(0, 255), pFile), EOF);
            ASSERT_NE(fputc(getRandomInt<uint16_t>(0, 255), pFile), EOF);
        }
        fclose(pFile);
        *skip = false;