octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #37891] Segfault in __contourc__ when Java run


From: Mike Miller
Subject: [Octave-bug-tracker] [bug #37891] Segfault in __contourc__ when Java runtime is loaded
Date: Wed, 12 Dec 2012 00:27:06 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11

Follow-up Comment #5, bug #37891 (project octave):

This doesn't look like a case of infinite recursion, it looks repeatable and
finite from my testing, but this dataset does push it pretty hard. I think
maybe loading the JRE sucks up a lot of stack space that the __contourc__
algorithm needs.

The little I've looked at the algorithm so far, it looks like it's using
recursion to trace each distinct contour line in the x-y plane, so the more
points connected with a single contour line the greater the recursion will
be.

I added a stack depth counter to see how deep it's going and compare with and
without Java. Without the JRE loaded, the drawcn function recurses to a
maximum depth of 3946 and still returns and completes successfully, draws a
reasonable looking contour.

With Java in the mix, the segfault occurs at a depth of 3135 drawcn calls. The
arguments to drawcn all look the same as in the working case without Java
loaded.

It looks like drawcn was written to take advantage of tail recursion but gcc
doesn't seem to be doing it.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?37891>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]