3 ms·
I released TXR 282 with NaN boxing support. The pre-built binary for Android doesn't use it though; I discovered late in the release process that on Android's
by kazinator 4y ago
I released TXR 282 with NaN boxing support. The pre-built binary for Android doesn't use it though; I discovered late in the release process that on Android's Bionic Libc, pointers are coming out of the heap with 64-bit-wide values like 0xb40000NNNNNNNNNN. So, swift crash in early startup. I will research into this for the next release.
Anyone finding things dead in the water like this has to use ./configure --no-nan-boxing.
Another issue I ran into is that when I tested with gcc 12.2 on a RISC-V machine, the double to integer conversion code threw a weird uninitialized warning, not just the warning about strict aliasing against the use of u in the second line:
ucnum u = coerce(ucnum, num) - NAN_FLNUM_DELTA;
return *coerce(double *, &u);
I added pragmas to suppress that. Anyway, everything built and tests passed on that installation.
- kazinator 4y agoHere is the issue: https://source.android.com/docs/security/test/tagged-pointers https://source.android.com/docs/security/test/tagged-pointer... Android is tagging the top byte of a pointer to check for misuses, like a pointer into the stack being passed to free() and such. I have successfully worked around it. The only pointers affected by this that we care about are Lisp heap objects. These are allocated in large block. When we allocate a heap block, we clear the top 16 bits of the pointer, and save that value in heap->tag. Then, if and when we free that heap block, instead of calling free(heap), we first mask back the heap->tag that we stripped away and free the resulting pointer. Everything builds on a Pixel 4a; tests pass. In spite of the rude language in that Android documentation, whereby some troglodytes disparage the work of their superiors, and give grave admonishments, it's possible to peacefully coexist.