[{"id":1794954,"web_url":"http://patchwork.ozlabs.org/comment/1794954/","msgid":"<CAKCAbMgtdJV=eXMcLXS5vbQMuAqUXLM_WQxVVQ8en=JQNMvghg@mail.gmail.com>","list_archive_url":null,"date":"2017-10-27T15:00:51","subject":"Re: [RFC][PATCH v9 1/6] Correct the size of _nl_value_type_LC_...\n\tarrays.","submitter":{"id":65878,"url":"http://patchwork.ozlabs.org/api/people/65878/","name":"Zack Weinberg","email":"zackw@panix.com"},"content":"On Tue, Sep 19, 2017 at 6:41 AM, Rafal Luzynski\n<digitalfreak@lingonborough.com> wrote:\n> There were several problems with checking the array size in the past,\n> for example BZ#356, caused by incorrectly assuming that every locale\n> token represents one element.  In fact, if a token represented\n> a subarray, for example an array of month names or characters category\n> and it appeared at the end of the array the compiler assumed that\n> the array ends just after the first element of the subarray.\n> Workarounds used in the past was to skip some categories while testing,\n> for example LC_CTYPE.  Now when we are about to add alternative month\n> names to LC_TIME (BZ#10871) this will fail again.\n>\n\n...\n\n>  #define DEFINE_CATEGORY(category, category_name, items, a) \\\n> -static const enum value_type _nl_value_type_##category[] = { NO_PAREN items };\n> +static const enum value_type _nl_value_type_##category     \\\n> +  [_NL_ITEM_INDEX (_NL_NUM_##category)] = { NO_PAREN items };\n>  #define DEFINE_ELEMENT(element, element_name, optstd, type, rest...) \\\n>    [_NL_ITEM_INDEX (element)] = type,\n>  #include \"categories.def\"\n\nPlease add a short version of your commit-message explanation of the\nchange as a comment right above \"#define DEFINE_CATEGORY\". Something\nlike\n\n/* The size of the array must be specified explicitly because some of\nthe 'items' may be\n   subarrays, which will cause the compiler to deduce an incorrect\nsize from the initializer.  */\n\nOK with that change; as this is independent of the rest of the\npatches, please go ahead and push it immediately, without the rest of\nthem.\n\nzw","headers":{"Return-Path":"<libc-alpha-return-86479-incoming=patchwork.ozlabs.org@sourceware.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":["patchwork-incoming@bilbo.ozlabs.org","mailing list libc-alpha@sourceware.org"],"Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=sourceware.org\n\t(client-ip=209.132.180.131; helo=sourceware.org;\n\tenvelope-from=libc-alpha-return-86479-incoming=patchwork.ozlabs.org@sourceware.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (1024-bit key;\n\tsecure) header.d=sourceware.org header.i=@sourceware.org\n\theader.b=\"POMfbOZC\"; dkim-atps=neutral","sourceware.org; auth=none"],"Received":["from sourceware.org (server1.sourceware.org [209.132.180.131])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3yNnBt0Mb1z9t3f\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSat, 28 Oct 2017 02:01:25 +1100 (AEDT)","(qmail 55971 invoked by alias); 27 Oct 2017 15:01:08 -0000","(qmail 54988 invoked by uid 89); 27 Oct 2017 15:00:57 -0000"],"DomainKey-Signature":"a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id\n\t:list-unsubscribe:list-subscribe:list-archive:list-post\n\t:list-help:sender:mime-version:in-reply-to:references:from:date\n\t:message-id:subject:to:cc:content-type; q=dns; s=default; b=youd\n\tOQIu+Izi/t+38tTxADXGAzM40fOy/6Bde4zMP+QOFOVXQll+jRumVzbAm3U3zlHL\n\ti3d4CgXSk1SHxA9zSuDqtdI44qibgRYP0eQWtA4409WQuNQ8tP1uExpp27rigbxr\n\tKSGgxR6c+NBovPXgQdkhMmPrRUZhuA4g0KmHrwU=","DKIM-Signature":"v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id\n\t:list-unsubscribe:list-subscribe:list-archive:list-post\n\t:list-help:sender:mime-version:in-reply-to:references:from:date\n\t:message-id:subject:to:cc:content-type; s=default; bh=HC3z16Qtta\n\tOjhyoTOM2vvkpGu4M=; b=POMfbOZC2rpHZ+Qj9BZjVH+rqj+fmUYQhgvjsiFs0m\n\t5Q1hhWbMf0QigDs8JzJgWrJIhEh9q5AJtg25P8/9UlWyxTauJj3Fty9BMczv4/s8\n\tdswlTFw3pHB8WmbFXlqnpd17ZI/0dowGTTA+TLsIPvMfL6nG9LsWRkhkztAp+X61\n\tU=","Mailing-List":"contact libc-alpha-help@sourceware.org; run by ezmlm","Precedence":"bulk","List-Id":"<libc-alpha.sourceware.org>","List-Unsubscribe":"<mailto:libc-alpha-unsubscribe-incoming=patchwork.ozlabs.org@sourceware.org>","List-Subscribe":"<mailto:libc-alpha-subscribe@sourceware.org>","List-Archive":"<http://sourceware.org/ml/libc-alpha/>","List-Post":"<mailto:libc-alpha@sourceware.org>","List-Help":"<mailto:libc-alpha-help@sourceware.org>,\n\t<http://sourceware.org/ml/#faqs>","Sender":"libc-alpha-owner@sourceware.org","X-Virus-Found":"No","X-Spam-SWARE-Status":"No, score=-1.4 required=5.0 tests=AWL, BAYES_00,\n\tRCVD_IN_SORBS_SPAM, RP_MATCHES_RCVD,\n\tSPF_PASS autolearn=no version=3.3.2 spammy=month","X-HELO":"mailbackend.panix.com","X-Gm-Message-State":"AMCzsaVw1K/SH4jXaBx8BxvmPQu3XUU2nMpNhn2lU6mMX9oeu1ZBHMDX\n\t+t8Yz+ytLmo2MnILxWEORgh5WAKRc26SC7Gf+UQ=","X-Google-Smtp-Source":"ABhQp+RR8SOVVaZjAzFJhKXC3/9ZxPRgAqaIkC5Ur6ZBIS0T6I3/0HIC68NO6SPu45bBoQfzTd6ufvzCnPsPzJYMtYw=","X-Received":"by 10.202.196.194 with SMTP id u185mr353936oif.259.1509116451600;\n\tFri, 27 Oct 2017 08:00:51 -0700 (PDT)","MIME-Version":"1.0","In-Reply-To":"<291099144.1094665.1505817664806@poczta.nazwa.pl>","References":"<291099144.1094665.1505817664806@poczta.nazwa.pl>","From":"Zack Weinberg <zackw@panix.com>","Date":"Fri, 27 Oct 2017 11:00:51 -0400","X-Gmail-Original-Message-ID":"<CAKCAbMgtdJV=eXMcLXS5vbQMuAqUXLM_WQxVVQ8en=JQNMvghg@mail.gmail.com>","Message-ID":"<CAKCAbMgtdJV=eXMcLXS5vbQMuAqUXLM_WQxVVQ8en=JQNMvghg@mail.gmail.com>","Subject":"Re: [RFC][PATCH v9 1/6] Correct the size of _nl_value_type_LC_...\n\tarrays.","To":"Rafal Luzynski <digitalfreak@lingonborough.com>","Cc":"GNU C Library <libc-alpha@sourceware.org>","Content-Type":"text/plain; charset=\"UTF-8\""}},{"id":1795124,"web_url":"http://patchwork.ozlabs.org/comment/1795124/","msgid":"<1943205015.144458.1509138516586@poczta.nazwa.pl>","list_archive_url":null,"date":"2017-10-27T21:08:36","subject":"Re: [RFC][PATCH v9 1/6] Correct the size of _nl_value_type_LC_...\n\tarrays.","submitter":{"id":67752,"url":"http://patchwork.ozlabs.org/api/people/67752/","name":"Rafal Luzynski","email":"digitalfreak@lingonborough.com"},"content":"27.10.2017 17:00 Zack Weinberg <zackw@panix.com> wrote:\n>\n> [...]\n> OK with that change; as this is independent of the rest of the\n> patches, please go ahead and push it immediately, without the rest of\n> them.\n\nThank you, Zack.  I'm going to apply your suggestions and push it now.\n\nRegards,\n\nRafal","headers":{"Return-Path":"<libc-alpha-return-86500-incoming=patchwork.ozlabs.org@sourceware.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":["patchwork-incoming@bilbo.ozlabs.org","mailing list libc-alpha@sourceware.org"],"Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=sourceware.org\n\t(client-ip=209.132.180.131; helo=sourceware.org;\n\tenvelope-from=libc-alpha-return-86500-incoming=patchwork.ozlabs.org@sourceware.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (1024-bit key;\n\tsecure) header.d=sourceware.org header.i=@sourceware.org\n\theader.b=\"YIJVLDlb\"; dkim-atps=neutral","sourceware.org; auth=none"],"Received":["from sourceware.org (server1.sourceware.org [209.132.180.131])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3yNxLl4hTSz9t4X\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSat, 28 Oct 2017 08:08:47 +1100 (AEDT)","(qmail 9223 invoked by alias); 27 Oct 2017 21:08:41 -0000","(qmail 9212 invoked by uid 89); 27 Oct 2017 21:08:41 -0000"],"DomainKey-Signature":"a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id\n\t:list-unsubscribe:list-subscribe:list-archive:list-post\n\t:list-help:sender:date:from:reply-to:to:cc:message-id\n\t:in-reply-to:references:subject:mime-version:content-type\n\t:content-transfer-encoding; q=dns; s=default; b=Aurx8gJfpSCupSEZ\n\tSHC7yJ1SgXE87RGtd/wENCFagPjbLKyveRQDaY7ozee2dx81EJ+/QV1nm4XcYoS8\n\tH4JhOsgKpeRxjhzbh+5eaP4hss+OWEiD2slUuSTLsciGhZAF2/DJMwxACDPv2JQn\n\t5fwMxepvcOlSJKzq2EVB0Okbnrw=","DKIM-Signature":"v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id\n\t:list-unsubscribe:list-subscribe:list-archive:list-post\n\t:list-help:sender:date:from:reply-to:to:cc:message-id\n\t:in-reply-to:references:subject:mime-version:content-type\n\t:content-transfer-encoding; s=default; bh=gNa6a6mMxDBN/4sbqUQXPt\n\tyksZ4=; b=YIJVLDlbyYweReDf7vxkfmxuMiOypeOureN37egXSD8F0P+HDqlg9M\n\t99QYQhqyr0/BDC1SyeNQdKZ122QO0Hoe3nqSonF724KMLchWADjasqypJdeOTuRd\n\txneB5zpvyqXVYLARnRYOAcUCcmQ9TfAzBloVk5n0b9sNcB1zOCTxk=","Mailing-List":"contact libc-alpha-help@sourceware.org; run by ezmlm","Precedence":"bulk","List-Id":"<libc-alpha.sourceware.org>","List-Unsubscribe":"<mailto:libc-alpha-unsubscribe-incoming=patchwork.ozlabs.org@sourceware.org>","List-Subscribe":"<mailto:libc-alpha-subscribe@sourceware.org>","List-Archive":"<http://sourceware.org/ml/libc-alpha/>","List-Post":"<mailto:libc-alpha@sourceware.org>","List-Help":"<mailto:libc-alpha-help@sourceware.org>,\n\t<http://sourceware.org/ml/#faqs>","Sender":"libc-alpha-owner@sourceware.org","X-Virus-Found":"No","X-Spam-SWARE-Status":"No, score=-1.4 required=5.0 tests=AWL, BAYES_00,\n\tKAM_LAZY_DOMAIN_SECURITY autolearn=no version=3.3.2\n\tspammy=27.10.2017, 27102017, H*x:Mailer, H*UA:Mailer","X-HELO":"aev204.rev.netart.pl","X-Spam-Score":"0","Date":"Fri, 27 Oct 2017 23:08:36 +0200 (CEST)","From":"Rafal Luzynski <digitalfreak@lingonborough.com>","Reply-To":"Rafal Luzynski <digitalfreak@lingonborough.com>","To":"Zack Weinberg <zackw@panix.com>","Cc":"GNU C Library <libc-alpha@sourceware.org>","Message-ID":"<1943205015.144458.1509138516586@poczta.nazwa.pl>","In-Reply-To":"<CAKCAbMgtdJV=eXMcLXS5vbQMuAqUXLM_WQxVVQ8en=JQNMvghg@mail.gmail.com>","References":"<291099144.1094665.1505817664806@poczta.nazwa.pl>\n\t<CAKCAbMgtdJV=eXMcLXS5vbQMuAqUXLM_WQxVVQ8en=JQNMvghg@mail.gmail.com>","Subject":"Re: [RFC][PATCH v9 1/6] Correct the size of _nl_value_type_LC_...\n\tarrays.","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"7bit","X-Originating-Client":"com.openexchange.ox.gui.dhtml"}}]