Date: Mon, 10 Nov 2008 22:02:35 GMT From: Peter Wemm <peter@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 152772 for review Message-ID: <200811102202.mAAM2ZFF039825@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=152772 Change 152772 by peter@peter_freefall on 2008/11/10 22:01:48 Deal with $LD_32_PRELOAD... Affected files ... .. //depot/projects/valgrind/coregrind/m_initimg/initimg-freebsd.c#4 edit Differences ... ==== //depot/projects/valgrind/coregrind/m_initimg/initimg-freebsd.c#4 (text+ko) ==== @@ -217,9 +217,9 @@ static HChar** setup_client_env ( HChar** origenv, const HChar* toolname) { HChar* preload_core = "vgpreload_core"; - HChar* ld_preload = "LD_PRELOAD="; + HChar* ld_preload; HChar* v_launcher = VALGRIND_LAUNCHER "="; - Int ld_preload_len = VG_(strlen)( ld_preload ); + Int ld_preload_len; Int v_launcher_len = VG_(strlen)( v_launcher ); Bool ld_preload_done = False; Int vglib_len = VG_(strlen)(VG_(libdir)); @@ -277,6 +277,15 @@ vg_assert(envc == (cpp - ret)); + ld_preload = "LD_PRELOAD="; + ld_preload_len = VG_(strlen)( ld_preload ); +#if defined(VGP_x86_freebsd) + if (VG_(is32on64)()) + ld_preload = "LD_32_PRELOAD="; + else +#endif + ld_preload = "LD_PRELOAD="; + ld_preload_len = VG_(strlen)( ld_preload ); /* 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) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200811102202.mAAM2ZFF039825>