|
From: | Matthew Woehlke |
Subject: | Re: bash-3.x problems on IRIX |
Date: | Fri, 27 Oct 2006 15:54:02 -0500 |
User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.7) Gecko/20060909 Thunderbird/1.5.0.7 Mnenhy/0.7.4.0 |
Matthew Woehlke wrote:
Stuart Shelton wrote:The following problems exist, at the very least, in bash 3.1.16, 3.1.17, and 3.2.1 - I assume it affects the all bash-3.x releases.
The hang is a different issue that seems to affect bash when built with compilers other than gcc; I can reproduce it on x86 Solaris as well as Irix with 'builtin printf "%G" 0'. The original test hangs because asprintf is seeing 0 rather than 4.2 (see below for a guess at an explanation, but more importantly the start of a fix). It's pretty nasty because it causes bash to stop responding to signals, and you have to kill it from an independent session.
Chet indicated in a private e-mail that he thinks he knows what causes this one.
If bash is built with the SGI MIPSpro compilers then, now matter what other CFLAGS are in affect, the test suite fails in many ways (and one of the many issues this causes is what I describe in the first posts on the above forum).[snippity snip] run-printf- at which point the test-suite hangs (and reports "Error 130" if interrupted). Looking at the contents of /tmp/xx, the output up to the point of the failure was:0.00 0.00 0.0 0.00 0.00 0.0 -INF -inf -INF -inf... which means that the test which causes the hang is 'printf "%G\n" 4.2'.There's clearly some broken magic here if it causes MIPSpro to generate code which hangs, and GCC to produce code which always outputs a variant of "0"!Repeat-By:Attemping to build bash-3.x on IRIX with GCC or MIPSpro, regardless of CFLAGS.Oh-oh, you're right, trying 'builtin printf "%G" 4.2' on my own Irix box just broke my login... Confirming the bug (I'm using 3.1.17) and the apparent test case. I'll also volunteer as another tester for any patches.
I think I have found the problem. When I build, I get this:
ld32: WARNING 110: Floating-point parameters exist in the call for "asprintf", a VARARG function, in object "./builtins/libbuiltins.a(printf.o)" without a prototype -- would result in invalid result. Definition can be found in object "./lib/sh/libsh.a(snprintf.o)" ld32: WARNING 110: Floating-point parameters exist in the call for "asprintf", a VARARG function, in object "./builtins/libbuiltins.a(printf.o)" without a prototype -- would result in invalid result. Definition can be found in object "./lib/sh/libsh.a(snprintf.o)" ld32: WARNING 110: Floating-point parameters exist in the call for "asprintf", a VARARG function, in object "./builtins/libbuiltins.a(printf.o)" without a prototype -- would result in invalid result. Definition can be found in object "./lib/sh/libsh.a(snprintf.o)"
Adding 'extern int asprintf(char **stringp, const char * format, ...);' to builtins/printf.def seems to fix the bug where '0' is being passed to asprintf (using Irix's 'cc' anyway; I don't have gcc). Obviously this is not the correct place/way to fix the problem, but it seems to indicate /what/ the problem is.
-- Matthew "Two IIRC's must make a right" -- Larry Hall (paraphrased)
[Prev in Thread] | Current Thread | [Next in Thread] |