Jeremy Huntwork wrote:

> Jürg Billeter wrote:
>> Ok, it's not a gcc bug at all... The SEGV seems to have destroyed some
>> debug info on the stack and that's the reason gdb didn't help. The
>> problem occured on all systems with linux partitions that don't have a
>> ext2/ext3, xfs, or jfs filesystem as the crash happens during the
>> reiserfs check which is the last one by hazard. The patch speaks for
>> itself, I have no idea why this doesn't crash with other gcc versions /
>> optimization settings, must be luck...
>> 
> 
> This patch also resolves the segfault for me. Thanks, Jürg. Although, I 
> do have an ext3 partition in addition to the reiser4 partition.
> 
> /dev/hda1 swap
> /dev/hda2 reiser4
> /dev/hda3 ext3
> 
> So, is our current assessment of the situation correct? Have we fixed 
> all of the issues with cfdisk or were there several we were noticing at 
> once?

It seems you may not have fully understood what Jurg explained. I must
admit that initially, I had trouble parsing what he said too :-) But upon
studying it further, it makes more sense now, and I have been able to
reproduce the crash by manipulating my partition table. I'll try
and explain it in my own words.

The area of the code that Jurg patched was in the function
get_linux_label() which gets called when trying to print out the partition
table. It reads the superblocks of linux partitions (type 83) and tries to
figure out what sort of filesystem is on the partition. It tests them in
this order: e2fs, xfs, jfs, resiserfs. The problematic code is in the
resierfs portion which, because it is last in the list, doesn't get called
very often. So in summary, if type 83 partitions exist and they have
reiserfs OR if they don't have any filesystem on them whatsoever, the
problematic code path is taken and the crash is likely to occur. Hope
this makes sense.

Regards
Greg
--
http://www.diy-linux.org/

-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to