Home | History | Annotate | Download | only in html
      1 <html>
      2 <head>
      3 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
      4 <title>12.README.solaris</title>
      5 <link rel="stylesheet" type="text/css" href="vg_basic.css">
      6 <meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
      7 <link rel="home" href="index.html" title="Valgrind Documentation">
      8 <link rel="up" href="dist.html" title="Valgrind Distribution Documents">
      9 <link rel="prev" href="dist.readme-mips.html" title="11.README.mips">
     10 <link rel="next" href="licenses.html" title="GNU Licenses">
     11 </head>
     12 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
     13 <div><table class="nav" width="100%" cellspacing="3" cellpadding="3" border="0" summary="Navigation header"><tr>
     14 <td width="22px" align="center" valign="middle"><a accesskey="p" href="dist.readme-mips.html"><img src="images/prev.png" width="18" height="21" border="0" alt="Prev"></a></td>
     15 <td width="25px" align="center" valign="middle"><a accesskey="u" href="dist.html"><img src="images/up.png" width="21" height="18" border="0" alt="Up"></a></td>
     16 <td width="31px" align="center" valign="middle"><a accesskey="h" href="index.html"><img src="images/home.png" width="27" height="20" border="0" alt="Up"></a></td>
     17 <th align="center" valign="middle">Valgrind Distribution Documents</th>
     18 <td width="22px" align="center" valign="middle"><a accesskey="n" href="licenses.html"><img src="images/next.png" width="18" height="21" border="0" alt="Next"></a></td>
     19 </tr></table></div>
     20 <div class="chapter">
     21 <div class="titlepage"><div><div><h1 class="title">
     22 <a name="dist.readme-solaris"></a>12.README.solaris</h1></div></div></div>
     23 <div class="literallayout"><p><br>
     24 Requirements<br>
     25 ------------<br>
     26 -YouneedarecentSolaris-likeOStocompilethisport.Solaris11or<br>
     27 anyillumos-baseddistributionshouldwork,Solaris10isnotsupported.<br>
     28 Running`uname-r`hastoprint'5.11'.<br>
     29 -RecentGCCtoolsarerequired,GCC3willprobablynotwork.GCCversion<br>
     30 4.5(orhigher)isrecommended.<br>
     31 -SolarisldhastobethefirstlinkerinthePATH.GNUldcannotbeused.<br>
     32 Thereiscurrentlynolinkercheckintheconfigurescriptbutthelinking<br>
     33 phasefailsifGNUldisused.RecentSolaris/illumosdistributionsareok.<br>
     34 -Aworkingcombinationofautotoolsisrequired:aclocal,autoheader,<br>
     35 automakeandautoconfhavetobefoundinthePATH.Youshouldbeableto<br>
     36 installpkg:/developer/build/automakeandpkg:/developer/build/autoconf<br>
     37 packagestofulfilthisrequirement.<br>
     38 -Systemheaderfilesarerequired.OnSolaris,thesecanbeinstalledwith:<br>
     39 #pkginstallsystem/header<br>
     40 -GNUmakeisalsorequired.OnSolaris,thiscanbequicklyachievedwith:<br>
     41 $PATH=/usr/gnu/bin:$PATH;exportPATH<br>
     42 -Forremotedebuggingsupport,workingGDBisrequired(seebelow).<br>
     43 -Forrunningregressiontests,GNUsed,grep,awk,diffarerequired.<br>
     44 ThiscanbequicklyachievedonSolarisbyprepending/usr/gnu/bintoPATH.<br>
     45 <br>
     46 <br>
     47 Compilation<br>
     48 -----------<br>
     49 PleasefollowthegenericinstructionsintheREADMEfile.<br>
     50 <br>
     51 Theconfigurescriptdetectsacanonicalhosttodeterminewhichversionof<br>
     52 Valgrindshouldbebuilt.Ifthesystemcompilerbydefaultproduces32-bit<br>
     53 binariesthenonlya32-bitversionofValgrindwillbebuilt.Toenable<br>
     54 compilationofboth64-bitand32-bitversionsonsuchasystem,issuethe<br>
     55 configurescriptasfollows:<br>
     56 ./configureCC='gcc-m64'CXX='g++-m64'<br>
     57 <br>
     58 <br>
     59 OracleSolarisandillumossupport<br>
     60 ----------------------------------<br>
     61 OneofthemaingoalofthisportistosupportbothOracleSolarisand<br>
     62 illumoskernels.ThisisaveryhardtaskbecauseSolariskerneltraditionally<br>
     63 doesnotprovideastablesyscallinterfaceandbecauseValgrindcontains<br>
     64 severalpartsthatarecloselytiedtotheunderlyingkernel.Forthese<br>
     65 reasons,theportneedstodetectwhichsyscallinterfacesarepresent.This<br>
     66 detectioncannotbedoneeasilyatruntimeandiscurrentlyimplementedas<br>
     67 asetofconfiguretests.Thismeansthatabinaryversionofthisportcanbe<br>
     68 executedonlyonakernelthatiscompatiblewithakernelthatwasused<br>
     69 duringtheconfigureandcompilationtime.<br>
     70 <br>
     71 Maincurrently-knownincompatibilities:<br>
     72 -Solaris11(releasedinNovember2011)removedalargesetofsyscallswhere<br>
     73 *atvariantofthesyscallwasalsopresent,forexample,open()versus<br>
     74 openat(AT_FDCWD)[1]<br>
     75 -syscallnumberforunlinkat()is76onSolaris11,but65onillumos[2]<br>
     76 -illumos(inApril2013)changedinterfaceoftheaccept()andpipe()<br>
     77 syscalls[3]<br>
     78 -posix_spawn()functionalityisbackedupbytruespawn()syscallonSolaris12<br>
     79 whereasillumosandSolaris11leveragevfork()<br>
     80 -illumosandolderSolarisuseutimesys()syscallwhereasnewerSolaris<br>
     81 usesutimensat()<br>
     82 <br>
     83 [1]http://docs.oracle.com/cd/E26502_01/html/E28556/gkzlf.html#gkzip<br>
     84 [2]https://www.illumos.org/issues/521<br>
     85 [3]https://github.com/illumos/illumos-gate/commit/5dbfd19ad5fcc2b779f40f80fa05c1bd28fd0b4e<br>
     86 <br>
     87 <br>
     88 Limitations<br>
     89 -----------<br>
     90 -TheportisWork-In-Progress,manythingsmaynotworkortheycanbesubtly<br>
     91 broken.<br>
     92 -CoredumpsproducedbyValgrinddonotcontainallinformationavailable,<br>
     93 especiallymicrostateaccountingandprocessorbindings.<br>
     94 -Accessingcontentsof/proc/self/psinfoisnotthread-safe.Thatisbecause<br>
     95 Valgrindemulatesthisfileonbehalfoftheclientprograms.Entire<br>
     96 open()-read()-close()sequenceonthisfileneedstobeperformed<br>
     97 atomically.<br>
     98 -Forklimitations:vfork()istranslatedtofork(),forkall()isnot<br>
     99 supported.<br>
    100 -Valgrinddoesnottrackdefinednessofsomeeflags(OF,SF,ZF,AF,CF,PF)<br>
    101 individuallyforeachflag.Afterasyscallisfinished,whenacarryflag<br>
    102 issetanddefined,allothermentionedflagswillbealsodefinedeven<br>
    103 thoughtheymightbeundefinedbeforemakingthesyscall.<br>
    104 -Systemcall"execve"withafiledescriptorwhichpointstoahardlink<br>
    105 iscurrentlynotsupported.Thatisbecausefromtheopenedfiledescriptor<br>
    106 itselfitisnotpossibletoreversemaptheintendedpathname.<br>
    107 Examplesarefexecve(3C)andisaexec(3C).<br>
    108 -ProgramheadersPT_SUNW_SYSSTATandPT_SUNW_SYSSTAT_ZONEarenotsupported.<br>
    109 Thatis,programslinkedwithmapfiledirectiveRESERVE_SEGMENTandattribute<br>
    110 TYPEequaltoSYSSTATorSYSSTAT_ZONEwillcauseValgrindexit.Itisnot<br>
    111 possibleforValgrindtoarrangemappingofakernelsharedpageatthe<br>
    112 addressspecifiedinthemapfilefortheguestapplication.Thereiscurrently<br>
    113 nosuchmechanisminSolaris.Hackyworkaroundsarepossible,though.<br>
    114 -WhenathreadhasnostackthenallsystemcallswillresultinValgrind<br>
    115 crash,eventhoughsuchsystemcallsusejustparameterspassedinregisters.<br>
    116 Thisshouldhappenonlyinpathologicalsituationswhenathreadiscreated<br>
    117 withcustommmap'edstackandthisstackisthenunmap'edduringthread<br>
    118 execution.<br>
    119 <br>
    120 <br>
    121 Remotedebuggingsupport<br>
    122 ------------------------<br>
    123 SolarisportofGDBhasamajorflawwhichpreventsremotedebuggingfrom<br>
    124 workingcorrectly.Fortunatelythisflawhasaneasyfix[4].Unfortunately<br>
    125 itisnotpresentinthecurrentGDB7.6.2.Thisboilsdowntoseveral<br>
    126 options:<br>
    127 -UseGDBshippedwithSolaris11.2whichhasthisflawfixed.<br>
    128 -WaituntilGDB7.7becomesavailable(therewon'tbeother7.6.xreleases).<br>
    129 -BuildGDB7.6.2withthefixbyyourselfusingthefollowingsteps:<br>
    130 #pkginstalldeveloper/gnu-binutils<br>
    131 $wgethttp://ftp.gnu.org/gnu/gdb/gdb-7.6.2.tar.gz<br>
    132 $gzip-dcgdb-7.6.2.tar.gz|tarxf-<br>
    133 $cdgdb-7.6.2<br>
    134 $patch-p1-i/path/to/valgrind-solaris/solaris/gdb-sol-thread.patch<br>
    135 $exportLIBS="-lncurses"<br>
    136 $exportCC="gcc-m64"<br>
    137 $./configure--with-x=no--with-curses--with-libexpat-prefix=/usr/lib<br>
    138 $gmake&amp;&amp;gmakeinstall<br>
    139 <br>
    140 [4]https://sourceware.org/ml/gdb-patches/2013-12/msg00573.html<br>
    141 <br>
    142 <br>
    143 TODOlist<br>
    144 ---------<br>
    145 -Fixfewremainingfailingtests.<br>
    146 -AddmoreSolaris-specifictests(especiallyforthedoorandspawn<br>
    147 syscalls).<br>
    148 -Providebettererrorreportingforvarioussubsyscalls.<br>
    149 -Implementstoringofextraregisterstateinsignalframe.<br>
    150 -Performancecomparisonagainstotherplatforms.<br>
    151 -PreventSIGPIPEwhenwritingtoasocket(coregrind/m_libcfile.c).<br>
    152 -Implementticketlockingforfairscheduling(--fair-sched=yes).<br>
    153 -ImplementsupportinDRDandHelgrindtoolsforthr_join()withthread==0.<br>
    154 -Addsupportforaccessingthread-localvariablesviagdb(auxprogs/getoff.c).<br>
    155 RequiresresearchoninternallibcTLSrepresentation.<br>
    156 -VEXsupportsAVX,BMIandAVX2.Investigateiftheycanbeenabledon<br>
    157 Solaris/illumos.<br>
    158 -InvestigatesupportformoreflagsinAT_SUN_AUXFLAGS.<br>
    159 -FixValgrindcrashwhenathreadhasnostackandsyswrap-main.caccesses<br>
    160 allpossiblesyscallparameters.Enablehelgrind/tests/stackteardown.c<br>
    161 toseethisineffect.Wouldrequireawarenessofsyscallparametersemantics.<br>
    162 -CorrectlyprintargumentsofDW_CFA_ORCL_arg_locinshow_CF_instruction()when<br>
    163 itisimplementedinlibdwarf.<br>
    164 -HandleasituationwhenguestprogramsetsSC_CANCEL_FLGinschedctland<br>
    165 Valgrindneedstoinvokeasyscallonitsown.<br>
    166 <br>
    167 <br>
    168 Contacts<br>
    169 --------<br>
    170 Pleasesendbugreportsandanyquestionsabouttheportto:<br>
    171 IvoRaisr&lt;ivosh (a] ivosh.net&gt;<br>
    172 PetrPavlu&lt;setup (a] dagobah.cz&gt;<br>
    173 <br>
    174 </p></div>
    175 </div>
    176 <div>
    177 <br><table class="nav" width="100%" cellspacing="3" cellpadding="2" border="0" summary="Navigation footer">
    178 <tr>
    179 <td rowspan="2" width="40%" align="left">
    180 <a accesskey="p" href="dist.readme-mips.html">&lt;&lt;11.README.mips</a></td>
    181 <td width="20%" align="center"><a accesskey="u" href="dist.html">Up</a></td>
    182 <td rowspan="2" width="40%" align="right"><a accesskey="n" href="licenses.html">GNU Licenses&gt;&gt;</a>
    183 </td>
    184 </tr>
    185 <tr><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td></tr>
    186 </table>
    187 </div>
    188 </body>
    189 </html>
    190