From patchwork Wed Jul 4 20:30:42 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 939585 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=sourceware.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=libc-alpha-return-93976-incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="U6xoy/uB"; dkim=pass (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="JvUS2mF1"; dkim-atps=neutral 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 41LXhD1r0jz9s1b for ; Thu, 5 Jul 2018 06:31:24 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id:mime-version :content-type:content-transfer-encoding; q=dns; s=default; b=Sbk RbPA8TKtpSBTqPoVVZvlwCRlJiTG5+s4zxGEK18aDHiUTZUASiO0Hr6SR+1/64EQ 83ytXhbAkkbFCVFmYqYqUG70wBWyYimmfsoCefwdlrUbBwaLvvK1hlUTKIcEEK3O JSjNdvU3boINrgSERu6RQ1YeK6iYgeRN8h+Sl+oE= 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:from:to:subject:date:message-id:mime-version :content-type:content-transfer-encoding; s=default; bh=BrkGP7Qv6 +ket97pfmwIWP04lt0=; b=U6xoy/uBBA92Zpr8GmSIwrDoWxpt/vyCrGvMXWzFU D9yK2Z8VHuB1/luLYnuayJjFfC3XkH2xALaZOLxm5y5LHC/Ba/1rZwg16DdBUABK K82btCJWegM3i1OcHuyHhWPXB5knkCkqtw7kMwPbZFIooER+sOXK9Jduv3V7U5UI aM= Received: (qmail 32583 invoked by alias); 4 Jul 2018 20:31:18 -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 32470 invoked by uid 89); 4 Jul 2018 20:31:03 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-25.4 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=398, HContent-Transfer-Encoding:8bit X-HELO: mail-qk0-f182.google.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=1kdkTSWcAK8p6f/J90kaq4L0r5PbJAZ5n5Dg/BU/FE8=; b=JvUS2mF1MaqfLuw/pXVnbepn63+4/arH85BbJJpnDy5hc2P+/Z2AZpAB6PJGGVev8g TEoqa6tLJl8wYGHMKFfjn07Qlk+1qTy4yLdiJw//tF6PrZ29aBZvUPNrennYW9bqDCXM ccXfjcv87G2E00RIdEIvEtssmSLyJ1nhs/P7A= From: Adhemerval Zanella To: libc-alpha@sourceware.org Subject: [COMMITTED] posix: Fix bug-regex33 after regex sync Date: Wed, 4 Jul 2018 17:30:42 -0300 Message-Id: <1530736242-15891-1-git-send-email-adhemerval.zanella@linaro.org> MIME-Version: 1.0 On some platforms the inclusion of regex-internal.h in bug-regex33 testcase show a MAX redefinition if test-skeleton.c is include later. This patch fixes by removing regex-internal.h inclusion and using SBC_MAX value directly. Checked on aarch64-linux-gnu. * posix/bug-regex33.c: Fix build after regex sync. --- ChangeLog | 4 ++++ posix/bug-regex33.c | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/posix/bug-regex33.c b/posix/bug-regex33.c index 0313cb4..015b73c 100644 --- a/posix/bug-regex33.c +++ b/posix/bug-regex33.c @@ -23,7 +23,6 @@ #include #include #include -#include "regex_internal.h" static int do_test (void) @@ -39,8 +38,9 @@ do_test (void) memset (&r, 0, sizeof (r)); memset (&s, 0, sizeof (s)); - /* The bug cannot be reproduced without initialized fastmap. */ - r.fastmap = malloc (SBC_MAX); + /* The bug cannot be reproduced without initialized fastmap (it is SBC_MAX + value from regex_internal.h). */ + r.fastmap = malloc (UCHAR_MAX + 1); /* 圭 */ re_compile_pattern ("\xb7\xbd", 2, &r);