You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed that when calling Queries.BlobSize on a pointer, containing dynamically-allocated memory, BlobSize returns the contents of the blob that the pointer points to instead of the blob's size.
Calling BlobSize for ptr in the program above for the line with the comment //BlobSize returns the contents of ptr's blob, namely 97 (i.e., the char a in decimal ASCII encoding).
Expected Behavior
Calling BlobSize for ptr in the program above for the line with the comment //BlobSize should return 5, since ptr points to a heap memory block with size 5 * sizeof(char) which should evaluate to 5
Further remarks
I noticed that in the match in base.ml's query function here, the second match case is always taken, i.e., BlobSize always gives back top and never matches the Blob (_,s,_) case.
The text was updated successfully, but these errors were encountered:
Description
I noticed that when calling
Queries.BlobSize
on a pointer, containing dynamically-allocated memory,BlobSize
returns the contents of the blob that the pointer points to instead of the blob's size.Take the following C program as an example:
Observed Behavior
Calling
BlobSize
forptr
in the program above for the line with the comment//BlobSize
returns the contents ofptr
's blob, namely97
(i.e., the chara
in decimal ASCII encoding).Expected Behavior
Calling
BlobSize
forptr
in the program above for the line with the comment//BlobSize
should return5
, sinceptr
points to a heap memory block with size5 * sizeof(char)
which should evaluate to5
Further remarks
I noticed that in the
match
inbase.ml
'squery
function here, the secondmatch
case is always taken, i.e.,BlobSize
always gives backtop
and never matches theBlob (_,s,_)
case.The text was updated successfully, but these errors were encountered: