mutex protect comp.arena in --verbose-link

This commit is contained in:
Andrew Kelley 2024-10-23 16:25:58 -07:00
parent 2530d638d6
commit 5e11790c7b

View File

@ -775,6 +775,9 @@ pub fn loadInput(self: *Elf, input: link.Input) !void {
const is_static_lib = self.base.isStaticLib();
if (comp.verbose_link) {
comp.mutex.lock(); // protect comp.arena
defer comp.mutex.unlock();
const argv = &self.dump_argv_list;
switch (input) {
.res => unreachable,