delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2018/08/03/14:14:30

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:subject:to:references:cc:reply-to:from
:message-id:date:mime-version:in-reply-to:content-type
:content-transfer-encoding; q=dns; s=default; b=SLOoL7BHyv4saI9i
Xv1GDf1QjK02A6H/y8O1TIfbkn5FvN6wroD9AJ2apG7ae31ckjdl9jhBzI+/dYFM
IYV4UtmgFb/ZWNaCKef+DES58SfMubyeMtTdSgdZIOx3SlQUQp8lRMGWYHer+LKc
/DqYJbHNRsLx4KggqOSmcSlcjss=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:subject:to:references:cc:reply-to:from
:message-id:date:mime-version:in-reply-to:content-type
:content-transfer-encoding; s=default; bh=Fz41Ed3cy2rOaP6NFss56j
AinHo=; b=SKODdkDc8fpqiaTWXqBZeKvfi7xRJI+hqW1k5/E7uatTDoxh/qirhO
g0aaqONtim4Uu0BvWlQyJZWxjeQUbA/dyd4hVH+74PGSBhVKcRfP5PkppbdzwADE
ypW4mt61jDCXpL54WEy9/aAzqt+rPzTcaxJzeTCX/WygNi1ldTll4=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Spam-SWARE-Status: No, score=-3.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=H*R:U*cygwin, sk:newlib, Hx-spam-relays-external:ESMTPA, metal
X-HELO: out1-smtp.messagingengine.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :reply-to:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=ltOXowsNPcTq6cVfJhKqJspomfmRLk3ou/K+ZTVk63A=; b=ehml8AHMD2Lx /cmUO/0OoXxvoKgaKhFJD8SflqhCitW44/WGl8zitXP51cc/SeBA8b85jwRnALMV 1hZim7fV93tjn5WHmVuMnL56FXymlTBj+EKE2fBH0+8hIaJkXLN7qjIhs6fdfo9T 0JEynf6ZM7xochkjwCNdaQ71f+st/EOLJidfcRZ7IyiLGtHJ6l25sZ7w3m1djcMh 0EysqCuOkHfIVWUFC74uOvbHzld7psXhPcXSb1HPB48uo8CPBKxUeOs2M9FAEvDG Mfh1RrOyAzM3NKw1cx1hk0WnOhttIJzcbSiUvErIgd8bS94vBdSsi2AI/mo3Q1WU grjZfZ50ug==
Subject: Re: Self-compiled xorg-server 1.20.0 crashes at startup, buffer overflow
To: tumtum00 <tumtum00 AT protonmail DOT com>
References: <xXobGF2ZMAup4U6upeZeUT3opDh7hre6sWHSAxvN47Xqg3DQf19yecPcsNI_fp-hZ9wlneKpfh18sFgVad0nRvTKnojh_4yCAEF9Zw-s0a0=@protonmail.com> <e95c0d44-ed2f-691f-9605-bb94833453ed AT dronecode DOT org DOT uk> <3bFLcaKIbW2ReAFfPR_VyPdeLOkhOtZMYWF_LXmhPBuysKqgz4kVUVRqtnu4RsPrGGfgMJSQzeFdAj3HMJgqWzDunzDSdF5kuycnE42YA08=@protonmail.com>
Cc: The Cygwin Mailing List <cygwin AT cygwin DOT com>
Reply-To: The Cygwin Mailing List <cygwin AT cygwin DOT com>
From: Jon Turney <jon DOT turney AT dronecode DOT org DOT uk>
Message-ID: <b8f43669-dc24-999d-12c1-84eae177eba6@dronecode.org.uk>
Date: Fri, 3 Aug 2018 19:14:11 +0100
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1
MIME-Version: 1.0
In-Reply-To: <3bFLcaKIbW2ReAFfPR_VyPdeLOkhOtZMYWF_LXmhPBuysKqgz4kVUVRqtnu4RsPrGGfgMJSQzeFdAj3HMJgqWzDunzDSdF5kuycnE42YA08=@protonmail.com>

On 03/08/2018 18:19, tumtum00 wrote:
> On 31 July 2018 7:57 PM, Jon Turney wrote:
> 
> I tried 3 new machines today, can reproduce the issue in all of them. All were Win7 x86_64. 2 VMs installed from scratch (one in English, the other German as in my first report) plus a system running on bare metal.
> 
>>> #7 0x000000018017e7e9 in __chk_fail () at /usr/src/debug/cygwin-2.10.0-1/newlib/libc/ssp/chk_fail.c:11
>>> msg = "*** buffer overflow detected ***: terminated\n"
>>> #8 0x000000018018c1c3 in __memcpy_chk (dst=0x60008e570, src=0x45, len=0, slen=0) at /usr/src/debug/cygwin-2.10.0-1/newlib/libc/ssp/memcpy_chk.c:48
>>
>> This is a wrapper around memcpy, which is being used as we are building
>> with _FORTIFY_SOURCE
>>
>> I'd suggest setting a breakpoint on this line (after installing the
>> cygwin-debuginfo package for relevant debug info) and trying to
>> understand why it's not succeeding.
> 
> Attached the backtrace at memcpy_chk.c:48.
> I've been trying to figure out what is going on from the source code, but I'm not really getting anywhere.
> 
> Does it suffice to install cygwin-debuginfo or do I need to set something up?
> I ran gdb with `set cygwin-exceptions on` too, but no further information came up in the backtrace.

> Thread 1 hit Breakpoint 1, __memcpy_chk (dst=0x60008c7a0, src=0x10059f4b0 <values>, len=8, slen=4)
>     at /usr/src/debug/cygwin-2.10.0-1/newlib/libc/ssp/memcpy_chk.c:48
> 48	/usr/src/debug/cygwin-2.10.0-1/newlib/libc/ssp/memcpy_chk.c: No such file or directory.
> #0  __memcpy_chk (dst=0x60008c7a0, src=0x10059f4b0 <values>, len=8, slen=4)

The "no such file or directory" doesn't make much sense to me.  That 
file should be provided by cygwin-debuginfo package.

Anyhow, I think to fix this, you need a cygwin with the following 
changes (the latest snapshot should be ok)

https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;a=commitdiff;h=4564b30f331a067e71b25308ac7c8a85ceb4b122;hp=4d1a356f7b36905f5e2b616513b111ef042f1a43
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;a=commitdiff;h=e494b560350cabef94126a4478096aae89ae35a0

Sorry for not working this out sooner, but I'd convinced myself that 
these changes are in the current cygwin-devel package, when in fact they 
aren't.

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019