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
The routine rtn_getenv can return a value of type str.
(Pdb) ptype(host_env_val)
<class'str'>
But __handle_external_return expects the return value to be either an integer or an Expression. When calling write_symbolic_register an exception will be thrown when trying to pass the string to newSymbolicExpression
Logic should be added to have rtn_getenv to return a pointer to the string. The environment may need to be populated on the stack during process creation, as it is with a real process.
The text was updated successfully, but these errors were encountered:
Hello @jordan9001.
The current implementation of getenv is indeed faulty as it return a string while it should not.
Indeed populating the stack at the begining of the execution would be to most accurate modeling. Another option is to allocate a buffer for the string and returning the pointer to it.
A nice implementation would also take to opportunity to symbolize the returned string if it is part of the input (and returning the concrete one otherwise).
Implementing these routines is an endless work and I am lacking time. Feel free to submit a PR, we would be bery happy to review it and to merge it.
The routine
rtn_getenv
can return a value of type str.But
__handle_external_return
expects the return value to be either an integer or an Expression. When callingwrite_symbolic_register
an exception will be thrown when trying to pass the string tonewSymbolicExpression
Logic should be added to have
rtn_getenv
to return a pointer to the string. The environment may need to be populated on the stack during process creation, as it is with a real process.The text was updated successfully, but these errors were encountered: