public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: Paul Jakma <paul@clubi.ie>
Cc: "J . A . Magallon" <jamagallon@able.es>,
	Hans Reiser <reiser@namesys.com>, Alan Cox <alan@redhat.com>,
	Chris Mason <mason@suse.com>,
	Jan Kasprzak <kas@informatics.muni.cz>,
	linux-kernel@vger.kernel.org, reiserfs-list@namesys.com,
	"Yury Yu . Rupasov" <yura@yura.polnet.botik.ru>
Subject: Re: [reiserfs-list] Re: ReiserFS Oops (2.4.1, deterministic, symlink
Date: Sat, 3 Feb 2001 04:48:09 -0500	[thread overview]
Message-ID: <20010203044809.Z16592@devserv.devel.redhat.com> (raw)
In-Reply-To: <20010202191701.Y16592@devserv.devel.redhat.com> <Pine.LNX.4.31.0102030420031.20193-100000@fogarty.jakma.org>
In-Reply-To: <Pine.LNX.4.31.0102030420031.20193-100000@fogarty.jakma.org>; from paul@clubi.ie on Sat, Feb 03, 2001 at 04:25:20AM +0000

On Sat, Feb 03, 2001 at 04:25:20AM +0000, Paul Jakma wrote:
> On Fri, 2 Feb 2001, Jakub Jelinek wrote:
> 
> > You can do:
> > if [ "$CC" = gcc ]; then
> >   echo 'inline void f(unsigned int n){int i,j=-1;for(i=0;i<10&&j<0;i++)if((1UL<<i)==n)j=i;if(j<0)exit(0);}main(){f(64);exit(1);}' > test.c
> >   gcc -O2 -o test test.c
> >   if ./test; then echo "*** Please don't use this compiler to compile kernel"; fi
> >   rm -f test.c test
> > fi
> >
> > (the $CC = gcc test is there e.g. so that the test is not done when
> > cross-compiling or when there is a separate kernel compiler and userland
> > compiler (e.g. on sparc64). This test will barf on gcc-2.96 up to -67 and
> >
> > 	Jakub
> 
> ehhmm..
> 
> [root@fogarty /tmp]# rpm -q gcc
> gcc-2.96-70
> [root@fogarty /tmp]# cat test.c
> inline void f(unsigned int n){int
> i,j=-1;for(i=0;i<10&&j<0;i++)if((1UL<<i)==n)j=i;if(j<0)exit(0);}main(){f(64);
> exit(1);}
> [root@fogarty /tmp]# gcc -o test test.c
> [root@fogarty /tmp]# ./test
> 
> didn't barf here with 2.96-70.

I used a wrong word (the test originally had abort() instead of exit(0) and
exit(0) instead of exit(1)). The test will exit with 0 if it was
miscompiled, 1 if it was not. And on 2.96-70 it should exit with 1 as it
should not be miscompiled.

	Jakub
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

  parent reply	other threads:[~2001-02-03  9:48 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-02-02 11:28 ReiserFS Oops (2.4.1, deterministic, symlink related) Jan Kasprzak
2001-02-02 11:04 ` [reiserfs-list] " Hans Reiser
2001-02-02 12:16   ` Jan Kasprzak
2001-02-02 12:34     ` Alan Cox
2001-02-02 13:09       ` Jan Kasprzak
2001-02-02 16:36         ` Jan Kasprzak
2001-02-02 16:46           ` Alan Cox
2001-02-02 12:26   ` [reiserfs-list] ReiserFS Oops (2.4.1, deterministic, symlink Alan Cox
2001-02-02 15:16     ` Chris Mason
2001-02-02 15:20       ` Alan Cox
2001-02-02 17:34       ` Hans Reiser
2001-02-02 18:25         ` Alan Cox
2001-02-02 20:43           ` Hans Reiser
2001-02-02 21:33             ` Alan Cox
2001-02-02 21:29               ` [reiserfs-list] " Hans Reiser
2001-02-02 22:13                 ` Alan Cox
2001-02-02 22:13                   ` Hans Reiser
2001-02-02 23:40                     ` J . A . Magallon
2001-02-02 23:34                       ` Hans Reiser
2001-02-03  0:17                       ` Jakub Jelinek
2001-02-03  4:25                         ` Paul Jakma
2001-02-03  7:58                           ` Alan Cox
2001-02-03  9:18                           ` J . A . Magallon
2001-02-03  9:48                           ` Jakub Jelinek [this message]
2001-02-03  7:46                       ` Alan Cox
2001-02-03 17:14                   ` David Woodhouse
2001-02-03 17:33                     ` Albert D. Cahalan
2001-02-03 17:56                       ` Alan Cox
2001-02-03 23:49                         ` Albert D. Cahalan
2001-02-02 21:34             ` John Morrison
2001-02-02 21:39               ` Alan Cox
2001-02-02 21:49                 ` John Morrison
2001-02-02 22:03                 ` Hans Reiser
2001-02-02 22:40                   ` Alan Cox
2001-02-02 22:16                     ` Hans Reiser
2001-02-02 22:58                   ` alex
2001-02-03  0:40                     ` Andre Pang
2001-02-03  2:22                   ` James Sutherland
2001-02-02 22:52                 ` Keith Owens
2001-02-09  9:39           ` Thomas Zehetbauer
2001-02-02 12:15 ` [reiserfs-list] ReiserFS Oops (2.4.1, deterministic, symlink related) John Morrison

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20010203044809.Z16592@devserv.devel.redhat.com \
    --to=jakub@redhat.com \
    --cc=alan@redhat.com \
    --cc=jamagallon@able.es \
    --cc=kas@informatics.muni.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mason@suse.com \
    --cc=paul@clubi.ie \
    --cc=reiser@namesys.com \
    --cc=reiserfs-list@namesys.com \
    --cc=yura@yura.polnet.botik.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox