Skip to content

Conversation

@rxin
Copy link
Contributor

@rxin rxin commented Jul 30, 2015

Previously we could be getting garbage data if the number of bytes is 0, or on JVMs that are 4 byte aligned, or when compressedoops is on.

@rxin
Copy link
Contributor Author

rxin commented Jul 30, 2015

cc @davies and @tellison

@rednaxelafx
Copy link
Contributor

Yes, this change looks good to me, for a "semantically safe bet" on the object layout.

@SparkQA
Copy link

SparkQA commented Jul 30, 2015

Test build #39027 has finished for PR 7789 at commit 7541a81.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we check the endian-ness? I think UNSAFE.getLong use the native endian.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this currently won't work for big endian. can somebody from ibm submit a patch to make it work? I don't have the environment to test.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we can just merge this one, add a comment and create a JIRA for big-endian.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup that's a good idea.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SparkQA
Copy link

SparkQA commented Jul 30, 2015

Test build #39077 has finished for PR 7789 at commit 86ffa3e.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@rxin
Copy link
Contributor Author

rxin commented Jul 30, 2015

Merging this since the failed test is unrelated.

@asfgit asfgit closed this in a20e743 Jul 30, 2015
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.

4 participants