---
title: "Avoiding Vendor- and Version-Specific VM Bugs"
url: https://daily.dev/posts/avoiding-vendor--and-version-specific-vm-bugs-juydbuhy8
source_url: https://jakewharton.com/avoiding-vendor-and-version-specific-vm-bugs
type: article
source: "Jake Wharton"
published: 2026-07-05T07:14:10.553Z
updated: 2026-07-05T07:17:04.025Z
tags: ["java", "android"]
reading_time: 13
upvotes: 0
comments: 0
language: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Avoiding Vendor- and Version-Specific VM Bugs

**[Jake Wharton](https://daily.dev/sources/jakewharton)** · 13 min read · 0 upvotes · 0 comments

## Summary

Jake Wharton explores how Android's D8 dexer works around vendor-specific and version-specific VM bugs when converting Java bytecode to Dalvik bytecode. Three concrete bugs are examined: the unused `not-int` instruction that some vendor JITs never implemented (causing crashes when D8 started using it), a vendor JIT crash triggered by a non-zero check immediately after a less-than-zero check on `cmp-long` results (found in OkHttp/Okio), and an Android 6.0 ART AOT compiler memory exhaustion bug triggered by heavily recursive methods. D8 automatically applies workarounds for these bugs based on the app's minimum API level, switching to more efficient bytecodes once the buggy Android versions are no longer supported.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://jakewharton.com/avoiding-vendor-and-version-specific-vm-bugs>

## Similar posts on daily.dev

- [How I Found a Deadlock Inside ART That ART Itself Couldn’t Dump](https://daily.dev/posts/how-i-found-a-deadlock-inside-art-that-art-itself-couldn-t-dump-6nkawyfh2) · ProAndroidDev · 1 upvotes · 0 comments
- [18% Faster Compiles, 0% Compromises](https://daily.dev/posts/18-faster-compiles-0-compromises-jbenicddz) · Android Developers Blog · 0 upvotes · 0 comments

---

Tags: [#java](https://daily.dev/tags/java), [#android](https://daily.dev/tags/android)

[View this post on daily.dev](https://daily.dev/posts/avoiding-vendor--and-version-specific-vm-bugs-juydbuhy8)
