From patchwork Fri Feb 8 17:42:49 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Uros Bizjak X-Patchwork-Id: 219237 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]) by ozlabs.org (Postfix) with SMTP id A0A892C007C for ; Sat, 9 Feb 2013 04:43:13 +1100 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1360950193; h=Comment: DomainKey-Signature:Received:Received:Received:Received: MIME-Version:Received:In-Reply-To:References:Date:Message-ID: Subject:From:To:Cc:Content-Type:Mailing-List:Precedence:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:Sender: Delivered-To; bh=+ZoksvFuGAgz4owqK+x+nPQtZMQ=; b=KKeFUyBf26OWIKv yXKjPzQWALjdNCp+1NmyQ/l++UoxckPmOEmoZsY/1YDmFjt/AVkxtZ0k+xSetaBB +HjAmHdLMK6svu9TqGLZqDe6PKwJWzkSpr8qyGCs/wJP4g3HiKO4TnXh/XjBtLIL Nb0SJWhO0NYdYfMCnzMWBFDLn5x4= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:MIME-Version:X-Received:Received:In-Reply-To:References:Date:Message-ID:Subject:From:To:Cc:Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=NWoyYoNPI/HG3dtfrSTb95QjIIg7PUxflJcUQ0R1f8tO8hPyozU4r3hRuozVZn 7Z/CHmNqhcwqEOy2LfA/HVirFjJsphzxWM7kL8WC6wcXuAOZnkVrdlm6XtpaDTad mLUFjviIzWrgIIOG9HCun0fHa8/6xHPup4zush7kE6EUs=; Received: (qmail 8570 invoked by alias); 8 Feb 2013 17:42:58 -0000 Received: (qmail 8545 invoked by uid 22791); 8 Feb 2013 17:42:55 -0000 X-SWARE-Spam-Status: No, hits=-5.0 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, KHOP_RCVD_TRUST, KHOP_THREADED, RCVD_IN_DNSWL_LOW, RCVD_IN_HOSTKARMA_YE, TW_ZJ X-Spam-Check-By: sourceware.org Received: from mail-ob0-f169.google.com (HELO mail-ob0-f169.google.com) (209.85.214.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 08 Feb 2013 17:42:50 +0000 Received: by mail-ob0-f169.google.com with SMTP id ta14so4139547obb.28 for ; Fri, 08 Feb 2013 09:42:49 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.60.12.103 with SMTP id x7mr4971978oeb.56.1360345369894; Fri, 08 Feb 2013 09:42:49 -0800 (PST) Received: by 10.182.49.68 with HTTP; Fri, 8 Feb 2013 09:42:49 -0800 (PST) In-Reply-To: References: Date: Fri, 8 Feb 2013 18:42:49 +0100 Message-ID: Subject: Re: libgo patch committed: Update to current version of Go library From: Uros Bizjak To: Ian Lance Taylor Cc: gcc-patches@gcc.gnu.org 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 On Fri, Feb 8, 2013 at 6:10 PM, Uros Bizjak wrote: > On Fri, Feb 8, 2013 at 5:53 PM, Ian Lance Taylor wrote: >> On Fri, Feb 8, 2013 at 8:48 AM, Uros Bizjak wrote: >>> >>> utimensat returns zero on CentOS. Following is gdb session: >> >> Thanks--can you do the same session but with "step" instead of "next"? > > I think I got the problem. Yep. Following patch fixes the failure: --cut here-- return EINVAL --cut here-- Please note, that looking at generated libcalls.go, there are many other possible signed/unsigned issues of the same type. Since this all happens on x86_64 (where go int is apparently 64bit), it looks that it is very important to distinguish int from _C_int in glue source. Uros. Index: go/syscall/libcall_linux_utimesnano.go =================================================================== --- go/syscall/libcall_linux_utimesnano.go (revision 195879) +++ go/syscall/libcall_linux_utimesnano.go (working copy) @@ -9,7 +9,7 @@ import "unsafe" //sys utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) -//utimensat(dirfd int, path *byte, times *[2]Timespec, flags int) int +//utimensat(dirfd _C_int, path *byte, times *[2]Timespec, flags int) _C_int func UtimesNano(path string, ts []Timespec) (err error) { if len(ts) != 2 {