Reported indirectly via MK_UBSAN:
lib/libc/stdlib/getenv.c:169:20: runtime error: load of value 190, which is not a valid value for type 'bool'
MFC after: 3 days
arichardson on Aug 2 2021, 2:42 PM.Authored by
If I understand correctly, the envVars with the putenv can't be reused.
I have some reservation with the proposed change. Basically the existing code is assuming that unused environment slots are zeroed (and they should be), so if I was you I'd probably amend the code around the two reallocarray's by zeroing out the newly added memory instead.