[llvm-commits] [LLVMdev] Cannot remove module from empty JIT
Chad Rosier
mcrosier at apple.com
Wed Jul 25 12:09:05 PDT 2012
Applied in r160753.
Chad
On Jul 25, 2012, at 2:10 AM, Verena Beckham wrote:
> Hi,
>
> Great, I made a patch (though trivial). Would you apply it for me? I don't have commit rights.
> Thanks very much.
>
> Verena
>
>
> On 24/07/2012 18:01, Jim Grosbach wrote:
>> 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
> <JITRemoveModule.patch>_______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list