Hello,<br><br>I get a segfault and I cannot find the reason. The main computation is done in "<br>`struct patternDC : public FunctionPass`<br>" but I also have <br><br>    class ifChecker {<br>    public: <br>        virtual bool operEquiv(Instruction *I1, Instruction *I2);<br>
    };<br><br>I have in <br><br>    bool patternDC::runOnFunction(Function &F) {<br>      ...<br>      ifChecker* CC=new ifChecker();<br>       if ( CC->operEquiv(ifsInstrArray[i], ifsInstrArray[j]) )<br>       ...<br>
<br>and<br><br>    bool ifChecker::operEquiv(Instruction *I1, Instruction *I2){<br>     if (I1!=NULL && I2!=NULL)<br>       //if (I1->getOpcode() != I2->getOpcode()) return false;<br>         return true;<br>
        }<br><br>When I decomment the line from operEquiv, I have the segfault. See gdb output:<br><br>    0xb7fd6ff0 <_ZN12_GLOBAL__N_19ifChecker9operEquivEPN4llvm11InstructionES3_+16>:    movzbl 0x4(%edx),%edx<br>
<br>What is the problem? <br>Thank you !<br clear="all"><br>-- <br><font style="background-color:rgb(255,255,255);color:rgb(153,153,153)">Best regards,</font><br style="background-color:rgb(255,255,255);color:rgb(153,153,153)">
<font style="background-color:rgb(255,255,255);color:rgb(153,153,153)">Alexandru Ionut Diaconescu</font><br>