2021-08-04 09:51:50 +03:00
|
|
|
/*
|
|
|
|
* QTest fuzzer-generated testcase for xlnx-dp display device
|
|
|
|
*
|
|
|
|
* Copyright (c) 2021 Qiang Liu <cyruscyliu@gmail.com>
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "qemu/osdep.h"
|
2022-03-30 12:39:05 +03:00
|
|
|
#include "libqtest.h"
|
2021-08-04 09:51:50 +03:00
|
|
|
|
|
|
|
/*
|
|
|
|
* This used to trigger the out-of-bounds read in xlnx_dp_read
|
|
|
|
*/
|
|
|
|
static void test_fuzz_xlnx_dp_0x3ac(void)
|
|
|
|
{
|
2022-09-02 19:51:19 +03:00
|
|
|
QTestState *s = qtest_init("-M xlnx-zcu102 ");
|
2021-08-04 09:51:50 +03:00
|
|
|
qtest_readl(s, 0xfd4a03ac);
|
|
|
|
qtest_quit(s);
|
|
|
|
}
|
|
|
|
|
|
|
|
int main(int argc, char **argv)
|
|
|
|
{
|
|
|
|
const char *arch = qtest_get_arch();
|
|
|
|
|
|
|
|
g_test_init(&argc, &argv, NULL);
|
|
|
|
|
|
|
|
if (strcmp(arch, "aarch64") == 0) {
|
|
|
|
qtest_add_func("fuzz/test_fuzz_xlnx_dp/3ac", test_fuzz_xlnx_dp_0x3ac);
|
|
|
|
}
|
|
|
|
|
|
|
|
return g_test_run();
|
|
|
|
}
|