cfdisk segfaults

Bug #19729 reported by Martin Pitt
20
Affects Status Importance Assigned to Milestone
util-linux (Ubuntu)
Fix Released
Medium
LaMont Jones

Bug Description

$ sudo cfdisk /dev/hdc segfaults immediately, both on i386 and amd64 (current
Breezy version).

The stack trace is not very helpful:

Program received signal SIGSEGV, Segmentation fault.
0x0000000000000000 in ?? ()
(gdb) bt
#0 0x0000000000000000 in ?? ()
#1 0x0000000000000000 in ?? ()
#2 0x0000000100000000 in ?? ()
#3 0x0000000000000003 in ?? ()
[...] just zeros
#105 0x0000000000000000 in ?? ()
#106 0x0000000006dcb674 in ?? ()
#107 0x0000000000400e1d in ?? ()
#108 0x00002aaaaaab2d43 in _dl_rtld_di_serinfo () from /lib64/ld-linux-x86-64.so.2
Previous frame inner to this frame (corrupt stack?)

The trace does not get any better when building with -g (and still -O2). The
segfault does not happen at all if building with -O0 or -O1 (*sigh*).

So a temporary workaround is to build with -O1 until this is sorted out.

Revision history for this message
Martin Pitt (pitti) wrote :

 util-linux (2.12p-5ubuntu2) breezy; urgency=low
 .
   * debian/patches/60_opt_O1.dpatch:
     - MCONFIG, configure: Build with -O1 instead of -O2 to work around cfdisk
       segfault.
     - Yay for upstream build systems which do not support specifying CFLAGS or
       OPT without breaking.
     - Ubuntu #13486

Temporary workaround for now.

Revision history for this message
LaMont Jones (lamont) wrote :

*** Bug 19945 has been marked as a duplicate of this bug. ***

Revision history for this message
LaMont Jones (lamont) wrote :

Fixed in 2.12p-5ubuntu2. Thanks Martin.

Revision history for this message
Martin Pitt (pitti) wrote :

(In reply to comment #3)
> Fixed in 2.12p-5ubuntu2. Thanks Martin.

Lamont, wait, I uploaded this version with a *workaround*, not with a proper
fix. Unless this is a compiler bug, using -O1 instead of -O2 merely hides the
bug, I think.

Revision history for this message
Adrian Bunk (bunk) wrote :

Hi Martin,

if you have ReiserFS partitions this segfault is a bug in cfdisk fixed in
upstream util-linux 2.12r-pre1 and 2.13-pre3.

Revision history for this message
Vassilis Pandis (pandisv) wrote :

util-linux (2.12r-1) unstable; urgency=low

  * New upstream verison and maintainer.
    - cfdisk: fix a segfault with ReiserFS partitions

I'm closing this now. If it still happens, please reopen.

Changed in util-linux:
status: Unconfirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.