Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / May 2007

Tip: Looking for answers? Try searching our database.

finding functions with large stack frames???

Thread view: 
Armel - 26 Apr 2007 16:58 GMT
Hello,

i am trying to find a tool which would (from source code or .jar) tell
me the size of the stack frame for each java function.
I have a bug which causes a stack overflow but I do not have any
information. From the JIT x86 assembler code I could just infer that
there was a big stack frame (something like 12KB in the crashing
function call)... if some tool could tell the stack frame size per
function i'm sure I could get out of this problem in seconds...
does anyone know any such tool ?

please help
Regards
Armel
Gordon Beaton - 27 Apr 2007 07:13 GMT
> i am trying to find a tool which would (from source code or .jar) tell
> me the size of the stack frame for each java function.

> I have a bug which causes a stack overflow but I do not have any
> information.

Why don't you have any information? The stack dump that comes with the
StackOverflowError should tell you where to start looking.

I think it's more likely that your stack *depth* has become too great,
for example in a recursive method (or set of mutually recursive
methods), not that one particular method has too many local variables.

/gordon

--
Joshua Cranmer - 28 Apr 2007 00:38 GMT
> Hello,
>
[quoted text clipped - 10 lines]
> Regards
> Armel

A stack frame overflow from too many function variables as opposed to a
poorly-written recursive call would require probably on the order of
hundreds, if not thousands, of local variables per function call.

Generally, when one gets a stack overflow, one gets the output like this:
...
   at Foo.bar(Foo.java:23)
   at Foo.bar(Foo.java:23)
   at Foo.bar(Foo.java:23)
   at Foo.bar(Foo.java:23)
   at Foo.bar(Foo.java:23)
   at Foo.bar(Foo.java:23)
   at Foo.bar(Foo.java:23)
   at Foo.bar(Foo.java:23)
...

indicating that the termination for recursion is not properly working.
The best thing to do would be to print diagnostics (e.g. the argument
list) and squirrel away the error to /dev/null.
Armel - 03 May 2007 09:27 GMT
> > Hello,
>
[quoted text clipped - 30 lines]
> The best thing to do would be to print diagnostics (e.g. the argument
> list) and squirrel away the error to /dev/null.- Masquer le texte des messages précédents -

in fact I do not master the executable itself, and I fear that there
is some eager catch which catches the stack overflow exception and
simply does nothing with it :-( so no stack trace...

Armel


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.