aboutsummaryrefslogtreecommitdiffstats
path: root/mps/code/root.c
diff options
context:
space:
mode:
authorRichard Brooksby2012-09-07 23:48:14 +0100
committerRichard Brooksby2012-09-07 23:48:14 +0100
commit5a604a2f5197e7c769638fadb98aa41d88faef7f (patch)
tree8ba711da58dfd437f2cac5499dc01c31c07b8197 /mps/code/root.c
parent6c887280e43265b347cdd9056c86271ad81e8c2a (diff)
downloademacs-5a604a2f5197e7c769638fadb98aa41d88faef7f.tar.gz
emacs-5a604a2f5197e7c769638fadb98aa41d88faef7f.zip
Fixing bugs introduced by type puns passed through scanning methods, discovered by offsetting mps_ss_s from the beginning of scanstatestruct.
Adding a pseudo-target "find-puns" which, on FreeBSD mostly, prints useful warnings about strict aliasing rule violations. Fixing more strict aliasing rule violations found by the above. Copied from Perforce Change: 179358 ServerID: perforce.ravenbrook.com
Diffstat (limited to 'mps/code/root.c')
-rw-r--r--mps/code/root.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/mps/code/root.c b/mps/code/root.c
index 9484c4bfa36..9ce385a124c 100644
--- a/mps/code/root.c
+++ b/mps/code/root.c
@@ -478,20 +478,20 @@ Res RootScan(ScanState ss, Root root)
478 break; 478 break;
479 479
480 case RootFUN: 480 case RootFUN:
481 res = (*root->the.fun.scan)(ss, root->the.fun.p, root->the.fun.s); 481 res = (*root->the.fun.scan)(&ss->ss_s, root->the.fun.p, root->the.fun.s);
482 if (res != ResOK) 482 if (res != ResOK)
483 goto failScan; 483 goto failScan;
484 break; 484 break;
485 485
486 case RootREG: 486 case RootREG:
487 res = (*root->the.reg.scan)(ss, root->the.reg.thread, 487 res = (*root->the.reg.scan)(&ss->ss_s, root->the.reg.thread,
488 root->the.reg.p, root->the.reg.s); 488 root->the.reg.p, root->the.reg.s);
489 if (res != ResOK) 489 if (res != ResOK)
490 goto failScan; 490 goto failScan;
491 break; 491 break;
492 492
493 case RootFMT: 493 case RootFMT:
494 res = (*root->the.fmt.scan)(ss, root->the.fmt.base, root->the.fmt.limit); 494 res = (*root->the.fmt.scan)(&ss->ss_s, root->the.fmt.base, root->the.fmt.limit);
495 ss->scannedSize += AddrOffset(root->the.fmt.base, root->the.fmt.limit); 495 ss->scannedSize += AddrOffset(root->the.fmt.base, root->the.fmt.limit);
496 if (res != ResOK) 496 if (res != ResOK)
497 goto failScan; 497 goto failScan;