Greetings,
Yes, it is partly due to optimization. Before return a 32bit
sal_Int32 into 64bit Py_ssize_t, the high 32bit of a 64bit
register should be set to zeros. In -O2, compiler doesn't clean
these bits. But I cannot reproduce it with a simpler case.
And this might relates to bridge implementation. PyUNO_len()
calls lcl_detach_getLength() to get count though bridge. Maybe
high 32 bit of the returned register should be cleaned in bridge.
So I guess I'll workaround this by building with -O0. (riscv64 isn't alone there, seeThanks! Is there any way to build just 'pyuno' module with -O0?https://salsa.debian.org/libreoffice-team/libreoffice/libreoffice/-/blob/master/rules#L746 (upto line 771)
From,
Sakura286