[Issue 20562] [dmd] Memory allocation failed (ERROR: This is a compiler bug)

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Feb 13 14:48:37 UTC 2020


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

--- Comment #9 from JR <zorael at gmail.com> ---
(In reply to Jonathan Marler from comment #8)
> JR how did you do your git bisect?  What command were you using to build dmd?

I used digger to automate the bisection. I might add that I started all this
with trying to make a minimal test case using dustmite, but after a while it
gets reduced to a vague state that sometimes compiles, sometimes doesn't.

The test expression I used to bisect was the build command that `dub build -v`
printed, grepped for "Memory allocation failed". I needed to invert the result
for digger (a success should be when the string was not detected), so I
couldn't just leave it as a normal command and had to make a batch script. I
don't know Windows so it may be a roundabout way of doing it, but it works.

With my repo cloned into C:\Temp\kameloso, then with a C:\Temp\bisect.bat test
script looking like the following: (necessitates having run `dub build` at
least once to fetch and build the dependencies)

```
@echo off
cd \Temp\kameloso

dmd -dip25 -dip1008 -m64 -c -ofk -debug -g -w -d -version=WithAdminPlugin
-version=WithAutomodePlugin -version=WithBashQuotesPlugin
-version=WithChanQueriesService -version=WithChatbotPlugin
-version=WithConnectService -version=WithCTCPService -version=WithHelpPlugin
-version=WithNotesPlugin -version=WithOnelinersPlugin
-version=WithPersistenceService -version=WithPipelinePlugin
-version=WithPrinterPlugin -version=WithQuotesPlugin
-version=WithSedReplacePlugin -version=WithSeenPlugin
-version=WithWebtitlesPlugin -version=WithPlugins -version=Have_kameloso
-version=Have_dialect -version=Have_lu -version=FlagAsUpdated
-version=Have_lu_core -version=Have_lu_meld -Isource
-IC:\Users\zorael\AppData\Local\dub\packages\dialect-0.3.2\dialect\source
-IC:\Users\zorael\AppData\Local\dub\packages\lu-0.1.2\lu\source
-IC:\Users\zorael\AppData\Local\dub\packages\lu-0.1.2\lu\source
source\kameloso\common.d source\kameloso\constants.d
source\kameloso\debugging.d source\kameloso\getopt.d
source\kameloso\irccolours.d source\kameloso\kameloso.d
source\kameloso\logger.d source\kameloso\main.d source\kameloso\messaging.d
source\kameloso\plugins\admin.d source\kameloso\plugins\automode.d
source\kameloso\plugins\bashquotes.d source\kameloso\plugins\chanqueries.d
source\kameloso\plugins\chatbot.d source\kameloso\plugins\common.d
source\kameloso\plugins\connect.d source\kameloso\plugins\ctcp.d
source\kameloso\plugins\hello.d source\kameloso\plugins\help.d
source\kameloso\plugins\notes.d source\kameloso\plugins\oneliners.d
source\kameloso\plugins\package.d source\kameloso\plugins\persistence.d
source\kameloso\plugins\pipeline.d source\kameloso\plugins\printer.d
source\kameloso\plugins\quotes.d source\kameloso\plugins\sedreplace.d
source\kameloso\plugins\seen.d source\kameloso\plugins\twitchbot.d
source\kameloso\plugins\webtitles.d source\kameloso\printing.d
source\kameloso\terminal.d source\kameloso\thread.d source\kameloso\traits.d
-vcolumns 2>&1 | findstr /C:"Memory allocation failed"

if %ERRORLEVEL% EQU 0 (exit /b 1) else (exit /b 0)
```

I set up a digger bisect.ini looking like the following:

```
good = master at v2.087.1
bad = master at v2.089.1
reverse = false
tester = C:\Temp\bisect.bat
```

Then I set it off with `dub run digger -- bisect bisect.ini`.

--


More information about the Digitalmars-d-bugs mailing list