Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Use a different method to get strings from JNI #1214

Merged
merged 7 commits into from
Jun 25, 2021
Merged

Conversation

Swatinem
Copy link
Member

@Swatinem Swatinem commented Feb 1, 2021

📜 Description

This uses a different method to get string contents from JNI into native options, and avoids excessive stack allocation.

💡 Motivation and Context

💚 How did you test it?

📝 Checklist

  • I reviewed the submitted code
  • I added tests to verify the changes
  • I updated the docs if needed
  • No breaking changes

🔮 Next steps

@codecov-io
Copy link

Codecov Report

Merging #1214 (78f95ff) into main (a32a612) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##               main    #1214   +/-   ##
=========================================
  Coverage     74.57%   74.57%           
  Complexity     1713     1713           
=========================================
  Files           177      177           
  Lines          6029     6029           
  Branches        600      600           
=========================================
  Hits           4496     4496           
  Misses         1256     1256           
  Partials        277      277           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a32a612...78f95ff. Read the comment docs.

@marandaneto
Copy link
Contributor

marandaneto commented Feb 9, 2021

@Swatinem currently this causes: JNI DETECTED ERROR IN APPLICATION: use of deleted local reference

@marandaneto
Copy link
Contributor

@Swatinem can we close this?

@Swatinem
Copy link
Member Author

I think this would still be interesting to do, as I think the current way is a bit fragile.
More specifically, I think explicitly handling jni references, and cleaning up all the string code would be a good idea.

@codecov-commenter
Copy link

codecov-commenter commented Jun 24, 2021

Codecov Report

Merging #1214 (3b1459a) into main (72df420) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##               main    #1214   +/-   ##
=========================================
  Coverage     76.03%   76.03%           
  Complexity     1954     1954           
=========================================
  Files           192      192           
  Lines          6763     6763           
  Branches        675      675           
=========================================
  Hits           5142     5142           
  Misses         1294     1294           
  Partials        327      327           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 72df420...3b1459a. Read the comment docs.

@Swatinem Swatinem marked this pull request as ready for review June 24, 2021 08:38
@marandaneto marandaneto merged commit 112af9d into main Jun 25, 2021
@marandaneto marandaneto deleted the fix/safer-init branch June 25, 2021 07:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants