From patchwork Fri Jun 3 07:49:37 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 629648 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 3rLbpm544Lz9s9c for ; Fri, 3 Jun 2016 17:49:52 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b=F/dnEr83; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:to:subject:mime-version:content-type :content-transfer-encoding:message-id:from; q=dns; s=default; b= U4gcvPtdq8m9k8HGOMy4Tglkk6eTna4kpR1Ky3QoTRPBiMt2siV0CH4/uBLzUDA+ 5BhP8EB9oUyr6ye5CFhoEpJ8G6MSdziM+eTHOp6a+n+gYPidq2fm/VtF9J8mrqa/ faTDcaJysCiA3BPIzHydsKtT6px0MPFkQtreh1sFJ+c= 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:date:to:subject:mime-version:content-type :content-transfer-encoding:message-id:from; s=default; bh=SS/GCQ 7vahvrVYbTDOezprS3Kbo=; b=F/dnEr83UpsmJV9paYRCWBNMNyEcaLeVStS+Kk 7qM0NAH/zSr+yBTsrQtCgGKyQcvsATqxKG48067cbNTDvhYb0ORVwSnzuhBvxHp7 0koBH/DVyTKX7WLPFgaHv8mW3/0Hru609rbY3V9vdl/kL6y57APCp7a15ci9UOEX Bwjz8= Received: (qmail 112288 invoked by alias); 3 Jun 2016 07:49:41 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 112272 invoked by uid 89); 3 Jun 2016 07:49:40 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.3 required=5.0 tests=BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=2289, 2016-06-03, 20160603 X-HELO: mx1.redhat.com Date: Fri, 03 Jun 2016 09:49:37 +0200 To: libc-alpha@sourceware.org Subject: [PATCH] libio: Use wmemset instead of __wmemset to avoid linknamespace issue User-Agent: Heirloom mailx 12.5 7/5/10 MIME-Version: 1.0 Message-Id: <20160603074937.7543D405F6ED1@oldenburg.str.redhat.com> From: fweimer@redhat.com (Florian Weimer) If the wide string operations are pulled into the link, the wmemset symbol can cause a linknamespace failure. 2016-06-03 Florian Weimer * libio/wstrops.c (_IO_wstr_overflow, enlarge_userbuf): Use __wmemset instead of wmemset. diff --git a/libio/wstrops.c b/libio/wstrops.c index 2b9d036..8d0e1cb 100644 --- a/libio/wstrops.c +++ b/libio/wstrops.c @@ -111,7 +111,7 @@ _IO_wstr_overflow (_IO_FILE *fp, _IO_wint_t c) fp->_wide_data->_IO_buf_base = NULL; } - wmemset (new_buf + old_wblen, L'\0', new_size - old_wblen); + __wmemset (new_buf + old_wblen, L'\0', new_size - old_wblen); _IO_wsetb (fp, new_buf, new_buf + new_size, 1); fp->_wide_data->_IO_read_base = @@ -228,9 +228,9 @@ enlarge_userbuf (_IO_FILE *fp, _IO_off64_t offset, int reading) new position. */ assert (offset >= oldend); if (reading) - wmemset (wd->_IO_read_base + oldend, L'\0', offset - oldend); + __wmemset (wd->_IO_read_base + oldend, L'\0', offset - oldend); else - wmemset (wd->_IO_write_base + oldend, L'\0', offset - oldend); + __wmemset (wd->_IO_write_base + oldend, L'\0', offset - oldend); return 0; }