ADF: Invoke row selection on table having single row.

In ADF the selection event is called whenever there is a change in row selection. This thing works fine but creates a problem when there exist only a single row in the table. For invoking the selection event in table containing single row you should reset the "SelectedRowKey" in advance section of property of table.

Algorithm to find the Control dependeny using PostDominator tree in llvm


The given function finds whether there exist a control dependency between the given two basic blocks. The function returns true if there exist a direct or transitive control dependency between the  blocks otherwise it returns false. Given function finds whether block Y is control dependent on block X or not. Initially we will call isControlDependent(X,Y,Y)


set controlStack;

bool isControlDependent (basicblock X, basicblock Y, basicblock Z)
{
        controlStack.insert(Z);
       
        if( (Z==entry) && (X!=entry) )   // entry is the entry block
       {
                 controlStack.erase(Z);
                 return false;
       }


      if ( (isPostDominated(Y,Z) || (Y==Z) )
      {
                if(X==Y)                       
                {
                     controlStack.erase(Z);
                     return false;
                }

               for( i=0 ; i < numpredecessor(z); i++ )
               {
                       if not exists  ( controlStack.find( Z.predecessor(i) ) )
                      {
                               flag = isControlDependent( X, Y, Z.predecessor(i) );
                               if(flag==true)
                               {
                                             return true
                               }

                      }
               }

      }

      else if(Z==X)
      {
                 return true;
      }
     
      else
      {
                 flag = isControlDependent( X,Z,Z );

                 if(flag==true)
                 {
                               return true;
                 }

       }

       controlStack.erase(Z);
       return false;  
}


LLVM profiling...

I was working on my final project then, suddenly I required to do some profiling. It took a while for me to understand its working and literally i was frustrated with the documentation on LLVM about it. I have to go through the mails to understand how its done. And even those mails were not written for a normal user. So here I am sharing what I have done and how I have done.

I would like to make this a kind of tutorial where I will start from the llvm installation to the profiling of code. I would like to make this tutorial such that even if a person has no interest in doing instrumentation he can read and apply this tutorial for fun.

Buffer overflow attack on ubutu 10.10 tutorial.

Hi,
I am working on buffer overflow as part of my TA duty. Soon I will be here with the full working example of it. Here you can find the detailed report with the code on how to tackle it. click here

A method for drawing arrow in Applet

// this method will draw an arrow drawarrow(int x1,int y1,int x2,int y2)
void drawArrowLine(Graphics g, int i, int j, int k, int l)
{
double d = Math.sqrt((k - i) * (k - i) + (l - j) * (l - j));
double d1 = (double)(-(k - i)) / (double)(l - j);
double d2 = 6D / Math.sqrt(1.0D + d1 * d1);
double d3 = 6D / Math.sqrt(1.0D + 1.0D / d1 / d1);
if(d1 < 0.0D)
d3 = -d3;
double d4 = (double)k - (double)(10 * (k - i)) / d;
double d5 = (double)l - (double)(10 * (l - j)) / d;
g.drawLine(i, j, (int)d4, (int)d5);
int ai[] = {
(int)(d4 - d2), k, (int)(d4 + d2)
};
int ai1[] = {
(int)(d5 - d3), l, (int)(d5 + d3)
};
g.fillPolygon(ai, ai1, 3);
}

Starting With LLVM installation

I am also working in compilers and I am working on LLVM framework. LLVM framework is the best framework according to me to work on. The documentation of the LLVM is according to me the best documentation of any open source available and the mailing list is awesome too. Any one working in compilers or wants to work in compilers should work in LLVM. I am attaching a pdf file to help the beginners installing LLVM. Hope this hepls.


Click here to download installation instructions.

Packed Malwares

In my seminar I worked on a new kind of malware i.e the packed malware. Packing is the latest obfuscation technique used by the malware authors for evading antiviruses. I am attaching a copy of my report with all the interesting work in this field.

Click here to download the report.

For any further query please contact me at tarun.still.single@gmail.com or tarun@cse.iitb.ac.in