From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29303 invoked by alias); 6 Aug 2008 12:14:06 -0000 Received: (qmail 29287 invoked by uid 22791); 6 Aug 2008 12:14:03 -0000 X-Spam-Status: No, hits=0.7 required=5.0 tests=AWL,BAYES_40,J_CHICKENPOX_13,J_CHICKENPOX_54,J_CHICKENPOX_63,J_CHICKENPOX_66,J_CHICKENPOX_83 X-Spam-Check-By: sourceware.org Received: from mikrom.com (HELO mail.mikrom.com) (62.75.218.126) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 06 Aug 2008 12:13:26 +0000 Received: from mikrom.com (s1.mikrom.local [192.168.0.241]) by mail.mikrom.com (Postfix) with ESMTP id 04A5013E6D for ; Wed, 6 Aug 2008 14:13:15 +0200 (CEST) Received: from [192.168.0.185] (unknown [192.168.0.185]) by mikrom.com (Postfix) with ESMTP id C367DE78C2 for ; Wed, 6 Aug 2008 14:13:13 +0200 (CEST) Message-ID: <4899955A.2060905@mikrom.de> Date: Wed, 06 Aug 2008 12:14:00 -0000 From: Stefan Sommerfeld Organization: MikroM GmbH User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: ecos-devel@ecos.sourceware.org Subject: [Fwd: Memory leak and error checker] Content-Type: multipart/mixed; boundary="------------000805070603000503000708" X-Virus-Checked: Checked by ClamAV on sourceware.org Mailing-List: contact ecos-devel-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: ecos-devel-owner@ecos.sourceware.org X-SW-Source: 2008-08/txt/msg00000.txt.bz2 This is a multi-part message in MIME format. --------------000805070603000503000708 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-length: 826 Hello eCos programmers, I've done a memory leak checker and memory error detector for Doug Lea's malloc implementation. It can check the memory at the boundaries of a block and can be used to search for memory leaks. Special functions: #include cygmem_memalloc_heaps[0]->snapShotMemory(); Increase the usage count of all memory blocks to take a snapshot of the current memory. cygmem_memalloc_heaps[0]->dumpMemory(trigger); Dump current memory with a usage count lower than the trigger value. For example after a snapShotMemory(), dumpMemory(1) will output all newly allocated blocks. Of course the code need some beautifing and the malloc address search isn't that nice. Would be nice if some one could give it a try... BTW: I call it MungWall to remind good old Amiga days. Bye... --------------000805070603000503000708 Content-Type: text/plain; name="mungwall.patch" Content-Transfer-Encoding: base64 Content-Disposition: inline; filename="mungwall.patch" Content-length: 19289 SW5kZXg6IENoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09ClJDUyBm aWxlOiAvY3ZzL2Vjb3MvZWNvcy9wYWNrYWdlcy9zZXJ2aWNlcy9tZW1hbGxv Yy9jb21tb24vY3VycmVudC9DaGFuZ2VMb2csdgpyZXRyaWV2aW5nIHJldmlz aW9uIDEuMzkKZGlmZiAtdSAtOCAtcCAtcjEuMzkgQ2hhbmdlTG9nCi0tLSBD aGFuZ2VMb2cJMTcgTWF5IDIwMDYgMTY6MTQ6MDIgLTAwMDAJMS4zOQorKysg Q2hhbmdlTG9nCTUgQXVnIDIwMDggMTI6NTg6MjUgLTAwMDAKQEAgLTEsOCAr MSwxNCBAQAorMjAwOC0wOC0wNSAgU3RlZmFuIFNvbW1lcmZlbGQgIDx6ZXJv Y29tQHdlYi5kZT4KKworCSogY2RsL21lbWFsbG9jLmNkbDogQWRkZWQgTXVu Z1dhbGwgTWVtb3J5IExlYWsvRXJyb3IgZGV0ZWN0b3IKKwkqIGluY2x1ZGUv ZGxtYWxsb2MuaHh4OiBBZGRlZCBNdW5nV2FsbCBzdXBwb3J0CisJKiB0ZXN0 cy9tdW5nd2FsbC5jeHg6IE11bmdXYWxsIHRlc3QKKwogMjAwNi0wNS0xNyAg QW5kcmV3IEx1bm4gIDxhbmRyZXcubHVubkBhc2NvbS5jaD4KIAogCSogZG9j L21lbWFsbG9jLnNnbWw6IEZpeCBwYXJhbWV0ZXJ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bmcg bGFyZ2UgbWluaW51bSBhbGlnbm1lbnRzIGNhbiBsZWFkCiAgICAgICAgICAg ICAgICAgICAgIHRvIGV4Y2Vzc2l2ZSBtZW1vcnkgd2FzdGFnZS4iCiAgICAg ICAgICAgIH0KKworICAgICAgICAgICBjZGxfb3B0aW9uIENZR0lNUF9NRU1B TExPQ19BTExPQ0FUT1JfRExNQUxMT0NfTVVOR1dBTEwgeworICAgICAgICAg ICAgICAgIGRpc3BsYXkgICAgICAgIk11bmdXYWxsIE1lbW9yeSBMZWFrL0Vy cm9yIGRldGVjdG9yIgorICAgICAgICAgICAgICAgIHJlcXVpcmVzICAgICAg Q1lHUEtHX0lTT0lORlJBCisgICAgICAgICAgICAgICAgZGVmYXVsdF92YWx1 ZSAwCisgICAgICAgICAgICAgICAgZGVzY3JpcHRpb24gICAiCisgICAgICAg ICAgICAgICAgICAgIE11bmdXYWxsIGNhbiBiZSB1c2VkIHRvIGRldGVjdCBt ZW1vcnkgY29ycnVwdGlvbnMgYW5kIGZpbmQKKyAgICAgICAgICAgICAgICAg ICAgbWVtb3J5IGxlYWtzLiBBcyBhIHNpZGUgZWZmZWN0IGV2ZXJ5IG1lbW9y eSBhbGxvY2F0aW9uIG5lZWRzCisgICAgICAgICAgICAgICAgICAgIGEgYml0 IG1vcmUgbWVtb3J5IGFuZCBhbGxvY2F0aW9ucyBhcmUgYSBiaXQgc2xvd2Vy LiIKKyAgICAgICAgICAgfQorCisgICAgICAgICAgIGNkbF9vcHRpb24gQ1lH TlVNX01FTUFMTE9DX0FMTE9DQVRPUl9ETE1BTExPQ19NVU5HV0FMTF9TQUZF QVJFQSB7CisgICAgICAgICAgICAgICAgZGlzcGxheSAgICAgICAiTXVuZ1dh bGwgc2FmZSBhcmVhIgorICAgICAgICAgICAgICAgIGZsYXZvciAgICAgICAg ZGF0YQorICAgICAgICAgICAgICAgIGxlZ2FsX3ZhbHVlcyAgMTYgdG8gNjU1 MzYKKyAgICAgICAgICAgICAgICBkZWZhdWx0X3ZhbHVlIDMyCisgICAgICAg ICAgICAgICAgZGVzY3JpcHRpb24gICAiCisgICAgICAgICAgICAgICAgICAg IE11bmdXYWxsIGFsbG9jYXRlcyBzcGFjZSBiZWZvcmUgYW5kIGFmdGVyIGEg bWVtb3J5IGJsb2NrIHRvCisgICAgICAgICAgICAgICAgICAgIGZpbmQgbWVt b3J5IGNvcnJ1cHRpb25zLiBUaGlzIHZhbHVlIHNwZWNpZmllcyBob3cgbXVj aCBzcGFjZQorICAgICAgICAgICAgICAgICAgICBzaG91bGQgYmUgcmVzZXJ2 ZWQuIFBsZWFzZSBoYXZlIHRoZSBhbGlnbm1lbnQgaW4gbWluZCBhbmQgdXNl CisgICAgICAgICAgICAgICAgICAgIHZhbHVlcyBtdWx0aXBsZSBvZiAxNi4i CisgICAgICAgICAgIH0KICAgICAgICAgfQogCiAgICAgICAgIGNkbF9jb21w b25lbnQgQ1lHUEtHX01FTUFMTE9DX0FMTE9DQVRPUl9TRVBNRVRBIHsKICAg ICAgICAgICAgIGRpc3BsYXkgICAgICAgIlZhcmlhYmxlIGJsb2NrIGFsbG9j YXRvciB3aXRoIHNlcGFyYXRlIG1ldGFkYXRhIgogICAgICAgICAgICAgZmxh dm9yICAgICAgICBub25lCiAgICAgICAgICAgICBub19kZWZpbmUKICAgICAg ICAgICAgIGRlc2NyaXB0aW9uICAgIgogICAgICAgICAgICAgICAgIFRoaXMg Y29tcG9uZW50IGNvbnRhaW5zIGNvbmZpZ3VyYXRpb24gb3B0aW9ucyByZWxh dGVkIHRvIHRoZSAKQEAgLTM5OSwxNyArNDIxLDE3IEBAIGNkbF9wYWNrYWdl IENZR1BLR19NRU1BTExPQyB7CiAgICAgICAgICAgICAgICAgYnVpbGRpbmcg dGhpcyBwYWNrYWdlLiBUaGVzZSBmbGFncyBhcmUgcmVtb3ZlZCBmcm9tCiAg ICAgICAgICAgICAgICAgdGhlIHNldCBvZiBnbG9iYWwgZmxhZ3MgaWYgcHJl c2VudC4iCiAgICAgIC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PQ19USFJFQURBV0FSRQogICAgIGN5Z191aW50OCAq Ci0gICAgYWxsb2MoIGN5Z19pbnQzMiBzaXplICkgeyByZXR1cm4gbXlwb29s LmFsbG9jKCBzaXplICk7IH0KKyAgICBhbGxvYyggY3lnX2ludDMyIHNpemUg KSB7CisjaWZuZGVmIENZR0lNUF9NRU1BTExPQ19BTExPQ0FUT1JfRExNQUxM T0NfTVVOR1dBTEwKKyAgICAgICAgcmV0dXJuIG15cG9vbC5hbGxvYyggc2l6 ZSApOworI2Vsc2UKKyAgICAgICAgcmV0dXJuKG1lbUluaXQobXlwb29sLmFs bG9jKCBzaXplICsgTVVOR1dBTExfT0ZGU0VUKSxzaXplKSk7CisjZW5kaWYK KyAgICB9CiAgICAgCiAjIGlmZGVmIENZR0ZVTl9LRVJORUxfVEhSRUFEU19U SU1FUgogICAgIC8vIGdldCBzb21lIG1lbW9yeSB3aXRoIGEgdGltZW91dAog ICAgIGN5Z191aW50OCAqCiAgICAgYWxsb2MoIGN5Z19pbnQzMiBzaXplLCBj eWdfdGlja19jb3VudCBkZWxheV90aW1lb3V0ICkgeworI2lmbmRlZiBDWUdJ TVBfTUVNQUxMT0NfQUxMT0NBVE9SX0RMTUFMTE9DX01VTkdXQUxMCiAgICAg ICAgIHJldHVybiBteXBvb2wuYWxsb2MoIHNpemUsIGRlbGF5X3RpbWVvdXQg KTsKKyNlbHNlCisgICAgICAgIHJldHVybihtZW1Jbml0KG15cG9vbC5hbGxv Yyggc2l6ZSArIE1VTkdXQUxMX09GRlNFVCwgZGVsYXlfdGltZW91dCApLHNp emUpKTsKKyNlbmRpZgogICAgIH0KICMgZW5kaWYKICNlbmRpZgogCiAgICAg Ly8gZ2V0IHNvbWUgbWVtb3J5LCByZXR1cm4gTlVMTCBpZiBub25lIGF2YWls YWJsZQogICAgIGN5Z191aW50OCAqCi0gICAgdHJ5X2FsbG9jKCBjeWdfaW50 MzIgc2l6ZSApIHsgcmV0dXJuIG15cG9vbC50cnlfYWxsb2MoI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FRPTU9GRlNFVCArIE1VTkdXQUxM X1RPUE9GRlNFVCArIHNpemUpOworICAgICAgICAJICAgc3RydWN0IE11bmdN ZW1JbmZvICptZW1pID0gKHN0cnVjdCBNdW5nTWVtSW5mbyAqKSBtZW07Cisg ICAgICAgIAkgICBtZW1pLT5oZWFkZXIgPSAweDAwYmFkY2FmZTsKKyAgICAg ICAgCSAgIG1lbWktPnNpemUgPSBzaXplOworICAgICAgICAJICAgTVVOR1dB TExfTE9DSzsKKyAgICAgICAgCSAgIG1lbWktPnByZWQgPSBtX2xhc3RfZW50 cnk7CisgICAgICAgIAkgICBpZiAobV9sYXN0X2VudHJ5KQorICAgICAgICAJ ICAgeworICAgICAgICAJICAgCW1fbGFzdF9lbnRyeS0+c3VjYyA9IG1lbWk7 CisgICAgICAgIAkgICB9CisgICAgICAgIAkgICBpZiAobV9maXJzdF9lbnRy eSA9PSAwKQorICAgICAgICAJICAgeworICAgICAgICAJICAgCW1fZmlyc3Rf ZW50cnkgPSBtZW1pOworICAgICAgICAJICAgfQorICAgICAgICAJICAgY3ln X3VpbnQzMiAqc3RhY2sgPSByZWludGVycHJldF9jYXN0PGN5Z191aW50MzIg Kj4oJm1lbWkpOworICAgICAgICAJICAgY3lnX2ludDMyIHJldG51bSA9IDA7 CisgICAgICAgIAkgICBmb3IgKGN5Z19pbnQzMiBpPTA7aTwyMDA7aSsrKQor ICAgICAgICAJICAgeworICAgICAgICAJICAgCWlmICgoc3RhY2tbaV0gPj0g KChjeWdfdWludDMyKSBfc3RleHQpKSAmJiAoc3RhY2tbaV0gPCAoKGN5Z191 aW50MzIpIF9fcmFtX2RhdGFfc3RhcnQpKSkKKyAgICAgICAgCSAgIAl7Cisg ICAgICAgIAkgICAJCW1lbWktPnJldHVybl9hZGRyW3JldG51bV0gPSBzdGFj a1tpXTsKKyAgICAgICAgCSAgIAkJaWYgKCsrcmV0bnVtID09IDcpCisgICAg ICAgIAkgICAJCXsKKyAgICAgICAgCSAgIAkJCWJyZWFrOworICAgICAgICAJ ICAgCQl9CisgICAgICAgIAkgICAJfQorICAgICAgICAJICAgfQorICAgICAg ICAJICAgbV9sYXN0X2VudHJ5ID0gbWVtaTsKKyAgICAgICAgCSAgIE1VTkdX QUxMX1VOTE9DSzsKKyAgICAgICAgICAgIHJldHVybigmbWVtW01VTkdXQUxM X1RPUE9GRlNFVCArIHNpemVvZihzdHJ1Y3QgTXVuZ01lbUluZm8pXSk7Cisg ICAgICAgIH0KKyAgICAgICAgcmV0dXJuKG1lbSk7CisgICAgfQorICAgIAor ICAgIGN5Z19ib29sIGZyZWVNZW0oY3lnX3VpbnQ4ICptZW0sIGN5Z19pbnQz MiBzaXplKQorICAgIHsKKyAgICAgICAgaWYgKG1lbSA9PSAwKQorICAgICAg ICB7CisgICAgICAgICAgICByZXR1cm4gbXlwb29sLmZyZWUobWVtLCBzaXpl KTsKKyAgICAgICAgfQorICAgICAgICBzdHJ1Y3QgTXVuZ01lbUluZm8gKm1l bWkgPSAoc3RydWN0IE11bmdNZW1JbmZvICopICZtZW1bLShNVU5HV0FMTF9P RkZTRVQgLSBNVU5HV0FMTF9CT1RUT01PRkZTRVQpXTsKKyAgICAgICAgaWYg KG1lbWktPmhlYWRlciA9PSAweDBiYWRjYWZlKQorICAgICAgICB7CisgICAg ICAgIAkJTVVOR1dBTExfTE9DSzsKKyAgICAgICAgICAgIGlmIChtX2ZpcnN0 X2VudHJ5ID09IG1lbWkpCisgICAgICAgICAgICB7CisgICAgICAgICAgICAJ bV9maXJzdF9lbnRyeSA9IG1lbWktPnN1Y2M7CisgICAgICAgICAgICB9Cisg ICAgICAgICAgICBpZiAobV9sYXN0X2VudHJ5ID09IG1lbWkpCisgICAgICAg ICAgICB7CisgICAgICAgICAgICAJbV9sYXN0X2VudHJ5ID0gbWVtaS0+cHJl ZDsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIGlmIChtZW1pLT5wcmVk KQorICAgICAgICAgICAgeworICAgICAgICAgICAgCW1lbWktPnByZWQtPnN1 Y2MgPSBtZW1pLT5zdWNjOworICAgICAgICAgICAgfQorICAgICAgICAgICAg aWYgKG1lbWktPnN1Y2MpCisgICAgICAgICAgICB7CisgICAgICAgICAgICAJ bWVtaS0+c3VjYy0+cHJlZCA9IG1lbWktPnByZWQ7CisgICAgICAgICAgICB9 CisgICAgICAgIAkJTVVOR1dBTExfVU5MT0NLOworCisJICAgICAgICBjeWdf dWludDggKmNoa21lbSA9ICZtZW1bLShNVU5HV0FMTF9UT1BPRkZTRVQpXTsK KwkgICAgICAgIGZvciAoY3lnX2ludDMyIGk9MDtpPE1VTkdXQUxMX1RPUE9G RlNFVDtpKyspCisJICAgICAgICB7CisJICAgICAgICAJICAgaWYgKGNoa21l bVtpXSAhPSAweGNkKQorCSAgICAgICAgCSAgIHsKKwkgICAgICAgIAkgICAJ ZGlhZ19wcmludGYoIkNZR0lNUF9NRU1BTExPQ19BTExPQ0FUT1JfRExNQUxM T0NfTVVOR1dBTEwgSElUOiAlZCBieXRlIG92ZXJ3cml0dGVuIGJlZm9yZTog JXAgYXQgMHglMDh4XG4iLE1VTkdXQUxMX1RPUE9GRlNFVCAtIGksbWVtLG1l bWktPnJldHVybl9hZGRyWzBdKTsKKwkgICAgICAgIAkgICAJZm9yIChjeWdf aW50MzIgaj0oaSAmICh+NykpO2o8TVVOR1dBTExfVE9QT0ZGU0VUO2orPTgp CisJICAgICAgICAJICAgCXsKKwkgICAgICAgIAkgICAJCWRpYWdfcHJpbnRm KCIgJXA6IDB4JTAyeCAweCUwMnggMHglMDJ4IDB4JTAyeCAgMHglMDJ4IDB4 JTAyeCAweCUwMnggMHglMDJ4XG4iLCZjaGttZW1bal0sY2hrbWVtW2pdLGNo a21lbVtqKzFdLAorCSAgICAgICAgCSAgIAkJY2hrbWVtW2orMl0sY2hrbWVt W2orM10sY2hrbWVtW2orNF0sY2hrbWVtW2orNV0sY2hrbWVtW2orNl0sY2hr bWVtW2orN10pOworCSAgICAgICAgCSAgIAl9CisJICAgICAgICAJICAgCWJy ZWFrOworCSAgICAgICAgCSAgIH0KKwkgICAgICAgIH0KKwkgICAgICAgIGNo a21lbSA9ICZtZW1bbWVtaS0+c2l6ZV07CisJICAgICAgICBmb3IgKGN5Z19p bnQzMiBpPU1VTkdXQUxMX0JPVFRPTU9GRlNFVC0xO2k+PTA7aS0tKQorCSAg ICAgICAgeworCSAgICAgICAgCSAgIGlmIChjaGttZW1baV0gIT0gMHhjZCkK KwkgICAgICAgIAkgICB7CisJICAgICAgICAJICAgCWRpYWdfcHJpbnRmKCJD WUdJTVBfTUVNQUxMT0NfQUxMT0NBVE9SX0RMTUFMTE9DX01VTkdXQUxMIEhJ VDogJWQgYnl0ZSBvdmVyd3JpdHRlbiBhZnRlcjogJXAgYXQgMHglMDh4XG4i LGkgKyAxLG1lbSxtZW1pLT5yZXR1cm5fYWRkclswXSk7CisJICAgICAgICAJ ICAgCWZvciAoY3lnX2ludDMyIGo9MDtqPGk7ais9OCkKKwkgICAgICAgIAkg ICAJeworCSAgICAgICAgCSAgIAkJZGlhZ19wcmludGYoIiAlcDogMHglMDJ4 IDB4JTAyeCAweCUwMnggMHglMDJ4ICAweCUwMnggMHglMDJ4IDB4JTAyeCAw eCUwMnhcbiIsJmNoa21lbVtqXSxjaGttZW1bal0sY2hrbWVtW2orMV0sCisJ ICAgICAgICAJICAgCQljaGttZW1baisyXSxjaGttZW1baiszXSxjaGttZW1b ais0XSxjaGttZW1bais1XSxjaGttZW1bais2XSxjaGttZW1bais3XSk7CisJ ICAgICAgICAJICAgCX0KKwkgICAgICAgIAkgICAJYnJlYWs7CisJICAgICAg ICAJICAgfQorCSAgICAgICAgfQorICAgICAgICB9CisgICAgICAgIGVsc2UK KyAgICAgICAgeworICAgICAgICAJCWRpYWdfcHJpbnRmKCJDWUdJTVBfTUVN QUxMT0NfQUxMT0NBVE9SX0RMTUFMTE9DX01VTkdXQUxMIEhJVDogbWlzc2lu ZyBoZWFkZXI6ICVwOjB4JTA4eFxuIixtZW0sbWVtaS0+aGVhZGVyKTsKKyAg ICAgICAgfQorICAgICAgICByZXR1cm4gbXlwb29sLmZyZWUoJm1lbVstKE1V TkdXQUxMX09GRlNFVCAtIE1VTkdXQUxMX0JPVFRPTU9GRlNFVCldLCBzaXpl ICsgTVVOR1dBTExfT0ZGU0VUKTsKKyAgICB9CisJCisgICAgc3RydWN0IE11 bmdNZW1JbmZvICptX2ZpcnN0X2VudHJ5OworICAgIHN0cnVjdCBNdW5nTWVt SW5mbyAqbV9sYXN0X2VudHJ5OworI2VuZGlmCiB9OwogCiAjZW5kaWYgLy8g aWZuZGVmIF9fTUFMTE9DX0lNUExfV0FOVEVECiAKICNlbmRpZiAvLyBpZm5k ZWYgQ1lHT05DRV9NRU1BTExPQ19ETE1BTExPQ19IWFgKIC8vIEVPRiBkbG1h bGxvYy5oeHgK --------------000805070603000503000708 Content-Type: text/plain; name="mungwall.cxx" Content-Transfer-Encoding: base64 Content-Disposition: inline; filename="mungwall.cxx" Content-length: 4006 Ly89PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQovLwovLyAgICAgICAg bXVuZ3dhbGwuY3h4Ci8vCi8vICAgICAgICBtdW5nd2FsbCBtZW1vcnkgZXJy b3IgdGVzdAovLwovLz09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci8v IyMjI0VDT1NHUExDT1BZUklHSFRCRUdJTiMjIyMKLy8gLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQovLyBUaGlzIGZpbGUg aXMgcGFydCBvZiBlQ29zLCB0aGUgRW1iZWRkZWQgQ29uZmlndXJhYmxlIE9w ZXJhdGluZyBTeXN0ZW0uCi8vIENvcHlyaWdodCAoQykgMTk5OCwgMTk5OSwg MjAwMCwgMjAwMSwgMjAwMiBSZWQgSGF0LCBJbm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