mudflap extention request

2006-01-23 Thread Herman ten Brugge
Hello, I recently debugged a program that had an array indexing problem. The simplified program is: typedef struct tst_struct { unsigned n; unsigned arr[3]; struct tst_struct *next; } tst; tst t = { 3, {0, 1, 2}, 0 }; int main (void) { t.arr[t.n++] = 3; } The 't.arr[t.n++]' overwrites the

mudflap cache question

2005-06-14 Thread Herman ten Brugge
I just read the mudflap pdf file and wanted to know how the cache was implemented. I looked at the code in mf-runtime.c and found the cache functions. The code for the __mf_uncache_object looks strange to me however. The code looks like: static void __mf_uncache_object (__mf_object_t *old_obj)

structures with zero length arrays

2005-05-08 Thread Herman ten Brugge
I have a question about structures with zero length arrays. Lets start with the example code: struct { char a; char b[]; } s = { 'a', "bc" }; char a[] = { 'a', 'b', 'c' }; int main(void) { printf("%d %d\n",sizeof(s),sizeof(a)); return 0; } When compiled with gcc the result is 1 3. I expecte

Re: new bounds-checking patches

2005-05-06 Thread Herman ten Brugge
Gerald Pfeifer wrote: On Fri, 6 May 2005, Herman ten Brugge wrote: I just released 2 new releases for gcc-3.3.6 and gcc-4.0.0 of my bounds-checking patch. The patches can be found on http://sourceforge.net/projects/boundschecking Can some one update the extension page (http://gcc.gnu.org

new bounds-checking patches

2005-05-06 Thread Herman ten Brugge
I just released 2 new releases for gcc-3.3.6 and gcc-4.0.0 of my bounds-checking patch. The patches can be found on http://sourceforge.net/projects/boundschecking Can some one update the extension page (http://gcc.gnu.org/extensions.html). This page still points to http://web.inter.NL.net/hcc/Haj