From owner-freebsd-current@freebsd.org Wed May 31 21:27:33 2017 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0AD28B94EA6; Wed, 31 May 2017 21:27:33 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BE2116A3F8; Wed, 31 May 2017 21:27:32 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from [IPv6:2001:470:7a58::3531:dd34:c822:60f2] (unknown [IPv6:2001:470:7a58:0:3531:dd34:c822:60f2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 37C2219190; Wed, 31 May 2017 23:27:24 +0200 (CEST) From: Dimitry Andric Content-Type: multipart/signed; boundary="Apple-Mail=_66BB4097-05BE-472A-9539-F0463C3653F2"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Firefox (and other Mozilla products) after ino64 Message-Id: <3FD47B4D-1C1E-485E-A305-9C4EF3FB5F74@FreeBSD.org> Date: Wed, 31 May 2017 23:27:16 +0200 Cc: FreeBSD Ports To: FreeBSD Current X-Mailer: Apple Mail (2.3273) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2017 21:27:33 -0000 --Apple-Mail=_66BB4097-05BE-472A-9539-F0463C3653F2 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Hi, Due to the recent ino64 update in 12.0-CURRENT, there have been some reports by Firefox port users about crashes. While I personally have not experienced these crashes, as I immediately rebuilt all my ports from scratch after the ino64 update, I think can explain why the following combination is very likely to have problems: * kernel+world after ino64 * www/firefox package from before ino64 It is because Firefox's JavaScript engine is doing tricks to get at libc structures and functions (via an FFI mechanism), and several structure layouts and offsets are hardcoded into its engine at build time. For instance, here is the place where the engine determines the offset of struct dirent's d_name field: = https://hg.mozilla.org/mozilla-central/file/tip/dom/system/OSFileConstants= .cpp#l648 Further down in the file, several offsets of fields in struct stats are similarly determined: = https://hg.mozilla.org/mozilla-central/file/tip/dom/system/OSFileConstants= .cpp#l677 Now, since ino64 changed quite a number of structure layouts, including struct dirent, struct stat, and others, such offsets determined in the past will no longer be valid! It is pretty likely that Firefox will attempt to access these fields, finding bogus values, or simply reading invalid memory, and crashing because of this. Or at the least, the behavior will be unstable. This also applies to other Mozilla products, such as Thunderbird, SeaMonkey, and so on. These should all be rebuilt from scratch under ino64. -Dimitry --Apple-Mail=_66BB4097-05BE-472A-9539-F0463C3653F2 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.30 iEYEARECAAYFAlkvNTsACgkQsF6jCi4glqNvpwCg5eerGXuJHurTOjxZgOiFSyZt OwYAoIZgIrTUAG2vLbkDXU7w3Kuy5pIm =CvWl -----END PGP SIGNATURE----- --Apple-Mail=_66BB4097-05BE-472A-9539-F0463C3653F2--