| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
The major-looking code changes were all just to unravel some gotos.
Change-Id: I86f98a48b160f357ce93c87446bad5d705d5f05b
|
| |
|
|
|
|
| |
Per suggestion during code review of previous patch.
Change-Id: I9bf88d3127f32036c1668ad03ffc491947a4f696
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The PrimitiveType enum got "promoted" to libdex, and I added a
few helper functions there. I also quashed the idea that there
is some sort of canonical ordering of the enumerated values.
In the vm (per se), I made PrimitiveType uses where it had assumed
an ordering instead switch(). This mostly made things much simpler.
I also split out the array of type classes in Globals.h into
individual ClassObject*s. This mostly made things simpler, but the gc
got a tiny bit of extra cruft because of it.
Finally, I made it so that the type classes get created explicitly
during vm startup, instead of happening implicitly the first time
they're accessed. This both simplified the code and, in particular,
made it so that the type classes didn't have to be declared volatile.
There are still a couple of related items that could stand to be
cleaned up, but I think what's here is enough for one patch.
Change-Id: Id14a6dfdb200abce9f30911c330ba32d9c2a4c3f
|
| |
|
|
|
|
|
|
|
| |
Give the UTF-8 parsing/validation code and the debug info decoder
their own files in libdex. Also, moved the random utility
dexRoundUpPower2() so it wasn't in the middle of unrelated stuff
(though maybe it doesn't want to stay in DexFile.c at all).
Change-Id: I115447e49904e2440dd538b1df90616ea95707a9
|
| |
|
|
|
|
|
|
|
|
|
|
| |
I made a combined class name / type descriptor validator in
libdex extracted from the original type descriptor validator,
made the original validator use that, and added another public
function to do class name validation.
The two not-quite-validators in CheckJNI.c and InternalNative.c
now do proper checking.
Change-Id: I0f25e3efb439da065d92596197d219792d5a46b1
|
| |
|
|
|
|
|
| |
Also, make the optimized dex data area be consistently referred to as
the "opt" section instead of sometimes the "aux" section.
Change-Id: Id5589c13ce4b53d713f8186314ea886cd884c865
|
| |
|
|
|
|
|
|
| |
This prevents some potential segfaults when working with (e.g., trying
to run) corrupted dex files, turning them into more informative error
messages.
Change-Id: Ie6845087bb17a5f65fafbd6f9ff335b6af489996
|
| |
|
|
| |
Change-Id: I1e3d103a7b932ef21acedb6438c0f26b315df28f
|
| |
|
|
| |
Change-Id: I95534bb2b88eaf48f2329282041118cd034c812b
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
We have a checksum on the base DEX data, but not on the stuff that
dexopt appends. If a flash block goes "funny" we might not be able to
detect the problem. This change adds a checksum field to the
"optimized" header.
The new checksum is verified under the same circumstances as the base
DEX checksum: when you use "dexdump", and when you enable additional
checking with -Xcheckdexsum (or the property dalvik.vm.check-dex-sum
is set to "true").
For bug 2255640.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The verifier currently reports all failures immediately. Certain failures,
such as the failure to resolve a method, or the determination that access
to a field is not allowed, are supposed to deferred until the first time
that executing code does something that could cause the resolution.
With this change, several kinds of verification failures are deferred.
This is done by making a writable copy of the bytecode and replacing the
failing instruction with an "always throw" opcode.
Gory details:
- Added throw-verification-error instruction. Implemented in "portable"
and ARM interpreters. x86 uses portable form through stub.
- Added a function that creates a copy of a DexCode area and makes the
bytecodes writable.
- Added code that replaces a single instruction with an "always throw".
- Replaced runtime check for abstract/interface in new-instance with a
check at verification time.
- Added a test to exercise the deferred error mechanism.
- Minor cleanups (replaced tab, bad valgrind command, ...).
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|