From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ot1-x329.google.com (mail-ot1-x329.google.com [IPv6:2607:f8b0:4864:20::329]) by sourceware.org (Postfix) with ESMTPS id BDCB73858D28 for ; Thu, 5 Jan 2023 12:21:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org BDCB73858D28 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ot1-x329.google.com with SMTP id j16-20020a056830271000b0067202045ee9so22397353otu.7 for ; Thu, 05 Jan 2023 04:21:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=GVC+SL669FrWd7VaWABVPHSui72bsWiPFWxiqrgDdvU=; b=EO1zt1w8v7e41hkzh7hmptT6rZy2sVGIn4/yUvtYVrXufaFGN/QYDuj9J7dIsPOZax nAMdhYVMP2+O+Dg6pmGwbu613ztWSIEBH5ZvpByTdcB16JGv+oraxjh1r6K2RfbVSlLO pxPgIePe7VxwEfOyyZyjt6LrWwmpN/HM0XNr8kcVJcP1qZ7+YVFUzJBmAzuK9Aw39RQz R6broHblby9M09bQW/i/jYtJNu7fqdAs7CQmQzakhGpzt9LGZ+PblfhkqhOlvWB07cqk tiFj1UyitOy5+LbLxdhjBXsdkUrMH1soWyUZSpjMFFk94DYgf6xQsadBwiHuRutqFI5T iPjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=GVC+SL669FrWd7VaWABVPHSui72bsWiPFWxiqrgDdvU=; b=eBvdfxsQyLSwWLpK83b5Esqm8iY+zNZ845XIa7jn/+UJcI00Vf7QrwoMmKtM2c1YRa mBdC26z3gM0oI4ETlERRjN9kavd0CUHIfMAPbUVRnLl+VvagrFCGPerK1CvaTd0OtLX5 1n2N7/7Fsugd+xfYfMELcpeCNn2K7g4xbNpKLyILIFT3oRHZI4Ntvpt/5taML1Msoz2j +FEzNj9RLJkmE9QC0Y4s9oGBxVgxSfCSBLAnmhAA2IliEvf6tvK3h9L5UxvimNreUtqN 13nX6abGYPgjQURMs0F0aKzoMYbQPGj/Lj4CHpS3c85nTGtO6Neid7wL7bFbjP7+1QOk uw+A== X-Gm-Message-State: AFqh2kqmDgd8Tot9RasfbU4jXkqWcUekGr87bA1BPKXP1eR0Tn2z4C9b 4mNfb05V9z+Cl7+s/xQQWIg= X-Google-Smtp-Source: AMrXdXtyxmv4MkPUFtQ5W+Qj95X2xuIsfolmqTqC26zEcwSXWc2JyiYI6K/zOxVBpED3vdy3YqcBew== X-Received: by 2002:a9d:62c:0:b0:66e:c736:ef9a with SMTP id 41-20020a9d062c000000b0066ec736ef9amr23860769otn.1.1672921280036; Thu, 05 Jan 2023 04:21:20 -0800 (PST) Received: from illithid (ip68-12-97-90.ok.ok.cox.net. [68.12.97.90]) by smtp.gmail.com with ESMTPSA id u20-20020a9d4d94000000b0066871c3adb3sm17431799otk.28.2023.01.05.04.21.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Jan 2023 04:21:19 -0800 (PST) Date: Thu, 5 Jan 2023 06:21:18 -0600 From: "G. Branden Robinson" To: Alejandro Colomar , 'GNU C Library' Cc: Wilco Dijkstra , Cristian =?utf-8?Q?Rodr=C3=ADguez?= , Damian McGuckin , Alexis Subject: Re: [manual]: rawmemchr(3) and UB Message-ID: <20230105122118.fk62iqxvgwlk7jfm@illithid> References: <20230104201923.nd6tovbtmsghi27d@illithid> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="gfrwxunpjk4onkgq" Content-Disposition: inline In-Reply-To: <20230104201923.nd6tovbtmsghi27d@illithid> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: --gfrwxunpjk4onkgq Content-Type: text/plain; charset=us-ascii Content-Disposition: inline My punishment for smarting off to the libc-alpha list is that I have to admit an error. At 2023-01-04T14:19:23-0600, G. Branden Robinson wrote: > The b in bzero() [is] for Bad BSD Bogosity. [...] Like index() and > rindex() it is duplicative. While BSD did hang on to {r,}index for a long time, I was digging around in libc history while amiably reading C. D. Perez's "A Guide to the C Library for Unix Users" (ca. 1981)[1] and found that I have to correct myself...and possibly the Linux man-pages documents for them. They date all the way back to V7 Unix and antedate str{r,}chr(). https://minnie.tuhs.org/cgi-bin/utree.pl?file=V7/usr/src/libc/gen/index.c https://minnie.tuhs.org/cgi-bin/utree.pl?file=V7/usr/src/libc/gen/rindex.c Mea culpa. Alex, in your current mission you might find entertainment of the cerebral hemorrhage-causing variety in some of the following files. https://minnie.tuhs.org/cgi-bin/utree.pl?file=V7/usr/src/libc/gen/strcat.c https://minnie.tuhs.org/cgi-bin/utree.pl?file=V7/usr/src/libc/gen/strcmp.c https://minnie.tuhs.org/cgi-bin/utree.pl?file=V7/usr/src/libc/gen/strcpy.c https://minnie.tuhs.org/cgi-bin/utree.pl?file=V7/usr/src/libc/gen/strlen.c https://minnie.tuhs.org/cgi-bin/utree.pl?file=V7/usr/src/libc/gen/strncat.c https://minnie.tuhs.org/cgi-bin/utree.pl?file=V7/usr/src/libc/gen/strncmp.c https://minnie.tuhs.org/cgi-bin/utree.pl?file=V7/usr/src/libc/gen/strncpy.c Regards, Branden [1] https://www.tuhs.org/Archive/Documentation/Manuals/Unix_4.0/Volume_1/D.1.2_A_Guide_to_the_C_Library.pdf --gfrwxunpjk4onkgq Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEh3PWHWjjDgcrENwa0Z6cfXEmbc4FAmO2wLQACgkQ0Z6cfXEm bc4XZw/+IKFwvj9MVVzICsqIumHUIK0gSCLOwNqqQrsLTmMg6y0vHvHJs7XH9EPR 3HmJs9ewzr6aE5DH5h9xzvCfOWc1sTSbXWdmg/5sUEx8bBF98Fo3RA14uBKI93ZE 9KaSBJtwASDSsv9MDTrqCcW16IpoV8NezZSqhw+r3ge1q8y/9cT5tgsKynfyqxAP ckMqUeOhPgUu9nyIodWLPmSUxNZXYBUyBNO8Nb5rYusHM9ECt7TMzM6qZt4/crEi M5POjOGecFvW+pywojMEIEejG07RrRIZ5GHzhLgcc+y4TYNCELByrBMeH75mh4Qr zJ3vFT6PvMNxLpB+NY8/UoAy/O1qV2HOF6r4msGy/qzH1ZcVv36aQ0PsoynOfIn1 c+zj+5tp//mUdcPp79PP+lptko0QqLjXLasBoe1O4V5eCaK5NcD8/S4u0GzlUQDy iiMPbC7ho0qNQrQc+1dTFq0ZpGN8f3MkksSLLzy8w+mZQlY2ZIT5t/h7eGn0P+4D rJxRCoxg7Aj9Zaura4Fehx3hfnFSzLunAhjpqdZZlvl00FP+Ojh2o0sLPhZ6TLlx C0/ZbO+k5AgYZwBiOvP9seJ8qUz21h72TScol3wZ5NMAM/aoTLnA6+UEBMFegPvB 6F7h7ljWEA1IhzCtPpGj8PwBJlSAQ12t0HcJh7nHN1z4TVzgGUw= =rTsQ -----END PGP SIGNATURE----- --gfrwxunpjk4onkgq--