bug-coreutils
[Top][All Lists]
Advanced

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

Re: btwowc(EOF) hang with gcc 4.4.2


From: Jim Meyering
Subject: Re: btwowc(EOF) hang with gcc 4.4.2
Date: Wed, 16 Dec 2009 08:44:03 +0100

Karl Berry wrote:
> Hi Jim and all,
>
> On a CentOS 5.4 system, compiling with gcc 4.4.2, configure goes into an
> infinite loop here:
> checking whether btowc(EOF) is correct...

Hi Karl,

Thanks for taking the time to report that.

Like you, I cannot reproduce that using this version
on that same type of system:

    gcc version 4.1.2 20080704 (Red Hat 4.1.2-46)

The code in question is calling btowc(EOF), which uses
this definition from wchar.h:

extern wint_t __btowc_alias (int __c) __asm ("btowc");
extern __inline wint_t
__NTH (btowc (int __c))
{ return (__builtin_constant_p (__c) && __c >= '\0' && __c <= '\x7f'
          ? (wint_t) __c : __btowc_alias (__c)); }

Since I don't even see any code that might loop there,
(though I didn't look up what __asm ("btowc") does)
I'd suspect a compiler problem.

> Running gdb on conftest gets a backtrace like this:
> #0  0x080491d1 in btowc (__c=-1) at /usr/include/wchar.h:331
> #1  0x08049431 in btowc () at /usr/include/wchar.h:332
> #2  main () at conftest.c:276
>
> Where that line 331 is:
> 331   { return (__builtin_constant_p (__c) && __c >= '\0' && __c <= '\x7f'
>
> This does not happen with other versions of gcc.  I can't tell if it's a
> gcc bug or a system include file bug or something actually in coreutils,
> but here's the report anyway.  It was pretty unsettling to have
> configure hang.




reply via email to

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