This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Build broken (was: [PATCH 02/11] Generate pass-instances.def)


On Wed, 2013-07-31 11:31:35 -0400, David Malcolm <dmalcolm@redhat.com> wrote:
> On Wed, 2013-07-31 at 11:36 +0200, Jan-Benedict Glaw wrote:
> > On Wed, 2013-07-31 10:34:10 +0200, Jan-Benedict Glaw <jbglaw@lug-owl.de> wrote:
[breakage with mawk]
> > > It seems this does only happen on one of the three running build
> > > clients. That one is using `mawk' instead of `gawk', what the two
> > > other builders (which are not affected) use.
> > 
> > The substr() was wrong, awk starts all its indices with 1, while the
> > script used 0. gawk ignores this, mawk starts the substring at 1, but
> > counts from 0 upwards.
> 
> A thousand apologies, and thanks for fixing this - I guess I owe you a
> $FAVORITE_BEVERAGE.  I had only tested with gawk (with and without -c)
> and with busybox awk.  I've now installed mawk and nawk on my dev box.

That's why I'm running the build robot :)  Once I've got some
time[tm], I'll spend it a small web frontend to look into the basic
information (which builds worked/failed, show build logfile, show git
log between working/non-working version.)

> Are that any other awks I should be testing with - and is this
> information captured somewhere for reference?

I don't know of any--I'm actually not a regular awk user at all.

And actually testing specific awk features isn't codified IMHO. And
while indices start at 1 (so the code was buggy in that way), it might
also be true that the implementation-defined behavior of virtually all
awk variants is to silently s/0/1/. Then, this would be an additional
glitch (not bug) in my mawk.

> However, having said that, with my original version (as of r201359), I
> get the same results as with your version:
> 
> $ md5sum gen-pass-instances.awk.*
> 6dcc4e2de8241f1811435013da44b757  gen-pass-instances.awk.new
> 7e5ad85f1f919dea9862b420ddbb0fdd  gen-pass-instances.awk.old
> 
> $ diff gen-pass-instances.awk.old gen-pass-instances.awk.new
> 58c58
> < 			substr(line, 0, pass_starts_at + len_of_pass_name - 1),
> ---
> > 			substr(line, 1, pass_starts_at + len_of_pass_name - 1),
> 
> $ for AWK in gawk "gawk -c" mawk nawk "busybox awk" ; \
>     do \
>       $AWK -f gen-pass-instances.awk.old passes.def \
>         > "pass-instances-old-$AWK.def" ; \
>     done
> 
> $ md5sum pass-instances-old-*
> e7d0f2c2ab4f2e83fbd032f222d66530  pass-instances-old-busybox awk.def
> e7d0f2c2ab4f2e83fbd032f222d66530  pass-instances-old-gawk -c.def
> e7d0f2c2ab4f2e83fbd032f222d66530  pass-instances-old-gawk.def
> e7d0f2c2ab4f2e83fbd032f222d66530  pass-instances-old-mawk.def
> e7d0f2c2ab4f2e83fbd032f222d66530  pass-instances-old-nawk.def
> 
> so it seems they're all generating the same output, with both my old
> version and your new version.
> 
> Have I messed up my testing above, or is something else going on?  What
> version of mawk are you using?

Your testing looks fine to me. My Debian "unstable" mawk is slightly
older than yours: 1.3.3-17

MfG, JBG

-- 
      Jan-Benedict Glaw      jbglaw@lug-owl.de              +49-172-7608481
  Signature of:                          Zensur im Internet? Nein danke!
  the second  :

Attachment: signature.asc
Description: Digital signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]