]> git.ipfire.org Git - thirdparty/pdns.git/commit
rec: don't use a vector of string for internal pubsuffixlist 16394/head
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Thu, 30 Oct 2025 08:42:57 +0000 (09:42 +0100)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Thu, 30 Oct 2025 08:42:57 +0000 (09:42 +0100)
commit9e6769f0186bd637befb0ec4d8b2102aab0e67b3
tree97e17900a72d02b170fe77c1febead5dfc79844b
parent82ea647b49bdc4a53f791a9f56df6bad87c9858a
rec: don't use a vector of string for internal pubsuffixlist

The construct

std::vector<std::string> x  { not event that many string literals };

blows up with some compilers. Worst I have seen is (with not even
8k strings): g++12 develops a resident size of 26G.

This just creates a (blank line and comments stripped) in-memory version of the file that is
fed to the same code as an external file.

Problem noted by @wojas.

Signed-off-by: Otto Moerbeek <otto.moerbeek@open-xchange.com>
pdns/recursordist/mkpubsuffixcc
pdns/recursordist/pubsuffix.hh
pdns/recursordist/pubsuffixloader.cc