Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.compilers > #1228

Mysterious triple test failures

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!us.feeder.erje.net!news.linkpendium.com!news.linkpendium.com!news.iecc.com!.POSTED!nerds-end
From "Nils M Holm" <nmh@t3x.org>
Newsgroups comp.compilers
Subject Mysterious triple test failures
Date Sat, 3 May 2014 21:38:13 +0200
Organization Compilers Central
Lines 41
Sender news@iecc.com
Approved comp.compilers@iecc.com
Message-ID <14-05-003@comp.compilers> (permalink)
NNTP-Posting-Host news.iecc.com
Mime-Version 1.0
Content-Type text/plain; charset=us-ascii
X-Trace miucha.iecc.com 1399147944 46940 2001:470:1f07:1126:0:676f:7373:6970 (3 May 2014 20:12:24 GMT)
X-Complaints-To abuse@iecc.com
NNTP-Posting-Date Sat, 3 May 2014 20:12:24 +0000 (UTC)
Keywords errors, question, comment
Posted-Date 03 May 2014 16:12:24 EDT
X-submission-address compilers@iecc.com
X-moderator-address compilers-request@iecc.com
X-FAQ-and-archives http://compilers.iecc.com
Xref csiph.com comp.compilers:1228

Show key headers only | View raw


In the recent months, several people who ported and/or used my
SubC compiler[1] reported that the triple test failed, but the
compiler still worked fine.

I am running the triple test as follows:

Subc sources ---[ third-party C compiler  ]---> stage-0 SubC
Subc sources ---[      stage-0 SubC       ]---> stage-1 SubC
Subc sources ---[      stage-1 SubC       ]---> stage-2 SubC

(where x---[y]--->z means "compile x with y to z"). Finally the
stage-1 and stage-2 compilers are compared. When they are equal,
the triple test is passed.

Now it has happened that this test failed, resulting in stage-1
and stage-2 compiler of identical size, but with tens of thousands
of differences. However, both compilers seem to work fine. The
differences are not in the symbol table, stripping the binaries
did not make any difference.

Further tests have shown that the assembly language output of
the differing compilers is identical.

This happened on 386-based OpenBSD and x86-64-based Linux systems.

So, what is going on here? Does anybody have an explanation?

And: to work around the problem, I thought about comparing the
assembly output of the compilers instead of the binaries. This
should yield the same results, shouldn't it?

Please let me know what you think!

[1] http://t3x.org/subc/

--
Nils M Holm  < n m h @ t 3 x . o r g >  www.t3x.org
[Are the stage-0 and stage-1 assembly sources the same?  The
first thing that occurs to me is that the code is laid out
differently so the variable-length branch logic has long
and short instructions in different places. -John]

Back to comp.compilers | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

Mysterious triple test failures "Nils M Holm" <nmh@t3x.org> - 2014-05-03 21:38 +0200
  Re: Mysterious triple test failures Kaz Kylheku <kaz@kylheku.com> - 2014-05-03 22:19 +0000
    Tripe test failure update "Nils M Holm" <nmh@t3x.org> - 2014-05-04 10:53 +0200
      Re: Triple test failure update Chris Dodd <cdodd@acm.org> - 2014-05-23 01:50 +0000
        Re: Triple test failure update "Nils M Holm" <nmh@t3x.org> - 2014-05-23 09:09 +0200
        Re: Triple test failure update alexfrunews@gmail.com - 2014-05-23 02:17 -0700
  Re: Mysterious triple test failures mrs@Kithrup.COM (Mike Stump) - 2014-05-04 04:47 +0000
  Re: Mysterious triple test failures alexfrunews@gmail.com - 2014-05-04 03:57 -0700
    Re: Tripe test failure update "Nils M Holm" <nmh@t3x.org> - 2014-05-05 10:30 +0200

csiph-web