From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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: from minnie.tuhs.org (minnie.tuhs.org [50.116.15.146]) by inbox.vuxu.org (Postfix) with ESMTP id 96B7423B51 for ; Mon, 20 May 2024 15:14:20 +0200 (CEST) Received: from minnie.tuhs.org (localhost [IPv6:::1]) by minnie.tuhs.org (Postfix) with ESMTP id 1139B43AFE; Mon, 20 May 2024 23:14:17 +1000 (AEST) Received: from freefriends.org (frenzy.freefriends.org [198.99.81.75]) by minnie.tuhs.org (Postfix) with ESMTPS id EC80343AFC for ; Mon, 20 May 2024 23:14:13 +1000 (AEST) X-Envelope-From: arnold@skeeve.com Received: from freefriends.org (localhost [127.0.0.1]) by freefriends.org (8.16.1/8.16.1) with ESMTPS id 44KDE75w170662 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Mon, 20 May 2024 07:14:08 -0600 Received: (from arnold@localhost) by freefriends.org (8.16.1/8.14.7/Submit) id 44KDE7rq170661; Mon, 20 May 2024 07:14:07 -0600 From: arnold@skeeve.com Message-Id: <202405201314.44KDE7rq170661@freefriends.org> X-Authentication-Warning: frenzy.freefriends.org: arnold set sender to arnold@skeeve.com using -f Date: Mon, 20 May 2024 07:14:07 -0600 To: tuhs@tuhs.org, douglas.mcilroy@dartmouth.edu References: In-Reply-To: User-Agent: Heirloom mailx 12.5 7/5/10 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID-Hash: 2G63QJADT5ASLFLWX53WOHJYRXTR7PTZ X-Message-ID-Hash: 2G63QJADT5ASLFLWX53WOHJYRXTR7PTZ X-MailFrom: arnold@skeeve.com 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 X-Mailman-Version: 3.3.6b1 Precedence: list Subject: [TUHS] Re: A fuzzy awk. (Was: The 'usage: ...' message.) List-Id: The Unix Heritage Society mailing list Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Perhaps I should not respond to this immediately. But: Douglas McIlroy wrote: > I'm surprised by nonchalance about bad inputs evoking bad program behavior. > That attitude may have been excusable 50 years ago. By now, though, we have > seen so much malicious exploitation of open avenues of "undefined behavior" > that we can no longer ignore bugs that "can't happen when using the tool > correctly". Mature software should not brook incorrect usage. It's not nonchalance, not at all! The current behavior is to die on the first syntax error, instead of trying to be "helpful" by continuing to try to parse the program in the hope of reporting other errors. > "Bailing out near line 1" is a sign of defensive precautions. Crashes and > unjustified output betray their absence. The crashes came because errors cascaded. I don't see a reason to spend valuable, *personal* time on adding defenses *where they aren't needed*. A steel door on your bedroom closet does no good if your front door is made of balsa wood. My change was to stop the badness at the front door. > I commend attention to the LangSec movement, which advocates for rigorously > enforced separation between legal and illegal inputs. Illegal input, in gawk, as far as I know, should always cause a syntax error report and an immediate exit. If it doesn't, that is a bug, and I'll be happy to try to fix it. I hope that clarifies things. Arnold