Because of: /* Save SSE, AVX, AVX512, mask and bound registers. */ #define STATE_SAVE_MASK \ ((1 << 1) | (1 << 2) | (1 << 3) | (1 << 5) | (1 << 6) | (1 << 7)) APX registers aren't preserved.
This only matters if BIND_NOW is used with a non-psABI calling convention, right?
(In reply to Florian Weimer from comment #1) > This only matters if BIND_NOW is used with a non-psABI calling convention, > right? Did you mean "BIND_NOW isn't used"?
(In reply to H.J. Lu from comment #2) > (In reply to Florian Weimer from comment #1) > > This only matters if BIND_NOW is used with a non-psABI calling convention, > > right? > > Did you mean "BIND_NOW isn't used"? Yes, indeed.
(In reply to Florian Weimer from comment #3) > (In reply to H.J. Lu from comment #2) > > (In reply to Florian Weimer from comment #1) > > > This only matters if BIND_NOW is used with a non-psABI calling convention, > > > right? > > > > Did you mean "BIND_NOW isn't used"? > > Yes, indeed. Then it is correct. I am testing a simple fix.
The master branch has been updated by H.J. Lu <hjl@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=dfb05f8e704edac70db38c4c8ee700769d91a413 commit dfb05f8e704edac70db38c4c8ee700769d91a413 Author: H.J. Lu <hjl.tools@gmail.com> Date: Fri Feb 16 07:17:10 2024 -0800 x86-64: Save APX registers in ld.so trampoline Add APX registers to STATE_SAVE_MASK so that APX registers are saved in ld.so trampoline. This fixes BZ #31371. Also update STATE_SAVE_OFFSET and STATE_SAVE_MASK for i386 which will be used by i386 _dl_tlsdesc_dynamic. Reviewed-by: Noah Goldstein <goldstein.w.n@gmail.com>
(In reply to Sourceware Commits from comment #5) > The master branch has been updated by H.J. Lu <hjl@sourceware.org>: > > https://sourceware.org/git/gitweb.cgi?p=glibc.git; > h=dfb05f8e704edac70db38c4c8ee700769d91a413 > > commit dfb05f8e704edac70db38c4c8ee700769d91a413 > Author: H.J. Lu <hjl.tools@gmail.com> > Date: Fri Feb 16 07:17:10 2024 -0800 > > x86-64: Save APX registers in ld.so trampoline > > Add APX registers to STATE_SAVE_MASK so that APX registers are saved in > ld.so trampoline. This fixes BZ #31371. > > Also update STATE_SAVE_OFFSET and STATE_SAVE_MASK for i386 which will > be used by i386 _dl_tlsdesc_dynamic. > Reviewed-by: Noah Goldstein <goldstein.w.n@gmail.com> Is this bug considered fixed now?
(In reply to Carlos O'Donell from comment #6) > (In reply to Sourceware Commits from comment #5) > > The master branch has been updated by H.J. Lu <hjl@sourceware.org>: > > > > https://sourceware.org/git/gitweb.cgi?p=glibc.git; > > h=dfb05f8e704edac70db38c4c8ee700769d91a413 > > > > commit dfb05f8e704edac70db38c4c8ee700769d91a413 > > Author: H.J. Lu <hjl.tools@gmail.com> > > Date: Fri Feb 16 07:17:10 2024 -0800 > > > > x86-64: Save APX registers in ld.so trampoline > > > > Add APX registers to STATE_SAVE_MASK so that APX registers are saved in > > ld.so trampoline. This fixes BZ #31371. > > > > Also update STATE_SAVE_OFFSET and STATE_SAVE_MASK for i386 which will > > be used by i386 _dl_tlsdesc_dynamic. > > Reviewed-by: Noah Goldstein <goldstein.w.n@gmail.com> > > Is this bug considered fixed now? Do we need to backport the fixes to release branches?
(In reply to H.J. Lu from comment #7) > Do we need to backport the fixes to release branches? I think it's a necessary correctness fix, but it's not risk-free due to increased stack size requirement. But it's the same as with lazy binding, so hopefully it should be okay.
The release/2.39/master branch has been updated by H.J. Lu <hjl@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=7fc8242bf87828c935ac5df5cafb9dc7ab635fd9 commit 7fc8242bf87828c935ac5df5cafb9dc7ab635fd9 Author: H.J. Lu <hjl.tools@gmail.com> Date: Fri Feb 16 07:17:10 2024 -0800 x86-64: Save APX registers in ld.so trampoline Add APX registers to STATE_SAVE_MASK so that APX registers are saved in ld.so trampoline. This fixes BZ #31371. Also update STATE_SAVE_OFFSET and STATE_SAVE_MASK for i386 which will be used by i386 _dl_tlsdesc_dynamic. Reviewed-by: Noah Goldstein <goldstein.w.n@gmail.com> (cherry picked from commit dfb05f8e704edac70db38c4c8ee700769d91a413)
Understanding that this is indeed fixed now for master / 2.40.