Parted 3.3 fails with a segmentation fault when I run simple commands such as: # parted /dev/sda quit This only happens when sys-block/parted-3.3 has been emerged without the "debug" USE flag. The same command doesn't fail when I enable the "debug" USE flag for sys-block/parted-3.3. See also bug #646104 for a similar problem (with an older version of parted).
Created attachment 602402 [details] emerge --info sys-block/parted
Created attachment 602404 [details] gdb backtrace
Looks like a problem that was fixed in an earlier Debian patch.
Created attachment 602406 [details, diff] /etc/portage/patches/sys-block/parted/parted-3.3-atari.patch Does this fix it for you?
(In reply to Jeroen Roovers from comment #3) > Looks like a problem that was fixed in an earlier Debian patch. (I was wrong about that. Atari disk label support was earlier added by a Debian patch but has since been accepted upstream.)
Your parted-3.3-atari.patch seems to fix the problem. Thanks!
(In reply to Francesco Turco from comment #6) > Your parted-3.3-atari.patch seems to fix the problem. Thanks! But it breaks compiling with USE=debug. At least I now know how to really fix it.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1af57544e419afdbc54cb6dc76e053593e4bb088 commit 1af57544e419afdbc54cb6dc76e053593e4bb088 Author: Jeroen Roovers <jer@gentoo.org> AuthorDate: 2020-01-03 14:47:20 +0000 Commit: Jeroen Roovers <jer@gentoo.org> CommitDate: 2020-01-03 14:49:17 +0000 sys-block/parted: Fix segfault when USE=-debug PED_ASSERT does funky stuff to atr_c_locale when USE=-debug, causing freelocale() to fail on exiting labels/atari.c. Package-Manager: Portage-2.3.84, Repoman-2.3.20 Closes: https://bugs.gentoo.org/704704 Signed-off-by: Jeroen Roovers <jer@gentoo.org> sys-block/parted/files/parted-3.3-atari.patch | 11 +++++++++++ sys-block/parted/{parted-3.3.ebuild => parted-3.3-r1.ebuild} | 3 ++- 2 files changed, 13 insertions(+), 1 deletion(-)
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4bab6569878f89180d50a40524a675712b0cec2a commit 4bab6569878f89180d50a40524a675712b0cec2a Author: Jeroen Roovers <jer@gentoo.org> AuthorDate: 2020-01-03 15:13:06 +0000 Commit: Jeroen Roovers <jer@gentoo.org> CommitDate: 2020-01-03 15:14:45 +0000 sys-block/parted: Reintroduce PED_ASSERT with correct assertion Package-Manager: Portage-2.3.84, Repoman-2.3.20 Bug: https://bugs.gentoo.org/704704 Fixes: 1af57544e419afdbc54cb6dc76e053593e4bb088 Signed-off-by: Jeroen Roovers <jer@gentoo.org> sys-block/parted/files/parted-3.3-atari.patch | 2 +- sys-block/parted/{parted-3.3-r1.ebuild => parted-3.3-r2.ebuild} | 0 2 files changed, 1 insertion(+), 1 deletion(-)
Unfortunately, after upgrading parted to version 3.3-r2 and emerging it without the "debug" USE flag, I can produce a segmentation fault again with: # parted /dev/sda quit
(In reply to Francesco Turco from comment #10) > Unfortunately, after upgrading parted to version 3.3-r2 and emerging it > without the "debug" USE flag, I can produce a segmentation fault again with: > > # parted /dev/sda quit I didn't see that in local testing. I'll revert to 3.3-r1, I guess.