Bug 20067 - mv dumps core on cross-partition directory mv's
Summary: mv dumps core on cross-partition directory mv's
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: fileutils
Version: 7.0
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Bernhard Rosenkraenzer
QA Contact: Aaron Brown
Depends On:
TreeView+ depends on / blocked
Reported: 2000-10-30 23:12 UTC by Stephen John Smoogen
Modified: 2007-04-18 16:29 UTC (History)
2 users (show)

Clone Of:
Last Closed: 2000-10-31 12:20:07 UTC

Attachments (Terms of Use)

Description Stephen John Smoogen 2000-10-30 23:12:49 UTC
mv in 7.0 fails when mv partition_a/dir_a to partition_b/dir_b

mv /root/XXX /home/root/YYY

files are copied over but are not removed from dir_a directory.

root:{/root}# mv updates/ /home/root/RPMS/7.0-updates
mv: basename.c:67: base_name: Assertion `all_slashes || *(p - 1) != '/''
Aborted (core dumped)


root:{/root}# gdb /bin/mv core
GNU gdb 5.0
Copyright 2000 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux"...(no debugging symbols
Core was generated by `mv -i updates/ /home/root/RPMS/7.0-updates'.
Program terminated with signal 6, Aborted.
Reading symbols from /lib/libc.so.6...done.
Loaded symbols for /lib/libc.so.6
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
#0  0x4004c8c1 in __kill () from /lib/libc.so.6
(gdb) where
#0  0x4004c8c1 in __kill () from /lib/libc.so.6
#1  0x4004c63d in raise (sig=6) at ../sysdeps/posix/raise.c:27
#2  0x4004dcc4 in abort () at ../sysdeps/generic/abort.c:88
#3  0x40046011 in __assert_fail (assertion=0x8051680 "all_slashes || *(p -
1) != '/'", file=0x805166a "basename.c",
    line=67, function=0x8051660 "base_name") at assert.c:60
#4  0x804d6db in strcpy () at ../sysdeps/generic/strcpy.c:31
#5  0x804cee0 in strcpy () at ../sysdeps/generic/strcpy.c:31
#6  0x80498c7 in strcpy () at ../sysdeps/generic/strcpy.c:31
#7  0x8049a4e in strcpy () at ../sysdeps/generic/strcpy.c:31
#8  0x8049eff in strcpy () at ../sysdeps/generic/strcpy.c:31
#9  0x4003ba2c in __libc_start_main (main=0x8049b30 <strcpy+1404>, argc=4,
ubp_av=0xbffff7b4, init=0x8049064,
    fini=0x804fd1c <strcpy+26472>, rtld_fini=0x4000d3c8 <_dl_fini>,
    at ../sysdeps/generic/libc-start.c:111

root:{/root}# rpm -q fileutils

Comment 1 Bernhard Rosenkraenzer 2000-10-31 12:35:25 UTC
Fixed since fileutils-4.0.27-1

Comment 2 Tim Waugh 2000-10-31 12:39:14 UTC
As a work-around, don't use trailing slashes.

Note You need to log in before you can comment on or make changes to this bug.