[LLVMdev] LLVM seg fault : dereference an uninitialized pointer Instruction*

Krzysztof Parzyszek kparzysz at codeaurora.org
Tue Jan 8 12:02:10 PST 2013


On 1/8/2013 6:23 AM, Alexandru Ionut Diaconescu wrote:
> Can you please tell me how can I initialize the ifsInstrArray
> array? And for its elements I should use the constructor of Instruction*
> (I cannot find it in Instruction.h)? I cannot initialize the elements by
> assigning NULL.

You need to make sure that the pointers in the array actually point to 
instructions.  I suspect that your code tries to dereference pointers 
that have indeterminate values (i.e. are uninitialized).

-Krzysztof


-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, 
hosted by The Linux Foundation



More information about the llvm-dev mailing list