Thread overview
[Issue 16626] [Reg 2.073] recent dmd nightly runs out of memory building Higgs
Oct 19, 2016
Martin Nowak
Oct 23, 2016
Martin Nowak
Oct 24, 2016
Dmitry Olshansky
Dec 24, 2016
Martin Nowak
[Issue 16626] [Reg 2.073] extreme CTFE memory usage with compile time regex
Dec 24, 2016
Martin Nowak
Jan 17, 2017
Martin Nowak
October 19, 2016
https://issues.dlang.org/show_bug.cgi?id=16626

--- Comment #1 from Martin Nowak <code@dawg.eu> ---
Seems to happen for 2 ctRegex to filter out non-alphanumerical characters.

auto nonAlnum = ctRegex!(`[^\w]`w);
enum notAlnum = ctRegex!(`[^0-9|a-z|A-Z]`, "g");

--
October 23, 2016
https://issues.dlang.org/show_bug.cgi?id=16626

--- Comment #2 from Martin Nowak <code@dawg.eu> ---
>From Dmitry https://github.com/dlang/phobos/pull/4286#issuecomment-255182046

> The new version is more demanding on memory during CTFE so yeah, most likely it now fails for some patterns. Dunno what to do here would really love to see the new engine sometime soon.

That might still take a while and in the meantime such simple ctRegex eat up
16GiB (kill my project tester https://ci.dawg.eu/ btw).
If we can't really support the NFA kickstarter in CTFE, then we should just
disable it for now.

--
October 24, 2016
https://issues.dlang.org/show_bug.cgi?id=16626

Dmitry Olshansky <dmitry.olsh@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull
                 CC|                            |dmitry.olsh@gmail.com

--- Comment #3 from Dmitry Olshansky <dmitry.olsh@gmail.com> ---
https://github.com/dlang/phobos/pull/4877

--
December 24, 2016
https://issues.dlang.org/show_bug.cgi?id=16626

--- Comment #4 from Martin Nowak <code@dawg.eu> ---
Wasn't fully resolved by the PR. https://github.com/dlang/phobos/pull/4877#issuecomment-257186040

--
December 24, 2016
https://issues.dlang.org/show_bug.cgi?id=16626

Martin Nowak <code@dawg.eu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[Reg 2.073] recent dmd      |[Reg 2.073] extreme CTFE
                   |nightly runs out of memory  |memory usage with compile
                   |building Higgs              |time regex

--- Comment #5 from Martin Nowak <code@dawg.eu> ---
More specifically this commit https://github.com/dlang/phobos/commit/e98fa4ad5ad39487844c91357cfec4f698e88230 is responsible for the high memory usage.

Also both, regex and ctRegex, trigger the bug if initialized during CTFE.

enum notAlnum = regex(`[^0-9|a-z|A-Z]`);
enum ctNotAlnum = ctRegex!(`[^0-9|a-z|A-Z]`);

https://github.com/dlang/phobos/pull/4995

--
December 26, 2016
https://issues.dlang.org/show_bug.cgi?id=16626

--- Comment #6 from github-bugzilla@puremagic.com ---
Commits pushed to master at https://github.com/dlang/phobos

https://github.com/dlang/phobos/commit/07090ae2fdaddd1c40b8c149f32733e908094ac3 disable kickstart in ctfe to workaround Issue 16626

- consumes too much memory, introduced by
  e98fa4ad5ad39487844c91357cfec4f698e88230 (#4286)

https://github.com/dlang/phobos/commit/9cbc862544a9a4afa14bb526ec4aff7792a71e49 Merge pull request #4995 from MartinNowak/fix16626

disable kickstart in ctfe to workaround Issue 16626

--
January 07, 2017
https://issues.dlang.org/show_bug.cgi?id=16626

--- Comment #7 from github-bugzilla@puremagic.com ---
Commits pushed to stable at https://github.com/dlang/phobos

https://github.com/dlang/phobos/commit/07090ae2fdaddd1c40b8c149f32733e908094ac3 disable kickstart in ctfe to workaround Issue 16626

https://github.com/dlang/phobos/commit/9cbc862544a9a4afa14bb526ec4aff7792a71e49 Merge pull request #4995 from MartinNowak/fix16626

--
January 16, 2017
https://issues.dlang.org/show_bug.cgi?id=16626

--- Comment #8 from github-bugzilla@puremagic.com ---
Commits pushed to newCTFE at https://github.com/dlang/phobos

https://github.com/dlang/phobos/commit/07090ae2fdaddd1c40b8c149f32733e908094ac3 disable kickstart in ctfe to workaround Issue 16626

https://github.com/dlang/phobos/commit/9cbc862544a9a4afa14bb526ec4aff7792a71e49 Merge pull request #4995 from MartinNowak/fix16626

--
January 17, 2017
https://issues.dlang.org/show_bug.cgi?id=16626

Martin Nowak <code@dawg.eu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--