From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 17A5B138350 for ; Sat, 25 Apr 2020 18:28:29 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 33524E08FA; Sat, 25 Apr 2020 18:28:23 +0000 (UTC) Received: from mail.suugaku.co.uk (unknown [90.193.124.236]) by pigeon.gentoo.org (Postfix) with ESMTP id B3AE1E08E0 for ; Sat, 25 Apr 2020 18:28:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=suugaku.co.uk; s=mail; t=1587839387; bh=SBQVb106zahG7GyILEKi9z+HC6iusF3Q1LJnN9dMBTc=; h=Date:From:To:Subject:References:In-Reply-To; b=oKFhPHKr56b14JLHW+212NTXeZPXps1bNPuN9GbCUTr3+IMpK51j/8DTbzWKvz7RB 444VAnPvTOVdLhdpDCwvXfkNAQVUwz19PkHejqptSpuTWmJDy67zG5rQ4PV3RyS5Ex ZrWKD8WYXY/C7yWbxP5cN3R8C9/XOJckun8RJJKI= Date: Sat, 25 Apr 2020 19:28:19 +0100 From: Ashley Dixon To: gentoo-user@lists.gentoo.org Subject: Re: [OBORONA-SPAM] Re: [gentoo-user] Is Gentoo dead? Message-ID: <20200425182819.lh4son6zvenx5drq@ad-gentoo-main> Mail-Followup-To: gentoo-user@lists.gentoo.org References: <20200421165803.GB187193@redacted> <11506562.O9o76ZdvQC@peak> <20200421190145.GF187193@redacted> <20200422161455.GA23147@legohost> <20200423152716.51799a42.lembark@wrkhors.com> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="rqkvsff7thihwjqb" Content-Disposition: inline In-Reply-To: X-Operating-System: Linux ad-gentoo-main 5.4.28-gentoo User-Agent: NeoMutt/20180716 X-Archives-Salt: db1ba778-3036-4e26-b9ad-86eaa6ae3d67 X-Archives-Hash: a6aac8be34cd1fbfc7953d87ccefb2d4 --rqkvsff7thihwjqb Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Apr 25, 2020 at 04:37:43PM +0000, Caveman Al Toraboran wrote: > so i really can't believe that we have devolved in > such a way where malloc/free suddenly has became a > hard concept for homo sapiens. You'd be surprised how much shocking code is out there, especiall= y in proprietary products (the Valve Steam Client is a prime exam= ple). In general, reasons for memory-management-incompetence fall into the foll= owing categories: (a) Programmers forget. For experienced and skilled developers, th= is is likely the most common cause of malloc-free mismatches. I= was programming in C a few years before I ever touched a comput= er (I bought/stole Kernighan and Ritchie from the local library= and wrote out code-listings with pencil and paper), and to this= day still occasionally forget to free everything I ma= lloc. Thankfully, in the days of dynamic code-analysis tools suc= h as Valgrind, these problems---amongst other hard-to= -spot issues---become easy fixes. (b) Programmers don't care, because it is assumed the operating s= ystem will do it for them. I have heard this one quite a bit = from people trying to justify their horribly written code. O= ften, with people who make this argument, the malloc-free mismatc= h is the least of their problems, however in the days of intell= igent operating system-level memory-management seen in modern = Linux kernels, some programmers seem to take the hard work of k= ernel developers as a free pass to be messy themse= lves. (c) Programmers don't care, because the code means nothing to them= =2E I have never worked as a professional programmer, so I can = only speculate, but from conversations with veteran developer= s at large companies such as Intel and Microsoft, it seems as t= hough the general morale amongst older developers can drop hugely= =2E Why bother optimising or thoroughly testing code when it's= not yours, and you don't really care about the company for = whom you're developing ? (d) Programmers are genuinely unaware of the importance of freeing = their malloc'd objects. With the abundance of terrible on= -line tutorials, written by teachers that seem to devote themselv= es to teaching the worst practices possible, I've seen an influ= x of programmers who are simply unaware of the need to free = their memory pools. It takes less than a minute of on-line sear= ching to find a popular tutorial on some pretty website which = shows code leaking memory. So yes, it is easy to understand, but whether people _care_ or even know in= the first place is entirely up to them. --=20 Ashley Dixon suugaku.co.uk 2A9A 4117 DA96 D18A 8A7B B0D2 A30E BF25 F290 A8AA --rqkvsff7thihwjqb Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEKpralop7ow7ykEEX0Yqw0r8lqKoFAl6kgUEACgkQ0Yqw0r8l qKqqsw/+L1YERewIqMIqv7g6lP0/Q8U0pnOtW6bchV2IfnwXCpPnhMVBNoD5A55c VpajYO9BLc+s4flWyQA/8L/1efP7UMjmwozL2NSnoehh7QbgvtaMKhYpVWrX8EeS yeuPGB9fDcKnLM+O+llfHHlKnwnYYsuseOGBzneojqJ3xr0jT8x0aJIXQ3CBJdOw 5S8/9nUYMe+QQChIx5oWT/zdcAqKE/zfPv54BcEx/trmbbbbzfNLJy5qFLcjfuEC sXcxMcz1uAoL+jgBD6A2u5Ym3W9UtfhfnvNhwZcmvJ9KyAYvSBN0rkbCG+VLicVX ztLIGVpOkYTNnsTPcq10aPNpQjnEuniCJVa95lSdsFE8S6dQmwnKTqFxhNRjF7YC uZSMLCNSLHkSgqRphjgMrcdjsUQUQppzcl78bekuvj2zpZJknm0TxE4Aq/t0Vrwz GxaaxezggZt80YXCTGe9fqVWj9nldeBHacBpG4OZmbJKU3jIdE24Gkj8Xz9ca+Rg FyHgwQx2Dus/y1JOodK6QhBXAOc7hqxZX8zjrhyb+oohoBiCZfPP8wWoErFmpH5g b3v4eStjDNnmVA5dTNt3GUKKUUCgiPM4xKgwldrSdzOr0E99EdQlqPLqNFwg4JrK n9wmliS2FjsdpW/LAAGJ7SQBrmOdm0/ag0iAwewG00WPgDkLfBc= =sq4T -----END PGP SIGNATURE----- --rqkvsff7thihwjqb--