Go to file
Michael Wachenschwanz d53a5c4aa9 Disallow reading object data from Parcels with non-object reads
The check added to each non-object reads adds an overhead. If the
objects (binders and file descriptors) were written to the Parcel in
sequential order then check adds a small O(1) overhead to each read,
plus an O(N) overhead to the first read (to verify the N objects were
added in order).
If the objects were written out of order (as in by jumping around the
Parcel
with setDataPosition and writing Binder, DON'T DO THIS!!) (writing non
objects out of order is fine), the first read is forced to sort the
objects
in the internal bookkeeping. Based on the assumption non sequential
writes
are infrequent and overall Parcels are probably mostly sorted, insertion
sort was used. Worst case sorts will add an O(N^2) overhead to the first
non object read from the Parcel.

Test: run cts -m CtsOsTestCases -t android.os.cts.ParcelTest

Bug: 29833520
Change-Id: I82de8eb5f5eb56f869542d5358e96884c24301b2
(cherry picked from commit c517681c66a1a387be657e0cf06da8d19659dd14)
2018-07-16 20:31:22 +02:00
build Fix xxhdpi 3072 heap sizes 2016-08-18 19:26:27 +03:00
cmds Android 6.0.1 Release 72 (M4B30X) 2016-10-06 11:50:30 -07:00
data/etc native: add ambient temperature & relative humidity sensor features 2015-11-04 12:28:21 -08:00
docs framework/native/docs: remove doc footer for jd output 2015-05-27 10:13:35 -07:00
include Disallow reading object data from Parcels with non-object reads 2018-07-16 20:31:22 +02:00
libs Disallow reading object data from Parcels with non-object reads 2018-07-16 20:31:22 +02:00
opengl libEGL: Only enable WORKAROUND_BUG_10194508 with board flag 2017-02-19 14:50:34 -05:00
services DO NOT MERGE Remove window obscurement information. 2017-11-10 18:08:28 +03:00
MODULE_LICENSE_APACHE2 auto import from //depot/cupcake/@135843 2009-03-03 19:31:44 -08:00
NOTICE resolved conflicts for merge of adee6b35 to honeycomb-plus-aosp 2011-01-17 14:17:12 -08:00