[parted-devel] endless segfault in exception handler

Olaf Hering olh at suse.de
Sat Apr 8 18:57:03 UTC 2006


 On Sat, Apr 08, leslie.polzer at gmx.net wrote:

> On Sat, Apr 08, 2006 at 05:46:46PM +0200, Olaf Hering wrote:
> 
> > A sig11 is not handled correctly. Removing the partition table from a
> > disk with a mac label causes an endless loop.
> The problem with the SIGSEGV handler looping should be resolved with
> 1.7rc4.  Please confirm if possible.

I tested Revision 694, but the segfault happens also with earlier parted
versions.
The root cause is of course that the mac.c has no way to prevent the
'rm 1' command.

>   Are you complaining about this, ped_log2 returning -1 for an input of
> 0 or ped_log2 being called with an input of 0?

I think thats the reason for the segfault. option_strings[-1] is likely
not the desired behavior. The whole thing looks a bit weird, enums
misused as bitflags. a 'return x ? x - 1 : 0' is a workaround to prevent
the crash.



More information about the parted-devel mailing list