Postblit segfault.

Basile B. b2.temp at gmx.com
Mon Jun 1 15:27:11 UTC 2020


On Monday, 1 June 2020 at 14:53:43 UTC, H. S. Teoh wrote:
> On Mon, Jun 01, 2020 at 01:53:09PM +0000, Bastiaan Veelo via 
> Digitalmars-d-learn wrote:
>> On Monday, 1 June 2020 at 09:42:44 UTC, Boris Carvajal wrote:
>> > On Monday, 1 June 2020 at 06:35:36 UTC, MaoKo wrote:
>> > > Hello, I don't understand why this code segfault on
>> > 
>> > Reduced to:
>> > 
>> > import std.stdio;
>> > 
>> > struct S {}
>> > 
>> > void main() {
>> >   S[1] s;
>> >   writeln(s);
>> > }
>> 
>> This used to work up to dmd 2.084.1. It fails since 2.085.1. 
>> Please file a regression report at 
>> https://issues.dlang.org/enter_bug.cgi?product=D
> [...]
>
> Tracked the segfault to Phobos, writeUpToNextSpec():
>
> 	1216	            if (trailing[i] != '%') continue;
>
> Apparently `trailing` has an invalid pointer.
>
>
> T

Possibly a backend bug (keyword "wrong code"), caused by either 
of [1] or [2]

[1] https://github.com/dlang/dmd/pull/9357
[2] https://github.com/dlang/dmd/pull/9623/files


More information about the Digitalmars-d-learn mailing list