Skip to content
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

Fix bug in resolution of VT arrays and fields #8646

Merged
merged 1 commit into from
Feb 26, 2020

Conversation

tajila
Copy link
Contributor

@tajila tajila commented Feb 24, 2020

Fix bug in resolution of VT arrays and fields

When creating an array the elements of the array are set to the default
value. For arrays of regular identity types this is NULL. For arrays of
valueTypes this is the defaultValue of the valueType. As a result, if
the element type of the array is a valueType, the element type must be
fully initialized before the array can be created. This PR addresses
this problem.

Also, in the resolve field code, it is incorrectly fetching the
flattened field cache from the class where the fieldref is stored
instead of the class that defined the field. We havent noticed this
because the existing tests only fetches fields using getter methods.

Signed-off-by: Tobi Ajila atobia@ca.ibm.com

@tajila
Copy link
Contributor Author

tajila commented Feb 25, 2020

@gacholio please review these changes

@gacholio
Copy link
Contributor

Why is this necessary?

@0xdaryl
Copy link
Contributor

0xdaryl commented Feb 25, 2020

Could you make your commit message more descriptive in what the problem is you're fixing please?

@tajila
Copy link
Contributor Author

tajila commented Feb 25, 2020

@0xdaryl Ive updated the commit message

@gacholio Ive updated the PR

runtime/vm/classsupport.c Outdated Show resolved Hide resolved
When creating an array the elements of the array are set to the default
value. For arrays of regular identity types this is NULL. For arrays of
valueTypes this is the defaultValue of the valueType. As a result, if
the element type of the array is a valueType, the element type must be
fully initialized before the array can be created. This PR addresses
this problem.

Also, in the resolve field code, it is incorrectly fetching the
flattened field cache from the class where the fieldref is stored
instead of the class that defined the field. We havent noticed this
because the existing tests only fetches fields using getter methods.

Signed-off-by: Tobi Ajila <atobia@ca.ibm.com>
@gacholio
Copy link
Contributor

jenkins test sanity xlinux jdk8

1 similar comment
@gacholio
Copy link
Contributor

jenkins test sanity xlinux jdk8

@tajila
Copy link
Contributor Author

tajila commented Feb 26, 2020

Test failures are:

Pipeline] End of Pipeline
Also:   hudson.remoting.Channel$CallSiteStackTrace: Remote call to ub16x64j97
		at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1743)
		at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:357)
		at hudson.remoting.Channel.call(Channel.java:957)
		at hudson.FilePath.act(FilePath.java:1072)
		at hudson.FilePath.act(FilePath.java:1061)
		at hudson.tasks.junit.JUnitParser.parseResult(JUnitParser.java:114)
		at hudson.tasks.junit.JUnitResultArchiver.parse(JUnitResultArchiver.java:137)
		at hudson.tasks.junit.JUnitResultArchiver.parseAndAttach(JUnitResultArchiver.java:167)
		at hudson.tasks.junit.pipeline.JUnitResultsStepExecution.run(JUnitResultsStepExecution.java:52)
		at hudson.tasks.junit.pipeline.JUnitResultsStepExecution.run(JUnitResultsStepExecution.java:25)
		at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
		at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$$Lambda$279.000000005406D620.run(Unknown Source)
		at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
		at java.util.concurrent.FutureTask.run(Unknown Source)
		at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
		at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
		at java.lang.Thread.run(Unknown Source)
java.lang.NoClassDefFoundError: Could not initialize class jenkins.model.Jenkins
	at hudson.ExtensionList.lookup(ExtensionList.java:433)
	at hudson.tasks.junit.TestNameTransformer.all(TestNameTransformer.java:40)
	at hudson.tasks.junit.TestNameTransformer.getTransformedName(TestNameTransformer.java:33)
	at hudson.tasks.junit.CaseResult.getTransformedTestName(CaseResult.java:273)
	at hudson.tasks.junit.SuiteResult.casesByName(SuiteResult.java:134)
	at hudson.tasks.junit.SuiteResult.addCase(SuiteResult.java:297)
	at hudson.tasks.junit.SuiteResult.<init>(SuiteResult.java:270)
	at hudson.tasks.junit.SuiteResult.parseSuite(SuiteResult.java:209)
	at hudson.tasks.junit.SuiteResult.parse(SuiteResult.java:181)
	at hudson.tasks.junit.TestResult.parse(TestResult.java:348)
	at hudson.tasks.junit.TestResult.parsePossiblyEmpty(TestResult.java:281)
	at hudson.tasks.junit.TestResult.parse(TestResult.java:206)

@gacholio
Copy link
Contributor

Enough has run to convince me.

@gacholio gacholio merged commit 596aec5 into eclipse-openj9:master Feb 26, 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.

3 participants