9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: David Tolpin <dvd@davidashen.net>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] 'fp: stack overflow'
Date: Fri,  5 Mar 2004 00:22:12 +0400	[thread overview]
Message-ID: <200403042022.i24KMCUO059009@adat.davidashen.net> (raw)
In-Reply-To: <52f9c7bb60481d1c2f85c7e455ddd165@terzarima.net>

>
> the compiler might be miscalculating the depth of the FP
> stack, allowing it to overflow at run-time.
> (alternatively, it might just be missing a pop variant in a particular case.)
> either way it would be helpful to see if you can isolate the expression(s)
> that cause the trouble.
>

The trouble is moving all around the floating point code if I am trying
to isolate it. The expressions are moderately complex, such as

  Vtemp[i][j].x = (1.0 - t) * Vtemp[i-1][j].x + t * Vtemp[i-1][j+1].x

but the problem moves to another expression in another function or
another part of the library (or just to a later invocation of the same
function) if I simpify them.

I must admit that I do not remember the x86 assembler well enough
to debug. But it looks to me like FP stack is unbalanced, and 
gets overflowed due to missing pops (or are they called folds?)

David


  reply	other threads:[~2004-03-04 20:22 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-04 18:25 David Tolpin
2004-03-04 18:33 ` David Presotto
2004-03-04 18:35   ` David Tolpin
2004-03-04 18:39     ` Charles Forsyth
2004-03-04 20:22       ` David Tolpin [this message]
2004-03-04 20:30         ` David Tolpin
2004-03-04 18:40     ` David Presotto
2004-03-04 22:21 ` boyd, rounin

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=200403042022.i24KMCUO059009@adat.davidashen.net \
    --to=dvd@davidashen.net \
    --cc=9fans@cse.psu.edu \
    /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;
as well as URLs for NNTP newsgroup(s).