Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions coregrind/m_initimg/initimg-darwin.c
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,13 @@ static HChar** setup_client_env ( HChar** origenv, const HChar* toolname)

vg_assert(envc == (cpp - ret));

/* Change VYLD_ to DYLD */
for (i = 0; i < envc; i++) {
if (0 == VG_(strncmp)(ret[i], "VYLD_", 5)) {
ret[i][0] = 'D';
}
}

/* Walk over the new environment, mashing as we go */
for (cpp = ret; cpp && *cpp; cpp++) {
if (VG_(memcmp)(*cpp, ld_preload, ld_preload_len) == 0) {
Expand Down Expand Up @@ -247,14 +254,6 @@ static HChar** setup_client_env ( HChar** origenv, const HChar* toolname)
envc--;
}

/* Change VYLD_ to DYLD */
for (i = 0; i < envc; i++) {
if (0 == VG_(strncmp)(ret[i], "VYLD_", 5)) {
ret[i][0] = 'D';
}
}


VG_(free)(preload_string);
ret[envc] = NULL;
return ret;
Expand Down