SA-MP Forums Archive
[Include] TDW RScan - Simple scanner - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+---- Forum: Includes (https://sampforum.blast.hk/forumdisplay.php?fid=83)
+---- Thread: [Include] TDW RScan - Simple scanner (/showthread.php?tid=635756)



TDW RScan - Simple scanner - VVWVV - 13.06.2017

TDW RScan
Description
This is a simple recursive scanner to detect recursive functions in scripts.
Functions Dependencies
amx_assembly
Example
PHP Code:
forward public func1();
forward public func2();
main() {
    
RScan_Run();
    goto 
___avoid_recursion;
    
func1();
___avoid_recursion:
}
func1() {
    
func2();
}
func2() {
    
func1();

Output:


Download
github



Re: TDW RScan - Simple scanner - Eoussama - 13.06.2017

This actually is useful, ty


Re: TDW RScan - Simple scanner - SimonItaly - 13.06.2017

I've been looking for something like that for ages. Literally.
I'll give it a try, thank you.

__________________________________________________

Edit after some messing with this:

First of all, when I tried compiling I got these warnings


Apparently my compiler doesn't like your indentation, so I changed lines 150-153 with the following:


Then I've tried to run it, but I got this runtime error:


So I changed this costant to '40':


Anyway, I didn't thought running this script on a 198'124 lines modular gamemode would have been a resource killer:


So I've stopped waiting after 10 minutes because my i7-4600U laptop was frying


I don't know if it's feasible to run the scanner on very large script like this, but I'll give it a try on my desktop sometime soon.
Anyway I've tested with some minor scripts and it works, even if it shows function names only for 'public' functions.


Re: TDW RScan - Simple scanner - Freedom. - 19.07.2017

Perfect I was looking for. It wrote something like that.

recursion detected: function 18720 indirectly calls itself