[klee-dev] Out of bound pointer
Nourah mmm
dnoorah at gmail.com
Thu Jun 22 15:51:07 BST 2017
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
-------------- next part --------------
HTML attachment scrubbed and removed
More information about the klee-dev
mailing list