[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

sed or gcc problem on Mac OS X

From: Jim Meyering
Subject: sed or gcc problem on Mac OS X
Date: Sat, 17 Oct 2009 10:22:07 +0200


I've traced a coreutils ls/abmon-align test failure
on powerpc Mac OS X (9.8.0 Darwin Kernel) to a failure of sed.

It's due to a problem with the installed /usr/local/bin/sed.
If I use /usr/bin/sed instead, it works fine.

Also, making this change to the coreutils test script,

    -      LC_ALL=C sed '1d; s/.\{15\}\(.*\) ...ts$/\1/; s/ /./g' |
    +      LC_ALL=C sed 's/.\{15\}//;s/ ..\.ts$//;s/ /./g' |

that test succeeds even when using /usr/local/bin/sed.

Here's a pared-down test case:
The sed-4.2.1 used here was just built from upstream
source using "gcc version 4.3.0 20070817 (experimental)"
so maybe it was miscompiled by that 2+-year-old version of gcc.

    $ sed --version|sed 1q
    GNU sed version 4.2.1

This shows the malfunction with 4.2.1:

    $ printf 'd\303\251\n'|sed 's/\(.\).*/\1/'

It works with vendor sed:

    $ printf 'd\303\251\n'|/usr/bin/sed 's/\(.\).*/\1/'

I also built sed on ppc/linux with a recent gcc, and there
it had no problem.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]