On 9/22/20 3:22 PM, Andreas Schwab wrote:
On Sep 22 2020, John Paul Adrian Glaubitz wrote:
root@pacman:~# debfoster
debfoster: /usr/include/atomic_ops/sysdeps/loadstore/atomic_load.h:31: AO_load: Assertion `((size_t)addr & (sizeof(*addr) - 1)) == 0' failed.
That a typical bad alignment check. It should use __alignof__, not
sizeof.
Aha, I was assuming something like that already but I wasn't sure since libatomic-ops wasn't
updated for a while in Debian [1].
[1] https://github.com/ivmai/libatomic_ops/blob/master/src/atomic_ops/sysdeps/loadstore/atomic_load.h#L31
On Sep 22 2020, John Paul Adrian Glaubitz wrote:
root@pacman:~# debfoster
debfoster: /usr/include/atomic_ops/sysdeps/loadstore/atomic_load.h:31: AO_load: Assertion `((size_t)addr & (sizeof(*addr) - 1)) == 0' failed.
That a typical bad alignment check. It should use __alignof__, not
sizeof.
[1] https://packages.qa.debian.org/liba/libatomic-ops.html
root@pacman:~# debfoster
debfoster: /usr/include/atomic_ops/sysdeps/loadstore/atomic_load.h:31: AO_load: Assertion `((size_t)addr & (sizeof(*addr) - 1)) == 0' failed.
That a typical bad alignment check. It should use __alignof__, not
sizeof.
Aha, I was assuming something like that already but I wasn't sure since libatomic-ops wasn't
updated for a while in Debian [1].
What would be the correct check then in [1]?
I was just re-reading the code and realized I'm dumb. Never mind.
s/sizeof/__alignof__/ should help.
I was just re-reading the code and realized I'm dumb. Never mind.That a typical bad alignment check. It should use __alignof__, not
sizeof.
Aha, I was assuming something like that already but I wasn't sure since libatomic-ops wasn't
updated for a while in Debian [1].
What would be the correct check then in [1]?
On 9/22/20 3:27 PM, John Paul Adrian Glaubitz wrote:
That a typical bad alignment check. It should use __alignof__, not
sizeof.
Aha, I was assuming something like that already but I wasn't sure since libatomic-ops wasn't
updated for a while in Debian [1].
What would be the correct check then in [1]?I was just re-reading the code and realized I'm dumb. Never mind.
s/sizeof/__alignof__/ should help.
On 9/22/20 5:23 PM, John Paul Adrian Glaubitz wrote:> On 9/22/20 3:27 PM, John Paul Adrian Glaubitz wrote:
That a typical bad alignment check. It should use __alignof__, not
sizeof.
Aha, I was assuming something like that already but I wasn't sure since libatomic-ops wasn't
updated for a while in Debian [1].
What would be the correct check then in [1]?
I was just re-reading the code and realized I'm dumb. Never mind.
s/sizeof/__alignof__/ should help.
Hmm, now it fails with __alignof__():
(sid-m68k-sbuild)root@epyc:/# debfoster -f
debfoster: /usr/include/atomic_ops/sysdeps/loadstore/atomic_load.h:31: AO_load: Assertion `((size_t)addr & (__alignof__(*addr) - 1)) == 0' failed.
qemu: uncaught target signal 6 (Aborted) - core dumped
Aborted
(sid-m68k-sbuild)root@epyc:/#
Adrian
Hmm, now it fails with __alignof__():
(sid-m68k-sbuild)root@epyc:/# debfoster -f
debfoster: /usr/include/atomic_ops/sysdeps/loadstore/atomic_load.h:31: AO_load: Assertion `((size_t)addr & (__alignof__(*addr) - 1)) == 0' failed.
qemu: uncaught target signal 6 (Aborted) - core dumped
Aborted
(sid-m68k-sbuild)root@epyc:/#
[1] https://github.com/ivmai/bdwgc/commit/b55459ad47d9aaa75c9a4b0f99a3b867592ab8e0
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 296 |
Nodes: | 16 (2 / 14) |
Uptime: | 39:07:28 |
Calls: | 6,648 |
Files: | 12,193 |
Messages: | 5,329,314 |