[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v4 17/20] fuzz: add support for qos-assisted fuzz targets
From: |
Stefan Hajnoczi |
Subject: |
Re: [PATCH v4 17/20] fuzz: add support for qos-assisted fuzz targets |
Date: |
Thu, 7 Nov 2019 14:22:59 +0100 |
User-agent: |
Mutt/1.12.1 (2019-06-15) |
On Wed, Oct 30, 2019 at 02:50:02PM +0000, Oleinik, Alexander wrote:
> +static char *qos_build_main_args()
Please use func(void) in C. In C () functions have unspecified and
unchecked arguments whereas in C++ () means (void). We want the
compiler to complain if arguments are passed to this function, so it
needs to be (void).
> +{
> + char **path = fuzz_path_vec;
> + QOSGraphNode *test_node;
> + GString *cmd_line = g_string_new(path[0]);
> + void *test_arg;
> +
> + /* Before test */
> + current_path = path;
> + test_node = qos_graph_get_node(path[(g_strv_length(path) - 1)]);
> + test_arg = test_node->u.test.arg;
> + if (test_node->u.test.before) {
> + test_arg = test_node->u.test.before(cmd_line, test_arg);
> + }
> + /* Prepend the arguments that we need */
> + g_string_prepend(cmd_line,
> + "qemu-system-i386 -display none -machine accel=qtest -m 64 ");
Does i386 need to be hardcoded? An earlier patch declared a fuzz_arch
or similar variable (from TARGET_NAME).
signature.asc
Description: PGP signature
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [PATCH v4 17/20] fuzz: add support for qos-assisted fuzz targets,
Stefan Hajnoczi <=