From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Philipp Stephani Newsgroups: gmane.emacs.devel Subject: Re: JSON/YAML/TOML/etc. parsing performance Date: Mon, 18 Sep 2017 13:26:34 +0000 Message-ID: References: <87poaqhc63.fsf@lifelogs.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="001a113cddcea7ccd8055976b188" X-Trace: blaine.gmane.org 1505741234 1712 195.159.176.226 (18 Sep 2017 13:27:14 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 18 Sep 2017 13:27:14 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Sep 18 15:27:03 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dtw4g-0008G6-HR for ged-emacs-devel@m.gmane.org; Mon, 18 Sep 2017 15:26:59 +0200 Original-Received: from localhost ([::1]:36635 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dtw4n-00064r-Ga for ged-emacs-devel@m.gmane.org; Mon, 18 Sep 2017 09:27:05 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53388) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dtw4a-00062l-VG for emacs-devel@gnu.org; Mon, 18 Sep 2017 09:26:56 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dtw4U-0007sh-HU for emacs-devel@gnu.org; Mon, 18 Sep 2017 09:26:52 -0400 Original-Received: from mail-io0-x229.google.com ([2607:f8b0:4001:c06::229]:44357) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dtw4U-0007sU-6a for emacs-devel@gnu.org; Mon, 18 Sep 2017 09:26:46 -0400 Original-Received: by mail-io0-x229.google.com with SMTP id v36so2048550ioi.1 for ; Mon, 18 Sep 2017 06:26:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=t/9/CCqNsF8hZQ5hygfYACqnhowuf2zQuwAIbW8d4Qg=; b=W5nx1HIyuY7jeYCTU5Dv0uEYWGziSPO+c4zpFU8roT03sbkYBIR++7QlIQH2+S2sVv vg9JpgzwKf3CEhuMXn8T3MyRmRckp1kVoAkdczr/0Hc3F8V+ik36Yhb73Qn26UDz3OWh jjASOSbZQd+vG8TgxABvfxseqnWYDp8OJn1FDuSCCheLWSEniepZO+PywbIVEAYyuTfo 1XlWYVrU7pQa3umIrDWQbpgV7FBgim0FQ3ksC5Fg/yuKL4r1P1SSo/dkTP8jVIk2DCFq RgW3cv0t2LWFOThMriKvGVpY7/ilaCVaf6cH1a1+XjSH9XPe/ZgA0Iu+yVyKqfyy6W5O Uqfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=t/9/CCqNsF8hZQ5hygfYACqnhowuf2zQuwAIbW8d4Qg=; b=OeNHupGZbn9QNHAER9eT3E29esCE+AykQ3Oz8UIMJ4UwAW70rvZZQqOaRg1V9PMCYS u8PsLCylN7Zz692Y0VffOR7esWTQUZwdr0cSl5bWUC9khFUbFjkSIttxaluCSOuGfeFx 1xfsgNDjxHcK0pdhJyrEOCIHEh+hDudNXlYzJB4qx/Z6VjdW58iOR7vOdjbO/osNgHqK GpCmFAXgkbepI6K8tRt2Wm8B9HrPeB8uBSeQNLtsQFNokk7P5GrfE1BGn1kD+ae7AaBl +qdLJSf2JtlkBo3oZDT8hYj7W8w1KixDHrpaViDz62rfD4wqA7fAXizK3WkrZVfuswAq Egfg== X-Gm-Message-State: AHPjjUhWwvzaOqSP6/ncYsOfOjXDpY8vyI7zoseJyBSwVzGsUJ/nMb6Q NTpoiSMbPgve+NpytNW/4PmUvdqjOL7EBcEGH9zoBg== X-Google-Smtp-Source: AOwi7QDUGcqGCQZDJR3Lhlchq0vZ8O2bHSUGmVbmomMsGhPayGp1JS2sJNC060advzZlyDid/PYxIF7RB2ERtKBq1lc= X-Received: by 10.202.177.195 with SMTP id a186mr21745962oif.32.1505741205119; Mon, 18 Sep 2017 06:26:45 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4001:c06::229 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:218456 Archived-At: --001a113cddcea7ccd8055976b188 Content-Type: multipart/alternative; boundary="001a113cddcea7ccd3055976b186" --001a113cddcea7ccd3055976b186 Content-Type: text/plain; charset="UTF-8" Philipp Stephani schrieb am So., 17. Sep. 2017 um 20:46 Uhr: > Ted Zlatanov schrieb am Sa., 16. Sep. 2017 um > 17:55 Uhr: > >> I wanted to ask if there's any chance of improving the parsing >> performance of JSON, YAML, TOML, and similar data formats. It's pretty >> poor today. >> >> That could be done in the core with C code, improved Lisp code, >> integration with an external library, or a mix of those. >> > > I don't know much about the others, but given the importance of JSON as > data exchange and serialization format, I think it's worthwhile to invest > some time here. I've implemented a wrapper around the json-c library > (license: Expat/X11/MIT), resulting in significant speedups using the test > data from https://github.com/miloyip/nativejson-benchmark: a factor of > 3.9 to 6.4 for parsing, and a factor of 27 to 67 for serializing. If people > agree that this is useful I can send a patch. > I've discovered that the interface and documentation of Jansson are much better than the ones of json-c, so I switched to Jansson. I've attached a patch. --001a113cddcea7ccd3055976b186 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


Philip= p Stephani <p.stephani2@gmail.c= om> schrieb am So., 17. Sep. 2017 um 20:46=C2=A0Uhr:
Ted Zlatanov <tzz@lifelogs.com> schrieb am Sa., 16. Sep. 2017 um 17:55=C2= =A0Uhr:
I wanted to ask if there= 9;s any chance of improving the parsing
performance of JSON, YAML, TOML, and similar data formats. It's pretty<= br> poor today.

That could be done in the core with C code, improved Lisp code,
integration with an external library, or a mix of those.

I don't know much about the others, but given the importa= nce of JSON as data exchange and serialization format, I think it's wor= thwhile to invest some time here. I've implemented a wrapper around the= json-c library (license: Expat/X11/MIT), resulting in significant speedups= using the test data from https://github.com/miloyip/nativejson-benchmar= k: a factor of 3.9 to 6.4 for parsing, and a factor of 27 to 67 for ser= ializing. If people agree that this is useful I can send a patch.

I've discovered that the inter= face and documentation of Jansson are much better than the ones of json-c, = so I switched to Jansson. I've attached a patch.
--001a113cddcea7ccd3055976b186-- --001a113cddcea7ccd8055976b188 Content-Type: text/plain; charset="UTF-8"; name="0001-Implement-native-JSON-support-using-Jansson.txt" Content-Disposition: attachment; filename="0001-Implement-native-JSON-support-using-Jansson.txt" Content-Transfer-Encoding: base64 Content-ID: <15e952b1e581bd849ac1> X-Attachment-Id: 15e952b1e581bd849ac1 RnJvbSA2N2FkNGUyMmM1YTBiNWRjYzBkZWEyYWJkZWYzMmVlM2M2MzZmYWRlIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBQaGlsaXBwIFN0ZXBoYW5pIDxwaHN0QGdvb2dsZS5jb20+CkRh dGU6IE1vbiwgMTggU2VwIDIwMTcgMTA6NTE6MzkgKzAyMDAKU3ViamVjdDogW1BBVENIXSBJbXBs ZW1lbnQgbmF0aXZlIEpTT04gc3VwcG9ydCB1c2luZyBKYW5zc29uCgoqIGNvbmZpZ3VyZS5hYzog TmV3IG9wdGlvbiAtLXdpdGgtanNvbi4KCiogc3JjL2pzb24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I7IGRvCisgIFhXSURHRVRTIExJQlNZU1RFTUQgSlNPTiBD QU5OT1RfRFVNUCBMQ01TMjsgZG8KIAogICAgIGNhc2UgJG9wdCBpbgogICAgICAgQ0FOTk9UX0RV TVApIGV2YWwgdmFsPVwkeyRvcHR9IDs7CkBAIC01NDE4LDYgKzU0MzUsNyBAQCBBQ19ERUZVTgog ICBEb2VzIEVtYWNzIHVzZSAtbG90Zj8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICR7SEFWRV9MSUJPVEZ9CiAgIERvZXMgRW1hY3MgdXNlIC1seGZ0PyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgJHtIQVZFX1hGVH0KICAgRG9lcyBFbWFjcyB1c2UgLWxzeXN0ZW1k PyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAke0hBVkVfTElCU1lTVEVNRH0KKyAgRG9l cyBFbWFjcyB1c2UgLWxqYW5zc29vbj8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAke0hB VkVfSlNPTn0KICAgRG9lcyBFbWFjcyBkaXJlY3RseSB1c2UgemxpYj8gICAgICAgICAgICAgICAg ICAgICAgICAgICAke0hBVkVfWkxJQn0KICAgRG9lcyBFbWFjcyBoYXZlIGR5bmFtaWMgbW9kdWxl cyBzdXBwb3J0PyAgICAgICAgICAgICAgICAke0hBVkVfTU9EVUxFU30KICAgRG9lcyBFbWFjcyB1 c2UgdG9vbGtpdCBzY3JvbGwgYmFycz8gICAgICAgICAgICAgICAgICAgICAke1VTRV9UT09MS0lU X1NDUk9MTF9CQVJTfQpkaWZmIC0tZ2l0IGEvc3JjL01ha2VmaWxlLmluIGIvc3JjL01ha2VmaWxl LmluCmluZGV4IDBlNTVhZDRiYjIuLjRkMzM2ODI2MjkgMTAwNjQ0Ci0tLSBhL3NyYy9NYWtlZmls ZS5pbgorKysgYi9zcmMvTWFrZWZpbGUuaW4KQEAgLTMxMiw2ICszMTIsMTAgQEAgTElCR05VVExT X0NGTEF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W0gKGVycm9yLT5jb2x1bW4pLAor ICAgICAgICAgICAgICAgICAgbWFrZV9uYXRudW0gKGVycm9yLT5wb3NpdGlvbikpKTsKK30KKwor c3RhdGljIHZvaWQKK2pzb25fcmVsZWFzZV9vYmplY3QgKHZvaWQgKm9iamVjdCkKK3sKKyAganNv bl9kZWNyZWYgKG9iamVjdCk7Cit9CisKK3N0YXRpYyB2b2lkCitjaGVja19zdHJpbmdfd2l0aG91 dF9lbWJlZGRlZF9udWxscyAoTGlzcF9PYmplY3Qgb2JqZWN0KQoreworICBDSEVDS19TVFJJTkcg KG9iamVjdCk7CisgIENIRUNLX1RZUEUgKG1lbWNociAoU0RBVEEgKG9iamVjdCksICdcMCcsIFNC WVRFUyAob2JqZWN0KSkgPT0gTlVMTCwKKyAgICAgICAgICAgICAgUXN0cmluZ193aXRob3V0X2Vt YmVkZGVkX251bGxzX3AsIG9iamVjdCk7Cit9CisKK3N0YXRpYyBqc29uX3QgKgoranNvbl9jaGVj ayAoanNvbl90ICpvYmplY3QpCit7CisgIGlmIChvYmplY3QgPT0gTlVMTCkKKyAgICBqc29uX291 dF9vZl9tZW1vcnkgKCk7CisgIHJldHVybiBvYmplY3Q7Cit9CisKK3N0YXRpYyBqc29uX3QgKgor bGlzcF90b19qc29uIChMaXNwX09iamVjdCBsaXNwKQoreworICBpZiAoTklMUCAobGlzcCkpCisg ICAgcmV0dXJuIGpzb25fY2hlY2sgKGpzb25fbnVsbCAoKSk7CisgIGVsc2UgaWYgKEVRIChsaXNw LCBRQ2pzb25fZmFsc2UpKQorICAgIHJldHVybiBqc29uX2NoZWNrIChqc29uX2ZhbHNlICgpKTsK KyAgZWxzZSBpZiAoRVEgKGxpc3AsIFF0KSkKKyAgICByZXR1cm4ganNvbl9jaGVjayAoanNvbl90 cnVlICgpKTsKKyAgZWxzZSBpZiAoSU5URUdFUlAgKGxpc3ApKQorICAgIHsKKyAgICAgIENIRUNL X1RZUEVfUkFOR0VEX0lOVEVHRVIgKGpzb25faW50X3QsIGxpc3ApOworICAgICAgcmV0dXJuIGpz b25fY2hlY2sgKGpzb25faW50ZWdlciAoWElOVCAobGlzcCkpKTsKKyAgICB9CisgIGVsc2UgaWYg KEZMT0FUUCAobGlzcCkpCisgICAgcmV0dXJuIGpzb25fY2hlY2sgKGpzb25fcmVhbCAoWEZMT0FU X0RBVEEgKGxpc3ApKSk7CisgIGVsc2UgaWYgKFNUUklOR1AgKGxpc3ApKQorICAgIHsKKyAgICAg IHB0cmRpZmZfdCBzaXplID0gU0JZVEVTIChsaXNwKTsKKyAgICAgIGVhc3NlcnQgKHNpemUgPj0g MCk7CisgICAgICBpZiAoc2l6ZSA+IFNJWkVfTUFYKQorICAgICAgICB4c2lnbmFsMSAoUW92ZXJm bG93X2Vycm9yLCBidWlsZF9wdXJlX2Nfc3RyaW5nICgic3RyaW5nIGlzIHRvbyBsb25nIikpOwor ICAgICAgcmV0dXJuIGpzb25fY2hlY2sgKGpzb25fc3RyaW5nbiAoU1NEQVRBIChsaXNwKSwgc2l6 ZSkpOworICAgIH0KKyAgZWxzZSBpZiAoVkVDVE9SUCAobGlzcCkpCisgICAgeworICAgICAgaWYg KCsrbGlzcF9ldmFsX2RlcHRoID4gbWF4X2xpc3BfZXZhbF9kZXB0aCkKKyAgICAgICAgeHNpZ25h bDAgKFFqc29uX29iamVjdF90b29fZGVlcCk7CisgICAgICBwdHJkaWZmX3Qgc2l6ZSA9IEFTSVpF IChsaXNwKTsKKyAgICAgIGVhc3NlcnQgKHNpemUgPj0gMCk7CisgICAgICBpZiAoc2l6ZSA+IFNJ WkVfTUFYKQorICAgICAgICB4c2lnbmFsMSAoUW92ZXJmbG93X2Vycm9yLCBidWlsZF9wdXJlX2Nf c3RyaW5nICgidmVjdG9yIGlzIHRvbyBsb25nIikpOworICAgICAganNvbl90ICpqc29uID0ganNv bl9jaGVjayAoanNvbl9hcnJheSAoKSk7CisgICAgICBmb3IgKHB0cmRpZmZfdCBpID0gMDsgaSA8 IHNpemU7ICsraSkKKyAgICAgICAgeworICAgICAgICAgIGludCBzdGF0dXMKKyAgICAgICAgICAg ID0ganNvbl9hcnJheV9hcHBlbmRfbmV3IChqc29uLCBsaXNwX3RvX2pzb24gKEFSRUYgKGxpc3As IGkpKSk7CisgICAgICAgICAgaWYgKHN0YXR1cyA9PSAtMSkKKyAgICAgICAgICAgIGpzb25fb3V0 X29mX21lbW9yeSAoKTsKKyAgICAgICAgICBlYXNzZXJ0IChzdGF0dXMgPT0gMCk7CisgICAgICAg IH0KKyAgICAgIGVhc3NlcnQgKGpzb25fYXJyYXlfc2l6ZSAoanNvbikgPT0gc2l6ZSk7CisgICAg ICAtLWxpc3BfZXZhbF9kZXB0aDsKKyAgICAgIHJldHVybiBqc29uOworICAgIH0KKyAgZWxzZSBp ZiAoSEFTSF9UQUJMRV9QIChsaXNwKSkKKyAgICB7CisgICAgICBpZiAoKytsaXNwX2V2YWxfZGVw dGggPiBtYXhfbGlzcF9ldmFsX2RlcHRoKQorICAgICAgICB4c2lnbmFsMCAoUWpzb25fb2JqZWN0 X3Rvb19kZWVwKTsKKyAgICAgIGpzb25fdCoganNvbiA9IGpzb25fY2hlY2sgKGpzb25fb2JqZWN0 ICgpKTsKKyAgICAgIHN0cnVjdCBMaXNwX0hhc2hfVGFibGUgKmggPSBYSEFTSF9UQUJMRSAobGlz cCk7CisgICAgICBmb3IgKHB0cmRpZmZfdCBpID0gMDsgaSA8IEhBU0hfVEFCTEVfU0laRSAoaCk7 ICsraSkKKyAgICAgICAgaWYgKCFOSUxQIChIQVNIX0hBU0ggKGgsIGkpKSkKKyAgICAgICAgICB7 CisgICAgICAgICAgICBMaXNwX09iamVjdCBrZXkgPSBIQVNIX0tFWSAoaCwgaSk7CisgICAgICAg ICAgICAvKiBXZSBjYW7igJl0IHNwZWNpZnkgdGhlIGxlbmd0aCwgc28gdGhlIHN0cmluZyBtdXN0 IGJlCisgICAgICAgICAgICAgICBudWxsLXRlcm1pbmF0ZWQuICAqLworICAgICAgICAgICAgY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pzb25fdHlwZW9mIChqc29uKSkKKyAgICB7CisgICAgY2FzZSBKU09OX05VTEw6CisgICAgICBy ZXR1cm4gUW5pbDsKKyAgICBjYXNlIEpTT05fRkFMU0U6CisgICAgICByZXR1cm4gUUNqc29uX2Zh bHNlOworICAgIGNhc2UgSlNPTl9UUlVFOgorICAgICAgcmV0dXJuIFF0OworICAgIGNhc2UgSlNP Tl9JTlRFR0VSOgorICAgICAgeworICAgICAgICBqc29uX2ludF90IHZhbHVlID0ganNvbl9pbnRl Z2VyX3ZhbHVlIChqc29uKTsKKyAgICAgICAgaWYgKEZJWE5VTV9PVkVSRkxPV19QICh2YWx1ZSkp CisgICAgICAgICAgeHNpZ25hbDEgKFFvdmVyZmxvd19lcnJvciwKKyAgICAgICAgICAgICAgICAg ICAgYnVpbGRfcHVyZV9jX3N0cmluZyAoIkpTT04gaW50ZWdlciBpcyB0b28gbGFyZ2UiKSk7Cisg ICAgICAgIHJldHVybiBtYWtlX251bWJlciAodmFsdWUpOworICAgICAgfQorICAgIGNhc2UgSlNP Tl9SRUFMOgorICAgICAgcmV0dXJuIG1ha2VfZmxvYXQgKGpzb25fcmVhbF92YWx1ZSAoanNvbikp OworICAgIGNhc2UgSlNPTl9TVFJJTkc6CisgICAgICB7CisgICAgICAgIHNpemVfdCBzaXplID0g anNvbl9zdHJpbmdfbGVuZ3RoIChqc29uKTsKKyAgICAgICAgaWYgKEZJWE5VTV9PVkVSRkxPV19Q IChzaXplKSkKKyAgICAgICAgICB4c2lnbmFsMSAoUW92ZXJmbG93X2Vycm9yLAorICAgICAgICAg ICAgICAgICAgICBidWlsZF9wdXJlX2Nfc3RyaW5nICgiSlNPTiBzdHJpbmcgaXMgdG9vIGxvbmci KSk7CisgICAgICAgIHJldHVybiBtYWtlX3N0cmluZyAoanNvbl9zdHJpbmdfdmFsdWUgKGpzb24p LCBzaXplKTsKKyAgICAgIH0KKyAgICBjYXNlIEpTT05fQVJSQVk6CisgICAgICB7CisgICAgICAg IGlmICgrK2xpc3BfZXZhbF9kZXB0aCA+IG1heF9saXNwX2V2YWxfZGVwdGgpCisgICAgICAgICAg eHNpZ25hbDAgKFFqc29uX29iamVjdF90b29fZGVlcCk7CisgICAgICAgIHNpemVfdCBzaXplID0g anNvbl9hcnJheV9zaXplIChqc29uKTsKKyAgICAgICAgaWYgKEZJWE5VTV9PVkVSRkxPV19QIChz aXplKSkKKyAgICAgICAgICB4c2lnbmFsMSAoUW92ZXJmbG93X2Vycm9yLAorICAgICAgICAgICAg ICAgICAgICBidWlsZF9wdXJlX2Nfc3RyaW5nICgiSlNPTiBhcnJheSBpcyB0b28gbG9uZyIpKTsK KyAgICAgICAgTGlzcF9PYmplY3QgcmVzdWx0ID0gRm1ha2VfdmVjdG9yIChtYWtlX25hdG51bSAo c2l6ZSksIFF1bmJvdW5kKTsKKyAgICAgICAgZm9yIChwdHJkaWZmX3QgaSA9IDA7IGkgPCBzaXpl OyArK2kpCisgICAgICAgICAgQVNFVCAocmVzdWx0LCBpLAorICAgICAgICAgICAgICAgIGpzb25f dG9fbGlzcCAoanNvbl9hcnJheV9nZXQgKGpzb24sIGkpKSk7CisgICAgICAgIC0tbGlzcF9ldmFs X2RlcHRoOworICAgICAgICByZXR1cm4gcmVzdWx0OworICAgICAgfQorICAgIGNhc2UgSlNPTl9P QkpFQ1Q6CisgICAgICB7CisgICAgICAgIGlmICgrK2xpc3BfZXZhbF9kZXB0aCA+IG1heF9saXNw X2V2YWxfZGVwdGgpCisgICAgICAgICAgeHNpZ25hbDAgKFFqc29uX29iamVjdF90b29fZGVlcCk7 CisgICAgICAgIHNpemVfdCBzaXplID0ganNvbl9vYmplY3Rfc2l6ZSAoanNvbik7CisgICAgICAg IGlmIChGSVhOVU1fT1ZFUkZMT1dfUCAoc2l6ZSkpCisgICAgICAgICAgeHNpZ25hbDEgKFFvdmVy Zmxvd19lcnJvciwKKyAgICAgICAgICAgICAgICAgICAgYnVpbGRfcHVyZV9jX3N0cmluZyAoIkpT T04gb2JqZWN0IGhhcyB0b28gbWFueSBlbGVtZW50cyIpKTsKKyAgICAgICAgTGlzcF9PYmplY3Qg cmVzdWx0ID0gQ0FMTE4gKEZtYWtlX2hhc2hfdGFibGUsIFFDdGVzdCwgUWVxdWFsLAorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUUNzaXplLCBtYWtlX25hdG51bSAoc2l6ZSkp OworICAgICAgICBzdHJ1Y3QgTGlzcF9IYXNoX1RhYmxlICpoID0gWEhBU0hfVEFCTEUgKHJlc3Vs dCk7CisgICAgICAgIGNvbnN0IGNoYXIgKmtleV9zdHI7CisgICAgICAgIGpzb25fdCAqdmFsdWU7 CisgICAgICAgIGpzb25fb2JqZWN0X2ZvcmVhY2ggKGpzb24sIGtleV9zdHIsIHZhbHVlKQorICAg ICAgICAgIHsKKyAgICAgICAgICAgIExpc3BfT2JqZWN0IGtleSA9IGJ1aWxkX3N0cmluZyAoa2V5 X3N0cik7CisgICAgICAgICAgICBFTUFDU19VSU5UIGhhc2g7CisgICAgICAgICAgICBwdHJkaWZm X3QgaSA9IGhhc2hfbG9va3VwIChoLCBrZXksICZoYXNoKTsKKyAgICAgICAgICAgIGVhc3NlcnQg KGkgPCAwKTsKKyAgICAgICAgICAgIGhhc2hfcHV0IChoLCBrZXksIGpzb25fdG9fbGlzcCAodmFs dWUpLCBoYXNoKTsKKyAgICAgICAgICB9CisgICAgICAgIC0tbGlzcF9ldmFsX2RlcHRoOworICAg ICAgICByZXR1cm4gcmVzdWx0OworICAgICAgfQorICAgIH0KKyAgLyogQ2Fu4oCZdCBnZXQgaGVy ZS4gICovCisgIGVtYWNzX2Fib3J0ICgpOworfQorCitERUZVTiAoImpzb24tcGFyc2Utc3RyaW5n IiwgRmpzb25fcGFyc2Vfc3RyaW5nLCBTanNvbl9wYXJzZV9zdHJpbmcsIDEsIDEsIE5VTEwsCisg ICAgICAgZG9jOiAvKiBQYXJzZSB0aGUgSlNPTiBTVFJJTkcgaW50byBhIExpc3Agb2JqZW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WN0KTsKKworICByZXR1cm4gdW5iaW5kX3RvIChjb3VudCwganNvbl90b19saXNw IChvYmplY3QpKTsKK30KKworc3RydWN0IGpzb25fcmVhZF9idWZmZXJfZGF0YQoreworICBwdHJk aWZmX3QgcG9pbnQ7Cit9OworCitzdGF0aWMgc2l6ZV90Citqc29uX3JlYWRfYnVmZmVyX2NhbGxi YWNrICh2b2lkICpidWZmZXIsIHNpemVfdCBidWZsZW4sIHZvaWQgKmRhdGEpCit7CisgIHN0cnVj dCBqc29uX3JlYWRfYnVmZmVyX2RhdGEgKmQgPSBkYXRhOworCisgIC8qIEZpcnN0LCBwYXJzZSBm cm9tIHBvaW50IHRvIHRoZSBnYXAgb3IgdGhlIGVuZCBvZiB0aGUgYWNjZXNzaWJsZQorICAgICBw b3J0aW9uLCB3aGF0ZXZlciBpcyBjbG9zZXIuICAqLworICBwdHJkaWZmX3QgcG9pbnQgPSBkLT5w b2ludDsKKyAgcHRyZGlmZl90IGVuZDsKKyAgeworICAgIGJvb2wgb3ZlcmZsb3cgPSBJTlRfQURE X1dSQVBWIChCVUZGRVJfQ0VJTElOR19PRiAocG9pbnQpLCAxLCAmZW5kKTsKKyAgICBlYXNzZXJ0 ICghb3ZlcmZsb3cpOworICB9CisgIHNpemVfdCBjb3VudDsKKyAgeworICAgIGJvb2wgb3ZlcmZs b3cgPSBJTlRfU1VCVFJBQ1RfV1JBUFYgKGVuZCwgcG9pbnQsICZjb3VudCk7CisgICAgZWFzc2Vy dCAoIW92ZXJmbG93KTsKKyAgfQorICBpZiAoYnVmbGVuIDwgY291bnQpCisgICAgY291bnQgPSBi dWZsZW47CisgIG1lbWNweSAoYnVmZmVyLCBCWVRFX1BPU19BRERSIChwb2ludCksIGNvdW50KTsK KyAgeworICAgIGJvb2wgb3ZlcmZsb3cgPSBJTlRfQUREX1dSQVBWIChkLT5wb2ludCwgY291bnQs ICZkLT5wb2ludCk7CisgICAgZWFzc2VydCAoIW92ZXJmbG93KTsKKyAgfQorICByZXR1c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uLXNlcmlhbGl6ZSBsaXNwKSBqc29uKSkKKyAgICAod2l0aC10ZW1wLWJ1ZmZl cgorICAgICAgKGpzb24taW5zZXJ0IGxpc3ApCisgICAgICAoc2hvdWxkIChlcXVhbCAoYnVmZmVy LXN0cmluZykganNvbikpCisgICAgICAoc2hvdWxkIChlb2JwKSkpCisgICAgKHNob3VsZCAoZXF1 YWwgKGpzb24tcGFyc2Utc3RyaW5nIGpzb24pIGxpc3ApKQorICAgICh3aXRoLXRlbXAtYnVmZmVy CisgICAgICAoaW5zZXJ0IGpzb24pCisgICAgICAoZ290by1jaGFyIDEpCisgICAgICAoc2hvdWxk IChlcXVhbCAoanNvbi1wYXJzZS1idWZmZXIpIGxpc3ApKQorICAgICAgKHNob3VsZCAoZW9icCkp KSkpCisKKyhlcnQtZGVmdGVzdCBqc29uLXNlcmlhbGl6ZS9vYmplY3QgKCkKKyAgKGxldCAoKHRh YmxlIChtYWtlLWhhc2gtdGFibGUgOnRlc3QgIydlcXVhbCkpKQorICAgIChwdXRoYXNoICJhYmMi IFsxIDIgdF0gdGFibGUpCisgICAgKHB1dGhhc2ggImRlZiIgbmlsIHRhYmxlKQorICAgIChzaG91 bGQgKGVxdWFsIChqc29uLXNlcmlhbGl6ZSB0YWJsZSkKKyAgICAgICAgICAgICAgICAgICAie1wi YWJjXCI6WzEsMix0cnVlXSxcImRlZlwiOm51bGx9IikpKSkKKworKGVydC1kZWZ0ZXN0IGpzb24t cGFyc2Utc3RyaW5nL29iamVjdCAoKQorICAobGV0ICgoYWN0dWFsCisgICAgICAgICAoanNvbi1w YXJzZS1zdHJpbmcKKyAgICAgICAgICAieyBcImFiY1wiIDogWzEsIDIsIHRydWVdLCBcImRlZlwi IDogbnVsbCwgXCJhYmNcIiA6IFs5LCBmYWxzZV0gfVxuIikpKQorICAgIChzaG91bGQgKGhhc2gt dGFibGUtcCBhY3R1YWwpKQorICAgIChzaG91bGQgKGVxdWFsIChoYXNoLXRhYmxlLWNvdW50IGFj dHVhbCkgMikpCisgICAgKHNob3VsZCAoZXF1YWwgKGNsLXNvcnQgKG1hcC1wYWlycyBhY3R1YWwp ICMnc3RyaW5nPCA6a2V5ICMnY2FyKQorICAgICAgICAgICAgICAgICAgICcoKCJhYmMiIC4gWzkg Ompzb24tZmFsc2VdKSAoImRlZiIpKSkpKSkKKworKHByb3ZpZGUgJ2pzb24tdGVzdHMpCis7Ozsg anNvbi10ZXN0cy5lbCBlbmRzIGhlcmUKLS0gCjIuMTQuMQoK --001a113cddcea7ccd8055976b188--