From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/12092 Path: news.gmane.org!.POSTED!not-for-mail From: Tobias Koch Newsgroups: gmane.linux.lib.musl.general Subject: Re: diffutils crash in malloc Date: Sun, 12 Nov 2017 22:02:26 +0000 Message-ID: References: ,<5A08C239.4070003@adelielinux.org> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="_000_AM5PR0802MB26119E1FA20D6E23CF60FB25892A0AM5PR0802MB2611_" X-Trace: blaine.gmane.org 1510524160 1183 195.159.176.226 (12 Nov 2017 22:02:40 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 12 Nov 2017 22:02:40 +0000 (UTC) To: "musl@lists.openwall.com" Original-X-From: musl-return-12108-gllmg-musl=m.gmane.org@lists.openwall.com Sun Nov 12 23:02:36 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 1eE0Kp-00005I-QE for gllmg-musl@m.gmane.org; Sun, 12 Nov 2017 23:02:35 +0100 Original-Received: (qmail 3251 invoked by uid 550); 12 Nov 2017 22:02:39 -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 3227 invoked from network); 12 Nov 2017 22:02:39 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nonterra01.onmicrosoft.com; s=selector1-nonterra-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=UsSOCPoGRsKvqIQQLVBiGpvitNLElNpSB2CL5YJc5cw=; b=np17RPZrEOTeYDbiYGBo7FG2HaAotqDOBck7hX0EvpfiPf8Tt51nzgvWr7B4oGNzAaZcJfeJ8AXAPOV+67Au6+j0LMiq1j/87Xs3y5xa8ka6oNCAXonvgSyWMJU5vrXq/Q9G1Bxui0cgNXCuuIbrjV0F7es9INieHxKGgiPDKfo= Thread-Topic: [musl] diffutils crash in malloc Thread-Index: AQHTW/za0R60iWsSAUCrXCMMIFi8+KMRSKCAgAACKas= In-Reply-To: <5A08C239.4070003@adelielinux.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=tobias.koch@nonterra.com; x-originating-ip: [2a01:c22:7608:4400:fd01:450f:3533:f195] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;AM5PR0802MB2610;6:IM1vU1KMUXs3IiAVBxM2a9CcrHXUuztdiEmn4/8/siKHoA3Vbd1MBF9T2hBAgTUCasAfwVChW3iCJv+97TGcfTnaoCdhCW9YQJriPlC+XtkcgNZTvzu1kJD46S09Ti3hlehMyIeacxNY/hxzTE6OTLrQVAR5blYqXEA1PF+E0QNO5eAnm1oM5lurhQDumiUONlPn2/XmcMb5uf0ITYPn2NkGVCDKKI5meuHjLqcy2bW4jfcuzseWcWT2cordurvBSRKu6LZnxRgjpqiYkN6YlXweTv7i2VH634c2HZFbqPzBNiPLK/52NtAMhTmnyx7dKWADsyyKglzIu1OXnNsyM+zoKkcAcmweVpp3+ltmLts=;5:gkzuxtYWm9dpUKg1G/l+zHlPvk7hDz6Gr/YN8BTidxUAabA4Z3DWXoiOJV3N7xRqfozDc2OCOHmu2xnHdssLoTCJlY91ONrWTERCGrdI4HF/EuqKt8pA9ICugScljntzmMSNMUi2hHqItHSvELObrTvnJ2/RLOeAwdSmaX7rwu8=;24:11A8HWNzg0Mg58JHo9bsbDOp+38dIQW5b6u0/EJ9uPSW0KH3PijsvV+yBDilKITSfXXPrPYKIlKS3GOPPyIJuG1hEIWD0qd4NbQCyXGL0y0=;7:pYOpO6YKhl94IsuxZVZEq1hBc1iaaWhBf4YiBzxVPnq0dOBmyuBZBgxY7DrenzpCqz79B0vt/hp8SYxrmQY6rVJvIuZR cSgf3+fko1p+H1o/tqG8oesutf7TUxo5oNYr7tnHZSt3amF/THjGFFDb98OKHyPHp72lXLNlgH1qu5I1qjoVBlQ6KAX7eFfHWI x-ms-exchange-antispam-srfa-diagnostics: SSOS; x-ms-office365-filtering-correlation-id: c68f4098-bf0e-4216-7602-08d52a190f9e x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(4534020)(4602075)(4603075)(4627115)(201702281549075)(2017052603258);SRVR:AM5PR0802MB2610; x-ms-traffictypediagnostic: AM5PR0802MB2610: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(17755550239193); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(5005006)(8121501046)(3231022)(3002001)(10201501046)(93006095)(93001095)(100000703101)(100105400095)(6041248)(2016111802025)(20161123562025)(20161123564025)(201703131423075)(201703061421075)(20161123558100)(20161123555025)(20161123560025)(6072148)(6043046)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:AM5PR0802MB2610;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:AM5PR0802MB2610; x-forefront-prvs: 0489CFBAC9 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(376002)(346002)(189002)(24454002)(54524002)(199003)(2900100001)(6306002)(2501003)(189998001)(575784001)(8676002)(86362001)(966005)(8936002)(81166006)(1730700003)(81156014)(6436002)(55016002)(102836003)(6116002)(5250100002)(14454004)(7736002)(5640700003)(74316002)(54896002)(236005)(508600001)(99286004)(6506006)(9686003)(76176999)(53936002)(54356999)(229853002)(53546010)(606006)(7696004)(5660300001)(6916009)(2950100002)(6606003)(101416001)(97736004)(25786009)(33656002)(6246003)(53376002)(53386004)(2906002)(3660700001)(19627405001)(3280700002)(105586002)(2351001)(106356001)(50986999)(68736007);DIR:OUT;SFP:1101;SCL:1;SRVR:AM5PR0802MB2610;H:AM5PR0802MB2611.eurprd08.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; received-spf: None (protection.outlook.com: nonterra.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM X-OriginatorOrg: nonterra.com X-MS-Exchange-CrossTenant-Network-Message-Id: c68f4098-bf0e-4216-7602-08d52a190f9e X-MS-Exchange-CrossTenant-originalarrivaltime: 12 Nov 2017 22:02:26.5510 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 76ec9478-ab84-4eac-917c-c1a3242376a3 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0802MB2610 Xref: news.gmane.org gmane.linux.lib.musl.general:12092 Archived-At: --_000_AM5PR0802MB26119E1FA20D6E23CF60FB25892A0AM5PR0802MB2611_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi, I should have pointed out that even though I was inside a mipsel target, th= e diff from the tools folder is an x86_64 binary: build@scw-fdfceb:~/spool/mipsel$ file sys-root/tools/bin/diff sys-root/tools/bin/diff: ELF 64-bit LSB executable, x86-64, version 1 (SYSV= ), dynamically linked, interpreter /tools/lib/ld-musl-x86_64.so.1, BuildID[= sha1]=3D80131005d1754ee60ea69e49e4d212c0ee53002a, not stripped And this is diffutils 3.5. Tobias ________________________________ From: A. Wilcox Sent: Monday, November 13, 2017 12:50 AM To: musl@lists.openwall.com Subject: Re: [musl] diffutils crash in malloc -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 On 12/11/17 15:46, Tobias Koch wrote: > Hi, > > when I switched from musl 1.1.16 to 1.1.17 (and now 1.1.18) diff > started to crash. The gdb backtrace shows, that this happens > during memory allocation: > > build@bootstrap(mipsel):~$ gdb /tools/bin/diff [snip] I notice you are using mipsel. Do you see this on any other architectures? diffutils compiled against 1.1.16 runs fine against 1.1.17 and 1.1.18 here on x86_64 (64-bit, LE) and ppc (32-bit, BE). So it seems this may be a MIPS issue. > Here a and b are empty files, but this happens with other input, > as well. diffutils' xmalloc looks fairly inconspicuous to me: > > I understand this may very well be a problem in diff and not musl. > But this is the exact same version of diffutils included with > Debian Stretch and running the same under Valgrind compiled against > glibc shows no problems. My wisdom ends here. Any clues how I can > get to the bottom of this? > > Tobias > Are you using valgrind and glibc on the same hardware (mipsel)? Best, - --arw - -- A. Wilcox (awilfox) Project Lead, Ad=E9lie Linux http://adelielinux.org Ad=E9lie Linux adelielinux.org Freedom over politics. Ad=E9lie Linux gives you the choice to run your syst= em your way. Your freedom, privacy, and right of choice are what truly matt= ers. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJaCMI2AAoJEMspy1GSK50Uk9wQAKPpqdKvQeTFWlUuZesYET1l 8tiHBvWL3vpymOL/cJGyYvlN4rl4TZE+aZrRtxebrgnAV0BwdA0WjNHaWZ0PkRG1 i6Do8GK8pSgYJf9PtgJQLbG+qoGCj9mWDxQm3gxf2r9YGINTOevsbTwfTbvJuFWC d1DDci7uffIhAQaYMVDm8IOmyOGGcbd91EivF9VZPNoqXcGWg9ZqMiioF+rOngJj f4Js1YoOHPiweUQWISSIbZffb3Sex5/z5nCRoODm07k4/9ku6BrG/ACeRy5BPSR3 68iDuMahsy6jCScMDgNsWgHvDXqp/XraTF8gPdcER6noq2o98XN+ezy7aUWPWpey SlhhmFwY3vCTyWU38gPMNw4VPtdaL+yCAy12PZQatHxkK/ck8vlTzqQ8c2FRMibk vGT85j97MUb/ziA43+9IkGMFc9gBFZdN1T8zNCDl4c7I57cSDvn0NsiJvcFDE+2J ThJf9ETKrougdJbCo7XIAl/JXSANVnADwd+F04uWYhyWBaA6jOYzOtQbpMM1DdeW hgnSxmgpwJkWCk4FKufpteeuv37uP8LUeGwjd9mWn18OjDdk092D7SwnaXNAcngp MsikPC4pzHbKSYUQ4rvHoX/qo4m7Hz9aI65eYcL3CHvX5Cfjlbv+dKI95kBM06ct Uq1fUeUkpC55II2RlFIp =3DkSn0 -----END PGP SIGNATURE----- --_000_AM5PR0802MB26119E1FA20D6E23CF60FB25892A0AM5PR0802MB2611_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable

Hi,


I should have pointed out that even though I was inside a mipsel target,= the diff from the tools folder is an x86_64 binary:


build@scw-fdfceb:~/spool/mipsel$ file sys-root/tools/bin/diff

sys-root/tools/bin/diff: ELF 64-bit LSB executable, x86-64, version 1 (S= YSV), dynamically linked, interpreter /tools/lib/ld-musl-x86_64.so.1, Build= ID[sha1]=3D80131005d1754ee60ea69e49e4d212c0ee53002a, not stripped


And this is diffutils 3.5.


Tobias




From: A. Wilcox <awilfox= @adelielinux.org>
Sent: Monday, November 13, 2017 12:50 AM
To: musl@lists.openwall.com
Subject: Re: [musl] diffutils crash in malloc
 
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On 12/11/17 15:46, Tobias Koch wrote:
> Hi,
>
> when I switched from musl 1.1.16 to 1.1.17 (and now 1.1.18) diff
> started to crash. The gdb backtrace shows, that this happens
> during memory allocation:
>
> build@bootstrap(mipsel):~$ gdb /tools/bin/diff

[snip]

I notice you are using mipsel.  Do you see this on any other
architectures?  diffutils compiled against 1.1.16 runs fine against 1.1.17 and 1.1.18 here on x86_64 (64-bit, LE) and ppc (32-bit, BE).
So it seems this may be a MIPS issue.

> Here a and b are empty files, but this happens with other input,
> as well. diffutils' xmalloc looks fairly inconspicuous to me:
>
> I understand this may very well be a problem in diff and not musl. > But this is the exact same version of diffutils included with
> Debian Stretch and running the same under Valgrind compiled against > glibc shows no problems. My wisdom ends here. Any clues how I can
> get to the bottom of this?
>
> Tobias
>

Are you using valgrind and glibc on the same hardware (mipsel)?

Best,
- --arw


- --
A. Wilcox (awilfox)
Project Lead, Ad=E9lie Linux
http://adelielinux.org
adelielinux.org
Freedom over politics. Ad=E9lie Linux gives you the choice to run your syst= em your way. Your freedom, privacy, and right of choice are what truly matt= ers.


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCAAGBQJaCMI2AAoJEMspy1GSK50Uk9wQAKPpqdKvQeTFWlUuZesYET1l
8tiHBvWL3vpymOL/cJGyYvlN4rl4TZE+aZrRtxebrgnAV0BwdA0WjNHaWZ0PkRG1
i6Do8GK8pSgYJf9PtgJQLbG+qoGCj9mWDxQm3gxf2r9YGINTOevsbTwfTbvJuFWC
d1DDci7uffIhAQaYMVDm8IOmyOGGcbd91EivF9VZPNoqXcGWg9ZqMiioF+rOngJj
f4Js1YoOHPiweUQWISSIbZffb3Sex5/z5nCRoODm07k4/9ku6BrG/ACeRy5BPSR3
68iDuMahsy6jCScMDgNsWgHvDXqp/XraTF8gPdcER6noq2o98XN+ezy7aUWPWpey
SlhhmFwY3vCTyWU38gPMNw4VPtdaL+yCAy12PZQatHxkK/ck8vlTzqQ8c2FRMibk
vGT85j97MUb/ziA43+9IkGMFc9gBFZdN1T8zNCDl4c7I57cSDvn0NsiJvcFDE+2J ThJf9ETKrougdJbCo7XIAl/JXSANVnADwd+F04uWYhyWBaA6jOYzOtQbpMM1DdeW
hgnSxmgpwJkWCk4FKufpteeuv37uP8LUeGwjd9mWn18OjDdk092D7SwnaXNAcngp
MsikPC4pzHbKSYUQ4rvHoX/qo4m7Hz9aI65eYcL3CHvX5Cfjlbv+dKI95kBM06ct
Uq1fUeUkpC55II2RlFIp
=3DkSn0
-----END PGP SIGNATURE-----
--_000_AM5PR0802MB26119E1FA20D6E23CF60FB25892A0AM5PR0802MB2611_--