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

Support for ARM pointer tagging #110

Closed
davidschreiber opened this issue Oct 13, 2021 · 4 comments
Closed

Support for ARM pointer tagging #110

davidschreiber opened this issue Oct 13, 2021 · 4 comments

Comments

@davidschreiber
Copy link

Recently, our team ran into a Djinni issue that started with bumping the target SDK version of our Android library to 30. On ARM devices, this triggered crashes which we could successfully backtrace to Android's new pointer tagging functionality: https://source.android.com/devices/tech/debug/tagged-pointers

Disclaimer: We're not yet using this version of Djinni, but are using an older fork of the original project.

Do you know if pointer tagging is already working on this project, or do you plan to support it in future versions?

@jothepro
Copy link
Contributor

Thanks for reporting this although you are not (yet) using this fork!!

Do you know if pointer tagging is already working on this project

I am not aware that this bug has been reported/fixed in our code.
Did you start investigating how exactly the crashes could be triggered by the generated gluecode?

do you plan to support it in future versions?

If the crashes are triggered by the djinni gluecode, we will provide a fix in the future, if possible. It would be great if you supported us with your knowledge or even a PR! 😊

We're not yet using this version of Djinni, but are using an older fork of the original project.

Pls let us know if there is something else about this fork that could be improved to make migration easier for you!

@canatella
Copy link

Could it be related to cross-language-cpp/djinni-support-lib#30 ? From my understanding the Android pointer tag use the upper bit which would trigger this issue again as the jlong would be negative ?

@davidschreiber
Copy link
Author

Oh, yes indeed @canatella. This looks exactly like the error we've been seeing ourselves 👍 (i.e. an assertion on the handle and 4096 bytes). It seems to make sense that this failure is triggered on M1 devices, as pointer tagging seems to be an ARM64-only feature. I wasn't even aware of the split between djinni-generator and djinni-support-lib, so I'm sorry in case I created this issue in the wrong repository.

@a4z
Copy link
Contributor

a4z commented Oct 15, 2021

As discussed in cross-language-cpp/djinni-support-lib#30 , it seems we already fixed that issue in the support-lib.
Therefore I close this issue. Please feel free to reopen if you think there is more to that topic.

In any case, thanks a lot for the link to the tagged pointer docs! I haven't seen that so far

@a4z a4z closed this as completed Oct 15, 2021
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

No branches or pull requests

4 participants