From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from m0.truegem.net (m0.truegem.net [69.55.228.47]) by sourceware.org (Postfix) with ESMTPS id DE4F43858403 for ; Sun, 26 Sep 2021 09:51:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org DE4F43858403 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=maxrnd.com Authentication-Results: sourceware.org; spf=none smtp.mailfrom=maxrnd.com Received: (from daemon@localhost) by m0.truegem.net (8.12.11/8.12.11) id 18Q9p7MD013858 for ; Sun, 26 Sep 2021 02:51:07 -0700 (PDT) (envelope-from mark@maxrnd.com) Received: from 162-235-43-67.lightspeed.irvnca.sbcglobal.net(162.235.43.67), claiming to be "[192.168.1.100]" via SMTP by m0.truegem.net, id smtpdq9whSN; Sun Sep 26 02:50:58 2021 Subject: Re: Incompatible clipboard format between 32bit and 64bit cygwin To: cygwin@cygwin.com References: <20210926103325.5c17eb11c3c8a56c377199a8@nifty.ne.jp> From: Mark Geisert Message-ID: <584f536c-b108-b562-b940-798ec2847c68@maxrnd.com> Date: Sun, 26 Sep 2021 02:50:58 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0 SeaMonkey/2.49.4 MIME-Version: 1.0 In-Reply-To: <20210926103325.5c17eb11c3c8a56c377199a8@nifty.ne.jp> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-9.0 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, NICE_REPLY_A, 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Sep 2021 09:51:10 -0000 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 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