[Issue 22397] New: Out of memory during compilation
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Oct 16 15:49:06 UTC 2021
https://issues.dlang.org/show_bug.cgi?id=22397
Issue ID: 22397
Summary: Out of memory during compilation
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: kulhanek.5 at wright.edu
# Linux error message
---
ERROR: This is a compiler bug.
Please report it via https://issues.dlang.org/enter_bug.cgi
with, preferably, a reduced, reproducible example and the information below.
DustMite (https://github.com/CyberShadow/DustMite/wiki) can help with the
reduction.
---
DMD v2.090.0
predefs DigitalMars Posix linux ELFv1 CRuntime_Glibc CppRuntime_Gcc
LittleEndian D_Version2 all D_SIMD D_InlineAsm_X86_64 X86_64 D_LP64 D_PIC
assert D_ModuleInfo D_Exceptions D_TypeInfo D_HardFloat
binary dmd
version v2.090.0
config /etc/dmd.conf
DFLAGS -I/usr/include/dmd/phobos -I/usr/include/dmd/druntime/import
-L-L/usr/lib/x86_64-linux-gnu -L--export-dynamic -fPIC
---
core.exception.OutOfMemoryError at src/core/exception.d(647): Memory allocation
failed
----------------Segmentation fault
# Windows error message
The same error appears in the Windows build (on Windows 10).
predefs DigitalMars Windows CRuntime_DigitalMars CppRuntime_DigitalMars
LittleEndian D_Version2 all D_InlineAsm D_InlineAsm_X86 X86 Win32 assert
D_ModuleInfo D_Exceptions D_TypeInfo D_HardFloat
version v2.089.1-dirty
# Code
import std.file, std.stdio, std.algorithm, std.array, std.path;
void print(R)(R entries, uint depth) {
entries
.map!(a => a[depth..$])
.filter!(a => a.length > 1)
.map!(a => a[1..$])
.print(depth + 1);
}
void main() {
dirEntries(".", SpanMode.depth)
.map!(a => a.name.pathSplitter.array)
.print(0);
}
--
More information about the Digitalmars-d-bugs
mailing list