From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.groups.io with SMTP id smtpd.web12.7408.1605783256575953154 for ; Thu, 19 Nov 2020 02:54:16 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ctvhBW9G; spf=pass (domain: redhat.com, ip: 216.205.24.124, mailfrom: lersek@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1605783255; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=iSTHe46VY5c6hg/KJI+WyzbTfQ6ffgnW3QWRCmI67AU=; b=ctvhBW9GWRGqQXASgWT3V4XeCIrw+/iGGkquBsBACfROwqhJprMB/bZl5yqeuXvDYKieJY O2v7edaK080n9OnJhvY60zZGsKilkD79Fya4tkjDqOGtFKIff8x5M/abituAZBaIsEKoyU Ls7ntT4iu4fjlAKEGIp4jFblBnJ3FdA= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-229-VqiBesbeOqKGMt4FlttCcg-1; Thu, 19 Nov 2020 05:54:11 -0500 X-MC-Unique: VqiBesbeOqKGMt4FlttCcg-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 48E4D100739B; Thu, 19 Nov 2020 10:53:45 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-112-236.ams2.redhat.com [10.36.112.236]) by smtp.corp.redhat.com (Postfix) with ESMTP id BB4B160636; Thu, 19 Nov 2020 10:53:43 +0000 (UTC) From: "Laszlo Ersek" To: edk2-devel-groups-io Cc: Dandan Bi , Hao A Wu , Jian J Wang , Liming Gao , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v2 RESEND 1/2] MdeModulePkg/Core/Dxe: assert SectionInstance invariant in FindChildNode() Date: Thu, 19 Nov 2020 11:53:39 +0100 Message-Id: <20201119105340.16225-2-lersek@redhat.com> In-Reply-To: <20201119105340.16225-1-lersek@redhat.com> References: <20201119105340.16225-1-lersek@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=lersek@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: base64 RmluZENoaWxkTm9kZSgpIGhhcyB0d28gY2FsbGVyczogR2V0U2VjdGlvbigpLCBhbmQgRmluZENo aWxkTm9kZSgpIGl0c2VsZi4KCi0gQXQgdGhlIEdldFNlY3Rpb24oKSBjYWxsIHNpdGUsIGEgcG9z aXRpdmUgKGkuZS4sIG5vbnplcm8pCiAgU2VjdGlvbkluc3RhbmNlIGlzIHBhc3NlZC4gVGhpcyBp cyBiZWNhdXNlIEdldFNlY3Rpb24oKSB0YWtlcyBhCiAgemVyby1iYXNlZCAoVUlOVE4pIFNlY3Rp b25JbnN0YW5jZSwgYW5kIHRoZW4gcGFzc2VzCiAgSW5zdGFuY2U9KFNlY3Rpb25JbnN0YW5jZSsx KSB0byBGaW5kQ2hpbGROb2RlKCkuCgotIEZvciByZWFjaGluZyB0aGUgcmVjdXJzaXZlIEZpbmRD aGlsZE5vZGUoKSBjYWxsIHNpdGUsIGEgc2VjdGlvbiB0eXBlCiAgbWlzbWF0Y2gsIG9yIGEgc2Vj dGlvbiBpbnN0YW5jZSBtaXNtYXRjaCwgaXMgbmVjZXNzYXJ5LiBUaGlzIG1lYW5zLAogIHJlc3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