[parted-devel] GNU Parted Official Repository: Changes to 'master'
Debarshi Ray
debarshi.ray at gmail.com
Thu Jan 11 13:27:46 CET 2007
> parted/parted.c | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> New commits:
> commit 9e05418de3477666b0709f5d1996149febd33100
> Author: Otavio Salvador <otavio at debian.org>
> Date: Sat Dec 16 18:47:53 2006 -0200
This causes Parted to abort, after dumping the customary stack trace
and the command history. The reason this happens is that
ped_device_free_all also closes and destroys the device with which
Parted was invoked by the user. Therefore any subsequent command whose
do* counterpart needs PedDevice **dev causes a segmentation fault.
eg., print (do_print), check (do_check)
(parted) print
(parted) print devices
(parted) print
Just give the above commands to recreate the bug.
A way to fix this is to create a deep copy duplicate of PedDeice **dev
before doing ped_device_free_all. This would require a
ped_device_duplicate function (similar to ped_disk_duplicate) to be
written.
What do you think?
> parted/parted.c: Destroy all objects before return when called with --list or --all option.
In fact objects are destroyed only for:
(parted) print devices
It remains to be done for --list and 'print all'.
Happy hacking,
Debarshi
--
After the game the king and the pawn go into the same box.
-- Italian proverb
More information about the parted-devel
mailing list