Jump to page: 1 2
Thread overview
[Issue 19148] ldc compiled with dmd and musl segment faults on unaligned SIMD instruction.
[Issue 19148] dmd doesn't keep stack aligned at 16 bytes boundary
Aug 08, 2018
Yuxuan Shui
Aug 08, 2018
Yuxuan Shui
Aug 09, 2018
Yuxuan Shui
[Issue 19148] Alignment of section does not reflect the maximum alignment of its contents
Aug 10, 2018
Yuxuan Shui
Aug 10, 2018
Yuxuan Shui
Aug 10, 2018
Yuxuan Shui
Aug 10, 2018
Yuxuan Shui
Aug 10, 2018
Yuxuan Shui
Aug 25, 2018
Joakim
Aug 25, 2018
Yuxuan Shui
Aug 26, 2018
Joakim
Aug 26, 2018
Yuxuan Shui
Aug 26, 2018
Joakim
Aug 26, 2018
Yuxuan Shui
Dec 17, 2022
Iain Buclaw
August 08, 2018
https://issues.dlang.org/show_bug.cgi?id=19148

--- Comment #1 from Yuxuan Shui <yshuiv7@gmail.com> ---
Whops, not the problem. But ldc still crashes, looking into it...

--
August 08, 2018
https://issues.dlang.org/show_bug.cgi?id=19148

Yuxuan Shui <yshuiv7@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|dmd doesn't keep stack      |ldc compiled with dmd and
                   |aligned at 16 bytes         |musl segment faults on
                   |boundary                    |unaligned SIMD instruction.

--
August 09, 2018
https://issues.dlang.org/show_bug.cgi?id=19148

--- Comment #2 from Yuxuan Shui <yshuiv7@gmail.com> ---
Looks like dmd mis-aligned a __gshared variable. .alignof reports an alignment of 16 bytes, while the variable is aligned only to 8 bytes.

--
August 10, 2018
https://issues.dlang.org/show_bug.cgi?id=19148

Yuxuan Shui <yshuiv7@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|ldc compiled with dmd and   |Alignment of section does
                   |musl segment faults on      |not reflect the maximum
                   |unaligned SIMD instruction. |alignment of its contents

--
August 10, 2018
https://issues.dlang.org/show_bug.cgi?id=19148

Yuxuan Shui <yshuiv7@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P1                          |P3
           Severity|enhancement                 |major

--
August 10, 2018
https://issues.dlang.org/show_bug.cgi?id=19148

Yuxuan Shui <yshuiv7@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P4

--
August 10, 2018
https://issues.dlang.org/show_bug.cgi?id=19148

Yuxuan Shui <yshuiv7@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P4                          |P1

--
August 10, 2018
https://issues.dlang.org/show_bug.cgi?id=19148

--- Comment #3 from Yuxuan Shui <yshuiv7@gmail.com> ---
I found the actual bug in codegen. In elfobj.c data_start(), when a symbol
doesn't have a explicit alignment (Salignment <= 0), the symbol itself is
aligned, but its section's alignment is not updated.

To reproduce:

__gshared real x;
pragma(msg, x.alignof);

Compiling it prints: 16LU, but the .data section of the resulting object file is only aligned to 8 bytes.

--
August 25, 2018
https://issues.dlang.org/show_bug.cgi?id=19148

--- Comment #4 from Joakim <dbugz@joakim.fea.st> ---
Which ldc and DMD versions? Does the just-released LDC 1.11 have this problem?

--
August 25, 2018
https://issues.dlang.org/show_bug.cgi?id=19148

--- Comment #5 from Yuxuan Shui <yshuiv7@gmail.com> ---
(In reply to Joakim from comment #4)
> Which ldc and DMD versions? Does the just-released LDC 1.11 have this problem?

Most recent ldc release fix the build problem. But this is a dmd bug nonetheless.

This bug still exists in dmd master

--
« First   ‹ Prev
1 2