OpenSolaris

Printable Version Enter a New Search
Bug ID 6576832
Synopsis lx_elfexec sets brkbase to 0 for statically linked linux binaries
State 10-Fix Delivered (Fix available in build)
Category:Subcategory kernel:brandz
Keywords
Responsible Engineer Evan Hoke
Reported Against
Duplicate Of
Introduced In solaris_nevada
Commit to Fix snv_71
Fixed In snv_71
Release Fixed solaris_nevada(snv_71)
Related Bugs
Submit Date 3-July-2007
Last Update Date 15-August-2007
Description
lx_elfexec sets brkbase to 0 when execing staticly linked linux binaries.  Setting the brkbase to 0 should only apply to shared objects and thus the code should be place inside the else statement, not outside.

Index: usr/src/uts/common/brand/lx/os/lx_brand.c
--- /ws/onnv-clone/usr/src/uts/common/brand/lx/os/lx_brand.c    Mon Jun 11 23:02:56 2007
+++ /builds/eh208807/onnv-brandz/usr/src/uts/common/brand/lx/os/lx_brand.c      Tue Jul  3 14:59:46 2007
@@ -705,19 +705,20 @@
                        /*
                         * A shared object with no interpreter, we use the
                         * calculated address from above.
                         */
                        edp->ed_ldentry = edp->ed_entry;
+
+                       /*
+                        * Delay setting the brkbase until the first call to
+                        * brk(). see elfexec() for details.
+                        */
+                       env.ex_bssbase = (caddr_t)0;
+                       env.ex_brkbase = (caddr_t)0;
+                       env.ex_brksize = 0;
                }
 
-               /*
-                * Delay setting the brkbase until the first call to brk();
-                * see elfexec() for details.
-                */
-               env.ex_bssbase = (caddr_t)0;
-               env.ex_brkbase = (caddr_t)0;
-               env.ex_brksize = 0;
        }
 
        env.ex_vp = vp;
        setexecenv(&env);
Work Around
N/A
Comments
N/A