Bug 469769 - [otdre] NPE when base guard calls isExecutingCallin()
Summary: [otdre] NPE when base guard calls isExecutingCallin()
Status: RESOLVED FIXED
Alias: None
Product: Objectteams
Classification: Tools
Component: OTJ (show other bugs)
Version: 2.4   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 2.5 RC   Edit
Assignee: Stephan Herrmann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 459269 (view as bug list)
Depends on:
Blocks: 484164
  Show dependency tree
 
Reported: 2015-06-09 14:25 EDT by Stephan Herrmann CLA
Modified: 2016-05-24 16:38 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stephan Herrmann CLA 2015-06-09 14:25:48 EDT
Test org.eclipse.objectteams.otdt.tests.otjld.api.Reflection.test924_isExecutingCallinCalled5() still fails under OTDRE.

I suspect that the team instance may not be properly in place when invoking isExecutingCallin(). If I remove this call we instead fail with StackOverflowError (since .equals() is intercepted which is used by the lifting infrastructure).
Comment 1 Stephan Herrmann CLA 2016-05-24 16:33:27 EDT
Turned out to be related to bug 493717 after all: where in the type hierarchy do we insert which code, and how are call chains constructed?

In particular: in that test we are binding to Object.equals(), which of course is not weavable. Instead, we insert a new dispatch method as T924iecc5.equals(), which starts off the call chain. But when we return from the team, _OT$callOrig() could not correctly dispatch. After bug 493717 we actually tried to call Object._OT$callOrig(), which - of course - does not exist.

Fixed by a new CreateSpecificSuperCallInCallOrigAdapter, which inserts an invokespecial towards the inherited unweavable method, wrapped between arg-unpacking and return boxing.

Released via commit f8337c36848c19866deb04d3d4124f6bba59ed7d
Comment 2 Stephan Herrmann CLA 2016-05-24 16:38:17 EDT
*** Bug 459269 has been marked as a duplicate of this bug. ***