[LLVMdev] Cannot remove module from empty JIT

Jim Grosbach grosbach at apple.com
Tue Jul 24 10:01:02 PDT 2012


Sure, seems reasonable.

-Jim

On Jul 24, 2012, at 4:42 AM, Verena Beckham <verena at codeplay.com> wrote:

> Hi,
> 
> You cannot call removeModule on a JIT with no modules: jitstate will be 
> 0 and therefore we have a null-pointer exception.
> The function returns a boolean for success/failure, however, so you 
> would expect to be able to call it and get false back.
> 
> Should we be checking for jitstate != 0 before accessing the variable?
> 
> -  if (jitstate->getModule() == M) {
> +  if (jitstate && jitstate->getModule() == M) {
> 
> 
>  Verena
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev




More information about the llvm-dev mailing list