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
To implement a primitive component in Treo, the user may use a static Java method, such as
public static void f(Output<String> p) {
...
}
The compiler uses this static method by producing a wrapper component that makes a call to the static method f. In this call, the wrapper component passes an instance of a node to the port parameter of f. However, it is not checked whether f is indeed of the above form. A malicious user could have provided the following static function:
public static void g(Port<String> p) {
\\ Use both p.put() and p.get().
}
The compiler would not complain, and even the generated code would not give a runtime error. This is not desired.
The compiler should be changed such that the wrapper component upcasts the Port passed to the static function to an Output. In this way, function g would give a type error.
The text was updated successfully, but these errors were encountered:
To implement a primitive component in Treo, the user may use a static Java method, such as
The compiler uses this static method by producing a wrapper component that makes a call to the static method f. In this call, the wrapper component passes an instance of a node to the port parameter of f. However, it is not checked whether f is indeed of the above form. A malicious user could have provided the following static function:
The compiler would not complain, and even the generated code would not give a runtime error. This is not desired.
The compiler should be changed such that the wrapper component upcasts the Port passed to the static function to an Output. In this way, function g would give a type error.
The text was updated successfully, but these errors were encountered: