Loading init/test_upgrade_mte/mte_upgrade_test_helper.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -60,6 +60,10 @@ int main(int argc, char** argv) { if (prctl(PR_SET_TAGGED_ADDR_CTRL, res & ~PR_MTE_TCF_SYNC, 0, 0, 0) == -1) abort(); } std::unique_ptr<volatile char[]> f(new char[1]); // This out-of-bounds is on purpose: we are testing MTE, which is designed to turn // out-of-bound errors into segfaults. // This binary gets run by src/com/android/tests/init/MteUpgradeTest.java, which // asserts that it crashes as expected. f[17] = 'x'; char buf[1]; read(1, buf, 1); Loading Loading
init/test_upgrade_mte/mte_upgrade_test_helper.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -60,6 +60,10 @@ int main(int argc, char** argv) { if (prctl(PR_SET_TAGGED_ADDR_CTRL, res & ~PR_MTE_TCF_SYNC, 0, 0, 0) == -1) abort(); } std::unique_ptr<volatile char[]> f(new char[1]); // This out-of-bounds is on purpose: we are testing MTE, which is designed to turn // out-of-bound errors into segfaults. // This binary gets run by src/com/android/tests/init/MteUpgradeTest.java, which // asserts that it crashes as expected. f[17] = 'x'; char buf[1]; read(1, buf, 1); Loading