rsync 3.00pre6 segfault in add_dirs_to_tree

Ming Zhang blackmagic02881 at
Thu Dec 13 16:53:56 GMT 2007

On Thu, 2007-12-13 at 07:06 -0800, Wayne Davison wrote:
> On Wed, Dec 12, 2007 at 09:44:47PM -0500, Ming Zhang wrote:
> > from the mode, it looks that both of them are directories, so S_ISDIR()
> > should be 1 and thus "dir_cnt--" should get executed, but later show
> > dir_cnt is still 1.
> I wonder if dir_cnt was 3 when there was only 2 dir entries?  I see a
> way in the code that the dir_count global could get executed and then
> later in the make_file() call it could return a NULL indicating that the
> current entry should not get included.

i did not realize that there is a dir_cnt global defined. i need to
figure out how to examine its value in gdb to confirm it was 3...

gdb "cheat" me that showing the function parameter dir_cnt is 1, it can
only grab the latest value which is 1 NOW.

> I'm moving the incrementing of the dir_count variable to avoid this.
> If you would, please test the latest dev version (from the most recent
> nightly tar file or the git repo).

sure i will test and let you know, but since i did not hit it every
time, i am not sure if i can reproduce. so no news will be good news...

> Thanks for your very detailed bug report!

thanks. developer know developer's pain when facing an incomplete bug
report. ;)

> ..wayne..
Ming Zhang

@#$%^ purging memory... (*!%

More information about the rsync mailing list