Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: assertion "ALIGNED_P(offset, obj->tlsalign)" failed: file "/usr/src/libexec/ld.elf_so/tls.c", line 549



    Date:        Wed, 22 Jul 2026 11:47:29 +0200
    From:        Martin Husemann <martin%duskware.de@localhost>
    Message-ID:  <amCRsbQKArhyVWMq%big-apple.aprisoft.de@localhost>

  | On Wed, Jul 22, 2026 at 04:39:33PM +0700, Robert Elz wrote:
  | > So, it runs this piece of code:
  | > 
  | >         offset = roundup2(_rtld_tls_static_offset, obj->tlsalign);
  | >         next_offset = offset + obj->tlssize;
  | > 	offset -= sizeof(struct tls_tcb);
  | > 
  | > 	assert(ALIGNED_P(offset, obj->tlsalign));
  |
  | (gdb) p sizeof(struct tls_tcb)
  | $1 = 8
  | (gdb) p obj->tlsalign
  | $2 = 64

That would certainly do it.   See if it all just works with the
assertion gone, it is pointless for the other 2 possible code paths
(unless one suspects that roundup2() is broken), and clearly wrong
for the one in question.

kre




Home | Main Index | Thread Index | Old Index