V4: Sign-extend heap pointers on 64-bit SPARC


Linux maps user memory above the VA hole on sparc64, from
0xfff8000100000000 on T4 and M7 and from 0xfff0000100000000 on M8 and
UltraSPARC III, so the heap pointers have their top bits set. The
sparc64 encoding kept bits 0-51 and required the rest to be clear, so
the engine crashed during start-up.

Store the low 57 bits as the 5-level page table layout does, and
sign-extend from bit 56 when decoding. That covers the 44-, 48-, 52-
and 53-bit VA layouts the kernel uses on sparc64.

With GCC this branch is only compiled once qtbase defines
Q_PROCESSOR_SPARC_64 for it, see the qtbase commit
"qprocessordetection.h: Detect 64-bit SPARC when building with GCC".

Amends commit c7722d4ed61d6a887e9f6c403ffa10b2048de2a4.

Pick-to: 6.12
Fixes: QTBUG-141832
Change-Id: I53afa9f40d72664ee33e6604bcdee1c39816ccc1
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
commit71381b2cf4d59033adc54d45d3247784fd6efe05
parent94f4a2bcbbb7cf79598dc6b4c93e7eb8d338cdbd
authorStian Halseth <stian@itx.no>
committerStian Halseth <stian@itx.no>
commit timeFri, 9 Oct 2026 17:56:04 +0000