New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
switch from std::regex to boost::regex #3826
Conversation
1. std::regex is not consistent across different platforms (libcxx vs libstdc++) 2. libstdc++ implementation is braindead: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93502 and overflows the stack if the input string gets too long. If this change is accepted I will also replace all other instances.
I'm not really in favor of this. BTW what string sizes are we talking about here? |
Depends on the platform's default stacksize limit but on x86_64-linux this leads to reliable crashes: #3804 |
Looks like this may get fixed upstream: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86164#c8 |
It does not really increase the closure size though in Nix. There might be some distributions such as Debian that package liboost_regex separately: https://packages.debian.org/sid/amd64/libboost-regex1.71-dev/filelist What is your proposed fix instead? fixing libstdc++'s regex is beyond my capabilities. |
Not really the commenter gave up. |
28k in my case. |
Note that libboost_regex.so is about 1.3 MB, but worse, it pulls in libicu4c which is 34 MB. |
I think it used It could be reverted to that. However its too much guessing from my side what the maintainers actually want as a acceptable solution so I just leave it as it is given that the one bug in nixpkgs itself is fixed... |
+1 for PCRE, oniguruma or any other regexp engine that has a consistent evaluation across platforms. |
@zimbatm While I would absolutely love PCRE the problem is that Nix is already using POSIX ERE and migrating to something else would break |
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93502
and overflows the stack if the input string gets too long.
If this change is accepted I will also replace all other instances.