From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18202 invoked by alias); 25 Apr 2017 09:24:52 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 18002 invoked by uid 89); 25 Apr 2017 09:24:51 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_NONE autolearn=no version=3.3.2 spammy=4.9, onlinedocs, Hx-languages-length:1285, H*M:b7f4 X-HELO: mail-wm0-f46.google.com Received: from mail-wm0-f46.google.com (HELO mail-wm0-f46.google.com) (74.125.82.46) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 25 Apr 2017 09:24:49 +0000 Received: by mail-wm0-f46.google.com with SMTP id r190so90383993wme.1 for ; Tue, 25 Apr 2017 02:24:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=Qgjx2HibW9+A4IQ1UcvGCpL0vJ5cv+SJ5f5+fxjyxbM=; b=TSP/ug6C0oDm2mgY7UGSul4TRr9xCBoTkHq2CZZi9evKxVr+EQqJg3vlKZFjU4GmAp EK+BK+9TS9pQlBlvsQ5Bx/P1CfNfcKHm2XqHIGFuiw9GiBHOKma7AFng5IzUSsxIy7kx coyKiMEanDYtnS3xOssyXo6oGMu2UIaz4gvVplwPGVPJqu/K/ngmdSmQud6vlHwdGugP kjO0EL1gD/fwcBLteABi+TNGcQ9dRUBJrlbT4cY3xgHrurECCPQwd/1XoTX2p2Myxu01 UXLqfamvNQBCRgfZdV1HlFvgTT7d+m1byVoLkTuH/BFzpLwLaSJm9QfjWHdZ2gFzn2gN wETQ== X-Gm-Message-State: AN3rC/5YZuyR1ufw3ZHOCSSyVOAjKpLIB0nqZ4n/pyMbQWqLOAxXW+UZ ojt2/2EmxBZK+smbYnJT0A== X-Received: by 10.28.196.70 with SMTP id u67mr1239000wmf.135.1493112289422; Tue, 25 Apr 2017 02:24:49 -0700 (PDT) Received: from [192.168.0.102] ([37.189.166.198]) by smtp.gmail.com with ESMTPSA id l36sm25569726wrl.59.2017.04.25.02.24.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 25 Apr 2017 02:24:48 -0700 (PDT) Subject: Re: [PATCH 1/5] Poison non-POD memset & non-trivially-copyable memcpy/memmove To: Yao Qi References: <1492050475-9238-1-git-send-email-palves@redhat.com> <1492050475-9238-2-git-send-email-palves@redhat.com> <44b612a2b2dadc142c054a1967dc2600@polymtl.ca> <86d1c0sxnf.fsf@gmail.com> Cc: Simon Marchi , gdb-patches@sourceware.org From: Pedro Alves Message-ID: Date: Tue, 25 Apr 2017 09:24:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <86d1c0sxnf.fsf@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-SW-Source: 2017-04/txt/msg00661.txt.bz2 On 04/25/2017 09:24 AM, Yao Qi wrote: > Pedro Alves writes: > > Hi Pedro, > >> +/* True if "T *" is relocatable. I.e., copyable with memcpy/memmove. >> + I.e., T is either trivially copyable, or void. */ >> +template >> +struct IsRelocatable >> + : gdb::Or, >> + std::is_trivially_copyable> >> +{}; > > This breaks the build with gcc 4.8, > > In file included from ../../binutils-gdb/gdb/common/common-defs.h:85:0, > from ../../binutils-gdb/gdb/defs.h:28, > from ../../binutils-gdb/gdb/gdb.c:19: > ../../binutils-gdb/gdb/common/poison.h:66:6: error: ‘is_trivially_copyable’ is not a member of ‘std’ > std::is_trivially_copyable> > ^ > Sorry, I thought I had tested gcc 4.8, but clearly I did not. I'll fix it as soon as I have a chance, probably by disabling the poisoning on older compilers. > you probably have already received the buildbot fail message > https://gdb-build.sergiodj.net/builders/Ubuntu-AArch64-m64/builds/1845 > > is_trivially_copyable is missing on 4.9 too, > https://gcc.gnu.org/onlinedocs/gcc-4.9.4/libstdc++/manual/manual/status.html#status.iso.2011 > and it was added in gcc 5, as far as I know. Thanks, Pedro Alves