forked from diffblue/cbmc
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Re-Resolve function calls if only java.lang.Object was found.
This fixes an issue in test-generator where a call to `toString` is dispatched to the `toString` method from `java.lang.Object` is used instead of the overridden method from `ArrayList`. Cite from the issue about the current implementation: > It tracks a `visited` set preventing it from listing callees twice when > multiple inheritance is in play (e.g. Java interfaces). Unfortunately this > malfunctions when we visit a type twice, once via its interfaces and once via > its concrete subclass which provides a definition This extends the original implementation, by resolving dispatch entries where an initial step resolved to a java.lang.Object function. This case can be an error, as some classes might be visited multiple times, first for an interface and then for the concrete class. The original implementation kept a visited set that recorded visited classes which resulted in some functions not correctly being resolved. This set is replaced with a map from class identifiers to dispatch table entries.
- Loading branch information
Matthias Güdemann
committed
Feb 5, 2018
1 parent
a619e48
commit 09efc90
Showing
2 changed files
with
101 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters