From: Jens Axboe Date: Mon, 27 May 2013 07:50:31 +0000 (+0200) Subject: Catch NULL td->o.ioengine X-Git-Tag: fio-2.1.1~8 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=6e5c4b8e46c95ca75e30e1110a0d24b2df9c47e9;p=fio.git Catch NULL td->o.ioengine This should not happen, except if there's a bug in the option parsing (or profile, see commit 774a99b5). But lets be cautious and catch it instead of seg faulting. Signed-off-by: Jens Axboe --- diff --git a/init.c b/init.c index c44fa671..70b56e38 100644 --- a/init.c +++ b/init.c @@ -749,6 +749,10 @@ int ioengine_load(struct thread_data *td) */ if (td->io_ops) return 0; + if (!td->o.ioengine) { + log_err("fio: internal fault, no IO engine specified\n"); + return 1; + } engine = get_engine_name(td->o.ioengine); td->io_ops = load_ioengine(td, engine);