Bug 10656 - 32-bit mv will not move broken symlinks
Summary: 32-bit mv will not move broken symlinks
Status: RESOLVED WORKSFORME
Alias: None
Product: Busybox
Classification: Unclassified
Component: Other (show other bugs)
Version: 1.27.x
Hardware: All Linux
: P5 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-01-16 08:36 UTC by john.frankish
Modified: 2018-01-30 14:15 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:


Attachments
busybox config (6.90 KB, application/gzip)
2018-01-16 08:36 UTC, john.frankish
Details

Note You need to log in before you can comment on or make changes to this bug.
Description john.frankish 2018-01-16 08:36:10 UTC
Created attachment 7431 [details]
busybox config

Using busybox-1.27.2, with the same .config with x86 and x86_64, the mv command will move broken symlinks with x86_64, but not with x86.

x86_64

$ mkdir -p test/old test/new
$ cd test/old
$ touch some-file
$ ln -s some-file good-link
$ ln -s no-file bad-link
$ mv * ../new
$ cd ..
$ find
.
./new
./new/some-file
./new/good-link
./new/bad-link
./old

..with x86, bad-link is left in ./old
Comment 1 john.frankish 2018-01-26 07:11:40 UTC
Note that in busybox-1.24, both 32-bit mv and 64-bit mv work as expected.
Comment 2 Denys Vlasenko 2018-01-26 14:31:54 UTC
(In reply to john.frankish from comment #0)
> Using busybox-1.27.2, with the same .config with x86 and x86_64, the mv command will move broken symlinks with x86_64, but not with x86.

Can not reproduce. I assume it's a problem with a libc or toolchain you are using.
Comment 3 john.frankish 2018-01-28 04:50:05 UTC
In case anybody else has the problem, here are the details:

glibc-2.26, gcc-7.2, busybox-1.27.2 - doesn't work
glibc-2.24, gcc-6.2, busybox-1.27.2 - doesn't work
glibc-2.22, gcc-5.2, busybox-1.24.0 - OK
Comment 4 Denys Vlasenko 2018-01-30 13:24:13 UTC
(In reply to john.frankish from comment #3)
glibc-2.26, gcc-7.2, busybox-1.27.2 - doesn't work
glibc-2.24, gcc-6.2, busybox-1.27.2 - doesn't work
glibc-2.22, gcc-5.2, busybox-1.24.0 - OK

Can you find at which exact bbox version it stopped working?
Comment 5 john.frankish 2018-01-30 14:15:44 UTC
I did some testing, compiling 32-bit with:

glibc-2.22, gcc-5.2; busybox-1.24.2, 1.25.1, 1.26.2, 1.27.2 all OK

glibc-2.24, gcc-6.2; busybox-1.25.1, 1.26.2, 1.27.2 none OK