6459085: naked pointer subtractions in class data sharing code

Mon, 18 Aug 2008 14:53:36 -0700

author
xlu
date
Mon, 18 Aug 2008 14:53:36 -0700
changeset 722
6e76352f1f62
parent 721
3529d0e8d09c
child 723
70c4fb9cf899

6459085: naked pointer subtractions in class data sharing code
Reviewed-by: jcoomes

make/linux/makefiles/vm.make file | annotate | diff | comparison | revisions
src/share/vm/memory/dump.cpp file | annotate | diff | comparison | revisions
     1.1 --- a/make/linux/makefiles/vm.make	Fri Aug 15 10:08:20 2008 -0700
     1.2 +++ b/make/linux/makefiles/vm.make	Mon Aug 18 14:53:36 2008 -0700
     1.3 @@ -195,7 +195,7 @@
     1.4                if [ $$? = 0 ] ; then					\
     1.5  		/usr/bin/chcon -t textrel_shlib_t $@;                   \
     1.6  		if [ $$? != 0 ]; then                                   \
     1.7 -		  echo "ERROR: Cannot chcon $@"; exit 1;                \
     1.8 +		  echo "ERROR: Cannot chcon $@";			\
     1.9  		fi							\
    1.10  	      fi							\
    1.11  	    fi                                                          \
     2.1 --- a/src/share/vm/memory/dump.cpp	Fri Aug 15 10:08:20 2008 -0700
     2.2 +++ b/src/share/vm/memory/dump.cpp	Mon Aug 18 14:53:36 2008 -0700
     2.3 @@ -1200,10 +1200,12 @@
     2.4      mapinfo->write_space(CompactingPermGenGen::rw, _rw_space, false);
     2.5      _rw_space->set_saved_mark();
     2.6      mapinfo->write_region(CompactingPermGenGen::md, _md_vs->low(),
     2.7 -                          md_top - _md_vs->low(), SharedMiscDataSize,
     2.8 +                          pointer_delta(md_top, _md_vs->low(), sizeof(char)),
     2.9 +                          SharedMiscDataSize,
    2.10                            false, false);
    2.11      mapinfo->write_region(CompactingPermGenGen::mc, _mc_vs->low(),
    2.12 -                          mc_top - _mc_vs->low(), SharedMiscCodeSize,
    2.13 +                          pointer_delta(mc_top, _mc_vs->low(), sizeof(char)),
    2.14 +                          SharedMiscCodeSize,
    2.15                            true, true);
    2.16  
    2.17      // Pass 2 - write data.
    2.18 @@ -1212,10 +1214,12 @@
    2.19      mapinfo->write_space(CompactingPermGenGen::ro, _ro_space, true);
    2.20      mapinfo->write_space(CompactingPermGenGen::rw, _rw_space, false);
    2.21      mapinfo->write_region(CompactingPermGenGen::md, _md_vs->low(),
    2.22 -                          md_top - _md_vs->low(), SharedMiscDataSize,
    2.23 +                          pointer_delta(md_top, _md_vs->low(), sizeof(char)),
    2.24 +                          SharedMiscDataSize,
    2.25                            false, false);
    2.26      mapinfo->write_region(CompactingPermGenGen::mc, _mc_vs->low(),
    2.27 -                          mc_top - _mc_vs->low(), SharedMiscCodeSize,
    2.28 +                          pointer_delta(mc_top, _mc_vs->low(), sizeof(char)),
    2.29 +                          SharedMiscCodeSize,
    2.30                            true, true);
    2.31      mapinfo->close();
    2.32  

mercurial