[prev in list] [next in list] [prev in thread] [next in thread] 

List:       klee-dev
Subject:    [klee-dev] How to determine the concretized size when dealing with malloc()
From:       Wang Austin <austinwang2333 () gmail ! com>
Date:       2022-04-18 9:55:47
Message-ID: CA+gEVMt6cZ0WjjTx6+WmY3gJHsdoczYXSawEMB+bNDRjKu75_A () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hello klee-dev members,

I'm working on a project involving KLEE and SMT solvers. We are collecting
queries from KLEE using the v2.2 klee docker image with the
"--use-query-log=solver:smt2" option. I observed that the queries collected
are not always complete when KLEE dealing with malloc(), and KLEE would
throw an error:
...
KLEE: ERROR: tif_unix.c:334: concretized symbolic size
...

I'm expecting to determine the concretized size for malloc() in accordance
with the value of size in the actual execution and check if the queries are
more complete in this case.

I checked the source code (klee/lib/Core/Executor.cpp), finding that KLEE
would "optimize" when the size is symbolized. And I tried the
"--allocate-determ" option for memory management according to the document,
which I thought would determine the size to a specific value and resolve
the error, whereas, it doesn't seem to be running right, here are the
results.

1) Normal execution:
...
KLEE: ERROR: tif_unix.c:334: concretized symbolic size
KLEE: NOTE: now ignoring this error at this location
KLEE: seeding done (0 states remain)
...

2) Execution with --allocate-determ=1 --allocate-determ-size=10:
...
KLEE: ERROR: tif_unix.c:334: concretized symbolic size
KLEE: NOTE: now ignoring this error at this location
KLEE: seeding done (0 states remain)
KLEE: Deterministic memory allocation starting frow 0x7ff30000000
...

The size still got concretized or perhaps I misunderstood the usage of the
"--allocate-determ" option.

I'm wondering if there is a way to "determine the concretized size to a
specific value when malloc()" or "NOT to optimize the size", so I can
collect queries with more completeness using KLEE.

Best Regards,
Austin Wang

[Attachment #5 (text/html)]

<div dir="ltr">Hello klee-dev members,  <div><br></div><div>I&#39;m working on a \
project involving KLEE and SMT solvers. We are collecting queries from KLEE using the \
v2.2 klee docker image with the &quot;--use-query-log=solver:smt2&quot; option. I \
observed that the queries collected are not always complete when KLEE dealing with \
malloc(), and KLEE would throw an error:  </div><div>...  </div><div>KLEE: ERROR: \
tif_unix.c:334: concretized symbolic size  </div><div>...  \
</div><div><br></div><div>I&#39;m expecting to determine the concretized size for \
malloc() in accordance with the value of size in the actual execution and check if \
the queries are more complete in this case.  </div><div><br></div><div>I checked the \
source code (klee/lib/Core/Executor.cpp), finding that KLEE would \
&quot;optimize&quot; when the size is symbolized. And I tried the \
&quot;--allocate-determ&quot; option for memory management according to the document, \
which I thought would determine the size to a specific value and resolve the error, \
whereas, it doesn't seem to be running right, here are the results.  \
</div><div><br></div><div>1) Normal execution:  </div><div>...</div><div>KLEE: ERROR: \
tif_unix.c:334: concretized symbolic size  </div><div>KLEE: NOTE: now ignoring this \
error at this location  </div><div>KLEE: seeding done (0 states remain)  \
</div><div>...</div><div><br></div><div>2) Execution with --allocate-determ=1 \
--allocate-determ-size=10:  </div><div>...</div><div>KLEE: ERROR: tif_unix.c:334: \
concretized symbolic size  </div><div>KLEE: NOTE: now ignoring this error at this \
location  </div><div>KLEE: seeding done (0 states remain)  </div><div>KLEE: \
Deterministic memory allocation starting frow 0x7ff30000000  \
</div><div>...</div><div><br></div><div>The size still  got concretized or perhaps I \
misunderstood the usage of the &quot;--allocate-determ&quot; option.  \
</div><div><br></div><div>I'm wondering if there is a way to &quot;determine the \
concretized size to a specific value when malloc()&quot; or &quot;NOT to  optimize  \
the size&quot;, so I can collect queries with more completeness using KLEE.    \
<br></div><div><br></div><div>Best Regards,  </div><font color="#888888"><div>Austin \
Wang    </div></font></div>



_______________________________________________
klee-dev mailing list
klee-dev@imperial.ac.uk
https://mailman.ic.ac.uk/mailman/listinfo/klee-dev


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic