andrey-zherikov / argparse

Parser for command-line arguments
https://andrey-zherikov.github.io/argparse/
Boost Software License 1.0
30 stars 6 forks source link

OutOfMemoryError: Memory allocation failed after bumping to 1dc7ab53d92127ebeaf84b3ecd12c1d7e8a397b3 #157

Closed ljmf00-wekaio closed 8 months ago

ljmf00-wekaio commented 8 months ago

My CI detects a regression at runtime when bumping 7e08d53 to 1dc7ab5, regardless of the build type or flags.

Error:

core.exception.OutOfMemoryError@core/lifetime.d(126): Memory allocation failed
----------------

(weirdly, no stack trace)


Can't give much more context but I'll keep this up-to-date if any investigation is known.

ljmf00-wekaio commented 8 months ago

Updating here, I have no clue, but going to run with ASAN, use after free flags. @andrey-zherikov maybe you should also add it to the CI.

SirNickolas commented 8 months ago

My CI detects a regression at runtime when bumping https://github.com/andrey-zherikov/argparse/commit/7e08d535bf81874c891b53f159e25d150b833a02 to https://github.com/andrey-zherikov/argparse/commit/1dc7ab53d92127ebeaf84b3ecd12c1d7e8a397b3

Super weird. Could you test with patched argparse/api/cli.d:25?

@@ -22,7 +22,7 @@ private void onError(Config config, alias printer = defaultErrorPrinter)(string
 {
     import std.algorithm.iteration: joiner;

-    if(config.errorHandler)
+    static if(config.errorHandler !is null)
         config.errorHandler(message);
     else
         try

(Don’t miss !is null: will not compile without it.) That’s my only idea at the moment.

ljmf00-wekaio commented 8 months ago

Investigated: Rebased with latest changes. Tried locally, can't reproduce. Cleaned cache of the CI and succeeded. Saved cache from mesonbuild is behaving weidly and not evicting dirty blobs, hence these weird error? Idk, but it seems unrelated to the change indeed.

/shrug