Bug 433784 - aliasing violation causes dumpe2fs segfaults in ia64.
Summary: aliasing violation causes dumpe2fs segfaults in ia64.
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: e2fsprogs
Version: 4.6
Hardware: All
OS: Linux
Target Milestone: rc
: ---
Assignee: Eric Sandeen
QA Contact:
: 455698 (view as bug list)
Depends On:
Blocks: 438356
TreeView+ depends on / blocked
Reported: 2008-02-21 14:00 UTC by Flavio Leitner
Modified: 2018-10-20 01:19 UTC (History)
4 users (show)

Clone Of:
Last Closed: 2008-07-24 19:58:32 UTC

Attachments (Terms of Use)
patch to workaround gcc inline bug (745 bytes, patch)
2008-02-21 14:00 UTC, Flavio Leitner
no flags Details | Diff
backported upstream patch (1.71 KB, patch)
2008-02-21 18:37 UTC, Flavio Leitner
no flags Details | Diff

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2008:0732 normal SHIPPED_LIVE e2fsprogs bug fix update 2008-07-23 16:46:24 UTC

Description Flavio Leitner 2008-02-21 14:00:51 UTC
Description of problem:

# /sbin/dumpe2fs -f -h /dev/mapper/myvg-rootvol > /dev/null
dumpe2fs 1.35 (28-Feb-2004)
Segmentation fault

#0  ext2fs_u32_list_iterate_begin (bb=0x0, ret=0x60000fffffffb2f8) at

(gdb) bt
#0  ext2fs_u32_list_iterate_begin (bb=0x0, ret=0x60000fffffffb2f8) at
#1  0x20000000000556c0 in ext2fs_badblocks_list_iterate_begin (bb=0x0,
ret=0x60000fffffffb2f8) at badblocks.c:258

#2  0x4000000000001930 in list_bad_blocks (fs=0x6000000000009000, dump=0) at

#3  0x4000000000002240 in main (argc=4, argv=0x60000fffffffba18) at dumpe2fs.c:353

#4  0x20000000000fd430 in __libc_start_main () from /lib/tls/libc.so.6.1
#5  0x4000000000001440 in _start ()

The macro is expanded to:
#define EXT2_CHECK_MAGIC(struct, code) \
         if ((struct)->magic != (code)) return (code)

and the variable 'struct' in this case is a NULL pointer.

Compiling with:
# CFLAGS="-O2  -fno-inline" ./configure --enable-elf-shlibs --enable-nls

does not reproduce anymore:
[root@rx1620 e2fsprogs-1.35]# LD_PRELOAD=lib/libext2fs.so.2 misc/dumpe2fs -f -h
/dev/mapper/myvg-rootvol > /dev/null
dumpe2fs 1.35 (28-Feb-2004)

Version-Release number of selected component (if applicable):

How reproducible:

Additional info:
It's a known problem on ARM:

Although this is actually a gcc bug would be great if we workaround this
problem while gcc is not fixed.


Comment 1 Flavio Leitner 2008-02-21 14:00:52 UTC
Created attachment 295505 [details]
patch to workaround gcc inline bug

Comment 3 RHEL Product and Program Management 2008-02-21 14:07:59 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update

Comment 5 Flavio Leitner 2008-02-21 18:15:49 UTC
Actually, it's a aliasing violation that causes dumpe2fs segfault and
building with CFLAGS="-O2 -fno-strict-aliasing" does indeed fix the problem.

Check the cloned bug that I've missed before at:

Comment 6 Flavio Leitner 2008-02-21 18:35:50 UTC
Upstream patch fixing the issue:

Comment 7 Flavio Leitner 2008-02-21 18:37:04 UTC
Created attachment 295548 [details]
backported upstream patch

Attached backported patch from upstream.

Comment 8 Eric Sandeen 2008-02-21 18:42:09 UTC
Flavio, thanks for all the legwork on this one.  :)


Comment 9 Eric Sandeen 2008-02-21 22:41:24 UTC
It looks like RHEL5 should have the same problem... can you confirm?

Or, I'll go looking for an ia64 somewhere... :)

Comment 10 Flavio Leitner 2008-02-22 14:21:07 UTC
I have not tested but yes, it looks like rhel-5 should have the same problem
and unfortunately, the test box is not mine so I can't respin with rhel5.


Comment 13 Eric Sandeen 2008-03-20 14:54:39 UTC
I've built this into 2fsprogs-1.35-12.15.el4

Mind giving it a test for verification?


Comment 18 Bryn M. Reeves 2008-05-02 11:11:35 UTC
Reproducible on x86_64 as well:

# uname -a
Linux timmy.example.com 2.6.9-55.ELsmp #1 SMP Fri Apr 20 16:36:54 EDT 2007
x86_64 x86_64 x86_64 GNU/Linux
# dumpe2fs -f -h /dev/mapper/VolGroup00-LogVol00 > /dev/null
dumpe2fs 1.35 (28-Feb-2004)
Segmentation fault

Comment 22 Eric Sandeen 2008-07-21 17:15:31 UTC
*** Bug 455698 has been marked as a duplicate of this bug. ***

Comment 23 errata-xmlrpc 2008-07-24 19:58:32 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.


Note You need to log in before you can comment on or make changes to this bug.