*ptr++ = (Addr)(argc + 1);
/* --- client argv --- */
- if (info->interp_name) {
+ if (info->interp_name)
*ptr++ = (Addr)copy_str(&strtab, info->interp_name);
- VG_(free)(info->interp_name);
- }
- if (info->interp_args) {
+ if (info->interp_args)
*ptr++ = (Addr)copy_str(&strtab, info->interp_args);
- VG_(free)(info->interp_args);
- }
*ptr++ = (Addr)copy_str(&strtab, VG_(args_the_exename));
// Tell aspacem about commpage, etc
record_system_memory();
- VG_(free)(info.interp_name);
- VG_(free)(info.interp_args);
+ VG_(free)(info.interp_name); info.interp_name = NULL;
+ VG_(free)(info.interp_args); info.interp_args = NULL;
return iifii;
}
*ptr++ = argc + 1;
/* --- client argv --- */
- if (info->interp_name) {
+ if (info->interp_name)
*ptr++ = (Addr)copy_str(&strtab, info->interp_name);
- VG_(free)(info->interp_name);
- }
- if (info->interp_args) {
+ if (info->interp_args)
*ptr++ = (Addr)copy_str(&strtab, info->interp_args);
- VG_(free)(info->interp_args);
- }
*ptr++ = (Addr)copy_str(&strtab, VG_(args_the_exename));
setup_client_dataseg( dseg_max_size );
}
- VG_(free)(info.interp_name);
- VG_(free)(info.interp_args);
+ VG_(free)(info.interp_name); info.interp_name = NULL;
+ VG_(free)(info.interp_args); info.interp_args = NULL;
return iifii;
}
*ptr++ = argc;
/* Copy-out client argv. */
- if (info->interp_name) {
+ if (info->interp_name)
*ptr++ = (Addr)copy_str(&strtab, info->interp_name);
- VG_(free)(info->interp_name);
- }
- if (info->interp_args) {
+ if (info->interp_args)
*ptr++ = (Addr)copy_str(&strtab, info->interp_args);
- VG_(free)(info->interp_args);
- }
*ptr++ = (Addr)copy_str(&strtab, VG_(args_the_exename));
for (i = 0; i < VG_(sizeXA)(VG_(args_for_client)); i++)
}
}
- VG_(free)(info.interp_name);
- VG_(free)(info.interp_args);
+ VG_(free)(info.interp_name); VG_(free)(info->interp_name);
+ VG_(free)(info.interp_args); VG_(free)(info->interp_args);
return iifii;
}
/* If this is one of V's areas, check carefully the block we're
getting back. This picks up simple block-end overruns. */
if (aid != VG_AR_CLIENT)
- vg_assert(blockSane(a, b));
+ vg_assert(is_inuse_block(b) && blockSane(a, b));
b_bszB = get_bszB(b);
b_pszB = bszB_to_pszB(a, b_bszB);
// Looks like a script. Run it with /bin/sh. This includes
// zero-length files.
-
+ VG_(free)(info->interp_name);
info->interp_name = VG_(strdup)("ume.desf.1", default_interp_name);
- info->interp_args = NULL;
+ VG_(free)(info->interp_args); info->interp_args = NULL;
if (info->argv && info->argv[0] != NULL)
info->argv[0] = exe_name;
Int VG_(do_exec)(const HChar* exe_name, ExeInfo* info)
{
Int ret;
-
- info->interp_name = NULL;
- info->interp_args = NULL;
+
+ VG_(free)(info->interp_name); info->interp_name = NULL;
+ VG_(free)(info->interp_args); info->interp_args = NULL;
ret = VG_(do_exec_inner)(exe_name, info);
cp++;
*cp = '\0';
}
-
+ VG_(free)(info->interp_name);
info->interp_name = VG_(strdup)("ume.ls.1", interp);
vg_assert(NULL != info->interp_name);
if (arg != NULL && *arg != '\0') {