From patchwork Mon Oct 28 18:22:15 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oleksandr Grytsov X-Patchwork-Id: 11216271 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8106D913 for ; Mon, 28 Oct 2019 18:24:00 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5BD3A214B2 for ; Mon, 28 Oct 2019 18:24:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="hwB4OZR5" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5BD3A214B2 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iP9ew-0000lP-26; Mon, 28 Oct 2019 18:22:30 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iP9eu-0000lK-Nr for xen-devel@lists.xenproject.org; Mon, 28 Oct 2019 18:22:28 +0000 X-Inumbo-ID: e5435d12-f9af-11e9-a531-bc764e2007e4 Received: from mail-lf1-x12d.google.com (unknown [2a00:1450:4864:20::12d]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id e5435d12-f9af-11e9-a531-bc764e2007e4; Mon, 28 Oct 2019 18:22:27 +0000 (UTC) Received: by mail-lf1-x12d.google.com with SMTP id b20so8553613lfp.4 for ; Mon, 28 Oct 2019 11:22:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=AmXxX3VgioA77BuFL1MgA9bHl37lAvOM/aNAudeiASw=; b=hwB4OZR56vS4x7Sg1cUWQQWvxVL95MQoRaEUqjL+OssYycbKi0EvPTc0MHCo+XqwQb iSD+wRWG74XcVC/rKqLPbtlCoqAhxOizPokQCj80Ksd2xCgiv6Bi5rUv0+8z6TDnIWPG ivLKvx+pHt8UJMj8lMSdUfnbC4EjWUFOomxk+fcQzXsKOl+wwX3qJ4IlAHIGLZBPvHQa zB+3UE0lpBnZnyLx7I1l4KtTPjkKh1EkwhVF3RgikPkkZZ+MmaStHhwk38ljhdjUPmUE DtMgMtcFg33YEcMXjIfK7u0SlTXUNyLh2BMFCUfjHCOJVzaqChUde8Shr6gnAT6DjL68 o5nA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=AmXxX3VgioA77BuFL1MgA9bHl37lAvOM/aNAudeiASw=; b=HazSv3wA+00QdGQLLvUsA5613KhK91N6z6MlVni+moG/DIVemFChkka2yfG6Dzgj+f JVAFbLS2cSGMACXCYESHauMmhwrY/2jUn9XC/FQc/6uC+w36t1kweyo4vLezrsoHXXvo 75NbYlR24KdIQzU5OyXXtmJ/n01NYPfK6dlIh8aQlTSJgkOVJYMeSnTqV4YyRexcx3fN rxqTLBveEUx54LNerKZnKAQbXop4HbFdfUG5nIdaEDI9fDKXoh8eeM7XlBR2n4QSQqwI /yng/ARu7ctrD0nnUrW6F3luI64At3vMWStnV2MvHTcpIQNSJba12PJWJGWR0zTHOqeP oM0w== X-Gm-Message-State: APjAAAWp3k7H9iohZUW8jhfUbwrWL14UQyDv8oxvZdiGufK4KRa8kJau xolgw4zu0yjQGZN/xEuX/1GSzZ/kjVbMSw== X-Google-Smtp-Source: APXvYqyNi5Vo49hRob1Gv4Cd9hlbe/gZAmpmVtLHWaCozRqGDmGueburTNPnn/jqwSdfg0wZwpMnmQ== X-Received: by 2002:a19:f018:: with SMTP id p24mr12021909lfc.93.1572286946283; Mon, 28 Oct 2019 11:22:26 -0700 (PDT) Received: from al1-pc.kyiv.epam.com (ll-74.141.223.85.sovam.net.ua. [85.223.141.74]) by smtp.gmail.com with ESMTPSA id p86sm7474522lja.100.2019.10.28.11.22.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Oct 2019 11:22:25 -0700 (PDT) From: Oleksandr Grytsov To: xen-devel@lists.xenproject.org Date: Mon, 28 Oct 2019 20:22:15 +0200 Message-Id: <20191028182216.3882-1-al1img@gmail.com> X-Mailer: git-send-email 2.17.1 Subject: [Xen-devel] [PATCH v1 0/1] libxl/gentypes: add range init to array elements in json parsing X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: anthony.perard@citrix.com, Oleksandr Grytsov , julien.grall@arm.com, ian.jackson@eu.citrix.com, wl@xen.org MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" From: Oleksandr Grytsov There are two old threads in which this issues was addresses ([1], [2]) but the root cause wasn't defined. The real root cause is that when libxl creates json file it doesn't put entries for fields with default value (which is correct). Then during parsing json back to data, array elements are initialized by zero in all cases. But they should be initialized to default value (if it is not equals to zero). [1] https://marc.info/?l=xen-devel&m=151378727210130&w=2 [2] https://marc.info/?l=xen-devel&m=157071551925734&w=2 Oleksandr Grytsov (1): libxl/gentypes: add range init to array elements in json parsing tools/libxl/gentypes.py | 2 ++ 1 file changed, 2 insertions(+)