From patchwork Thu Oct 23 22:40:41 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Lance Taylor X-Patchwork-Id: 402698 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 1697714007D for ; Fri, 24 Oct 2014 09:40:52 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:date:message-id:subject:from:to:content-type; q= dns; s=default; b=b9EPR+LTalYmDYJ0uBW32cFcuo/aeZWRxqHMktsyYMM9Mx koWWEzYqwPmf/3rUMIYiVtU/mAGuILozsIxj+aeyw239SIAY4xVi01g3vH8jC3eA fgYULgmSgiImnGxUVYFnu+lnP22bMx68ISclCZbrUU4niy5lBawmuLs1JhBrA= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:date:message-id:subject:from:to:content-type; s= default; bh=9QAxEv995FPts54wmwMqVuxNn+Q=; b=ROseWqotJq1vkOxiHJff f9uGk7bPEIXk5BUX7eT/qJXzHlHpCm0jL0QUdKLoLX9U0oGDWqFW2aP+QPwf1IA6 Hg5obez7o9mEdM3tnX6sKIBs589g4rVn+cOO7IgYq9rD66Ir8b26WhMC8cfXU3nm RkVPaiNsqpocnjs030jhU/c= Received: (qmail 13525 invoked by alias); 23 Oct 2014 22:40:45 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 13513 invoked by uid 89); 23 Oct 2014 22:40:45 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-yh0-f46.google.com Received: from mail-yh0-f46.google.com (HELO mail-yh0-f46.google.com) (209.85.213.46) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Thu, 23 Oct 2014 22:40:44 +0000 Received: by mail-yh0-f46.google.com with SMTP id f10so1029642yha.5 for ; Thu, 23 Oct 2014 15:40:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to :content-type; bh=QI4FEb7ETlPYe6t1d0wKWTaJy3MLuSAmhGQk1x9kSp8=; b=dOQmXK7Myj9QrsST6NyXpjv/yVNQl06lUk3tkCPhqIfxz8aNybDRR1PesP/utx+UNG C25jlmOoZAUPzEdAvgiyV2RBSd5n7h6LncPuAS8gJ6Gyl0V7OqrK2eW/9/bzdM4fVydp pzVlCMvcRsD5IaMuT+ZUWmkrQV6Zvk4GNMtusDoC7hF3aDd/T1s3EF1JBuOVTfJfwZhe HwryGaIiCG/zi6f0/WURHTIoWhXucvtcioyOD3jjNT6YrlxCWNAaoKE/rxjbUmj4JdAD HoZhOpHxuq3qhIkKU96azZORtIpJt9jS4NJyLzKmKgnxNg1RC9AnDfjyO2Bqe3GmrC0V gI6w== X-Gm-Message-State: ALoCoQk5hzsr4AAwg1YbKuH6J9xLY+wyiCOyMU6R5LUc29+Njk+taWqSF+ivUk2+brcxKhgfOQtF MIME-Version: 1.0 X-Received: by 10.170.37.10 with SMTP id 10mr384138ykf.99.1414104041333; Thu, 23 Oct 2014 15:40:41 -0700 (PDT) Received: by 10.170.233.132 with HTTP; Thu, 23 Oct 2014 15:40:41 -0700 (PDT) Date: Thu, 23 Oct 2014 15:40:41 -0700 Message-ID: Subject: libbacktrace patch committed: Fix load_pointer if no atomic or sync functions From: Ian Taylor To: gcc-patches@gcc.gnu.org This patch to libbacktrace fixes the type returned by the backup definition of backtrace_atomic_load_pointer for the case where libbacktrace is compiled with neither the atomic nor the sync functions available. This case does not arise in general but could arise from other uses of the library, or when building stage 1 with a very old host compiler. Bootstrapped and ran libbacktrace tests on x86_64-unknown-linux-gnu, which proves nothing, really. Ian 2014-10-23 Ian Lance Taylor * internal.h (backtrace_atomic_load_pointer) [no atomic or sync]: Fix to return void *. Index: internal.h =================================================================== --- internal.h (revision 216522) +++ internal.h (working copy) @@ -99,7 +99,7 @@ extern void backtrace_atomic_store_int ( /* We have neither the sync nor the atomic functions. These will never be called. */ -#define backtrace_atomic_load_pointer(p) (abort(), 0) +#define backtrace_atomic_load_pointer(p) (abort(), (void *) NULL) #define backtrace_atomic_load_int(p) (abort(), 0) #define backtrace_atomic_store_pointer(p, v) abort() #define backtrace_atomic_store_size_t(p, v) abort()