diff options
author | tnn <tnn> | 2010-10-01 08:32:35 +0000 |
---|---|---|
committer | tnn <tnn> | 2010-10-01 08:32:35 +0000 |
commit | 72addbd2e433a874ab15293ebaf535bd4f7219fc (patch) | |
tree | 0a26ca95f2c934e724b3d7fef67604abeb1231ae /emulators/qemu/patches | |
parent | 84da7509f20757cec702a8f8e80c25535aab2c14 (diff) | |
download | pkgsrc-72addbd2e433a874ab15293ebaf535bd4f7219fc.tar.gz |
Rework 2MB stack allocation in qemu-img which causes SEGV with our
default process limits. Bump PKGREVISION.
Diffstat (limited to 'emulators/qemu/patches')
-rw-r--r-- | emulators/qemu/patches/patch-ab | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/emulators/qemu/patches/patch-ab b/emulators/qemu/patches/patch-ab new file mode 100644 index 00000000000..65de1fa0c56 --- /dev/null +++ b/emulators/qemu/patches/patch-ab @@ -0,0 +1,32 @@ +$NetBSD: patch-ab,v 1.13 2010/10/01 08:32:35 tnn Exp $ + +Rework 2MB stack allocation in qemu-img which causes SEGV with our +default process limits. + +--- qemu-img.c.orig 2010-05-04 15:27:48.000000000 +0000 ++++ qemu-img.c +@@ -537,12 +537,15 @@ static int img_convert(int argc, char ** + BlockDriverState **bs, *out_bs; + int64_t total_sectors, nb_sectors, sector_num, bs_offset; + uint64_t bs_sectors; +- uint8_t buf[IO_BUF_SIZE]; ++ uint8_t *buf; + const uint8_t *buf1; + BlockDriverInfo bdi; + QEMUOptionParameter *param = NULL; + char *options = NULL; + ++ buf = malloc(IO_BUF_SIZE); ++ if (!buf) ++ error("out of memory"); + fmt = NULL; + out_fmt = "raw"; + out_baseimg = NULL; +@@ -792,6 +795,7 @@ static int img_convert(int argc, char ** + for (bs_i = 0; bs_i < bs_n; bs_i++) + bdrv_delete(bs[bs_i]); + free(bs); ++ free(buf); + return 0; + } + |