GNU bug report logs - #57513
[PATCH] installer: Fix segfault on double logical partition removal.

Previous Next

Package: guix-patches;

Reported by: Josselin Poiret <dev <at> jpoiret.xyz>

Date: Wed, 31 Aug 2022 21:24:01 UTC

Severity: normal

Tags: patch

Done: Mathieu Othacehe <othacehe <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #13 received at 57513-done <at> debbugs.gnu.org (full text, mbox):

From: Josselin Poiret <dev <at> jpoiret.xyz>
To: Mathieu Othacehe <othacehe <at> gnu.org>
Cc: 57513-done <at> debbugs.gnu.org
Subject: Re: bug#57513: [PATCH] installer: Fix segfault on double logical
 partition removal.
Date: Thu, 01 Sep 2022 21:16:02 +0200
Hey Mathieu,

Mathieu Othacehe <othacehe <at> gnu.org> writes:

> I was able to reproduce the issue by creating an extended partition
> containing a single logical partition using the manual partitioning tool
> then, the automatic one right after.
>
> It resulted in a segfault, which is fixed by your patch, that's a very
> nice catch!

I have to thank KE0VVT on IRC, who provided a core dump file!  This was
surprisingly easier to debug than I thought, for those interested, I
built the installer using the same Guix commit, and loaded the guile
core dump file in gdb.  I then used `guix build parted
--with-debug-info=parted` and loaded the resulting libparted.so library
using `info sections` to find out where the .text of libparted.so was
loaded in the core file, and `add-symbol-file
/gnu/store/path/to/libparted.so 0xaddress` to load the symbols.  That
way, I could see that ped_disk_remove_partition was invoked for a disk
that had an empty partition list, hence leading me to this double remove
problem!

> Pushed as 4989f6acff3b3fcfbd9dde3e3c2767bd2cd6d49e.
>
> Thanks,
>
> Mathieu

Thank you for reviewing this so fast!

Best,
-- 
Josselin Poiret




This bug report was last modified 2 years and 268 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.