From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/9605 Path: news.gmane.org!not-for-mail From: Alexander Monakov Newsgroups: gmane.linux.lib.musl.general Subject: [PATCH 0/3] env functions overhaul Date: Sun, 13 Mar 2016 21:53:47 +0300 Message-ID: <1457895230-13602-1-git-send-email-amonakov@ispras.ru> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1457895268 28489 80.91.229.3 (13 Mar 2016 18:54:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 13 Mar 2016 18:54:28 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-9618-gllmg-musl=m.gmane.org@lists.openwall.com Sun Mar 13 19:54:28 2016 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1afB9o-0001Y8-5p for gllmg-musl@m.gmane.org; Sun, 13 Mar 2016 19:54:28 +0100 Original-Received: (qmail 21688 invoked by uid 550); 13 Mar 2016 18:54:17 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 20443 invoked from network); 13 Mar 2016 18:54:01 -0000 X-Mailer: git-send-email 2.1.3 Xref: news.gmane.org gmane.linux.lib.musl.general:9605 Archived-At: Hello, recently, fixing benign UB in unsetenv unearthed bigger issues in putenv, and prompted an overhaul. I still have to improve env testing on libc-test side, but I think I'm done with code tuning on the musl side, and pretty happy with the result. Patches 2 and 3 are followups to stuff discussed on IRC; I feel they are not essential. Patch 1 is the overhaul itself. I hope that new code is easy to follow. It should also improve code size nicely; on x86-64 I got (.text size change after patch 1/3 only; .bss grows by one pointer): text text filename 17 17 obj/src/env/clearenv.o 140 97 obj/src/env/getenv.o 491 334 obj/src/env/putenv.o 215 284 obj/src/env/setenv.o 283 140 obj/src/env/unsetenv.o Thanks. Alexander