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
{{ message }}
This repository has been archived by the owner on Jun 29, 2023. It is now read-only.
The sandbox member variable fnPointerMap is declared as void*, yet is only even used as std::map<...> *. Why is the casting necessary? Shouldn't the member variable just be std::map<...>*?
Good point. I originally had this as std::map. However, I changed this to the above as when using this library in Firefox, including the map header caused compilation issues. Therefore I wanted the ability to use the API without the map header
In this use case, since we don't have a map (aka the function pointer cache) we performed symbol resolution manually prior to call and then used sandbox_invoke_with_fnptr instead of sandbox_invoke. Thus getFunctionPointerFromCache is never invoked, and no code with std::map exists in the binary.
Note, that this the code has since evolved significantly and I'm not sure if the limitations that originally required this change still apply... So, its worth investigating if I can just change this back
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The sandbox member variable
fnPointerMap
is declared asvoid*
, yet is only even used asstd::map<...> *
. Why is the casting necessary? Shouldn't the member variable just bestd::map<...>*
?https://github.com/shravanrn/rlbox_api/blob/master/rlbox.h#L1118-L1139
The text was updated successfully, but these errors were encountered: