From 6e5c4b8e46c95ca75e30e1110a0d24b2df9c47e9 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Mon, 27 May 2013 09:50:31 +0200 Subject: [PATCH] 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 --- init.c | 4 ++++ 1 file changed, 4 insertions(+) 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); -- 2.25.1