I'm compiling clojure on android and running it using the new ART runtime, and all works fine apart from the locking macro which fails ART's bytecode verification.
Example generated bytecode here: https://gist.github.com/AdamClements/2ae6c4919964b71eb470 The try block in java doesn't cover the monitorenter, where in clojure it does (this means that if the monitorenter fails, it will still attempt the monitorexit which I think is wrong). I tried this change, but it still fails ART's verification. The other difference is that the java version also catches any exceptions around *either* of the monitorexits and will retry the monitorexit indefinitely. I couldn't find a way to replicate this in clojure. Looking at the ART verifier source https://android.googlesource.com/platform/art/+/kitkat-release/runtime/verifier/method_verifier.cc on line 2731, it seems that the condition is that every instruction where the monitorenter/exit tally > 0 should be within a catch all block, which it isn't in the clojure version, there's all sorts going on which isn't within the finally's scope. Any insight would be appreciated, Adam -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.