mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andreas Franck <afranck@gmx.de>
To: Mike Galbraith <mikeg@wen-online.de>,
	Linus Torvalds <torvalds@transmeta.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Fatal Oops on boot with 2.4.0testX and recent GCC snapshots
Date: Thu, 28 Dec 2000 01:26:19 +0100	[thread overview]
Message-ID: <00122801261900.00466@dg1kfa.ampr.org> (raw)
In-Reply-To: <Pine.Linu.4.10.10012271823370.471-100000@mikeg.weiden.de> <00122801060000.00534@dg1kfa.ampr.org>
In-Reply-To: <00122801060000.00534@dg1kfa.ampr.org>

Hello Mike, hello Linus,

Some minutes ago, I wrote:
> I think I have found the reason for our bugs. It seems GCC really
> miscompiles buffer.c:bdflush_init without frame pointers. I'll try harder
> now to understand what excactly is going on, but it seems it is smashing
> its local stack space by decrementing its stack pointer too early, then
> calling an assembler function (__down_failed). It might be that GCC is
> confused by this.

[...]

> Any comments on this? I'll now try to split up the stack space operation in
> two parts, the first after call kernel_thread: addl $12, %esp (as in the
> first call), and an additional addl $64, %esp just before leaving (before
> popl %ebx). And I'll report what happened, later - but I have a good
> feeling that I have caught the bug.

... and my good feeling was right. Changing the bogus assembly code made the 
bug go away. I'll try to prepare a simpler testcase for the GCC maintainers 
tomorrow. For short, this is what happens: GCC tries to free its stack frame 
for the local variables far too early. It then calls __down_failed(), which 
pushes some things on the stack - thereby corrupting the semaphore pointer! 
So __down() works on a random memory location instead of the semaphore, which 
is guaranteed to fail badly. 

I've added linux-kernel as CC again, so everybody can now hear that this is 
definitely a GCC bug, and not a kernel issue.

Greetings,
Andreas

-- 
->>>----------------------- Andreas Franck --------<<<-
---<<<---- Andreas.Franck@post.rwth-aachen.de --->>>---
->>>---- Keep smiling! ----------------------------<<<-
-
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/

       reply	other threads:[~2000-12-28  0:53 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <Pine.Linu.4.10.10012271823370.471-100000@mikeg.weiden.de>
     [not found] ` <00122801060000.00534@dg1kfa.ampr.org>
2000-12-28  0:26   ` Andreas Franck [this message]
2000-12-23 11:34 Andreas Franck
2000-12-23 17:33 ` Mike Galbraith
2000-12-23 19:14   ` Andreas Franck
2000-12-24 16:13     ` Mike Galbraith
2000-12-24  0:21   ` Andreas Franck
2000-12-24 22:49   ` Andreas Franck
2000-12-25  5:09     ` Mike Galbraith
2000-12-25 12:29       ` Andreas Franck
2000-12-25 17:45         ` Mike Galbraith
2000-12-25 16:12       ` Andreas Franck
2000-12-25 18:00         ` Mike Galbraith
2000-12-25 20:40       ` Thorsten Kranzkowski
2000-12-26  7:03         ` Paul Laufer

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=00122801261900.00466@dg1kfa.ampr.org \
    --to=afranck@gmx.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mikeg@wen-online.de \
    --cc=torvalds@transmeta.com \
    /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

all inboxes | Powered by JetHome®