[klee-dev] Out of bound pointer

asantosa1999 at gmail.com asantosa1999 at gmail.com
Fri Jun 30 23:16:05 BST 2017


Dear Nora,
I think the ordering of the command-line arguments given to the all.bc was wrong, causing the memory error.all.bc has to be given options -i, -o, then -- and then followed by the non-option arguments.
Please try to run the following command instead:
klee --emit-all-errors --allow-external-sym-calls --optimize --libc=uclibc --posix-runtime ./all.bc -i '/home/naloboud/parboil/ datasets/stencil/small/input/ 128x128x32.bin' -o '/home/naloboud/parboil/ datasets/stencil/small/output/ 128x128x32.out' -- 128 128 32 100
Best,Andrew
On Sat Jun 24 2017 00:01:45 GMT+0800 (SGT), Nourah mmm <dnoorah at gmail.com> wrote:

Hi, 
Thank you for your response
Its a multi-files program, I attached it to this email. and I use this command to run the program 

myclang -I /home/klee/klee_src/include -emit-llvm -c -g main.c parboil.c kernels.c file.c 


klee --emit-all-errors --allow-external-sym-calls --optimize --libc=uclibc --posix-runtime ./all.bc -- 128 128 32 100 -i '/home/naloboud/parboil/ datasets/stencil/small/input/ 128x128x32.bin' -o '/home/naloboud/parboil/ datasets/stencil/small/output/ 128x128x32.out' 


On 23 June 2017 at 01:30, asantosa1999 at gmail.com <asantosa1999 at gmail.com> wrote:

Hi Nora, 
Could you please provide a more complete example, perhaps a runnable one? 
Andrew

Sent from Yahoo Mail on Android 
 
 On Thu, Jun 22, 2017 at 10:51 PM, Nourah mmm<dnoorah at gmail.com> wrote:  Hi,
When the run reach the following part of code it results in ../klee/runtime/POSIX/fd.c:40: memory error: out of bound pointer.
.err
------------------------------ ------------------------------ ------------------------------ -------
Error: memory error: out of bound pointer
File: /home/naloboud/klee/runtime/ POSIX/fd.c
Line: 40
assembly.ll line: 4453
Stack: 
    #000004453 in open (pathname=0, flags=0) at /home/naloboud/klee/runtime/ POSIX/fd.c:40
    #100002536 in _stdio_fopen (fname_or_mode=0, mode=45350704) at /home/naloboud/klee-uclibc/ libc/stdio/_fopen.c:146
    #200001602 in __user_main (argc=10, argv=39032928) at /home/naloboud/klee-uclibc/ libc/stdio/fopen.c:20
    #300004027 in main (=10, =39032928) at /home/naloboud/klee-uclibc/ libc/misc/internals/__uClibc_ main.c:401
Info: 
    address: 0
    next: object at 30964048 of size 18
        MO50[18] allocated at main():  %k_termios.i.i1.i.i.i = alloca %struct.__kernel_termios.448, align 4
------------------------------ ------------------------------ ------------------------------ -------------
The code:

float *h_A0;
    float *h_Anext;

    size=nx*ny*nz;
    printf("2\n");

    h_A0=(float*)malloc(sizeof( float)*size);
    h_Anext=(float*)malloc(sizeof( float)*size);
        FILE *fp = fopen(parameters->inpFiles[0], "rb");
    read_data(h_A0, nx,ny,nz,fp);
        fclose(fp);
        printf("3\n");
        memcpy (h_Anext,h_A0 ,sizeof(float)*size);
        printf("4\n"); 

Please help 
Thank you in advance 
Nora
______________________________ _________________
klee-dev mailing list
klee-dev at imperial.ac.uk
https://mailman.ic.ac.uk/ mailman/listinfo/klee-dev
  


-------------- next part --------------
HTML attachment scrubbed and removed


More information about the klee-dev mailing list