Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Weaving Java Source Code - java.lang.StackOverflowError

Hi Jim,

I wanted to confirm that you are actually weaving the Java VM's rt.jar. To affect constructor execution for StackOverflowError you would need to do this (and this is in violation of the normal Sun license agreement if you are using a Sun VM). 

The <init> method in your trace should correspond to execution of the constructor.

If so, what exact pointcuts did you write? Can you show what works for Throwable but not StackOverflowError?

Ron

p.s. You could advise constructor calls from client code, but I believe this error is constructed by the VM, so it wouldn't help much.


Ron Bodkin
Chief Technology Officer
New Aspects of Software
m: (415) 509-2895


------------Original Message------------
From: "James Calise" <jcalise@xxxxxxx>
To: <aspectj-users@xxxxxxxxxxx>
Date: Thu, Feb-5-2004 12:05 PM
Subject: [aspectj-users] Weaving Java Source Code - java.lang.StackOverflowError
I am attempting to write an aspect that weaves code into java.lang.StackOverflowError.  I want to receive a callback anytime a StackOverflowError is created, but through trial and error using the pointcut for execution(new(..)) doesn’t work on StackOverflow only Throwable will the constructor callback.  On further investigation when a StackOverflow error is created the <init> method is called in the trace, so I tried using the pointcut initializer(new(..)),but that also did not work.
 
Has anyone attempted anything similar, or have any suggestions on how I can accomplish weaving java.lang.StackOverflowError
 
Thanks,
 
Jim


Back to the top