asp code parser and analyzer

V

Vadym Stetsyak

Hi, All

I have a legacy ASP application, which is full of memory leaks. The source
of the leaks are ADO objects that were not closed.
For exapmle "Open" recordset without "Close" and so on.

As the application is rather big, manually parsing asp code is rather
painfully.

Are there any asp code parsing tools, to analyze the source code?

TIA
 
R

Roland Hall

in message
: I have a legacy ASP application, which is full of memory leaks. The source
: of the leaks are ADO objects that were not closed.
: For exapmle "Open" recordset without "Close" and so on.
:
: As the application is rather big, manually parsing asp code is rather
: painfully.
:
: Are there any asp code parsing tools, to analyze the source code?

Not sure but objects are defined with the word 'set'. So it shouldn't be
that hard to find them.

--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp
 
V

Vadym Stetsyak

Yes, that is not too difficult.
Also when you call Open for the recordset object and do not call Close it is
the source of mem leaks.

So to detect the mem leak I have to debug the page under different
conditions, it takes time. That is why I posted this message, about code
analyzers...
 
A

Adrienne

Yes, that is not too difficult.
Also when you call Open for the recordset object and do not call Close
it is the source of mem leaks.

So to detect the mem leak I have to debug the page under different
conditions, it takes time. That is why I posted this message, about
code analyzers...

You could roll your own. Using FSO, you could read the files and search
for ".Open". If ".Open" was found, then search for ".Close". If ".Close"
was not found, then you could find the name of the recordset using MID
function, and then write to the document. Just a thought, not tested.
 
V

Vadym Stetsyak

At first I thought of something like injecting additional code
after the "Set", "Open", "Close" statements
the code would be something like

Server.Execute("report.asp?page=test.asp&line=34&var=rs&action=open")

and on report.asp gather the statistics. It will be like obtaining dynamic
call stack of the page.

We can parse an asp file statically, but we shall not be able to reproduce
dynamic behavior ( conditions based on some values and so on )
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top