Bug 3933 – Array memory allocation error lacks a line number

Status
RESOLVED
Resolution
DUPLICATE
Severity
enhancement
Priority
P2
Component
druntime
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2010-03-11T12:19:14Z
Last change time
2018-05-17T07:23:45Z
Keywords
diagnostic
Assigned to
Sean Kelly
Creator
bearophile_hugs

Comments

Comment #0 by bearophile_hugs — 2010-03-11T12:19:14Z
This program: void main() { int[] a; a.length -= 1; } At runtime the compiler shows the following error message, if possible I'd like to see a line number too: Memory allocation failed
Comment #1 by bearophile_hugs — 2010-03-11T13:25:51Z
Suggestion from Steven Schveighoffer: once a stacktrace printout is available, probably there is no need to instrument code like this to show line numbers.
Comment #2 by dmitry.olsh — 2018-05-17T07:23:45Z
With DMD 2.079 it shows the following: core.exception.OutOfMemoryError@src/core/exception.d(702): Memory allocation failed ---------------- ??:? _d_arraysetlengthT [0xc1dcfb8e] ??:? _Dmain [0xc1dcdbaa] I bet linenumbers worked on Linux so it could be a problem with my setup. In any case it's certainly a separate issue that I'll give in DUPLICATE resolution *** This issue has been marked as a duplicate of issue 18068 ***