[Issue 18196] New: segmentation fault on "fwrite" on any system with glibc-core-2.25

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Jan 5 16:49:45 UTC 2018


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 at puremagic.com
          Reporter: gleb at 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
#0  0x00007ffff7460299 in fwrite () from /lib64/libc.so.6
#1  0x00000000004046ba in std.stdio (obj=..., f=0x655160 <std.stdio>) at 
/usr/include/d/std/stdio.d:4064
#2  0x00000000004045f1 in std.stdio.File.LockingTextWriter (this=..., 
writeme=...)
    at /usr/include/d/std/stdio.d:2775
#3  0x0000000000403ddb in std.range.primitives (e=..., r=...) at 
/usr/include/d/std/range/primitives.d:269
#4  0x0000000000403dad in std.range.primitives (e=..., r=...) at 
/usr/include/d/std/range/primitives.d:358
#5  0x0000000000403d41 in std.format (this=..., writer=...) at 
/usr/include/d/std/format.d:1188
#6  0x0000000000403871 in std.format (fmt=..., w=...) at 
/usr/include/d/std/format.d:474
#7  0x00000000004037d1 in std.stdio.File (this=..., fmt=...) at 
/usr/include/d/std/stdio.d:1496
#8  0x0000000000403759 in std.stdio (fmt=...) at 
/usr/include/d/std/stdio.d:3797
#9  0x000000000040370a in D main (args=...) at hello.d:7

--


More information about the Digitalmars-d-bugs mailing list