PERFORCE change 152772 for review

Peter Wemm peter at FreeBSD.org
Mon Nov 10 14:02:36 PST 2008


http://perforce.freebsd.org/chv.cgi?CH=152772

Change 152772 by peter at 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) {


More information about the p4-projects mailing list