[svn:parrot] r48937 - trunk/src/gc
chromatic at svn.parrot.org
chromatic at svn.parrot.org
Sat Sep 11 18:25:37 UTC 2010
Author: chromatic
Date: Sat Sep 11 18:25:37 2010
New Revision: 48937
URL: https://trac.parrot.org/parrot/changeset/48937
Log:
[GC] Inverted the condition of r48936 for safety.
nwellnhof argued (correctly) that *reading* the flag of something which might
not be a PMC could read unmapped memory. Kablammo.
Modified:
trunk/src/gc/system.c
Modified: trunk/src/gc/system.c
==============================================================================
--- trunk/src/gc/system.c Sat Sep 11 17:46:57 2010 (r48936)
+++ trunk/src/gc/system.c Sat Sep 11 18:25:37 2010 (r48937)
@@ -525,8 +525,8 @@
is_pmc_ptr(ARGIN(const Memory_Pools *mem_pools), ARGIN(const void *ptr))
{
ASSERT_ARGS(is_pmc_ptr)
- return PObj_is_PMC_TEST((PObj *)ptr)
- && contained_in_pool(mem_pools->pmc_pool, ptr);
+ return contained_in_pool(mem_pools->pmc_pool, ptr)
+ && PObj_is_PMC_TEST((PObj *)ptr);
}
More information about the parrot-commits
mailing list