Postblit segfault.

H. S. Teoh hsteoh at quickfur.ath.cx
Mon Jun 1 14:53:43 UTC 2020


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

-- 
They pretend to pay us, and we pretend to work. -- Russian saying


More information about the Digitalmars-d-learn mailing list