From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/10977 Path: news.gmane.org!.POSTED!not-for-mail From: Szabolcs Nagy Newsgroups: gmane.linux.lib.musl.general Subject: Re: Re: a bug in bindtextdomain() and strip '.UTF-8' Date: Sun, 29 Jan 2017 14:39:47 +0100 Message-ID: <20170129133946.GT17692@port70.net> References: Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1485697233 1414 195.159.176.226 (29 Jan 2017 13:40:33 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 29 Jan 2017 13:40:33 +0000 (UTC) User-Agent: Mutt/1.6.0 (2016-04-01) To: musl@lists.openwall.com Original-X-From: musl-return-10992-gllmg-musl=m.gmane.org@lists.openwall.com Sun Jan 29 14:40:22 2017 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.84_2) (envelope-from ) id 1cXpi1-0005tL-Sv for gllmg-musl@m.gmane.org; Sun, 29 Jan 2017 14:39:58 +0100 Original-Received: (qmail 5564 invoked by uid 550); 29 Jan 2017 13:39:59 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 5543 invoked from network); 29 Jan 2017 13:39:59 -0000 Mail-Followup-To: musl@lists.openwall.com Content-Disposition: inline In-Reply-To: Xref: news.gmane.org gmane.linux.lib.musl.general:10977 Archived-At: * He X [2017-01-29 12:52:56 +0800]: > 1. no memset after malloc, caused chromium crash: > http://www.openwall.com/lists/musl/2017/01/28/1 > --- musl-1.1.16/src/locale/dcngettext.c 2017-01-29 04:42:49.002221317 +0000 > +++ musl-1.1.16/src/locale/dcngettext.c 2017-01-29 04:42:49.002221317 +0000 > @@ -180,6 +180,7 @@ > __munmap((void *)map, map_size); > goto notrans; > } > + memset(p, 0, sizeof *p + namelen + 1); > p->map = map; > p->map_size = map_size; > memcpy(p->name, name, namelen+1); if you want to zero the entire allocation, then use calloc. but i think initializing plural_rule is enough. > 2. musl uses generic config of libstdc++, which blocked the support of > locale, patch is there: > https://github.com/xhebox/noname-linux/issues/2#issuecomment-275704150 this breaks the abi of libstdc++ because the definition of a type in the public api is changed. so existing c++ binaries break if the toolchain is patched.