Skip to content

Commit

Permalink
Silently ignore the D8 desugar SynthesizedClass attribute in ijar
Browse files Browse the repository at this point in the history
The attribute currently contains a short value, and has no references to the constant pool.

See

  https://r8-review.googlesource.com/c/r8/+/59895
  https://r8-review.googlesource.com/c/r8/+/59980
  https://r8-review.googlesource.com/c/r8/+/60133

for reference.

PiperOrigin-RevId: 375029196
  • Loading branch information
sgjesse authored and copybara-github committed May 21, 2021
1 parent 3114e80 commit 1544777
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions third_party/ijar/classfile.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1460,8 +1460,12 @@ void HasAttrs::ReadAttrs(const u1 *&p) {
} else {
// Skip over unknown attributes with a warning. The JVM spec
// says this is ok, so long as we handle the mandatory attributes.
fprintf(stderr, "ijar: skipping unknown attribute: \"%s\".\n",
attr_name.c_str());
// Don't even warn for the D8 desugar SynthesizedClass attribute. It is
// not relevant for ijar.
if (attr_name != "com.android.tools.r8.SynthesizedClass") {
fprintf(stderr, "ijar: skipping unknown attribute: \"%s\".\n",
attr_name.c_str());
}
p += attribute_length;
}
}
Expand Down

0 comments on commit 1544777

Please sign in to comment.