]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Assert on any attempt to make a symbol a typedef for itself.
authorTom Hughes <tom@compton.nu>
Thu, 7 Oct 2004 08:21:38 +0000 (08:21 +0000)
committerTom Hughes <tom@compton.nu>
Thu, 7 Oct 2004 08:21:38 +0000 (08:21 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2732

coregrind/vg_symtypes.c

index 2018a3b48ebf0d66cac4d5a19503a344949ccd8d..52643ecd02074cd6f58df875cb4b0f931acca64a 100644 (file)
@@ -399,6 +399,7 @@ SymType *VG_(st_mktypedef)(SymType *st, Char *name, SymType *type)
 {
    st = alloc(st);
 
+   vg_assert(st != type);
    vg_assert(st->kind == TyUnresolved || st->kind == TyUnknown ||
             st->kind == TyStruct || st->kind == TyUnion ||
             st->kind == TyTypedef);