|
From: Jeremy F. <je...@go...> - 2005-03-14 01:29:35
|
CVS commit by fitzhardinge:
Make sure that an FP write to a distinguished map makes it un-distinguished.
BUGS: 101423
A tests/distinguished-writes.c 1.1 [no copyright]
A tests/distinguished-writes.stderr.exp 1.1
A tests/distinguished-writes.vgtest 1.1
M +2 -2 mc_main.c 1.69
M +4 -1 tests/Makefile.am 1.73
--- valgrind/memcheck/tests/Makefile.am #1.72:1.73
@@ -24,4 +24,5 @@
custom_alloc.stderr.exp custom_alloc.vgtest \
describe-block.stderr.exp describe-block.vgtest \
+ distinguished-writes.vgtest distinguished-writes.stderr.exp \
doublefree.stderr.exp doublefree.vgtest \
error_counts.stderr.exp error_counts.stdout.exp error_counts.vgtest \
@@ -92,5 +93,5 @@
badloop badpoll badrw brk brk2 buflen_check \
clientperm custom_alloc \
- describe-block \
+ describe-block distinguished-writes \
doublefree error_counts errs1 exitprog execve execve2 \
fprw fwrite hello inits inline \
@@ -132,4 +133,6 @@
custom_alloc_SOURCES = custom_alloc.c
describe_block_SOURCES = describe-block.c
+distinguished_writes_SOURCES = distinguished-writes.c
+distinguished_writes_CFLAGS = -O
doublefree_SOURCES = doublefree.c
error_counts_SOURCES = error_counts.c
--- valgrind/memcheck/mc_main.c #1.68:1.69
@@ -1322,5 +1322,5 @@ void MC_(fpu_write_check) ( Addr addr, S
sm_off = SM_OFF(addr);
a_off = sm_off >> 3;
- if (sm->abits[a_off] != VGM_BYTE_VALID) goto slow4;
+ if (IS_DISTINGUISHED_SM(sm) || sm->abits[a_off] != VGM_BYTE_VALID) goto slow4;
/* Properly aligned and addressible. Make valid. */
v_off = SM_OFF(addr);
@@ -1341,5 +1341,5 @@ void MC_(fpu_write_check) ( Addr addr, S
sm_off = SM_OFF(addr);
a_off = sm_off >> 3;
- if (sm->abits[a_off] != VGM_BYTE_VALID) goto slow8;
+ if (IS_DISTINGUISHED_SM(sm) || sm->abits[a_off] != VGM_BYTE_VALID) goto slow8;
/* First half properly aligned and addressible. Make valid. */
v_off = SM_OFF(addr);
|