NetBSD-Bugs archive

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

Re: lib/59652: DNS utilities core dump in -current



More analysis shows me it's a ld.elf_so bug that means the data isn't aligned correctly relative to the struct tcb_tls for__HAVE_TLS_VARIANT_I

I didn't check __HAVE_TLS_VARIANT_II yet.

Here's a little test program that fails.

#include <inttypes.h>
#include <assert.h>

#define ALIGNMENT       64

#define MAGIC1  0xaa55aa55aa55aa55
#define MAGIC2  0xc0ffeeeeeeeeeeee
#define MAGIC3  0xff00ff00ff00ff00

__thread
struct {
        uint64_t magic1;
        uint64_t magic2 __attribute__((aligned(ALIGNMENT)));
        uint64_t magic3;
} tls_data = {
        .magic1 = MAGIC1,
        .magic2 = MAGIC2,
        .magic3 = MAGIC3,
};

int
main()
{
        assert(tls_data.magic1 == MAGIC1);
        assert(tls_data.magic2 == MAGIC2);
        assert(tls_data.magic3 == MAGIC3);
}




Home | Main Index | Thread Index | Old Index