aboutsummaryrefslogtreecommitdiff
path: root/tests/096-array-copy-concurrent-gc/src/Main.java
Commit message (Collapse)AuthorAgeFilesLines
* Add test cases for concurrent gc and System.arraycopyJohannes Carlsson2012-06-051-0/+86
When System.arraycopy runs at the same time as a concurrent gc the phone will sometimes crash since System.arraycopy was implemented using memmove and memcpy. In current implementation of mememove bytes are copied one at a time. If for instance only 3 out of 4 bytes to an object reference were copied when the thread switch to the gc thread occurred and the gc was scanning the marked objects the gc read an invalid address. The parameters to dvmWriteBarrierArray in one case was also corrected (they are currently not used). The fix itself for this crash is made elsewhere, this commit just adds test cases to verify that this works. Change-Id: I0a8cfd43561b3d5de4bba818993bcf8b40413045