pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/emulators/qemu Rework 2MB stack allocation in qemu-img...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/3cda0fadbb67
branches:  trunk
changeset: 581292:3cda0fadbb67
user:      tnn <tnn%pkgsrc.org@localhost>
date:      Fri Oct 01 08:32:35 2010 +0000

description:
Rework 2MB stack allocation in qemu-img which causes SEGV with our
default process limits. Bump PKGREVISION.

diffstat:

 emulators/qemu/Makefile         |   3 ++-
 emulators/qemu/distinfo         |   3 ++-
 emulators/qemu/patches/patch-ab |  32 ++++++++++++++++++++++++++++++++
 3 files changed, 36 insertions(+), 2 deletions(-)

diffs (64 lines):

diff -r e9a5e95456d5 -r 3cda0fadbb67 emulators/qemu/Makefile
--- a/emulators/qemu/Makefile   Thu Sep 30 18:30:20 2010 +0000
+++ b/emulators/qemu/Makefile   Fri Oct 01 08:32:35 2010 +0000
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.72 2010/08/09 20:56:32 tsutsui Exp $
+# $NetBSD: Makefile,v 1.73 2010/10/01 08:32:35 tnn Exp $
 #
 
 DISTNAME=              qemu-0.12.4
+PKGREVISION=           1
 CATEGORIES=            emulators
 MASTER_SITES=          http://download.savannah.gnu.org/releases/qemu/
 
diff -r e9a5e95456d5 -r 3cda0fadbb67 emulators/qemu/distinfo
--- a/emulators/qemu/distinfo   Thu Sep 30 18:30:20 2010 +0000
+++ b/emulators/qemu/distinfo   Fri Oct 01 08:32:35 2010 +0000
@@ -1,9 +1,10 @@
-$NetBSD: distinfo,v 1.58 2010/08/11 17:05:13 tsutsui Exp $
+$NetBSD: distinfo,v 1.59 2010/10/01 08:32:35 tnn Exp $
 
 SHA1 (qemu-0.12.4.tar.gz) = 1cc3200bf496c836f7c4256c1d12143dab9b82dc
 RMD160 (qemu-0.12.4.tar.gz) = dbf5e02812b0df076e4ec8c20b7c382f7507645e
 Size (qemu-0.12.4.tar.gz) = 4697077 bytes
 SHA1 (patch-aa) = df7561fa16c1b12b973557a6e9a13e82bc64df89
+SHA1 (patch-ab) = 5b19489e36022537488cca8944448ad65914a67d
 SHA1 (patch-ao) = e515093b6ea99f9cba665de022fd62f3be911569
 SHA1 (patch-ba) = f317a580e849aa368f904137d4fb7ce44701a231
 SHA1 (patch-dd) = 32661203ba023bea67cd7cde1f4088f4d0e5c582
diff -r e9a5e95456d5 -r 3cda0fadbb67 emulators/qemu/patches/patch-ab
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/qemu/patches/patch-ab   Fri Oct 01 08:32:35 2010 +0000
@@ -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;
+ }
+ 



Home | Main Index | Thread Index | Old Index