[klee-dev] covering malloc error handlers

Sven programmer at nurfuerspam.de
Tue Aug 4 19:43:33 BST 2015


Ah, okay.

I thought about linking with my own malloc replacement, but your
suggestion sounds nicer, thanks.

On 08/03/2015 04:09 PM, Cristian Cadar wrote:
> The current codebase does not have this option, but adding such code
> should be easy.  One option would be to change
> SpecialFunctionHandler::handleMalloc.
>
> Best,
> Cristian
>
> On 15/07/15 16:04, Sven wrote:
>> hey there,
>>
>> Can klee generate path for failed mallocs?
>>
>> I am running:
>>
>> #include <stdlib.h>
>>
>> int main(int argc, char **argv) {
>>          char *c = malloc(6*sizeof(char));
>>          if(NULL == c) {
>>                  return 1;
>>          }
>>          return 0;
>> }
>>
>> I expect 2 pathes, one where malloc fails, and thereby returns NULL, and
>> one where malloc is successful. However, I am getting just one path. Is
>> this a limitation of klee or am I doing something wrong?
>>
>> Cheers,
>> Sven
>>
>>
>>
>> _______________________________________________
>> klee-dev mailing list
>> klee-dev at imperial.ac.uk
>> https://mailman.ic.ac.uk/mailman/listinfo/klee-dev
>>
>
> _______________________________________________
> klee-dev mailing list
> klee-dev at imperial.ac.uk
> https://mailman.ic.ac.uk/mailman/listinfo/klee-dev




More information about the klee-dev mailing list