Mail Archives: djgpp-workers/2002/09/01/02:15:30
Charles & Richard,
> > PROBLEM 1 - RM.EXE SIGABRT
>
> > Test directory setup:
> > -Created a test directory C:\dj204\test
> > -Created a sub directory C:\dj204\test\test
> > -Created one file in the subdirectory C:\dj204\test\test\test.c
>
> Using the rm.exe from simtel's fil41b.zip; and creating the exact
> directories/names as you did above, this works fine on my Win2K system.
I didn't try this yesterday, but I did once I read the email and the rm.exe
from simtel's fil41b.zip works fine with the example. I now expect that the
problem is in a 2.04 CVS LIBC change or series of changes.
> A quick inspection of the remove.c makes it unclear to me how have_device
> could not be set at this point; this code should be harmless but is
> probably unneeded on DOS/Windows systems (it's a security fix).
I have occasionally seen the inode error display on me for no apparent
reason. The error is :-
"ERROR: the directory %s initially had device/inode\n\
numbers %lu/%lu, but now (after a chdir into it), the numbers for
`.'\n\
are %lu/%lu. That means that while rm was running, the directory\n\
was replaced with either another directory or a link to another
directory."),
I have added allot of printf's and debug to the remove.c and I am still
tracing it out, but so far no joy. I suspect something in one of the
functions within the remove_cwd_entries() as have_device goes to 0 after the
fspec_init_dp (&fs, dp) call. The following is what I have got so far. I
have not included the remove.c as it would be too big. I need to do some
more debugging to find out where the problem is.
line 336 (340) => fspec_init_common (struct File_spec *fs)
line 353 (355) => fspec_init_dp (struct File_spec *fs, struct dirent *dp)
line 564 (562)=> fspec_init_dp (&fs, dp);
The numbers in the brackets correspond to the numbers below.
DJGPP_204 C:\dj204\gnu\filutil4.1\src>rm.exe -rf test
347 ++++ 340 872 886 422 374 377 381 FAIL
426
897 943 957 985 738 test
filename >test< have_filetype_mode 1 have_full_mode 1 have_device
1
mode 31ED st_ino 10000001 st_dev 2
514 559, . 514 559, .. 514 559, test 562 355 ++++
340
remove.c 567
filename >test< have_filetype_mode 1 have_full_mode 0 have_device
0
mode 3000 st_ino 1 st_dev 1CFF70
872 886 422 FAIL 426 897 943 957 985 738
test
/test
filename >test< have_filetype_mode 1 have_full_mode 0 have_device
0
mode 3000 st_ino 1 st_dev 1CFF70
Assertion failed at remove.c line 775: fs->have_device
Exiting due to signal SIGABRT
.... SNIP....
Call frame traceback EIPs:
0x0000d706 ___djgpp_traceback_exit+54
0x0000d7f6 _raise+86
0x00009a5e ___dj_assert+46
0x00003386 _fspec_init_file+4406
0x0000357a _rm+426
0x00002636 _fspec_init_file+998
0x000030cb _fspec_init_file+3707
0x0000357a _rm+426
0x00001e88 _main+424
0x00009217 ___crt1_startup+199
- Raw text -