[illumos-Advocates] [RTI] 1222-1224, 1230 constant string overwrites and GCC4.x stdarg

Garrett D'Amore garrett at damore.org
Mon Jul 25 14:04:42 PDT 2011


This looks reasonable to me.

	- Garrett

On Sat, 2011-07-23 at 16:50 -0400, Richard Lowe wrote:
> outgoing:
>     comparing with /builds/illumos-clone
>     searching for changes
>     
>     changeset:   13410:887780fcf2f5
>     user:        Richard Lowe <richlowe at richlowe.net>
>     date:        Mon Jun 27 18:29:43 2011 +0100
>     
>     description:
>     	1224 lp may overwrite constant data
>     	Reviewed by: Gordon Ross <gwr at nexenta.com>
>     	Reviewed by: Albert Lee <trisk at nexenta.com>
>     
>     modified:
>        usr/src/cmd/lp/cmd/lpadmin/options.c
>        usr/src/cmd/lp/cmd/lpfilter.c
>        usr/src/cmd/lp/cmd/lpforms.c
>        usr/src/cmd/lp/cmd/lpusers.c
>        usr/src/cmd/lp/lib/lp/isterminfo.c
>        usr/src/cmd/lp/lib/lp/tidbit.c
>     
>     
>     changeset:   13411:23161d58e78a
>     user:        Richard Lowe <richlowe at richlowe.net>
>     date:        Thu Jun 16 07:46:34 2011 +0100
>     
>     description:
>     	1223 catman may modify constant data
>     	Reviewed by: Gordon Ross <gwr at nexenta.com>
>     	Reviewed by: Albert Lee <trisk at nexenta.com>
>     
>     modified:
>        usr/src/cmd/man/src/man.c
>     
>     
>     changeset:   13412:b5ca1dcc04d2
>     user:        Richard Lowe <richlowe at richlowe.net>
>     date:        Wed Jun 15 13:30:14 2011 +0100
>     
>     description:
>     	1222 crypt may modify constant data
>     	Reviewed by: Gordon Ross <gwr at nexenta.com>
>     	Reviewed by: Albert Lee <trisk at nexenta.com>
>     
>     modified:
>        usr/src/cmd/crypt/crypt.c
>     
>     
>     changeset:   13413:862e53600e55
>     tag:         tip
>     user:        Richard Lowe <richlowe at richlowe.net>
>     date:        Mon May 16 00:20:30 2011 +0100
>     
>     description:
>     	1230 need support for recent gcc stdarg builtins
>     	1240 va_*.h use non-existent __GNUC_MINOR
>     	Reviewed by: Alexander Eremin <alexander.eremin at nexenta.com>
>     	Reviewed by: Jason King <jason.brian.king at gmail.com>
>     	Reviewed by: Gordon Ross <gwr at nexenta.com>
>     	Reviewed by: Garret D'Amore <garrett at nexenta.com>
>     
>     modified:
>        usr/src/uts/common/sys/va_impl.h
>        usr/src/uts/common/sys/va_list.h
>     
> pbchk:
>     Copyright check:
>     usr/src/cmd/crypt/crypt.c: no copyright claim for current year found
>     usr/src/cmd/lp/cmd/lpadmin/options.c: no copyright claim for current year found
>     usr/src/cmd/lp/cmd/lpfilter.c: no copyright claim for current year found
>     usr/src/cmd/lp/cmd/lpforms.c: no copyright claim for current year found
>     usr/src/cmd/lp/cmd/lpusers.c: no copyright claim for current year found
>     usr/src/cmd/lp/lib/lp/isterminfo.c: no copyright claim for current year found
>     usr/src/cmd/lp/lib/lp/tidbit.c: no copyright claim for current year found
>     usr/src/cmd/man/src/man.c: no copyright claim for current year found
>     usr/src/uts/common/sys/va_impl.h: no copyright claim for current year found
>     usr/src/uts/common/sys/va_list.h: no copyright claim for current year found
>     
>     C style check:
>     Skipping usr/src/cmd/lp/cmd/lpadmin/options.c...
>     Skipping usr/src/cmd/lp/cmd/lpfilter.c...
>     Skipping usr/src/cmd/lp/cmd/lpforms.c...
>     Skipping usr/src/cmd/lp/cmd/lpusers.c...
>     Skipping usr/src/cmd/lp/lib/lp/isterminfo.c...
>     Skipping usr/src/cmd/lp/lib/lp/tidbit.c...
>     
>     Header format check:
>     
>     Java style check:
>     
>     Mapfile comment check:
>     
>     File permission check:
>     
>     Keywords check:
>     
>     Comments check:
>     
>     Checking for new tags:
>     
>     Checking for multiple heads (or branches):
>     
>     Checking for branch changes:
>     
>     Checking for uncommitted changes:
>     
>     Checking for merges:
>     
> As you can see, I NOT'd cmd/lp from cstyle, because it is utterly
> rank. (I didn't make it worse).
> 
> testing:
> 
>   String overwrites:  These come from a workspace in which I'm working
>   on GCC4.x support.  GCC puts constant strings in read-only memory.
>   Testing was via using the software (after building it with 4.x), and
>   then repeated here in a normal build, except in the case of catman.
> 
>   catman: 
>     built with GCC4:
>     unset MANPATH; catman -w
> 
>     (the bug is MANPATH/PATH sensitive)
> 
>   lp:
>     run all the options-related ones with incorrect options, etc.
> 
>     built lp with -xstrconst (to get the reliable crash) and: 
>     lpfilter -f posttek -F /etc/lp/fd/posttek.fd
>     (using posttek from build 148)
>     
>   crypt:
>     Built with -xstrconst:
>       crypt foo </etc/passwd 
>   
>   The versions tested using xstrconst v. gcc4 were largely out of
>   convenience of forcing the appropriate strings to be crashily
>   constant, for ease of testing.
> 
>   stdarg changes:
> 
>      Built illumos with studio+gcc3
>      Built illumos+patches with gcc4+studio
> 
>      Tried to build a simple stdarg-using test program using an old GCC,
>      prior that supported by our headers (2.95), and watched it fail.
> 
>      Built that same test program using a GCC old enough to take the
>      __builtin_stdarg_start path (GCC 3.2.1 from SunFreeware), and
>      verified it built and ran.  Verified with -E that it did take the
>      path through the conditional I expected.
> 
> 
>      gcc3.2:
>         % /usr/local/bin/gcc -E foo.c -nostdinc -I $ROOT/usr/include 2>&1 | grep '^ *__builtin'
>         __builtin_stdarg_start(ap, fmt);
>      gcc3.4:
>         % gcc -E foo.c -nostdinc -I $ROOT/usr/include 2>&1 | grep '^ *__builtin'
>        __builtin_va_start(ap, fmt);
>      gcc4.4:
>         % /opt/gcc/4.4.4/bin/gcc -E foo.c -nostdinc -I $ROOT/usr/include 2>&1 | grep '^ *__builtin'
>         __builtin_va_start(ap, fmt);
> 
>      I would REALLY appreciate other ideas for testing this, as I am,
>      obviously, pretty worried about breaking something so critical.
> 
> mail_msg inline below.
> 
> -- Rich
> 
> 
> ==== Nightly distributed build started:   Fri Jul 22 23:55:33 BST 2011 ====
> ==== Nightly distributed build completed: Sat Jul 23 01:24:56 BST 2011 ====
> 
> ==== Total build time ====
> 
> real    1:29:22
> 
> ==== Build environment ====
> 
> /usr/bin/uname
> SunOS richlowe.openindiana.org 5.11 oi_148 i86pc i386 i86pc
> 
> /opt/SUNWspro/bin/dmake
> dmake: Sun Distributed Make 7.8 SunOS_i386 Patch 126504-01 2007/07/19
> number of concurrent jobs = 16
> 
> 32-bit compiler
> /opt/onbld/bin/i386/cw -_cc
> cw version 1.29
> primary: /opt/onnv-tools/SUNWspro/SS12/bin/cc
> cc: Sun C 5.9 SunOS_i386 Patch 124868-10 2009/04/30
> shadow: /usr/sfw/bin/gcc
> gcc (GCC) 3.4.3 (csl-sol210-3_4-20050802)
> 
> 64-bit compiler
> /opt/onbld/bin/i386/cw -_cc
> cw version 1.29
> primary: /opt/onnv-tools/SUNWspro/SS12/bin/cc
> cc: Sun C 5.9 SunOS_i386 Patch 124868-10 2009/04/30
> shadow: /usr/sfw/bin/gcc
> gcc (GCC) 3.4.3 (csl-sol210-3_4-20050802)
> 
> /usr/java/bin/javac
> java full version "1.6.0_21-b06"
> 
> /usr/ccs/bin/as
> as: Sun Compiler Common 12 SunOS_i386 snv_121 08/03/2009
> 
> /usr/ccs/bin/ld
> ld: Software Generation Utilities - Solaris Link Editors: 5.11-1.1725
> 
> Build project:  #build
> Build taskid:   2618
> 
> ==== Nightly argument issues ====
> 
> 
> ==== Build version ====
> 
> illumos-richlowe_73
> 
> ==== Make clobber ERRORS ====
> 
> 
> ==== Make tools clobber ERRORS ====
> 
> 
> ==== Tools build errors ====
> 
> 
> ==== Build errors (non-DEBUG) ====
> 
> 
> ==== Build warnings (non-DEBUG) ====
> 
> 
> ==== Elapsed build time (non-DEBUG) ====
> 
> real    29:28.2
> user  4:00:03.6
> sys     53:15.8
> 
> ==== Build noise differences (non-DEBUG) ====
> 
> 
> ==== package build errors (non-DEBUG) ====
> 
> 
> ==== Build errors (DEBUG) ====
> 
> 
> ==== Build warnings (DEBUG) ====
> 
> 
> ==== Elapsed build time (DEBUG) ====
> 
> real    25:52.4
> user  3:24:20.7
> sys     45:42.3
> 
> ==== Build noise differences (DEBUG) ====
> 
> 
> ==== package build errors (DEBUG) ====
> 
> 
> ==== Validating manifests against proto area ====
> 
> 
> ==== Check ELF runtime attributes ====
> 
> 
> ==== Diff ELF runtime attributes (since last build) ====
> 
> 
> ==== 'dmake lint' of src ERRORS ====
> 
> 
> ==== Elapsed time of 'dmake lint' of src ====
> 
> real    19:43.0
> user  1:07:34.1
> sys     49:21.7
> 
> ==== lint warnings src ====
> 
> 
> ==== lint noise differences src ====
> 
> 
> ==== cstyle/hdrchk errors ====
> 
> 
> ==== Find core files ====
> 
> 
> ==== Diff unreferenced files (since last build) ====
> 
> 
> ==== Check lists of files ====
> 
> 
> ==== Impact on file permissions ====
> 
> 
> _______________________________________________
> Advocates mailing list
> Advocates at lists.illumos.org
> http://lists.illumos.org/m/listinfo/advocates





More information about the Advocates mailing list