Looks like there're issues with merging a previous session in. Both joliet_compare_paths () and generate_joliet_path_tables () assume that whenever `DIRENTRY->parent == reloc_dir', `DIRENTRY->self->parent_rec' will be non-NULL.
This is the case when DIRENTRY originates from `insert_file_entry ()'. However, somehow it gets wrong when it's `match_cl_re_entries ()' to set `parent_rec'. It appears that there're no corresponding entries in `cl_dirs' for some of the `re_dirs' entries! (NB: even if it's the previous session that was messed up, and it probably was, it's still undesirable to segfault in this case.) I've slightly modified the source, mainly to produce some warnings related to the case. Here's how it runs now: $ genisoimage \ -input-charset iso-8859-1 \ -C 312032,365680 -M /dev/cdrom -v -v -print-size \ -JR -uid 0 -gid 0 \ -graft-points users/ivan/archives/=/.../users/ivan/archives/ ... Warning: missing whole name for: 'rr_moved' Warning: re [0x8d514a8]->de [0x84d1178]->parent_rec = 0 Warning: re [0x8d514a8]->de [0x84d1178]->whole_name = "rr_moved/remotes" Warning: re [0x8ce1170]->de [0x84c9e58]->parent_rec = 0 Warning: re [0x8ce1170]->de [0x84c9e58]->whole_name = "rr_moved/origin" Warning: re [0x8c626a8]->de [0x84c5838]->parent_rec = 0 Warning: re [0x8c626a8]->de [0x84c5838]->whole_name = "rr_moved/heads" Using SCHEM000.I;1 for /mnt/users/ivan/archives/mercurial/scheme48/.hg/data/alt/schemetoc-record.scm.i (schemetoc-features.scm.i) ... Warning: rr [0x8c62058]->self [0x84c5838] (w/name = rr_moved/heads) RR_MOVED? Warning: ll [0x8c62058]->self [0x84c5838] (w/name = rr_moved/heads) RR_MOVED? ... a number of these... Warning: rr [0x8cdffa8]->self [0x84c9e58] (w/name = rr_moved/origin) RR_MOVED? Warning: ll [0x8cdffa8]->self [0x84c9e58] (w/name = rr_moved/origin) RR_MOVED? ... and of these as well... Warning: rr [0x8d50e78]->self [0x84d1178] (w/name = rr_moved/remotes) RR_MOVED? Warning: rr [0x8d50e78]->self [0x84d1178] (w/name = rr_moved/remotes) RR_MOVED? ... intermingled with these, too... qsort () does its work, doesn't it?.. Warning: dpnt [0x8c62058]->self [0x84c5838 (w/name = rr_moved/heads) RR_MOVED? Warning: dpnt [0x8cdffa8]->self [0x84c9e58 (w/name = rr_moved/origin) RR_MOVED? Warning: dpnt [0x8d50e78]->self [0x84d1178 (w/name = rr_moved/remotes) RR_MOVED? ... Total extents scheduled to be written = 22503 22503 $ The diff follows. --- cdrkit-1.1.6-debian-1/genisoimage/genisoimage.c 2007-03-17 17:59:16.000000000 +0600 +++ cdrkit-1.1.6-debian-1-my/genisoimage/genisoimage.c 2007-11-18 17:01:33.000000000 +0600 @@ -3307,6 +3307,8 @@ * finish_cl_pl_entries can do its job */ match_cl_re_entries(); + + check_re_entries (); } #ifdef APPLE_HYB /* free up any HFS filename mapping memory */ --- cdrkit-1.1.6-debian-1/genisoimage/joliet.c 2007-03-15 03:14:33.000000000 +0600 +++ cdrkit-1.1.6-debian-1-my/genisoimage/joliet.c 2007-11-18 16:22:27.000000000 +0600 @@ -551,10 +551,28 @@ rparent = rr->parent->jpath_index; lparent = ll->parent->jpath_index; - if (rr->parent == reloc_dir) { + if (rr->parent != reloc_dir) { + /* do nothing */ + } else if (rr->self->parent_rec == 0) { + /* issue a warning */ + fprintf (stderr, + ("Warning: rr [%p]->self [%p]" + " (w/name = %s) RR_MOVED?\n"), + rr, rr->self, rr->self->whole_name); + } else { + /* redirect to a non-RR_MOVED directory */ rparent = rr->self->parent_rec->filedir->jpath_index; } - if (ll->parent == reloc_dir) { + if (ll->parent != reloc_dir) { + /* do nothing */ + } else if (ll->self->parent_rec == 0) { + /* issue a warning */ + fprintf (stderr, + ("Warning: ll [%p]->self [%p]" + " (w/name = %s) RR_MOVED?\n"), + ll, ll->self, ll->self->whole_name); + } else { + /* redirect to a non-RR_MOVED directory */ lparent = ll->self->parent_rec->filedir->jpath_index; } if (rparent < lparent) { @@ -739,6 +757,13 @@ dpnt->parent->jpath_index); set_722(jpath_table_m + jpath_table_index, dpnt->parent->jpath_index); + } else if (dpnt->self->parent_rec == 0) { + /* issue a warning */ + fprintf (stderr, + ("Warning: dpnt [%p]->self [%p" + " (w/name = %s) RR_MOVED?\n"), + dpnt, dpnt->self, + dpnt->self->whole_name); } else { set_721(jpath_table_l + jpath_table_index, dpnt->self->parent_rec->filedir->jpath_index); --- cdrkit-1.1.6-debian-1/genisoimage/multi.c 2007-03-15 03:14:33.000000000 +0600 +++ cdrkit-1.1.6-debian-1-my/genisoimage/multi.c 2007-11-18 17:13:01.000000000 +0600 @@ -1837,6 +1837,27 @@ } void +check_re_entries (void) +{ + struct dir_extent_link *re; + + /* for each relocated directory */ + for (re = re_dirs; re != 0; re = re->next) { + if (re->de == 0) { + /* it's okay, check match_cl_re_entries () */ + } else if (re->de->parent_rec == 0) { + fprintf (stderr, + ("Warning: re [%p]->de [%p]" + "->parent_rec = 0\n" + "Warning: re [%p]->de [%p]" + "->whole_name = \"%s\"\n"), + re, re->de, + re, re->de, re->de->whole_name); + } + } +} + +void finish_cl_pl_for_prev_session() { struct dir_extent_link *re = re_dirs; -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]