Stack Size Estimation

Runtime-Evaluation An online method is to paint the complete stack with a certain value, like 0xAAAA (or 0xAA, whatever your width is). Then you can check how large the stack has maximally grown in the past by checking how much of the painting is left untouched. Have a look at this link for an explanation … Read more

Static Actionscript code analysis possibilities

Update Nov 2018: It would appear that Structure101 (new download page) no longer has an ActionScript variant. Original answer, links outdated: Download Structure101g and select the Actionscript flavor after installing the software. I’ve confirmed that it is able to map out class level and even function call dependencies in Flex/AS3 projects, and generate a visual … Read more

Should the Code Contracts static checker be able to check arithmetic bound?

I’ve had an answer on the MSDN forum. It turns out I was very nearly there. Basically the static checker works better if you split out “and-ed” contracts. So, if we change the code to this: public static int RollDice(Random rng) { Contract.Ensures(Contract.Result<int>() >= 2); Contract.Ensures(Contract.Result<int>() <= 12); if (rng == null) { rng = … Read more

Tool to generate graph data for class dependencies [closed]

I’m not certain about command line tools, but I like using ObjectAid for reverse engineering into class diagrams: http://www.objectaid.com/ You can easily add any class with it’s relationships to an ObjectAid graph. It saves the file in an XML format with the ucls extension. Here’s a sample: <?xml version=”1.0″ encoding=”UTF-8″?> <class-diagram version=”1.1.4″ icons=”true” always-add-relationships=”true” generalizations=”true” … Read more

How to use cppcheck’s inline suppression filter option for C++ code?

You can change the output template to display the error id from the command line, which is quite neat. For a Visual Studio format output with error id displayed, add this to your command line: –template “{file}({line}): {severity} ({id}): {message}” This will produce output something like this: s:\src\jpeg.cpp(123): error (bufferAccessOutOfBounds): Buffer access out-of-bounds: abRY Which … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)