Skip to content

Conversation

@jpobst
Copy link
Contributor

@jpobst jpobst commented Oct 8, 2021

Fixes: #860

.jnilib files seem to be some sort of Java Native file for Mac . It starts with the magic token of 0xcafebabe but is not the type of compiled .class file we understand and are interested in.

image

Trying to parse it results in:

System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.

  StackTrace:
   at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
   at System.Collections.Generic.List`1.get_Item(Int32 index)
   at Xamarin.Android.Tools.Bytecode.AttributeInfo.CreateFromStream(ConstantPool constantPool, Stream stream) in 
 Xamarin.Android.Tools.Bytecode\AttributeInfo.cs:line 101

We should ignore this file in a .jar.

@jonpryor jonpryor merged commit 403dd37 into main Oct 11, 2021
@jonpryor jonpryor deleted the no-jnilib branch October 11, 2021 20:10
@github-actions github-actions bot locked and limited conversation to collaborators Apr 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AOORE reading constant pool in class-parse

3 participants