GNU bug report logs -
#57513
[PATCH] installer: Fix segfault on double logical partition removal.
Previous Next
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
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your message dated Thu, 01 Sep 2022 18:48:51 +0200
with message-id <87y1v32g7g.fsf <at> gnu.org>
and subject line Re: bug#57513: [PATCH] installer: Fix segfault on double logical partition removal.
has caused the debbugs.gnu.org bug report #57513,
regarding [PATCH] installer: Fix segfault on double logical partition removal.
to be marked as done.
(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)
--
57513: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=57513
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
* gnu/installer/parted.scm (auto-partition!): Avoid removing logical
partitions twice.
---
gnu/installer/parted.scm | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/gnu/installer/parted.scm b/gnu/installer/parted.scm
index 641a1f45e8..84fdbe24fb 100644
--- a/gnu/installer/parted.scm
+++ b/gnu/installer/parted.scm
@@ -2,6 +2,7 @@
;;; Copyright © 2018, 2019 Mathieu Othacehe <m.othacehe <at> gmail.com>
;;; Copyright © 2019, 2020, 2022 Ludovic Courtès <ludo <at> gnu.org>
;;; Copyright © 2020 Tobias Geerinckx-Rice <me <at> tobias.gr>
+;;; Copyright © 2022 Josselin Poiret <dev <at> jpoiret.xyz>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -983,6 +984,11 @@ (define* (auto-partition! disk
(for-each
(lambda (partition)
(and (data-partition? partition)
+ ;; Do not remove logical partitions ourselves, since
+ ;; disk-remove-partition* will remove all the logical partitions
+ ;; residing on an extended partition, which would lead to a
+ ;; double-remove and ensuing SEGFAULT.
+ (not (logical-partition? partition))
(disk-remove-partition* disk partition)))
non-boot-partitions)
base-commit: 47c11772dfe840a536ed7ec438fe832878f51054
--
2.37.2
[Message part 3 (message/rfc822, inline)]
Hey,
> * gnu/installer/parted.scm (auto-partition!): Avoid removing logical
> partitions twice.
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!
Pushed as 4989f6acff3b3fcfbd9dde3e3c2767bd2cd6d49e.
Thanks,
Mathieu
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.