From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 14597 invoked from network); 12 Mar 2023 22:27:54 -0000 Received: from minnie.tuhs.org (2600:3c01:e000:146::1) by inbox.vuxu.org with ESMTPUTF8; 12 Mar 2023 22:27:54 -0000 Received: from minnie.tuhs.org (localhost [IPv6:::1]) by minnie.tuhs.org (Postfix) with ESMTP id 593D9413BD; Mon, 13 Mar 2023 08:27:47 +1000 (AEST) Received: from sdaoden.eu (sdaoden.eu [217.144.132.164]) by minnie.tuhs.org (Postfix) with ESMTPS id 5B14841396 for ; Mon, 13 Mar 2023 08:27:42 +1000 (AEST) Date: Sun, 12 Mar 2023 23:27:38 +0100 Author: Steffen Nurpmeso From: Steffen Nurpmeso To: Warner Losh , Dave Horsfall Message-ID: <20230312222738.bX8Mi%steffen@sdaoden.eu> In-Reply-To: References: <20230309230130.q4I-f%steffen@sdaoden.eu> <20230310165552.czZmL%steffen@sdaoden.eu> Mail-Followup-To: Warner Losh , Dave Horsfall , The Eunuchs Hysterical Society User-Agent: s-nail v14.9.24-436-g7fcdba31ea OpenPGP: id=EE19E1C1F2F7054F8D3954D8308964B51883A0DD; url=https://ftp.sdaoden.eu/steffen.asc; preference=signencrypt BlahBlahBlah: Any stupid boy can crush a beetle. But all the professors in the world can make no bugs. Message-ID-Hash: QC43KH7DBGSB4HQCIZA4FRC5VROFAKE4 X-Message-ID-Hash: QC43KH7DBGSB4HQCIZA4FRC5VROFAKE4 X-MailFrom: steffen@sdaoden.eu X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: The Eunuchs Hysterical Society X-Mailman-Version: 3.3.6b1 Precedence: list Subject: [TUHS] Re: I can't drive 55: "GOTO considered harmful" 55th anniversary List-Id: The Unix Heritage Society mailing list Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Warner Losh wrote in : |On Sun, Mar 12, 2023, 2:47 PM Dave Horsfall wrote: |> On Fri, 10 Mar 2023, Steffen Nurpmeso wrote: |> |>>|Seriously, I also use setjmp()/longjmp() for a more elegant exit from a |>> |>> That is sheer unbelievable, really? _So_ expensive! |> |> How often would you call setjmp()/longjmp() Only on a Sunday! I never used these myself of free will. (And never regulary at all until i took maintainership of a BSD Mail clone, which is the examplary piece of software to show that BSD signal handling and SA_RESTART are a terrible misconception, especially as soon as the software gets larger. .. In my opinion. Once it was able to run "24/6" i counted the number of system calls necessary for signal block / release and installation / removal over a week, and i think the number was way in the six digits. System calls them all! I should have taken the OpenBSD variant instead, and simply take over what "was good", and it would be much, much better by now. They did the work and reduced the very messy part to two exactly locatable system call points of interest. (I looked i guess 2014-<2017.) A very bad decision. But if i live long enough i will make it, and another one i would really long for.) |Cheap enough for occasional error handling, way too expensive for a generic |exception handling system... processors with lots of registers were more of |a problem... Even on a x86(-32) i have gnashed with my teeth. And that with a Cyrix from 1996 .. and not to think about i386 or even earlier processors with so few memory and speed. I remember _for sure_ looking at the jmpbuf structure by then, and the assembler files (sheer magic by then) and x86 instructions. "Some" jpeg library used jump buffers to signal errors. (I got rid of most sources for things that will never come true, but i do have libjpeg-turbo ball due to package dependencies, and they also use that internally, but looking at it it seems to be a different thing.) That is maybe ok since image processing is maybe expensive enough by itself to simply say they do not care about proper error paths along the way but take a "dead-end exit". (But it was i think not like that with the jpeg i have in mind.) --steffen | |Der Kragenbaer, The moon bear, |der holt sich munter he cheerfully and one by one |einen nach dem anderen runter wa.ks himself off |(By Robert Gernhardt)