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=-0.5 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,MAILING_LIST_MULTI autolearn=ham autolearn_force=no version=3.4.4 Received: from minnie.tuhs.org (minnie.tuhs.org [IPv6:2600:3c01:e000:146::1]) by inbox.vuxu.org (Postfix) with ESMTP id 27F2D2409C for ; Mon, 30 Sep 2024 22:03:35 +0200 (CEST) Received: from minnie.tuhs.org (localhost [IPv6:::1]) by minnie.tuhs.org (Postfix) with ESMTP id 445CB436E7; Tue, 1 Oct 2024 06:03:31 +1000 (AEST) Received: from mail-pf1-x436.google.com (mail-pf1-x436.google.com [IPv6:2607:f8b0:4864:20::436]) by minnie.tuhs.org (Postfix) with ESMTPS id 1D938436E4 for ; Tue, 1 Oct 2024 06:03:28 +1000 (AEST) Received: by mail-pf1-x436.google.com with SMTP id d2e1a72fcca58-71db62281aeso463997b3a.0 for ; Mon, 30 Sep 2024 13:03:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1727726607; x=1728331407; darn=tuhs.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=xKoO27W9x9bl05eP9A/OzogTPDmh/d4AkwZk1MpB8mw=; b=H9KPmnkJig6hP93bcO5vszZ0IPVhwrQTn+eI8XoZlWofCFkdtPGdYMDBHTAQHQ2pF6 eCedcpOvQSK00flI4iPbI/vAVqa8MlUHeu5NyE2P4i2M3gASYUu7RQsMN5bqF+mf51mp yhBD2MLQJzvE5NzVhl9iB4poL7wTZ9NSTdwJNyruDbxmIlHCfmHiW7knF/sGeX+BTLEb lcuREq0Pf7wZmI5TH4Q+8XW7Z+dnOwkF2XCNU/zMGTWA0fz0Y1tKQle2lotY48aCr9zW sKKuR27EOR20YUx6++NlhUY2UkLyH4/hZUD/m7bMNkQyRpBknLvRdWfH4sNIll3M09k4 JovA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727726607; x=1728331407; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=xKoO27W9x9bl05eP9A/OzogTPDmh/d4AkwZk1MpB8mw=; b=DluwcRx6Acab7JJWkTVCiUXadV98F6YyF2ddn5U6d6mHveczhrt2i1hK4G6cKNeJho XutdfsFyYHGxqzT5TWH8i3pZLYEBqB1MrskDdF21avUhltoUr0pTsK0jBw2bho1Zc9OC DNEo7EEdsljweZjF0mVSiMrL3QPOfAWJhWiuI2SU6LdToZDaHSNFonXhpF9XgeqRfeAD iqwY4sqggEiRy6IzWtCw37gdC21IDbwrvGa7Hs7fE6LgnwVZW5VQuE7L7ohr8u3RWjCr PTs2JMadLlT4eVKNJfJlmqWB/XaGKCq0Iikixq124g7Ooso+DSfaIxrj/h2xMJui2Tr0 pPQg== X-Gm-Message-State: AOJu0YxDR0UXShXYTVDlHnwZiRmVZA+5Hn9Q3hpS1JJABvNLlFU8V8nO WRj2QDKB3w2F5kP6JLru66SAmd5bOPB21bjKT7qDTK6wPbSzc05iANMVQz7f7PC3tlNm4MlT7xX yj+bhYYoEc/FGE/17a6TdgKDZVjxf3A== X-Google-Smtp-Source: AGHT+IGG051XoaBcIXqmLMEzAVwzznIu3GsSZq7RD/zQw+fM4Wok4gTk82YkPZvE/VMbS8qEI3ZWTJwIueQiUPg8o1I= X-Received: by 2002:a05:6a00:4c06:b0:717:8a7c:dd82 with SMTP id d2e1a72fcca58-71db7aaa2cfmr1021028b3a.9.1727726607117; Mon, 30 Sep 2024 13:03:27 -0700 (PDT) MIME-Version: 1.0 References: <20240930191216.tIpea9lo@steffen%sdaoden.eu> In-Reply-To: <20240930191216.tIpea9lo@steffen%sdaoden.eu> From: Rich Salz Date: Mon, 30 Sep 2024 16:03:15 -0400 Message-ID: To: TUHS main list Content-Type: multipart/alternative; boundary="000000000000afb68106235bb29a" Message-ID-Hash: EGFCQ3NSKO3VORBILKITQERYK7ILFEXM X-Message-ID-Hash: EGFCQ3NSKO3VORBILKITQERYK7ILFEXM X-MailFrom: rich.salz@gmail.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-tuhs.tuhs.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Douglas McIlroy X-Mailman-Version: 3.3.6b1 Precedence: list Subject: [TUHS] Re: Minimum Array Sizes in 16 bit C (was Maximum) List-Id: The Unix Heritage Society mailing list Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: --000000000000afb68106235bb29a Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Sep 30, 2024 at 3:12=E2=80=AFPM Steffen Nurpmeso wrote > noone ever told them that even the eldest C can be used in a safe > way; Perhaps we have different meanings of the word safe. void foo(char *p) { /* interesting stuff here */ ; free(p); } void bar() { char *p =3D malloc(20); foo(p); printf("foo is %s\n", p); foo(p); } Why should I have to think about this code when the language already knows what is wrong. --000000000000afb68106235bb29a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Mon, Sep 30, 2024 at 3:12=E2=80=AF= PM Steffen Nurpmeso <steffen@sdaod= en.eu> wrote
noone ever told them that even the eldest C can be used in a safe
way;
=C2=A0
Perhaps we have different meanings o= f the word safe.

=C2=A0=C2=A0=C2=A0 void foo(char = *p) { /* interesting stuff here */ ; free(p); }
=C2=A0=C2=A0= =C2=A0 void bar() { char *p =3D malloc(20);
=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 foo(p);
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 printf("foo is %s\n", p);
=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 foo(p);
=C2=A0=C2=A0=C2=A0 }
=
Why should I have to think about this code when = the language already knows what is wrong.
--000000000000afb68106235bb29a--