* [PATCH] Fix bug in bssplit parsing
@ 2009-10-14 22:15 Kenneth Waters
2009-10-15 5:15 ` Jens Axboe
0 siblings, 1 reply; 2+ messages in thread
From: Kenneth Waters @ 2009-10-14 22:15 UTC (permalink / raw)
To: fio
Fio,
I found a bug is bssplit parsing in bssplit_ddir() when trying to use
FIO on an ARM platform. It looks like str_to_decimal() takes a "void
*" as its fourth argument, which it passes to get_multi_bytes(), which
is passes to fio_get_kb_base(), which casts it to a "struct
thread_data *". bssplit_ddir() is passing in "struct thread_data **",
which I think is causing fio_get_kb_base() to go paw around in the
stack; I believe the different stack layouts between ARM and x86 is
causing me to see this problem. The first change that introduces this
bug seems to be d6978a3242daad9cb7b0710b724f19225d1ed7e2.
Kenneth Waters
I apologize if this patch is in the wrong format.
---
options.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/options.c b/options.c
index 549775c..b5abd74 100644
--- a/options.c
+++ b/options.c
@@ -82,7 +82,7 @@ static int bssplit_ddir(struct thread_data *td, int
ddir, char *str)
} else
perc = -1;
- if (str_to_decimal(fname, &val, 1, &td)) {
+ if (str_to_decimal(fname, &val, 1, td)) {
log_err("fio: bssplit conversion failed\n");
free(td->o.bssplit);
return 1;
--
1.6.5
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] Fix bug in bssplit parsing
2009-10-14 22:15 [PATCH] Fix bug in bssplit parsing Kenneth Waters
@ 2009-10-15 5:15 ` Jens Axboe
0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2009-10-15 5:15 UTC (permalink / raw)
To: Kenneth Waters; +Cc: fio
On Wed, Oct 14 2009, Kenneth Waters wrote:
> Fio,
>
> I found a bug is bssplit parsing in bssplit_ddir() when trying to use
> FIO on an ARM platform. It looks like str_to_decimal() takes a "void
> *" as its fourth argument, which it passes to get_multi_bytes(), which
> is passes to fio_get_kb_base(), which casts it to a "struct
> thread_data *". bssplit_ddir() is passing in "struct thread_data **",
> which I think is causing fio_get_kb_base() to go paw around in the
> stack; I believe the different stack layouts between ARM and x86 is
> causing me to see this problem. The first change that introduces this
> bug seems to be d6978a3242daad9cb7b0710b724f19225d1ed7e2.
Woops indeed, good catch! I have applied your patch. Thanks a lot.
> I apologize if this patch is in the wrong format.
It was line wrapped, but not a big deal to correct for a one-liner
patch.
--
Jens Axboe
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-10-15 5:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-14 22:15 [PATCH] Fix bug in bssplit parsing Kenneth Waters
2009-10-15 5:15 ` Jens Axboe
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.