NetBpfLoad: crash if we are reusing a map.

This is to identify if it actually happens.

It is expected not to happen, because we now pin every map and are run only once on boot.

Test: TreeHugger
Flag: EXEMPT dead code
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ie46ace40f20fb4b061a91cd53f8256caebdfa71f
This commit is contained in:
Maciej Żenczykowski 2025-05-20 06:41:01 -07:00
commit b71cd4f8cf

View file

@ -986,6 +986,7 @@ static int createMaps(const char* elfPath, ifstream& elfFile, vector<unique_fd>&
saved_errno = errno;
ALOGD("bpf_create_map reusing map %s, ret: %d", mapNames[i].c_str(), fd.get());
reuse = true;
abort();
} else {
union bpf_attr req = {
.map_type = type,