| Commit message (Collapse) | Author | Age | Files | Lines |
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When `fstat` fails, `st` is left uninitialised. In our case, Ben Kohler
noticed our release media builds were failing in Gentoo on x86 when building
busybox with occasional SIGBUS. This turned out to be EOVERFLOW (from 32-bit
ino_t) which wasn't being reported because nothing was checking the return value
from `fstat`.
Fix that to avoid UB (use of uninit var) and to give a more friendly
error to the user.
This actually turns out to be fixed already in the kernel from back in
2010 [0] and 2016 [1].
[0] https://github.com/torvalds/linux/commit/a3ba81131aca243bfecfa78c42edec0cd69f72d6
[1] https://github.com/torvalds/linux/commit/46fe94ad18aa7ce6b3dad8c035fb538942020f2b
Reported-by: Ben Kohler <bkohler@gentoo.org>
Signed-off-by: Sam James <sam@gentoo.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|\| |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In the function find_export_symbols, since the fopen file does not
exit when it fails, there is a dereference problem in fclose(fp),
which will cause a segmentation fault.
Signed-off-by: Yan Zhu <zhuyan2015@foxmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|\| |
|
| |
| |
| |
| |
| |
| |
| | |
Bug: https://bugs.gentoo.org/893776
Closes: https://bugs.busybox.net/show_bug.cgi?id=15326
Signed-off-by: Arsen Arsenović <arsen@gentoo.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Make some adjustments to the build system to allow busybox-w32
to be built with w64devkit:
- Strip drive prefix from CURDIR in Makefile to avoid confusing
make with colons.
- Limit file redirection to a subshell in the usage_compressed and
embedded_scripts scripts. Otherwise it isn't possible to move
the open generated file on Windows.
- Change the option tests in Kbuild.include to allow for /dev/null
not existing on Windows.
- Create host binaries without a '.exe' extension. Otherwise they're
rebuilt more often than necessary.
- Modify split-include.c to allow for Windows' popen() not expanding
wildcards.
(GitHub issue #239)
|
|\| |
|
| |
| |
| |
| | |
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Commit 4bdc914ff (build system: fix compiler warnings) added a
test on the return value of fgets() in split-include.c.
During bisection it's possible to go back to a state where a
configuration value didn't exist. This results in an empty
include file corresponding to the missing feature. If a
subsequent bisection returns to a state where the feature exists
split-include treats the empty file as an error and the build
fails.
Add a call to ferror() to distinguish between fgets() failing
due to an error and due to there being no data to read.
Signed-off-by: Ron Yorston <rmy@pobox.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
These items are already listed, albeit without `.exe` suffix.
Presumably, this is because BusyBox-w32 is traditionally cross-compiled
on Linux.
However, we are about to introduce a CI build definition that builds
BusyBox-w32 in MSYS2 (using mingw-w64-gcc), meaning that those
executables might very well exist _with_ `.exe` suffix.
Let's ignore those, too.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
|
|\| |
|
| |
| |
| |
| | |
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
without POSIX, kbuild has some trouble compiling its support
executables. Luckily, the parts that really lean on POSIX functionality
are pretty much all only needed when configuring the build
interactively.
When compiling BusyBox for Win32, we do not actually need interactive
configuration at all: we simply choose the default. Therefore, a lot of
the stuff that is typically built for the Kconfig system is totally
unnecessary (such as: compiling documentation via fork()&exec(), changing
the window size, etc).
Liberally put all of the problematic code behind #ifndef __MINGW32__
guards, just to get `make mingw64_defconfig` going in Git for Windows'
SDK (which is a special-purpose version of MSYS2).
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
It is not. At least not in general. And in particular not on 64-bit
Windows, where sizeof(long) == 4.
What the code wanted to use is actually called intptr_t.
Note: `intptr_t` is a C99 feature.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The current code without this patch is seriously flawed, as it can
easily overrun the buffer while looking for the *beginning* of the
line.
The symptom when trying to build without this patch in Git for
Windows' SDK (which is a special-purpose version of MSYS2) is:
$ make mingw64_defconfig && make -j15
HOSTCC scripts/basic/fixdep
make[1]: *** [scripts/Makefile.host:104: scripts/basic/fixdep] Error 127
make: *** [Makefile:358: scripts_basic] Error 2
make: *** [Makefile:358: scripts_basic] Error 2
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We want to make sure that the original line endings are preserved, as
fixdep hardcodes the assumption of Unix-type line endings.
The symptom is this (kinda hard to understand) error when building in
Git for Windows' SDK (which is a special-purpose version of MSYS2):
$ make mingw64_defconfig && make -j15
HOSTCC scripts/basic/fixdep
C:/git-sdk-64/mingw64/x86_64-w64-mingw32/include/ctype.h
64-w64-mingw32/include/ctype.h: Invalid argument
fixdep: make[1]: *** [scripts/Makefile.host:104: scripts/basic/fixdep] Error 2
make: *** [Makefile:358: scripts_basic] Error 2
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
|
|\| |
|
| |
| |
| |
| |
| | |
Signed-off-by: Maninder Singh <maninder1.s@samsung.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|\|
| |
| |
| |
| |
| | |
Conflicts:
include/platform.h
scripts/basic/fixdep.c
|
| |
| |
| |
| | |
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|\|
| |
| |
| |
| |
| | |
Conflicts:
Makefile.flags
scripts/basic/fixdep.c
|
| |
| |
| |
| | |
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|\| |
|
| |
| |
| |
| |
| | |
Signed-off-by: Marek Polacek <mpolacek@redhat.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
| | |
|
|/ |
|
|
|
|
|
|
|
|
|
| |
Update retrun character detection in the fixdep.c
to let it work in cygwin.
Signed-off-by: Macpaul Lin <macpaul@andestech.com>
Signed-off-by: Greentime <green.hu@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
|
|
| |
This reverts commit 10c36b86574133bb1cd29ad04db64c7953b94ab5.
|
|
|
|
|
|
|
|
|
| |
Update return character detection in the fixdep.c
to let it workable in cygwin.
Signed-off-by: Macpaul Lin <macpaul@andestech.com>
Signed-off-by: Greentime <green.hu@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
|
|
| |
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
function old new delta
launch_helper 170 169 -1
setup_heredoc 312 302 -10
handle_dir_common 367 354 -13
expand_vars_to_list 2456 2443 -13
open_transformer 89 74 -15
data_extract_to_command 439 423 -16
do_ipaddr 1406 1389 -17
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/7 up/down: 0/-85) Total: -85 bytes
Signed-off-by: Pascal Bellard <pascal.bellard@ads-lu.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
|
|
| |
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
|
|
|
| |
Signed-off-by: Jérémie Koenig <jk@jk.fr.eu.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
|
|
| |
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
|
|
| |
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
|
|
|
|
| |
and SKIP_XXXX to IF_NOT_XXXX - the second one was especially
badly named. It was not skipping anything!
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(by Valdimir)
function old new delta
config_open2 - 41 +41
config_read 507 542 +35
find_pair 169 187 +18
fopen_for_write - 14 +14
fopen_for_read - 14 +14
find_main 406 418 +12
xfopen_for_write - 10 +10
xfopen_for_read - 10 +10
popstring 134 140 +6
parse_inittab 396 401 +5
next_token 923 928 +5
pack_gzip 1659 1661 +2
bb__parsespent 117 119 +2
fallbackSort 1719 1717 -2
evalvar 1376 1374 -2
qrealloc 36 33 -3
...
...
...
...
singlemount 4579 4569 -10
process_stdin 443 433 -10
patch_main 1111 1101 -10
ifupdown_main 2175 2165 -10
file_action_grep 90 80 -10
uuidcache_init 649 637 -12
hush_main 797 785 -12
read_config 230 217 -13
dpkg_main 3835 3820 -15
read_line_input 3134 3110 -24
sysctl_main 232 203 -29
config_open 40 10 -30
WARN_BAD_LINE 44 - -44
login_main 1714 1575 -139
------------------------------------------------------------------------------
(add/remove: 5/1 grow/shrink: 8/74 up/down: 174/-737) Total: -563 bytes
|
| |
|
| |
|
| |
|
|
|
|
|
| |
uidgid_get.c: add forgotten copyright notice
pwd/grp/shadow: avoid collisions with libc names
|
|
|
|
|
| |
decided to stop doing FOUR memcmp's per each input character.
I should have fixed this much earlier...
|
| |
|
|
|
|
| |
suggested by Roberto A. Foglietta <roberto.foglietta@gmail.com>
|
| |
|
|
|