evmc icon indicating copy to clipboard operation
evmc copied to clipboard

Fix java bindings

Open vvviiimmm opened this issue 2 years ago • 3 comments

  1. vm_execute input data was not handled properly. An additional inputData parameter has been added to EvmcVm's execute function to avoid pointer arithmetics in java
  2. ReleaseByteArrayElements was called on a pointer that is not derived from GetByteArrayElements causing segfaults
  3. get_block_hash_fn typo

Also, it was quite challenging to encode evmc_message into ByteBuffer and then decode the result. I'd suggest capturing that logic into java classes so the callers won't have to work with memory buffers directly.

vvviiimmm avatar May 30 '22 14:05 vvviiimmm

Thanks! It seems to fail on CI, can you please check?

Also, it was quite challenging to encode evmc_message into ByteBuffer and then decode the result. I'd suggest capturing that logic into java classes so the callers won't have to work with memory buffers directly.

Absolutely, we did some work on it but didn't had the time to finish. See #542 and #555.

axic avatar May 30 '22 14:05 axic

Codecov Report

Merging #651 (ce0c74a) into master (58913e0) will not change coverage. The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #651   +/-   ##
=======================================
  Coverage   92.84%   92.84%           
=======================================
  Files          23       23           
  Lines        3552     3552           
  Branches      376      376           
=======================================
  Hits         3298     3298           
  Misses        144      144           
  Partials      110      110           

codecov[bot] avatar May 31 '22 08:05 codecov[bot]

@vvviiimmm Are you using EVMC in Java?

chfast avatar Aug 17 '22 09:08 chfast