ICE handling is still terrible
Ethan
gooberman at gmail.com
Sat Jul 27 22:16:39 UTC 2019
Example log at the bottom of this message.
Take a quick look and scroll back up after.
Can you guess what the cause is?
I feel like I've been saying "production environment" in almost
every post I've been making here recently. And it's exactly this
kind of thing that someone encountering when their job is on the
line that will make them say many obscene things while rewriting
their code in another language.
Do you know what caused the ICE yet?
I followed my hunch. Because. For some terrible reason DMD is
still shipped as a 32-bit binary in Windows. And I know that
Binderoo can blow out memory usage thanks to the CTFE engine's
naive way of handling arrays.
So I grab the 2.086.1 source. Fix the problem I was having with
the project file. Target a 64 bit build. Got me a DMD binary the
way it should be officially distributed. Target my compiler to
it, build my project. No errors, no ICE.
Wahoo.
Let's see what happens if I build my own 32-bit DMD though.
COMPILED : error : out of memory
Okay. Why my custom-built binary actually gives me a good error
message and the official build doesn't is beyond me. That in
itself is a large problem.
Still. It's an ICE. Follow the instructions and submit a bug,
right?
Dustmite is not a solution. Dustmite is not a solution. Dustmite
is not a solution. Dustmite is not a solution. Dustmite is not a
solution.
The problem here is an out of memory error. Want to get it? Just
call some CTFE function that generates large amounts of array
data in an infinite loop.
Let's say some random person, like the one I mentioned above with
their job on the line, tries to use a code minimisation tool to
find the bug. The problem in the first place was that adding code
caused the compiler to run out of memory. Stripping code away
will not reproduce this error.
But what's a person without my experience to do when they get a
problem like this? Stop work?
------------------------------------------------------------------------------
COMPILED : 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 %.*s
predefs ANSI SmithyEditor DigitalMars Windows
CRuntime_Microsoft CppRuntime_Microsoft LittleEndian D_Version2
all D_SIMD D_InlineAsm_X86_64 X86_64 Win64 D_LP64 assert
D_ModuleInfo D_Exceptions D_TypeInfo D_HardFloat
binary C:\Program Files
(x86)\dlang\dmd.2.086.1.windows\dmd2\windows\bin\dmd.exe
version v2.086.1
config C:\Program Files
(x86)\dlang\dmd.2.086.1.windows\dmd2\windows\bin\sc.ini
DFLAGS '-IC:\Program Files
(x86)\dlang\dmd.2.086.1.windows\dmd2\windows\bin\..\..\src\phobos' '-IC:\Program Files (x86)\dlang\dmd.2.086.1.windows\dmd2\windows\bin\..\..\src\druntime\import' -L/OPT:NOICF
---
object.Error@(0): Access Violation
----------------
0x006C9DBE
0x0052C431
0x006D6B43
0x006D6AC5
0x006D695F
0x0052C3C3
0x75938494
0x778241C8
0x77824198
More information about the Digitalmars-d
mailing list