www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 18196] New: segmentation fault on "fwrite" on any system with

https://issues.dlang.org/show_bug.cgi?id=18196

          Issue ID: 18196
           Summary: segmentation fault on "fwrite" on any system with
                    glibc-core-2.25
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: critical
          Priority: P1
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: gleb asd.iao.ru

dmd, installed from "official" rpm:

any program (for example, code follows) traps on "writeln" with follows
diagnosis:

module main;

import std.stdio;

int main(string[] args)
{
    writefln("Hello World\n");
        return 0;
}

Fatal error: glibc detected an invalid stdio handle

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7460299 in fwrite () from /lib64/libc.so.6

(gdb) bt


/usr/include/d/std/stdio.d:4064

writeme=...)
    at /usr/include/d/std/stdio.d:2775

/usr/include/d/std/range/primitives.d:269

/usr/include/d/std/range/primitives.d:358

/usr/include/d/std/format.d:1188

/usr/include/d/std/format.d:474

/usr/include/d/std/stdio.d:1496

/usr/include/d/std/stdio.d:3797


--
Jan 05 2018