From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#61667: 29.0.60; Failure to redisplay Date: Fri, 3 Mar 2023 15:44:03 +0200 Message-ID: References: <04d7cb31-684c-07c0-ee7b-503514fc1a85@yandex.ru> <8716b41c97839d6a8b87@heytings.org> <7fee18a7-3307-b6de-1428-ae17d51c85af@yandex.ru> <9ac9271f1ee55a9b8bbf@heytings.org> <87a60y13ou.fsf@yahoo.com> <674e150e-fcbe-7d67-962e-214cfaec2ca0@yandex.ru> <875ybl1dii.fsf@yahoo.com> <2b249c97-db63-34e1-80c2-0c898005e31f@yandex.ru> <87zg8xyt0m.fsf@yahoo.com> <25c817d9-f969-8c24-6ed4-9b35fd6f27ad@yandex.ru> <87sfeozn8f.fsf@yahoo.com> <87o7pczlsq.fsf@yahoo.com> <43d50d6a-1eb0-cd42-0479-3f9d4d74904a@yandex.ru> <87ilfkyorf.fsf@yahoo.com> <8f4df0d7-eb1a-379a-db03-314f2c93743b@yandex.ru> <87a60vztad.fsf@yahoo.com> <14405ac4f8f101c35628@heytings.org> <60c92936-2a75-a254-145a-6a0a1656a645@yandex.ru> <8eda4f1e-233e-4963-1b1d-75945eca01d4@yandex.ru> <874jr2y7qk.fsf@yahoo.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------9JD7newz6Vz0RG2soH0kgzf5" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40166"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1 Cc: 61667@debbugs.gnu.org, Gregory Heytings , Eli Zaretskii To: Po Lu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Mar 03 14:45:27 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pY5iv-000AF1-80 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 03 Mar 2023 14:45:25 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pY5ib-0006hZ-9r; Fri, 03 Mar 2023 08:45:05 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pY5iZ-0006hK-Ed for bug-gnu-emacs@gnu.org; Fri, 03 Mar 2023 08:45:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pY5iZ-0002oi-3U for bug-gnu-emacs@gnu.org; Fri, 03 Mar 2023 08:45:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pY5iY-00008G-A3 for bug-gnu-emacs@gnu.org; Fri, 03 Mar 2023 08:45:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 03 Mar 2023 13:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61667 X-GNU-PR-Package: emacs Original-Received: via spool by 61667-submit@debbugs.gnu.org id=B61667.1677851054432 (code B ref 61667); Fri, 03 Mar 2023 13:45:02 +0000 Original-Received: (at 61667) by debbugs.gnu.org; 3 Mar 2023 13:44:14 +0000 Original-Received: from localhost ([127.0.0.1]:59961 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pY5hl-00006s-Vh for submit@debbugs.gnu.org; Fri, 03 Mar 2023 08:44:14 -0500 Original-Received: from mail-wr1-f51.google.com ([209.85.221.51]:38621) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pY5hk-00006a-H2 for 61667@debbugs.gnu.org; Fri, 03 Mar 2023 08:44:12 -0500 Original-Received: by mail-wr1-f51.google.com with SMTP id h11so2308653wrm.5 for <61667@debbugs.gnu.org>; Fri, 03 Mar 2023 05:44:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1677851046; h=in-reply-to:from:references:cc:to:content-language:subject :user-agent:mime-version:date:message-id:sender:from:to:cc:subject :date:message-id:reply-to; bh=weIc5xqRyWGzrKAF5/WAJ1srCV9/serDdqEqyqMN1ck=; b=WLKH21k82JLL33XckIH7866QKCYj1U5vMjBOZs0JQrerU99qZXL4ZzTweRE5AMQTMm okBD4zY2S2Oz3xOVamj7sawSOehlm4FyDqnzn3qT9gtkSWnQJFLJzW3X08rBtN1fWgnh MurBC5ZlfFzYKbHba+QTflXaOFioPo8/HdSDkAeQpukP2VCLrbnK1HWriaVyddC0EFgO uDe4tISHCqfoBx35GcHaji0bJeOw0Ds5LHmNKFZ/+ZNKzBv1ogWexdMmUrdQjZW0pw9S JRd9kpnudZH+k4j/JU470gaBEI8p9gXQXUkeNf+eXHBb/iUELB+MM2TyGSSaWA9Nd4uM hGUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1677851046; h=in-reply-to:from:references:cc:to:content-language:subject :user-agent:mime-version:date:message-id:sender:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=weIc5xqRyWGzrKAF5/WAJ1srCV9/serDdqEqyqMN1ck=; b=1/0Cc7XhjlhCs0gyOKjO+fvVSMMBpn5r6iqORv0uIqSTREA4UkYypv0vNN9+mS4TPA NIr1trUVBrEJS50Ku5DyOhvrXFxOzdHmNwczfg29AJNOm8sGAM3MSFLn3wcpP03QvoUD +Mkl8a8pCR47V/8OXnJQ8i1H7fIPy+D+PRhef3N5rIvQVN2sjKWD6iJttz6Qij6sqWeB JYi/P4yfGMVk+bv3jRCZokeeYmIDEB+UcLeqn7e54vurEbOI/fVZR1/WT8pDjluc9tnY BT5azkITenOONhfs0CNUOnJsirFuP3c926fGU+HQrq5rCsoyC8MiGg5U/HEIOoXvDcqn jKZw== X-Gm-Message-State: AO0yUKUAq2jyWWhecJRB7KLwxopnWBB8p1ddP/7jhPEPruY/Bouj+Byn 460RocdSZrir9Clitisi1Do= X-Google-Smtp-Source: AK7set+YhuhnXlCuI1GWCkSmSsaUM/iOu7xk6FgJmHQQF4yL1TCXcOZPn6JZABCWcjZ1nM96k7/aEQ== X-Received: by 2002:a5d:61cd:0:b0:2c7:bfe:4f78 with SMTP id q13-20020a5d61cd000000b002c70bfe4f78mr1498649wrv.68.1677851046281; Fri, 03 Mar 2023 05:44:06 -0800 (PST) Original-Received: from [192.168.0.2] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id l3-20020a1c7903000000b003e7c89b3514sm5678547wme.23.2023.03.03.05.44.04 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 03 Mar 2023 05:44:05 -0800 (PST) Content-Language: en-US In-Reply-To: <874jr2y7qk.fsf@yahoo.com> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:257212 Archived-At: This is a multi-part message in MIME format. --------------9JD7newz6Vz0RG2soH0kgzf5 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 03/03/2023 02:54, Po Lu wrote: >> So I went back to the previous Emacs versions. >> >> This MRE: >> >> src/emacs -Q --eval "(tool-bar-mode -1)" --eval "(menu-bar-mode -1)" >> --eval "(scroll-bar-mode -1)" --eval "(global-set-key \"a\" (lambda >> () (interactive) (insert \"!\") (redisplay) (find-file >> \"xassociations.rb\") ))" --eval "(add-hook 'find-file-hook >> #'redisplay t)" --eval "(blink-cursor-mode -1 )" --eval "(setq >> frame-title-format \"aaa\")" >> >> Press 'a'. See if the buffer is displayed after a delay. > > Could you send me xassociations.rb? I can't reproduce this with any > file of my own. Attached, though this doesn't seem to depend on the exact file. E.g., I reproduced this bug (indefinitely delayed refresh) just today with src/alloc.c a few times. >> --eval "(modify-frame-parameters nil '((undecorated . t)))", OTOH, we >> can also cross out from the list of fixes: the problem still happens >> with it, though seemingly less often (first repro at the 15th try). > > OK, thanks. Damned blink-cursor-mode! Does the frame still refresh > when you hover over the title bar buttons? If there is a title bar, and there are buttons, yes, always. Also, sometimes the frame refreshes right away as soon as I move the mouse over its border. Sometimes, however, I can move the mouse over it for a while, and refresh happens only when hovering over the title bar buttons. Or over the mode-line. Or pressing some button on the keyboard, of course. > Also, since we now know blink-cursor-mode was previously screwing with > the results, would you please try some other window manager again and > see if the problem reproduces without GNOME? Tried again with WindowMaker, couldn't reproduce there still. It's still working kind of sluggishly, though. Also tried installing Xfce4, but there seems to be some integration problem: it's not possible to log into it from GDM (journalctl shows some errors about it trying to launch its own session manager and failing because of GDM already running). I've also tried to reproduce the error with a Lucid build of Emacs 29 under GNOME -- never hit the problem once. --------------9JD7newz6Vz0RG2soH0kgzf5 Content-Type: application/x-ruby; name="xassociations.rb" Content-Disposition: attachment; filename="xassociations.rb" Content-Transfer-Encoding: base64 IyBmcm96ZW5fc3RyaW5nX2xpdGVyYWw6IHRydWUKCiMgJXcKCm1vZHVsZSBBY3Rpdm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xhc3Mgd2hpY2ggYXJlIHNwZWNpYWxpemVkIGFjY29yZGluZyB0byB0aGUgY29sbGVjdGlv biBvciBhc3NvY2lhdGlvbiBzeW1ib2wgYW5kIHRoZQogICAgICAjIG9wdGlvbnMgaGFzaC4g SXQgd29ya3MgbXVjaCB0aGUgc2FtZSB3YXkgYXMgUnVieSdzIG93biA8dHQ+YXR0cio8L3R0 PgogICAgICAjIG1ldGhvZHMuCiAgICAgICMKICAgICAgIyAgIGNsYXNzIFByb2plY3QgPCBB Y3RpdmVSZWNvcmQ6OkJhc2UKICAgICAgIyAgICAgYmVsb25nc190byAgICAgICAgICAgICAg OnBvcnRmb2xpbwogICAgICAjICAgICBoYXNfb25lICAgICAgICAgICAgICAgICA6cHJvamVj dF9tYW5hZ2VyCiAgICAgICMgICAgIGhhc19tYW55ICAgICAgICAgICAgICAgIDptaWxlc3Rv bmVzCiAgICAgICMgICAgIGhhc19hbmRfYmVsb25nc190b19tYW55IDpjYXRlZ29yaWVzCiAg ICAgICMgICBlbmQKICAgICAgIwogICAgICAjIFRoZSBwcm9qZWN0IGNsYXNzIG5vdyBoYXMg dGhlIGZvbGxvd2luZyBtZXRob2RzIChhbmQgbW9yZSkgdG8gZWFzZSB0aGUgdHJhdmVyc2Fs IGFuZAogICAgICAjIG1hbmlwdWxhdGlvbiBvZiBpdHMgcmVsYXRpb25zaGlwczoKICAgICAg IwogICAgICAjICAgcHJvamVjdCA9IFByb2plY3QuZmlyc3QKICAgICAgIyAgIHByb2plY3Qu cG9ydGZvbGlvCiAgICAgICMgICBwcm9qZWN0LnBvcnRmb2xpbyA9IFBvcnRmb2xpby5maXJz dAogICAgICAjICAgcHJvamVjdC5yZWxvYWRfcG9ydGZvbGlvCiAgICAgICMKICAgICAgIyAg IHByb2plY3QucHJvamVjdF9tYW5hZ2VyCiAgICAgICMgICBwcm9qZWN0LnByb2plY3RfbWFu YWdlciA9IFByb2plY3RNYW5hZ2VyLmZpcnN0CiAgICAgICMgICBwcm9qZWN0LnJlbG9hZF9w cm9qZWN0X21hbmFnZXIKICAgICAgIwogICAgICAjICAgcHJvamVjdC5taWxlc3RvbmVzLmVt cHR5PwogICAgICAjICAgcHJvamVjdC5taWxlc3RvbmVzLnNpemUKICAgICAgIyAgIHByb2pl Y3QubWlsZXN0b25lcwogICAgICAjICAgcHJvamVjdC5taWxlc3RvbmVzIDw8IE1pbGVzdG9u ZS5maXJzdAogICAgICAjICAgcHJvamVjdC5taWxlc3RvbmVzLmRlbGV0ZShNaWxlc3RvbmUu Zmlyc3QpCiAgICAgICMgICBwcm9qZWN0Lm1pbGVzdG9uZXMuZGVzdHJveShNaWxlc3RvbmUu Zmlyc3QpCiAgICAgICMgICBwcm9qZWN0Lm1pbGVzdG9uZXMuZmluZChNaWxlc3RvbmUuZmly c3QuaWQpCiAgICAgICMgICBwcm9qZWN0Lm1pbGVzdG9uZXMuYnVpbGQKICAgICAgIyAgIHBy b2plY3QubWlsZXN0b25lcy5jcmVhdGUKICAgICAgIwogICAgICAjICAgcHJvamVjdC5jYXRl Z29yaWVzLmVtcHR5PwogICAgICAjICAgcHJvamVjdC5jYXRlZ29yaWVzLnNpemUKICAgICAg IyAgIHByb2plY3QuY2F0ZWdvcmllcwogICAgICAjICAgcHJvamVjdC5jYXRlZ29yaWVzIDw8 IENhdGVnb3J5LmZpcnN0CiAgICAgICMgICBwcm9qZWN0LmNhdGVnb3JpZXMuZGVsZXRlKGNh dGVnb3J5MSkKICAgICAgIyAgIHByb2plY3QuY2F0ZWdvcmllcy5kZXN0cm95KGNhdGVnb3J5 MSkKICAgICAgIwogICAgICAjID09PSBBIHdvcmQgb2Ygd2FybmluZwogICAgICAjCiAgICAg ICMgRG9uJ3QgY3JlYXRlIGFzc29jaWF0aW9ucyB0aGF0IGhhdmUgdGhlIHNhbWUgbmFtZSBh cyB7aW5zdGFuY2UgbWV0aG9kc31bcmRvYy1yZWY6QWN0aXZlUmVjb3JkOjpDb3JlXSBvZgog ICAgICAjIDx0dD5BY3Rpd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LS0tLS0tLS0tLS0tLS0tKy0tLS0tLS0tLS0tLSstLS0tLS0t LS0tLS0tLSstLS0tLS0tLS0KICAgICAgIyAgIG90aGVyICAgICAgICAgICAgICAgICAgICAg ICAgICAgICB8ICAgICBYICAgICAgfCAgICAgIFggICAgICAgfCAgICBYCiAgICAgICMgICBv dGhlcj0ob3RoZXIpICAgICAgICAgICAgICAgICAgICAgfCAgICAgWCAgICAgIHwgICAgICBY ICAgICAgIHwgICAgWAogICAgICAjICAgYnVpbGRfb3RoZXIoYXR0cmlidXRlcz17fSkgICAg ICAgIHwgICAgIFggICAgICB8ICAgICAgICAgICAgICB8ICAgIFgKICAgICAgIyAgIGNyZWF0 ZV9vdGhlcihhdHRyaWJ1dGVzPXt9KSAgICAgICB8ICAgICBYICAgICAgfCAgICAgICAgICAg ICAgfCAgICBYCiAgICAgICMgICBjcmVhdGVfb3RoZXIhKGF0dHJpYnV0ZXM9e30pICAgICAg fCAgICAgWCAgICAgIHwgICAgICAgICAgICAgIHwgICAgWAogICAgICAjICAgcmVsb2FkX290 aGVyICAgICAgICAgICAgICAgICAgICAgIHwgICAgIFggICAgICB8ICAgICAgWCAgICAgICB8 ICAgIFgKICAgICAgIyAgIG90aGVyX2NoYW5nZWQ/ICAgICAgICAgICAgICAgICAgICB8ICAg ICBYICAgICAgfCAgICAgIFggICAgICAgfAogICAgICAjICAgb3RoZXJfcHJldmlvdXNseV9j aGFuZ2VkPyAgICAgICAgIHwgICAgIFggICAgICB8ICAgICAgWCAgICAgICB8CiAgICAgICMK ICAgICAgIyA9PT0gQ29sbGVjdGlvbiBhc3NvY2lhdGlvbnMgKG9uZS10by1tYW55IC8gbWFu eS10by1tYW55KQogICAgICAjICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IHwgICAgICAgfCAgICAgICAgICB8IGhhc19tYW55CiAgICAgICMgICBnZW5lcmF0ZWQgbWV0 aG9kcyAgICAgICAgICAgICAgICAgfCBoYWJ0bSB8IGhhc19tYW55IHwgOnRocm91Z2gKICAg ICAgIyAgIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rLS0tLS0tLSstLS0t LS0tLS0tKy0tLS0tLS0tLS0KICAgICAgIyAgIG90aGVycyAgICAgICAgICAgICAgICAgICAg ICAgICAgICB8ICAgWCAgIHwgICAgWCAgICAgfCAgICBYCiAgICAgICMgICBvdGhlcnM9KG90 aGVyLG90aGVyLC4uLikgICAgICAgICAgfCAgIFggICB8ICAgIFggICAgIHwgICAgWAogICAg ICAjICAgb3RoZXJfaWRzICAgICAgICAgICAgICAgICAgICAgICAgIHwgICBYICAgfCAgICBY ICAgICB8ICAgIFgKICAgICAgIyAgIG90aGVyX2lkcz0oaWQsaWQsLi4uKSAgICAgICAgICAg ICB8ICAgWCAgIHwgICAgWCAgICAgfCAgICBYCiAgICAgICMgICBvdGhlcnM8PCAgICAgICAg ICAgICAgICAgICAgICAgICAgfCAgIFggICB8ICAgIFggICAgIHwgICAgWAogICAgICAjICAg b3RoZXJzLnB1c2ggICAgICAgICAgICAgICAgICAgICAgIHwgICBYICAgfCAgICBYICAgICB8 ICAgIFgKICAgICAgIyAgIG90aGVycy5jb25jYXQgICAgICAgICAgICAgICAgICAgICB8ICAg WCAgIHwgICAgWCAgICAgfCAgICBYCiAgICAgICMgICBvdGhlcnMuYnVpbGQoYXR0cmlidXRl cz17fSkgICAgICAgfCAgIFggICB8ICAgIFggICAgIHwgICAgWAogICAgICAjICAgb3RoZXJz LmNyZWF0ZShhdHRyaWJ1dGVzPXt9KSAgICAgIHwgICBYICAgfCAgICBYICAgICB8ICAgIFgK ICAgICAgIyAgIG90aGVycy5jcmVhdGUhKGF0dHJpYnV0ZXM9e30pICAgICB8ICAgWCAgIHwg ICAgWCAgICAgfCAgICBYCiAgICAgICMgICBvdGhlcnMuc2l6ZSAgICAgICAgICAgICAgICAg ICAgICAgfCAgIFggICB8ICAgIFggICAgIHwgICAgWAogICAgICAjICAgb3RoZXJzLmxlbmd0 aCAgICAgICAgICAgICAgICAgICAgIHwgICBYICAgfCAgICBYICAgICB8ICAgIFgKICAgICAg IyAgIG90aGVycy5jb3VudCAgICAgICAgICAgICAgICAgICAgICB8ICAgWCAgIHwgICAgWCAg ICAgfCAgICBYCiAgICAgICMgICBvdGhlcnMuc3VtKCphcmdzKSAgICAgICAgICAgICAgICAg fCAgIFggICB8ICAgIFggICAgIHwgICAgWAogICAgICAjICAgb3RoZXJzLmVtcHR5PyAgICAg ICAgICAgICAgICAgICAgIHwgICBYICAgfCAgICBYICAgICB8ICAgIFgKICAgICAgIyAgIG90 aGVycy5jbGVhciAgICAgICAgICAgICAgICAgICAgICB8ICAgWCAgIHwgICAgWCAgICAgfCAg ICBYCiAgICAgICMgICBvdGhlcnMuZGVsZXRlKG90aGVyLG90aGVyLC4uLikgICAgfCAgIFgg ICB8ICAgIFggICAgIHwgICAgWAogICAgICAjICAgb3RoZXJzLmRlbGV0ZV9hbGwgICAgICAg ICAgICAgICAgIHwgICBYICAgfCAgICBYICAgICB8ICAgIFgKICAgICAgIyAgIG90aGVycy5k ZXN0cm95KG90aGVyLG90aGVyLC4uLikgICB8ICAgWCAgIHwgICAgWCAgICAgfCAgICBYCiAg ICAgICMgICBvdGhlcnMuZGVzdHJveV9hbGwgICAgICAgICAgICAgICAgfCAgIFggICB8ICAg IFggICAgIHwgICAgWAogICAgICAjICAgb3RoZXJzLmZpbmQoKmFyZ3MpICAgICAgICAgICAg ICAgIHwgICBYICAgfCAgICBYICAgICB8ICAgIFgKICAgICAgIyAgIG90aGVycy5leGlzdHM/ ICAgICAgICAgICAgICAgICAgICB8ICAgWCAgIHwgICAgWCAgICAgfCAgICBYCiAgICAgICMg ICBvdGhlcnMuZGlzdGluY3QgICAgICAgICAgICAgICAgICAgfCAgIFggICB8ICAgIFggICAg IHwgICAgWAogICAgICAjICAgb3RoZXJzLnJlc2V0ICAgICAgICAgICAgICAgICAgICAgIHwg ICBYICAgfCAgICBYICAgICB8ICAgIFgKICAgICAgIyAgIG90aGVycy5yZWxvYWQgICAgICAg ICAgICAgICAgICAgICB8ICAgWCAgIHwgICAgWCAgICAgfCAgICBYCiAgICAgICMKICAgICAg IyA9PT0gT3ZlcnJpZGluZyBnZW5lcmF0ZWQgbWV0aG9kcwogICAgICAjCiAgICAgICMgQXNz b2NpYXRpb24gbWV0aG9kcyBhcmUgZ2VuZXJhdGVkIGluIGEgbW9kdWxlIGluY2x1ZGVkIGlu dG8gdGhlIG1vZGVsCiAgICAgICMgY2xhc3MsIG1ha2luZyBvdmVycmlkZXMgZWFzeS4gVGhl IG9yaWdpbmFsIGdlbmVyYXRlZCBtZXRob2QgY2FuIHRodXMgYmUKICAgICAgIyBjYWxsZWQg d2l0aCArc3VwZXIrOgogICAgICAjCiAgICAgICMgICBjbGFzcyBDYXIgPCBBY3RpdmVSZWNv cmQ6OkJhc2UKICAgICAgIyAgICAgYmVsb25nc190byA6b3duZXIKICAgICAgIyAgICAgYmVs b25nc190byA6b2xkX293bmVyCiAgICAgICMKICAgICAgIyAgICAgZGVmIG93bmVyPShuZXdf b3duZXIpCiAgICAgICMgICAgICAgc2VsZi5vbGRfb3duZXIgPSBzZWxmLm93bmVyCiAgICAg ICMgICAgICAgc3VwZXIKICAgICAgIyAgICAgZW5kCiAgICAgICMgICBlbmQKICAgICAgIwog ICAgICAjIFRoZSBhc3NvY2lhdGlvbiBtZXRob2RzIG1vZHVsZSBpcyBpbmNsdWRlZCBpbW1l ZGlhdGVseSBhZnRlciB0aGUKICAgICAgIyBnZW5lcmF0ZWQgYXR0cmlidXRlcyBtZXRob2Rz IG1vZHVsZSwgbWVhbmluZyBhbiBhc3NvY2lhdGlvbiB3aWxsCiAgICAgICMgb3ZlcnJpZGUg dGhlIG1ldGhvZHMgZm9yIGFuIGF0dHJpYnV0ZSB3aXRoIHRoZSBzYW1lIG5hbWUuCiAgICAg ICMKICAgICAgIyA9PSBDYXJkaW5hbGl0eSBhbmQgYXNzb2NpYXRpb25zCiAgICAgICMKICA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VtcGxveWVlcwogICAgICAjICAgZW5kCiAgICAgICMgICBjbGFz cyBFbXBsb3llZSA8IEFjdGl2ZVJlY29yZDo6QmFzZQogICAgICAjICAgICBiZWxvbmdzX3Rv IDptYW5hZ2VyICAgICAjIGZvcmVpZ24ga2V5IC0gbWFuYWdlcl9pZAogICAgICAjICAgZW5k CiAgICAgICMKICAgICAgIyA9PT0gTWFueS10by1tYW55CiAgICAgICMKICAgICAgIyBUaGVy ZSBhcmUgdHdvIHdheXMgdG8gYnVpbGQgYSBtYW55LXRvLW1hbnkgcmVsYXRpb25zaGlwLgog ICAgICAjCiAgICAgICMgVGhlIGZpcnN0IHdheSB1c2VzIGEgI2hhc19tYW55IGFzc29jaWF0 aW9uIHdpdGggdGhlIDx0dD46dGhyb3VnaDwvdHQ+IG9wdGlvbiBhbmQgYSBqb2luIG1vZGVs LCBzbwogICAgICAjIHRoZXJlIGFyZSB0d28gc3RhZ2VzIG9mIGFzc29jaWF0aW9ucy4KICAg ICAgIwogICAgICAjICAgY2xhc3MgQXNzaWdubWVudCA8IEFjdGl2ZVJlY29yZDo6QmFzZQog ICAgICAjICAgICBiZWxvbmdzX3RvIDpwcm9ncmFtbWVyICAjIGZvcmVpZ24ga2V5IC0gcHJv Z3JhbW1lcl9pZAogICAgICAjICAgICBiZWxvbmdzX3RvIDpwcm9qZWN0ICAgICAjIGZvcmVp Z24ga2V5IC0gcHJvamVjdF9pZAogICAgICAjICAgZW5kCiAgICAgICMgICBjbGFzcyBQcm9n cmFtbWVyIDwgQWN0aXZlUmVjb3JkOjpCYXNlCiAgICAgICMgICAgIGhhc19tYW55IDphc3Np Z25tZW50cwogICAgICAjICAgICBoYXNfbWFueSA6cHJvamVjdHMsIHRocm91Z2g6IDphc3Np Z25tZW50cwogICAgICAjICAgZW5kCiAgICAgICMgICBjbGFzcyBQcm9qZWN0IDwgQWN0aXZl UmVjb3JkOjpCYXNlCiAgICAgICMgICAgIGhhc19tYW55IDphc3NpZ25tZW50cwogICAgICA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gd29yayBkaXJlY3RseSB3aXRoIHRoZSByZWxhdGlvbnNoaXAgaXRz ZWxmLgogICAgICAjCiAgICAgICMgPT0gSXMgaXQgYSAjYmVsb25nc190byBvciAjaGFzX29u ZSBhc3NvY2lhdGlvbj8KICAgICAgIwogICAgICAjIEJvdGggZXhwcmVzcyBhIDEtMSByZWxh dGlvbnNoaXAuIFRoZSBkaWZmZXJlbmNlIGlzIG1vc3RseSB3aGVyZSB0byBwbGFjZSB0aGUg Zm9yZWlnbgogICAgICAjIGtleSwgd2hpY2ggZ29lcyBvbiB0aGUgdGFibGUgZm9yIHRoZSBj bGFzcyBkZWNsYXJpbmcgdGhlICNiZWxvbmdzX3RvIHJlbGF0aW9uc2hpcC4KICAgICAgIwog ICAgICAjICAgY2xhc3MgVXNlciA8IEFjdGl2ZVJlY29yZDo6QmFzZQogICAgICAjICAgICAj IEkgcmVmZXJlbmNlIGFuIGFjY291bnQuCiAgICAgICMgICAgIGJlbG9uZ3NfdG8gOmFjY291 bnQKICAgICAgIyAgIGVuZAogICAgICAjCiAgICAgICMgICBjbGFzcyBBY2NvdW50IDwgQWN0 aXZlUmVjb3JkOjpCYXNlCiAgICAgICMgICAgICMgT25lIHVzZXIgcmVmZXJlbmNlcyBtZS4K ICAgICAgIyAgICAgaGFzX29uZSA6dXNlcgogICAgICAjICAgZW5kCiAgICAgICMKICAgICAg IyBUaGUgdGFibGVzIGZvciB0aGVzZSBjbGFzc2VzIGNvdWxkIGxvb2sgc29tZXRoaW5nIGxp a2U6CiAgICAgICMKICAgICAgIyAgIENSRUFURSBUQUJMRSB1c2VycyAoCiAgICAgICMgICAg IGlkIGJpZ2ludCBOT1QgTlVMTCBhdXRvX2luY3JlbWVudCwKICAgICAgIyAgICAgYWNjb3Vu dF9pZCBiaWdpbnQgZGVmYXVsdCBOVUxMLAogICAgICAjICAgICBuYW1lIHZhcmNoYXIgZGVm YXVsdCBOVUxMLAogICAgICAjICAgICBQUklNQVJZIEtFWSAgKGlkKQogICAg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G9iamVjdCwKICAgICAgIyB5b3UgY2FuIGFsc28g ZGVmaW5lIGNhbGxiYWNrcyB0aGF0IGdldCB0cmlnZ2VyZWQgd2hlbiB5b3UgYWRkIGFuIG9i amVjdCB0byBvciByZW1vdmUgYW4KICAgICAgIyBvYmplY3QgZnJvbSBhbiBhc3NvY2lhdGlv biBjb2xsZWN0aW9uLgogICAgICAjCiAgICAgICMgICBjbGFzcyBGaXJtIDwgQWN0aXZlUmVj b3JkOjpCYXNlCiAgICAgICMgICAgIGhhc19tYW55IDpjbGllbnRzLAogICAgICAjICAgICAg ICAgICAgICBkZXBlbmRlbnQ6IDpkZXN0cm95LAogICAgICAjICAgICAgICAgICAgICBhZnRl cl9hZGQ6IDpjb25ncmF0dWxhdGVfY2xpZW50LAogICAgICAjICAgICAgICAgICAgICBhZnRl cl9yZW1vdmU6IDpsb2dfYWZ0ZXJfcmVtb3ZlCiAgICAgICMKICAgICAgIyAgICAgZGVmIGNv bmdyYXR1bGF0ZV9jbGllbnQocmVjb3JkKQogICAgICAjICAgICAgICMgLi4uCiAgICAgICMg ICAgIGVuZAogICAgICAjCiAgICAgICMgICAgIGRlZiBsb2dfYWZ0ZXJfcmVtb3ZlKHJlY29y ZCkKICAgICAgIyAgICAgICAjIC4uLgogICAgICAjICAgICBlbmQKICAgICAgIyAgIGVuZAog ICAgICAjCiAgICAgICMgSXQncyBwb3NzaWJsZSB0byBzdGFjayBjYWxsYmFja3MgYnkgcGFz c2luZyB0aGVtIGFzIGFuIGFycmF5LiBFeGFtcGxlOgogICAgICAjCiAgICAgICMgICBjbGFz cyBGaXJtIDwgQWN0aXZlUmVjb3JkOjpCYXNlCiAgICAgICMgICAgIGhhc19tYW55IDpjbGll bnRzLAogICAgICAjICAgICAgICAgICAgICBkZXBlbmRlbnQ6IDpkZXN0cm95LAogICAgICAj ICAgICAgICAgICAgICBhZnRlcl9hZGQ6IFs6Y29uZ3JhdHVsYXRlX2NsaWVudCwgLT4gKGZp cm0sIHJlY29yZC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XBzCiAgICAgICMgICAgIGhhc19tYW55IDpib29rcywgdGhyb3VnaDogOmF1 dGhvcnNoaXBzCiAgICAgICMgICBlbmQKICAgICAgIwogICAgICAjICAgY2xhc3MgQXV0aG9y c2hpcCA8IEFjdGl2ZVJlY29yZDo6QmFzZQogICAgICAjICAgICBiZWxvbmdzX3RvIDphdXRo b3IKICAgICAgIyAgICAgYmVsb25nc190byA6Ym9vawogICAgICAjICAgZW5kCiAgICAgICMK ICAgICAgIyAgIEBhdXRob3IgPSBBdXRob3IuZmlyc3QKICAgICAgIyAgIEBhdXRob3IuYXV0 aG9yc2hpcHMuY29sbGVjdCB7IHxhfCBhLmJvb2sgfSAjIHNlbGVjdHMgYWxsIGJvb2tzIHRo YXQgdGhlIGF1dGhvcidzIGF1dGhvcnNoaXBzIGJlbG9uZyB0bwogICAgICAjICAgQGF1dGhv ci5ib29rcyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICMgc2VsZWN0cyBhbGwgYm9v a3MgYnkgdXNpbmcgdGhlIEF1dGhvcnNoaXAgam9pbiBtb2RlbAogICAgICAjCiAgICAgICMg WW91IGNhbiBhbHNvIGdvIHRocm91Z2ggYSAjaGFzX21hbnkgYXNzb2NpYXRpb24gb24gdGhl IGpvaW4gbW9kZWw6CiAgICAgICMKICAgICAgIyAgIGNsYXNzIEZpcm0gPCBBY3RpdmVSZWNv cmQ6OkJhc2UKICAgICAgIyAgICAgaGFzX21hbnkgICA6Y2xpZW50cwogICAgICAjICAgICBo YXNfbWFueSAgIDppbnZvaWNlcywgdGhyb3VnaDogOmNsaWVudHMKICAgICAgIyAgIGVuZAog ICAgICAjCiAgICAgICMgICBjbGFzcyBDbGllbnQgPCBBY3RpdmVSZWNvcmQ6OkJhc2UKICAg ICAgIyAgICAgYmVsb25nc190byA6ZmlybQogICAgICAjICAgICBoYXNfbWFueSAgIDppbnZv aWNlcwogICAgICAjICAgZW5kCiAgICAgICMKICAgICAgIyAgIGNsYXNzIEludm9pY2UgPCBB Y3RpdmVSZWNvcmQ6OkJhc2UKICAgICAgIyAgICAgYmVsb25nc190byA6Y2xpZW50CiAgICAg ICMgICBlbmQKICAgICAgIwogICAgICAjICAgQGZpcm0gPSBGaXJtLmZpcnN0CiAgICAgICMg ICBAZmlybS5jbGllbnRzLmZsYXRfbWFwIHsgfGN8IGMuaW52b2ljZXMgfSAjIHNlbGVjdCBh bGwgaW52b2ljZXMgZm9yIGFsbCBjbGllbnRzIG9mIHRoZSBmaXJtCiAgICAgICMgICBAZmly bS5pbnZvaWNlcyAgICAgICAgICAgICAgICAgICAgICAgICAgICAjIHNlbGVjdHMgYWxsIGlu dm9pY2VzIGJ5IGdvaW5nIHRocm91Z2ggdGhlIENsaWVudCBqb2luIG1vZGVsCiAgICAgICMK ICAgICAgIyBTaW1pbGFybHkgeW91IGNhbiBnbyB0aHJvdWdoIGEgI2hhc19vbmUgYXNzb2Np YXRpb24gb24gdGhlIGpvaW4gbW9kZWw6CiAgICAgICMKICAgICAgIyAgIGNsYXNzIEdyb3Vw IDwgQWN0aXZlUmVjb3JkOjpCYXNlCiAgICAgICMgICAgIGhhc19tYW55ICAgOnVzZXJzCiAg ICAgICMgICAgIGhhc19tYW55ICAgOmF2YXRhcnMsIHRocm91Z2g6IDp1c2VycwogICAgICAj ICAgZW5kCiAgICAgICMKICAgICAgIyAgIGNsYXNzIFVzZXIgPCBBY3RpdmVSZWNvcmQ6OkJh c2UKICAgICAgIyAgICAgYmVsb25nc190byA6Z3JvdXAKICAgICAgIyAgICAgaGFzX29uZSAg ICA6YXZhdGFyCiAgICAgICMgICBlbmQKICAgICAgIwogICAgICAjICAgY2xhc3MgQXZhdGFy IDwgQWN0aXZlUmVjb3JkOjpCYXNlCiAgICAgICMgICAgIGJlbG9uZ3NfdG8gOnVzZXIKICAg ICAgIyAgIGVuZAogICAgICAjCiAgICAgICMgICBAZ3JvdXAgPSBHcm91cC5maXJzdAogICAg ICAjICAgQGdyb3VwLnVzZXJzLmNvbGxlY3QgeyB8dX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lzIHdvdWxkIGJlOgogICAgICAjCiAgICAgICMgICBjbGFz cyBBdXRob3IgPCBBY3RpdmVSZWNvcmQ6OkJhc2UKICAgICAgIyAgICAgaGFzX21hbnkgOnBv c3RzCiAgICAgICMgICAgIGhhc19tYW55IDpjb21tZW50ZXJzLCB0aHJvdWdoOiA6cG9zdHMK ICAgICAgIyAgIGVuZAogICAgICAjCiAgICAgICMgICBjbGFzcyBQb3N0IDwgQWN0aXZlUmVj b3JkOjpCYXNlCiAgICAgICMgICAgIGhhc19tYW55IDpjb21tZW50cwogICAgICAjICAgICBo YXNfbWFueSA6Y29tbWVudGVycywgdGhyb3VnaDogOmNvbW1lbnRzCiAgICAgICMgICBlbmQK ICAgICAgIwogICAgICAjICAgY2xhc3MgQ29tbWVudCA8IEFjdGl2ZVJlY29yZDo6QmFzZQog ICAgICAjICAgICBiZWxvbmdzX3RvIDpjb21tZW50ZXIKICAgICAgIyAgIGVuZAogICAgICAj CiAgICAgICMgV2hlbiB1c2luZyBhIG5lc3RlZCBhc3NvY2lhdGlvbiwgeW91IHdpbGwgbm90 IGJlIGFibGUgdG8gbW9kaWZ5IHRoZSBhc3NvY2lhdGlvbiBiZWNhdXNlIHRoZXJlCiAgICAg ICMgaXMgbm90IGVub3VnaCBpbmZvcm1hdGlvbiB0byBrbm93IHdoYXQgbW9kaWZpY2F0aW9u IHRvIG1ha2UuIEZvciBleGFtcGxlLCBpZiB5b3UgdHJpZWQgdG8KICAgICAgIyBhZGQgYSA8 dHQ+Q29tbWVudGVyPC90dD4gaW4gdGhlIGV4YW1wbGUgYWJvdmUsIHRoZXJlIHdvdWxkIGJl IG5vIHdheSB0byB0ZWxsIGhvdyB0byBzZXQgdXAgdGhlCiAgICAgICMgaW50ZXJtZWRpYXRl IDx0dD5Qb3N0PC90dD4gYW5kIDx0dD5Db21tZW50PC90dD4gb2JqZWN0cy4KICAgICAgIwog ICAgICAjID09IFBvbHltb3JwaGljIFxBc3NvY2lhdGlvbnMKICAgICAgIwog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Lmpv aW5zKDpjaGlsZHJlbikKICAgICAgIyAgICMgPT4gU0VMRUNUIC4uLiBGUk9NIG1peGlucyBJ Tk5FUiBKT0lOIG1peGlucyBjaGlsZHJlbnNfbWl4aW5zIC4uLgogICAgICAjICAgVHJlZU1p eGluLmpvaW5zKGNoaWxkcmVuOiA6cGFyZW50KQogICAgICAjICAgIyA9PiBTRUxFQ1QgLi4u IEZST00gbWl4aW5zIElOTkVSIEpPSU4gbWl4aW5zIGNoaWxkcmVuc19taXhpbnMgLi4uCiAg ICAgICMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgSU5ORVIgSk9JTiBwYXJlbnRz X21peGlucyAuLi4KICAgICAgIyAgIFRyZWVNaXhpbi5qb2lucyhjaGlsZHJlbjoge3BhcmVu dDogOmNoaWxkcmVufSkKICAgICAgIyAgICMgPT4gU0VMRUNUIC4uLiBGUk9NIG1peGlucyBJ Tk5FUiBKT0lOIG1peGlucyBjaGlsZHJlbnNfbWl4aW5zIC4uLgogICAgICAjICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIElOTkVSIEpPSU4gcGFyZW50c19taXhpbnMgLi4uCiAg ICAgICMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgSU5ORVIgSk9JTiBtaXhpbnMg Y2hpbGRyZW5zX21peGluc18yCiAgICAgICMKICAgICAgIyBIYXMgYW5kIEJlbG9uZ3MgdG8g TWFueSBqb2luIHRhYmxlcyB1c2UgdGhlIHNhbWUgaWRlYSwgYnV0IGFkZCBhIDx0dD5fam9p bjwvdHQ+IHN1ZmZpeDoKICAgICAgIwogICAgICAjICAgUG9zdC5qb2lucyg6Y2F0ZWdvcmll cykKICAgICAgIyAgICMgPT4gU0VMRUNUIC4uLiBGUk9NIHBvc3RzIElOTkVSIEpPSU4gY2F0 ZWdvcmllc19wb3N0cyAuLi4gSU5ORVIgSk9JTiBjYXRlZ29yaWVzIC4uLgogICAgICAjICAg UG9zdC5qb2lucyhjYXRlZ29yaWVzOiA6cG9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MgICBQb3N0LmpvaW5zKDpjb21t ZW50cykuam9pbnMoImlubmVyIGpvaW4gY29tbWVudHMgLi4uIikKICAgICAgIyAgICMgPT4g U0VMRUNUIC4uLiBGUk9NIHBvc3RzIElOTkVSIEpPSU4gY29tbWVudHNfcG9zdHMgT04gLi4u IElOTkVSIEpPSU4gY29tbWVudHMgLi4uCiAgICAgICMgICBQb3N0LmpvaW5zKDpjb21tZW50 cywgOnNwZWNpYWxfY29tbWVudHMpLmpvaW5zKCJpbm5lciBqb2luIGNvbW1lbnRzIC4uLiIp CiAgICAgICMgICAjID0+IFNFTEVDVCAuLi4gRlJPTSBwb3N0cyBJTk5FUiBKT0lOIGNvbW1l bnRzIGNvbW1lbnRzX3Bvc3RzIE9OIC4uLgogICAgICAjICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgSU5ORVIgSk9JTiBjb21tZW50cyBzcGVjaWFsX2NvbW1lbnRzX3Bvc3RzIC4u LgogICAgICAjICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgSU5ORVIgSk9JTiBjb21t ZW50cyAuLi4KICAgICAgIwogICAgICAjIFRhYmxlIGFsaWFzZXMgYXJlIGF1dG9tYXRpY2Fs bHkgdHJ1bmNhdGVkIGFjY29yZGluZyB0byB0aGUgbWF4aW11bSBsZW5ndGggb2YgdGFibGUg aWRlbnRpZmllcnMKICAgICAgIyBhY2NvcmRpbmcgdG8gdGhlIHNwZWNpZmljIGRhdGFiYXNl LgogICAgICAjCiAgICAgICMgPT0gTW9kdWxlcwogICAgICAjCiAgICAgICMgQnkgZGVmYXVs dCwgYXNzb2NpYXRpb25zIHdpbGwgbG9vayBmb3Igb2JqZWN0cyB3aXRoaW4gdGhlIGN1cnJl bnQgbW9kdWxlIHNjb3BlLiBDb25zaWRlcjoKICAgICAgIwogICAgICAjICAgbW9kdWxlIE15 QXBwbGljYXRpb24KICAgICAgIyAgICAgbW9kdWxlIEJ1c2luZXNzCiAgICAgICMgICAgICAg Y2xhc3MgRmlybSA8IEFjdGl2ZVJlY29yZDo6QmFzZQogICAgICAjICAgICAgICAgaGFzX21h bnkgOmNsaWVudHMKICAgICAgIyAgICAgICBlbmQKICAgICAgIwogICAgICAjICAgICAgIGNs YXNzIENsaWVudCA8IEFjdGl2ZVJlY29yZDo6QmFzZTsgZW5kCiAgICAgICMgICAgIGVuZAog ICAgICAjICAgZW5kCiAgICAgICMKICAgICAgIyBXaGVuIDx0dD5GaXJtI2NsaWVudHM8L3R0 PiBpcyBjYWxsZWQsIGl0IHdpbGwgaW4gdHVybiBjYWxsCiAgICAgICMgPHR0Pk15QXBwbGlj YXRpb246OkJ1c2luZXNzOjpDbGllbnQuZmluZF9hbGxfYnlfZmlybV9pZChmaXJtLmlkKTwv dHQ+LgogICAgICAjIElmIHlvdSB3YW50IHRvIGFzc29jaWF0ZSB3aXRoIGEgY2xhc3MgaW4g YW5vdGhlciBtb2R1bGUgc2NvcGUsIHRoaXMgY2FuIGJlIGRvbmUgYnkKICAgICAgIyBzcGVj aWZ5aW5nIHRoZSBjb21wbGV0ZSBjbGFzcyBuYW1lLgogICAgICAjCiAgICAgICMgICBtb2R1 bGUgTXlBcHBsaWNhdGlvbgogICAgICAjICAgICBtb2R1bGUgQnVzaW5lc3MKICAgICAgIyAg ICAgICBjbGFzcyBGaXJtIDwgQWN0aXZlUmVjb3JkOjpCYXNlOyBlbmQKICAgICAgIyAgICAg ZW5kCiAgICAgICMKICAgICAgIyAgICAgbW9kdWxlIEJpbGxpbmcKICAgICAgIyAgICAgICBj bGFzcyBBY2NvdW50IDwgQWN0aXZlUmVjb3JkOjpCYXNlCiAgICAgICMgICAgICAgICBiZWxv bmdzX3RvIDpmaXJtLCBjbGFzc19uYW1lOiAiTXlBcHBsaWNhdGlvbjo6QnVzaW5lc3M6OkZp cm0iCiAgICAgICMgICAgICAgZW5kCiAgICAgICMgICAgIGVuZAogICAgICAjICAgZW5kCiAg ICAgICMKICAgICAgIyA9PSBCaS1kaXJlY3Rpb25hbCBhc3NvY2lh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ICAgICMKICAgICAgIyAgICBjbGFzcyBFdmlsV2l6YXJkIDwgQWN0aXZl UmVjb3JkOjpCYXNlCiAgICAgICMgICAgICBiZWxvbmdzX3RvIDpkdW5nZW9uLCBpbnZlcnNl X29mOiA6ZXZpbF93aXphcmQKICAgICAgIyAgICBlbmQKICAgICAgIwogICAgICAjIEZvciBt b3JlIGluZm9ybWF0aW9uLCBzZWUgdGhlIGRvY3VtZW50YXRpb24gZm9yIHRoZSArOmludmVy c2Vfb2YrIG9wdGlvbiBhbmQgdGhlCiAgICAgICMge0FjdGl2ZSBSZWNvcmQgQXNzb2NpYXRp b25zIGd1aWRlfVtodHRwczovL2d1aWRlcy5ydWJ5b25yYWlscy5vcmcvYXNzb2NpYXRpb25f YmFzaWNzLmh0bWwjYmktZGlyZWN0aW9uYWwtYXNzb2NpYXRpb25zXS4KICAgICAgIwogICAg ICAjID09IERlbGV0aW5nIGZyb20gYXNzb2NpYXRpb25zCiAgICAgICMKICAgICAgIyA9PT0g RGVwZW5kZW50IGFzc29jaWF0aW9ucwogICAgICAjCiAgICAgICMgI2hhc19tYW55LCAjaGFz X29uZSwgYW5kICNiZWxvbmdzX3RvIGFzc29jaWF0aW9ucyBzdXBwb3J0IHRoZSA8dHQ+OmRl cGVuZGVudDwvdHQ+IG9wdGlvbi4KICAgICAgIyBUaGlzIGFsbG93cyB5b3UgdG8gc3BlY2lm eSB0aGF0IGFzc29jaWF0ZWQgcmVjb3JkcyBzaG91bGQgYmUgZGVsZXRlZCB3aGVuIHRoZSBv d25lciBpcwogICAgICAjIGRlbGV0ZWQuCiAgICAgICMKICAgICAgIyBGb3IgZXhhbXBsZToK ICAgICAgIwogICAgICAjICAgICBjbGFzcyBBdXRob3IKICAgICAgIyAgICAgICBoYXNfbWFu eSA6cG9zdHMsIGRlcGVuZGVudDogOmRlc3Ryb3kKICAgICAgIyAgICAgZW5kCiAgICAgICMg ICAgIEF1dGhvci5maW5kKDEpLmRlc3Ryb3kgIyA9PiBXaWxsIG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RJbnZhbGlkCiAgICAgICAgIyAgIGlmIHRoZSBy ZWNvcmQgaXMgaW52YWxpZC4KICAgICAgICAjIFtjb2xsZWN0aW9uLnJlbG9hZF0KICAgICAg ICAjICAgUmV0dXJucyBhIFJlbGF0aW9uIG9mIGFsbCBvZiB0aGUgYXNzb2NpYXRlZCBvYmpl Y3RzLCBmb3JjaW5nIGEgZGF0YWJhc2UgcmVhZC4KICAgICAgICAjICAgQW4gZW1wdHkgUmVs YXRpb24gaXMgcmV0dXJuZWQgaWYgbm9uZSBhcmUgZm91bmQuCiAgICAgICAgIwogICAgICAg ICMgPT09IEV4YW1wbGUKICAgICAgICAjCiAgICAgICAgIyAgIGNsYXNzIEZpcm0gPCBBY3Rp dmVSZWNvcmQ6OkJhc2UKICAgICAgICAjICAgICBoYXNfbWFueSA6Y2xpZW50cwogICAgICAg ICMgICBlbmQKICAgICAgICAjCiAgICAgICAgIyBEZWNsYXJpbmcgPHR0Pmhhc19tYW55IDpj bGllbnRzPC90dD4gYWRkcyB0aGUgZm9sbG93aW5nIG1ldGhvZHMgKGFuZCBtb3JlKToKICAg ICAgICAjCiAgICAgICAgIyAgIGZpcm0gPSBGaXJtLmZpbmQoMikKICAgICAgICAjICAgY2xp ZW50ID0gQ2xpZW50LmZpbmQoNikKICAgICAgICAjCiAgICAgICAgIyAgIGZpcm0uY2xpZW50 cyAgICAgICAgICAgICAgICAgICAgICAgIyBzaW1pbGFyIHRvIENsaWVudC53aGVyZShmaXJt X2lkOiAyKQogICAgICAgICMgICBmaXJtLmNsaWVudHMgPDwgY2xpZW50CiAgICAgICAgIyAg IGZpcm0uY2xpZW50cy5kZWxldGUoY2xpZW50KQogICAgICAgICMgICBmaXJtLmNsaWVudHMu ZGVzdHJveShjbGllbnQpCiAgICAgICAgIyAgIGZpcm0uY2xpZW50cyA9IFtjbGllbnRdCiAg ICAgICAgIyAgIGZpcm0uY2xpZW50X2lkcwogICAgICAgICMgICBmaXJtLmNsaWVudF9pZHMg PSBbNl0KICAgICAgICAjICAgZmlybS5jbGllbnRzLmNsZWFyCiAgICAgICAgIyAgIGZpcm0u Y2xpZW50cy5lbXB0eT8gICAgICAgICAgICAgICAgIyBzaW1pbGFyIHRvIGZpcm0uY2xpZW50 cy5zaXplID09IDAKICAgICAgICAjICAgZmlybS5jbGllbnRzLnNpemUgICAgICAgICAgICAg ICAgICAjIHNpbWlsYXIgdG8gQ2xpZW50LmNvdW50ICJmaXJtX2lkID0gMiIKICAgICAgICAj ICAgZmlybS5jbGllbnRzLmZpbmQgICAgICAgICAgICAgICAgICAjIHNpbWlsYXIgdG8gQ2xp ZW50LndoZXJlKGZpcm1faWQ6IDIpLmZpbmQoNikKICAgICAgICAjICAgZmlybS5jbGllbnRz LmV4aXN0cz8obmFtZTogJ0FDTUUnKSAjIHNpbWlsYXIgdG8gQ2xpZW50LmV4aXN0cz8obmFt ZTogJ0FDTUUnLCBmaXJtX2lkOiAyKQogICAgICAgICMgICBmaXJtLmNsaWVudHMuYnVpbGQg ICAgICAgICAgICAgICAgICMgc2ltaWxhciB0byBDbGllbnQubmV3KGZpcm1faWQ6IDIpCiAg ICAgICAgIyAgIGZpcm0uY2xpZW50cy5jcmVhdGUgICAgICAgICAgICAgICAgIyBzaW1pbGFy IHRvIENsaWVudC5jcmVhdGUoZmlybV9pZDogMikKICAgICAgICAjICAgZmlybS5jbGllbnRz LmNyZWF0ZSEgICAgICAgICAgICAgICAjIHNpbWlsYXIgdG8gQ2xpZW50LmNyZWF0ZSEoZmly bV9pZDogMikKICAgICAgICAjICAgZmlybS5jbGllbnRzLnJlbG9hZAogICAgICAgICMKICAg ICAgICAjIFRoZSBkZWNsYXJhdGlvbiBjYW4gYWxzbyBpbmNsdWRlIGFuICtvcHRpb25zKyBo YXNoIHRvIHNwZWNpYWxpemUgdGhlIGJlaGF2aW9yIG9mIHRoZSBhc3NvY2lhdGlvbi4KICAg ICAgICAjCiAgICAgICAgIyA9PT0gU2NvcGVzCiAgICAgICAgIwogICAgICAgICMg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Vuc3VyaW5nX293bmVyX3dhc10KICAg ICAgICAjICAgU3BlY2lmaWVzIGFuIGluc3RhbmNlIG1ldGhvZCB0byBiZSBjYWxsZWQgb24g dGhlIG93bmVyLiBUaGUgbWV0aG9kIG11c3QgcmV0dXJuIHRydWUgaW4gb3JkZXIgZm9yIHRo ZQogICAgICAgICMgICBhc3NvY2lhdGVkIHJlY29yZHMgdG8gYmUgZGVsZXRlZCBpbiBhIGJh Y2tncm91bmQgam9iLgogICAgICAgICMKICAgICAgICAjIE9wdGlvbiBleGFtcGxlczoKICAg ICAgICAjICAgaGFzX21hbnkgOmNvbW1lbnRzLCAtPiB7IG9yZGVyKCJwb3N0ZWRfb24iKSB9 CiAgICAgICAgIyAgIGhhc19tYW55IDpjb21tZW50cywgLT4geyBpbmNsdWRlcyg6YXV0aG9y KSB9CiAgICAgICAgIyAgIGhhc19tYW55IDpwZW9wbGUsIC0+IHsgd2hlcmUoZGVsZXRlZDog ZmFsc2UpLm9yZGVyKCJuYW1lIikgfSwgY2xhc3NfbmFtZTogIlBlcnNvbiIKICAgICAgICAj ICAgaGFzX21hbnkgOnRyYWNrcywgLT4geyBvcmRlcigicG9zaXRpb24iKSB9LCBkZXBlbmRl bnQ6IDpkZXN0cm95CiAgICAgICAgIyAgIGhhc19tYW55IDpjb21tZW50cywgZGVwZW5kZW50 OiA6bnVsbGlmeQogICAgICAgICMgICBoYXNfbWFueSA6dGFncywgYXM6IDp0YWdnYWJsZQog ICAgICAgICMgICBoYXNfbWFueSA6cmVwb3J0cywgLT4geyByZWFkb25seSB9CiAgICAgICAg IyAgIGhhc19tYW55IDpzdWJzY3JpYmVycywgdGhyb3VnaDogOnN1YnNjcmlwdGlvbnMsIHNv dXJjZTogOnVzZXIKICAgICAgICAjICAgaGFzX21hbnkgOnN1YnNjcmliZXJzLCB0aHJvdWdo OiA6c3Vic2NyaXB0aW9ucywgZGlzYWJsZV9qb2luczogdHJ1ZQogICAgICAgICMgICBoYXNf bWFueSA6Y29tbWV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gICMgRGVjbGFy aW5nIDx0dD5oYXNfb25lIDpiZW5lZmljaWFyeTwvdHQ+IGFkZHMgdGhlIGZvbGxvd2luZyBt ZXRob2RzIChhbmQgbW9yZSk6CiAgICAgICAgIwogICAgICAgICMgICBhY2NvdW50ID0gQWNj b3VudC5maW5kKDUpCiAgICAgICAgIyAgIGJlbmVmaWNpYXJ5ID0gQmVuZWZpY2lhcnkuZmlu ZCg4KQogICAgICAgICMKICAgICAgICAjICAgYWNjb3VudC5iZW5lZmljaWFyeSAgICAgICAg ICAgICAgICMgc2ltaWxhciB0byBCZW5lZmljaWFyeS5maW5kX2J5KGFjY291bnRfaWQ6IDUp CiAgICAgICAgIyAgIGFjY291bnQuYmVuZWZpY2lhcnkgPSBiZW5lZmljaWFyeSAjIHNpbWls YXIgdG8gYmVuZWZpY2lhcnkudXBkYXRlKGFjY291bnRfaWQ6IDUpCiAgICAgICAgIyAgIGFj Y291bnQuYnVpbGRfYmVuZWZpY2lhcnkgICAgICAgICAjIHNpbWlsYXIgdG8gQmVuZWZpY2lh cnkubmV3KGFjY291bnRfaWQ6IDUpCiAgICAgICAgIyAgIGFjY291bnQuY3JlYXRlX2JlbmVm aWNpYXJ5ICAgICAgICAjIHNpbWlsYXIgdG8gQmVuZWZpY2lhcnkuY3JlYXRlKGFjY291bnRf aWQ6IDUpCiAgICAgICAgIyAgIGFjY291bnQuY3JlYXRlX2JlbmVmaWNpYXJ5ISAgICAgICAj IHNpbWlsYXIgdG8gQmVuZWZpY2lhcnkuY3JlYXRlIShhY2NvdW50X2lkOiA1KQogICAgICAg ICMgICBhY2NvdW50LnJlbG9hZF9iZW5lZmljaWFyeQogICAgICAgICMgICBhY2NvdW50LnJl c2V0X2JlbmVmaWNpYXJ5CiAgICAgICAgIwogICAgICAgICMgPT09IFNjb3BlcwogICAgICAg ICMKICAgICAgICAjIFlvdSBjYW4gcGFzcyBhIHNlY29uZCBhcmd1bWVudCArc2NvcGUrIGFz IGEgY2FsbGFibGUgKGkuZ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jICAgcG9zdC5h dXRob3IgICAgICAgICAgICMgc2ltaWxhciB0byBBdXRob3IuZmluZChwb3N0LmF1dGhvcl9p ZCkKICAgICAgICAjICAgcG9zdC5hdXRob3IgPSBhdXRob3IgICMgc2ltaWxhciB0byBwb3N0 LmF1dGhvcl9pZCA9IGF1dGhvci5pZAogICAgICAgICMgICBwb3N0LmJ1aWxkX2F1dGhvciAg ICAgIyBzaW1pbGFyIHRvIHBvc3QuYXV0aG9yID0gQXV0aG9yLm5ldwogICAgICAgICMgICBw b3N0LmNyZWF0ZV9hdXRob3IgICAgIyBzaW1pbGFyIHRvIHBvc3QuYXV0aG9yID0gQXV0aG9y Lm5ldzsgcG9zdC5hdXRob3Iuc2F2ZTsgcG9zdC5hdXRob3IKICAgICAgICAjICAgcG9zdC5j cmVhdGVfYXV0aG9yISAgICMgc2ltaWxhciB0byBwb3N0LmF1dGhvciA9IEF1dGhvci5uZXc7 IHBvc3QuYXV0aG9yLnNhdmUhOyBwb3N0LmF1dGhvcgogICAgICAgICMgICBwb3N0LnJlbG9h ZF9hdXRob3IKICAgICAgICAjICAgcG9zdC5yZXNldF9hdXRob3IKICAgICAgICAjICAgcG9z dC5hdXRob3JfY2hhbmdlZD8KICAgICAgICAjICAgcG9zdC5hdXRob3JfcHJldmlvdXNseV9j aGFuZ2VkPwogICAgICAgICMKICAgICAgICAjID09PSBTY29wZXMKICAgICAgICAjCiAgICAg ICAgIyBZb3UgY2FuIHBhc3MgYSBzZWNvbmQgYXJndW1lbnQgK3Njb3BlKyBhcyBhIGNhbGxh YmxlIChpLmUuIHByb2Mgb3IKICAgICAgICAjIGxhbWJkYSkgdG8gcmV0cmlldmUgYSBzcGVj aWZpYyByZWNvcmQgb3IgY3VzdG9taXplIHRoZSBnZW5lcmF0ZWQgcXVlcnkKICAgICAgICAj IHdoZW4geW91IGFjY2VzcyB0aGUgYXNzb2NpYXRlZCBvYmplY3QuCiAgICAgICAgIwogICAg ICAgICMgU2NvcGUgZXhhbXBsZX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ICAjIERlY2xhcmluZyA8dHQ+aGFzX2FuZF9iZWxvbmdzX3Rv X21hbnkgOnByb2plY3RzPC90dD4gYWRkcyB0aGUgZm9sbG93aW5nIG1ldGhvZHMgKGFuZCBt b3JlKToKICAgICAgICAjCiAgICAgICAgIyAgIGRldmVsb3BlciA9IERldmVsb3Blci5maW5k KDExKQogICAgICAgICMgICBwcm9qZWN0ICAgPSBQcm9qZWN0LmZpbmQoOSkKICAgICAgICAj CiAgICAgICAgIyAgIGRldmVsb3Blci5wcm9qZWN0cwogICAgICAgICMgICBkZXZlbG9wZXIu cHJvamVjdHMgPDwgcHJvamVjdAogICAgICAgICMgICBkZXZlbG9wZXIucHJvamVjdHMuZGVs ZXRlKHByb2plY3QpCiAgICAgICAgIyAgIGRldmVsb3Blci5wcm9qZWN0cy5kZXN0cm95KHBy b2plY3QpCiAgICAgICAgIyAgIGRldmVsb3Blci5wcm9qZWN0cyA9IFtwcm9qZWN0XQogICAg ICAgICMgICBkZXZlbG9wZXIucHJvamVjdF9pZHMKICAgICAgICAjICAgZGV2ZWxvcGVyLnBy b2plY3RfaWRzID0gWzldCiAgICAgICAgIyAgIGRldmVsb3Blci5wcm9qZWN0cy5jbGVhcgog ICAgICAgICMgICBkZXZlbG9wZXIucHJvamVjdHMuZW1wdHk/CiAgICAgICAgIyAgIGRldmVs b3Blci5wcm9qZWN0cy5zaXplCiAgICAgICAgIyAgIGRldmVsb3Blci5wcm9qZWN0cy5maW5k KDkpCiAgICAgICAgIyAgIGRldmVsb3Blci5wcm9qZWN0cy5leGlzdHM/KDkpCiAgICAgICAg IyAgIGRldmVsb3Blci5wcm9qZWN0cy5idWlsZCAgIyBzaW1pbGFyIHRvIFByb2plY3QubmV3 KGRldmVsb3Blcl9pZDogMTEpCiAgICAgICAgIyAgIGRldmVsb3Blci5wcm9qZWN0cy5jcmVh dGUgIyBzaW1pbGFyIHRvIFByb2plY3QuY3JlYXRlKGRldmVsb3Blcl9pZDogMTEpCiAgICAg ICAgIyA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h0ZW5zaW9uCiAgICAgICAgICBfcmVmbGVjdGlvbnNb bmFtZS50b19zXS5wYXJlbnRfcmVmbGVjdGlvbiA9IGhhYnRtX3JlZmxlY3Rpb24KICAgICAg ICBlbmQKICAgICAgZW5kCiAgZW5kCmVuZAo= --------------9JD7newz6Vz0RG2soH0kgzf5--