[linux-lvm] lvcreate segfault in vg_setup_pointers_for_snapshots

Paul Jakma paulj at alphyra.ie
Thu Oct 4 14:51:39 UTC 2001


On Thu, 4 Oct 2001, Joe Thornber wrote:

> >    for ( l = 0; l < vg->lv_max; l++) {
> >       lv_t *lv_chain_ptr = vg->lv[l];
> >       if ( lv_chain_ptr == NULL) continue;

> No, this snippet looks right to me.  How can we test before the assignment ?

well, it's not a biggy, but you could test vg->lv[l] for NULL and 
conditionally assign and save a copy if NULL.

in light of your next sentence though, doesn't matter.

> If lv_chain_ptr is NULL the code then jumps back to the top of the
> 'for' loop.

ah... Doh! of course.

> - Joe

anyway, any idea how to get a deeper back trace? or does info stack/bt 
print out the complete stack trace?

--paulj





More information about the linux-lvm mailing list