X-Recipient: archive-cygwin@delorie.com
X-Original-To: cygwin@cygwin.com
Delivered-To: cygwin@cygwin.com
DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 3E2773858C60
Authentication-Results: sourceware.org;
 dmarc=none (p=none dis=none) header.from=towo.net
Authentication-Results: sourceware.org; spf=none smtp.mailfrom=towo.net
Subject: Re: Incompatible clipboard format between 32bit and 64bit cygwin
To: cygwin@cygwin.com
References: <20210926103325.5c17eb11c3c8a56c377199a8@nifty.ne.jp>
 <584f536c-b108-b562-b940-798ec2847c68@maxrnd.com>
From: Thomas Wolff <towo@towo.net>
Message-ID: <0b13b9ac-583f-ab72-4202-f8b187946d93@towo.net>
Date: Sun, 26 Sep 2021 20:37:45 +0200
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101
 Thunderbird/78.14.0
MIME-Version: 1.0
In-Reply-To: <584f536c-b108-b562-b940-798ec2847c68@maxrnd.com>
X-Provags-ID: V03:K1:HapxVJc3NUHHN9/liFJOeW+L9jRC5nI1usQs+e9jiPOTiPuoAj7
 kkFBcpzOfyx6g7bgkMrLS6A71+xZoBGXmvPN5Lx4Ruq5JHkTU3uf7qLbEksEaEZ2yUol3Pe
 xYpPdtnYPhOlqTrqZRRS4edCUWQvRiMXEDrniK1FfXeYHBfNRndZkuF+o2t37td7rrURucg
 h/ic/vXIOgWImHSwQ3quA==
X-UI-Out-Filterresults: notjunk:1;V03:K0:zSagNnzkVRU=:lV2ykWvBXbPNxwz9U7MlVG
 tPbxwUtHuwaIi4xhZdwka4fwbKv7CHbYKAt37MQLDNkxNEDmqKAnIFIvhtzh52H6Opn8bYLtz
 NhNCFZWLGCzhQiQjNf36wxydxBhc0vg/x6F38Xt6Lg1noAiqh7ErijpU6bBVM3PhJyBtG8Xan
 nyq+cJkqg+k/tWxIJIa755RMCbnGYwdYXoSqd4/aDI9jQG95PIrrR9QDfDk5G90SsOotlfLHJ
 lBDdz1qpW2RAnbFkiP/8SqYKrhbI19jYP+Ni/nQe2FUqQHkclbGHlcBQu8QQwsKC9llO2yccI
 ScmcBEJbsc09/sBkdlR3qIwxNOOUPR4V6HIMVcN+JNUQCFKrCxcPkpeIpu4wPXxwXviFkTC3v
 K4MGZiyiN9mdB4LbUC5kDqBzbpZqOpo9nRarZudOWc9knMzYdycWaK6azy+ZfwogGaa4hfj8w
 RbjO26fF+X3MJvRHYGgKJ3P8eJorvWXdK3zwJlbzzEcXepzOxQJGfQ8VzlHUVwjCpeH5TKlv0
 /hGAUyf7nxY4JYwLGso019X57NMW74wAbsq32ILFeIKnGRqY34VU03jbPXimLSLf/QF/I4OtY
 R1fbjsiaYW7TSGGjco3iQm0NLst2a1LmDzHlzBnq4hYlhpTTk6PWh4BfzMIebdOnLfP2fNlmN
 yaQr3563jAjXMTrASokS8GAYvwIYqFGmqHzhUl0WOBkOfbCCoGj8LoLMXXQZu1hv0P49UPQQO
 k3WuPRfSCbYumED1Ghylf6Q+sGZpG5V7n8EwVg==
X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00, BODY_8BITS,
 KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, NICE_REPLY_A, RCVD_IN_MSPIKE_H2,
 SPF_HELO_NONE, SPF_NONE, TXREP autolearn=no autolearn_force=no version=3.4.4
X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on
 server2.sourceware.org
X-BeenThere: cygwin@cygwin.com
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-request@cygwin.com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=subscribe>
Content-Type: text/plain; charset="utf-8"; Format="flowed"
Errors-To: cygwin-bounces+archive-cygwin=delorie.com@cygwin.com
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie.com@cygwin.com>
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 18QIbuVL022808


Am 26.09.2021 um 11:50 schrieb Mark Geisert:
> Hi Takashi,
>
> Takashi Yano via Cygwin wrote:
>> I noticed that cygwin clipboard is not compatible
>> between 32bit and 64bit cygwin.
>>
>> If I run 'echo AAAAAAAA > /dev/clipboard' in 32bit cygwin,
>> and run 'cat /dev/clipboard' in 64bit cygwin, this result in
>> cat: /dev/clipboard: Bad address
>>
>> This is because the structure
>> typedef struct
>> {
>>    timestruc_t   timestamp;
>>    size_t    len;
>>    char      data[1];
>> } cygcb_t;
>> defined in fhandler_clipboard.cc has different size.
>>
>> Is this the known issue?
>
> I doubt anybody has ever tried what you did. 
I have and it failed; I just didn't find it important enough to report 
it here... Thanks for the plan to fix it.

> I have been testing getclip and putclip between 32- and 64-bit 
> environments, but neglected to test Cygwin-internal clipboard format 
> that prepends cygcb_t to the user-supplied data.  So getclip and 
> putclip will need fixing as well.
>
> I will submit a Cygwin patch to fix /dev/clipboard usage and a similar 
> patch to cygutils for the utilities.
>
> I appreciate your help in uncovering and investigating bugs in 
> clipboard support.
> Thanks & Regards,
>
> ..mark
>


-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

