Skip to content

Fix "local type not allowed in final code: null_type" exception #235

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

Merged
merged 1 commit into from
Feb 21, 2020

Conversation

zjbthomas
Copy link
Contributor

With IccTA enabled to detect ICC flows, when to instrument onServiceConnected(ComponentName, IBinder) for bound Service, a Local of NullType is created to represent the first argument of type ComponentName. However, NullType is not acceptable in the final Jimple code generated by Soot, when validating the body. Thus, an exception with the following message will be thrown:

(<dummyMainClass: void redirector0(android.content.ServiceConnection,android.content.Intent)>) local type not allowed in final code: null_type local

This simple fix replaces NullType with the correct type ComponentName. Though even with this fix, FlowDroid still lacks the mechanism to detect ICC flows of bound Service, this fix can at least make sure FlowDroid finish its analysis without abnormal termination when onServiceConnected(ComponentName, IBinder) is used in the application code.

You can validate this fix by running test on DroidBench app ServiceCommunication1.

…instrumenting onServiceConnected(ComponentName, IBinder)
@StevenArzt
Copy link
Member

Thanks a lot for this fix. If you want to work on IBinder support, that would be greatly appreciated.

@StevenArzt StevenArzt merged commit ff525ce into secure-software-engineering:develop Feb 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants