This occurs with `env -u VAR` and `env -u VAR=val`, but interestingly `env VAR=val`, `env -`, `env -i` and `env` all seem to work fine. I have tested this going back several busybox versions (1.20.2 - 1.27.2), on my own and other public arm+arm64 Android builds as well as the official arm and i686 builds (https://busybox.net/downloads/binaries/1.26.2-defconfig-multiarch/) using my phone and my Ubuntu VM, respectively. My attempts to debug it have only led to dead ends so far, including trying swapping out the putenv for the commented unsetenv with no luck, but I do know that toybox env -u does work on Android and uses putenv and unsetenv, so it should be possible on that platform and this just seems to be a larger busybox issue overall, independent of platform/architecture. Let me know if there's anything else I can provide to help debug or fix it.
Here my tests: $> sudo docker run -ti --rm busybox / # busybox BusyBox v1.27.2 (2017-11-01 22:58:00 UTC) multi-call binary. ... / # env -u HOME env env: invalid number 'HOME' / # env -u 1 env Segmentation fault Since it said invalid number I tried a number and got a segfault.
Fixed in git: commit 8d8ee910f0a624fefd2a4aaefeb406003dea7807 Author: Ron Yorston <rmy@pobox.com> Date: Mon Dec 25 21:36:05 2017 +0100 env: -u option fails due to typo