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
Bug description
This one is very similar to #174 but without static initializer.
Please consider the following code
publicclassMainActivityextendsAppCompatActivity{
publicvoidonCreate(BundlesavedInstanceState){
MyClassmyInstance = newMyClass();
myInstance.myField = this.source();
StringmyString = myInstance.myField;
myInstance.myField = ""; // If this statement is removed, Mariana Trench reports the sink in the next linethis.sink(myString); // NOT reported as issue by Mariana Trench
}
publicStringsource(){ // Defined as source in MT configreturn"Secret";
}
publicvoidsink(Stringparam){} // Defined as sink in MT config
}
classMyClass{
StringmyField;
}
As annotated in the code, Mariana Trench doesn't detect any issues, but actually the sink in MainActivity.onCreate should be reported.
I'm using mariana-trench Version: 1.0.6.
The text was updated successfully, but these errors were encountered:
This is most likely a problem with our alias analysis. This might actually be fixed, but the version of Mariana Trench you are using is one year old. I will look into pushing a new version when I get the time.
In the meantime, you could try building mariana trench from source and rerunning the analysis. That might solve the false negative.
Summary:
#176
Aliasing should ideally address this but doesn't.
This is related to the choice of not dereferencing on iget. Solution pending.
Note that aliasing does not regress the behavior, i.e. without aliasing, the false negative would still be there.
Reviewed By: arthaud
Differential Revision: D68990317
fbshipit-source-id: 1ede0349c0ff0481d03d2f8f344d3f38664fff11
Bug
Bug description
This one is very similar to #174 but without static initializer.
Please consider the following code
As annotated in the code, Mariana Trench doesn't detect any issues, but actually the sink in
MainActivity.onCreate
should be reported.I'm using mariana-trench Version: 1.0.6.
The text was updated successfully, but these errors were encountered: