Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct size of allocated space for unbounded objects #987

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/goto-programs/interpreter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1200,15 +1200,15 @@ Function: interpretert::get_size
Outputs: Size of the given type

Purpose: Retrieves the actual size of the provided structured type.
Unbounded objects get allocated 2^32 address space each
Unbounded objects get allocated 2^31 address space each
(of a 2^64 sized space).

\*******************************************************************/

size_t interpretert::get_size(const typet &type)
{
if(unbounded_size(type))
return 2ULL << 32ULL;
return 1ULL << 31ULL;

if(type.id()==ID_struct)
{
Expand Down