Re: msdos_rename bug
Thu, 19 Oct 1995 01:45:04 +0100

Several people have complained about an OOPS in the msdos
rename code under 1.3.34 and 1.3.35, maybe already slightly
I looked at the code, and find that in

static int rename_diff_dir()

which has a local variable

struct super_block *sb;

this variable is nonzero before the call to msdos_parent_ino(walk,1);
but zero afterwards. This is against the semantics of C, so it seems
that either there is a compiler bug, or there is a wild pointer
At first sight the generated code seems correct (but I know nothing
about Intel assembler). The variable sb is translated as register
variable %ebp. If I insert a line taking its address, then it gets
assigned a stack address 64(%esp) and the bug goes away.

I'll leave it to others to worry what is wrong.
The above was with gcc 2.7.0 and an ELF system.