OSDN Git Service

6c3d219bfcfef89e219f9cbf46db210a60bfb5d9
[pf3gnuchains/gcc-fork.git] / libmudflap / ChangeLog
1 2005-09-29  James E. Wilson  <wilson@specifix.com>
2
3         * mf-hooks1.c (__mf_0fn_mmap, mmap, __mf_0fn_munmap, munmap): Protect
4         with HAVE_MMAP ifdef.
5
6 2005-09-23  Frank Ch. Eigler  <fche@elastic.org>
7
8         PR 23084.
9         * mf-hooks2.c (accept): Tolerate NULL sockaddr* parameter.
10
11 2005-09-23  Frank Ch. Eigler  <fche@elastic.org>
12
13         * testsuite/libmudflap.c++/pass58-frag.cxx: New test for heisenbug 19319.
14
15 2005-09-23  Tom Tromey  <tromey@redhat.com>
16
17         * aclocal.m4, configure: Rebuilt.
18         * configure.ac: Use GCC_CHECK_TLS.
19         * acinclude.m4 (LIBMUDFLAP_CHECK_TLS, LIBMUDFLAP_ENABLE): Moved
20         to ../config.
21
22 2005-08-22  Jim Wilson  <wilson@specifix.com>
23
24         * mf-hooks2.c (MF_REGISTER_fopen): Define to __MF_TYPE_STATIC when
25         __FreeBSD__ is defined.
26
27 2005-08-17  Jim Wilson  <wilson@specifix.com>
28
29         * mf-hooks1.c (malloc, calloc, realloc, free,
30         __mf_wrap_alloca_indirect): Call BEGIN_MALLOC_PROTECT before calling
31         the real routines, and END_MALLOC_PROTECT afterwards.
32         * mf-impl.h (enum __mf_state_enum): Expand comment.  Add in_malloc.
33         (BEGIN_PROTECT): Handle in_malloc state.
34         (BEGIN_MALLOC_PROTECT, END_MALLOC_PROTECT): New.
35         * testsuite/libmudflap.c/hook2-allocstuff.c: New.
36
37 2005-08-17  Kelley Cook  <kcook@gcc.gnu.org>
38
39         * All files: Update FSF address.
40
41 2005-08-15  Ulrich Weigand  <weigand@informatik.uni-erlangen.de>
42
43         * mf-hooks3.c (main_seen_p): Remove.
44         (__mf_get_state): Remove attempt to recognize the main thread.
45
46 2005-08-15  Maciej W. Rozycki  <macro@linux-mips.org>
47
48         * configure.ac: Test for the name of the symbol used for the entry
49         point; define ENTRY_POINT to the result.
50         * configure: Regenerate.
51         * config.h.in: Regenerate.
52         * mf-heuristics.c: Replace _start with ENTRY_POINT throughout.
53
54 2005-08-14  Ulrich Weigand  <weigand@informatik.uni-erlangen.de>
55
56         * mf-runtime.c (__mf_state_1): Initialize to reentrant.
57         (__mf_init): Set thread state active.
58         * mf-hooks3.c (__mf_pthread_spawner): Always set thread
59         state active.
60         (pthread_create wrapper): Always use thread spawner.
61
62         * testsuite/libmudflap.cth/pass37-frag.c: Increase timeout.
63         * testsuite/libmudflap.cth/pass39-frag.c: Likewise.
64
65 2005-07-16  Richard Henderson  <rth@redhat.com>
66
67         * acinclude.m4: New file.
68         * configure.ac: Invoke LIBMUDFLAP_CHECK_TLS.
69         * configure, config.h.in, Makefile.in, testsuite/Makefile.in: Rebuild.
70         * mf-hooks1.c (__mf_0fn_malloc): Move body from ...
71         (__mf_0fn_calloc): ... here.
72         * mf-hooks3.c (struct pthread_info): Remove.
73         (__mf_pthread_info, __mf_pthread_info_idx): Remove.
74         (LIBMUDFLAPTH_THREADS_MAX): Set to 1021.
75         (struct mf_thread_data): New.
76         (mf_thread_data, mf_thread_data_lock): New.
77         (__mf_allocate_blank_threadinfo): Remove.
78         (__mf_find_threadinfo): Rewrite and simplify.  Only use if TLS is
79         not available.
80         (__mf_state_perthread): Remove.
81         (__mf_get_state, __mf_set_state): New.
82         (__mf_pthread_cleanup): Use &errno, rather than saved pointer.
83         Update mf_thread_data killing procedure.
84         (__mf_pthread_spawner): Similarly.
85         (__mf_0fn_pthread_create): Only use wrapper if necessary.  Remove
86         code to allocate thread stack space.
87         (__mf_0fn_pthread_join, pthread_join): Remove.
88         (__mf_0fn_pthread_exit, pthread_exit): Remove.
89         * mf-impl.h (dyn_pthread_join, dyn_pthread_exit): Remove.
90         (__mf_state_1): Rename from __mf_state; use TLS when available.
91         (__mf_get_state, __mf_set_state): New.  Update all users.
92         * mf-runtime.c (begin_recursion_protect1): New.
93         (BEGIN_RECURSION_PROTECT): Use it.
94         (__mf_state_1): Rename from __mf_state; use TLS when available.
95         (threads_active_p): Remove.
96         (__mf_usage): Compute it directly.
97
98 2005-06-19  Ulrich Weigand  <uweigand@de.ibm.com>
99
100         * testsuite/libmudflap.c/externs-1.c (main): Add return statement.
101
102 2005-06-15  Frank Ch. Eigler  <fche@redhat.com>
103
104         Fix for uncaching bug reported by Herman ten Brugge.
105         * mf-runtime.c (__mf_uncache_object): Search whole cache.
106         * testsuite/libmudflap.c/fail40-frag.c: New test.
107
108 2005-05-23  Alfred M. Szmidt  <ams@gnu.org>
109
110         PR libmudflap/21724
111         * Makefile.am (AM_MAKEFLAGS): Pass includedir.
112         * Makefile.in: Amend.
113
114 2005-06-14  Frank Ch. Eigler  <fche@redhat.com>
115
116         PR mudflap/21023
117         * testsuite/libmudflap.c/externs.exp, externs-{1,2}.c: New test files.
118         * testsuite/libmudflap.c/cfrags.exp: Bypass new sources.
119
120 2005-06-14  Frank Ch. Eigler  <fche@redhat.com>
121
122         PR libmudflap/21094
123         * testsuite/libmudflap.c++/*.exp: Assert build tree g++.
124
125 2005-06-14  Frank Ch. Eigler  <fche@redhat.com>
126
127         PR mudflap/22064
128         * mf-impl.h (mudflap_mode, violation_mode): Make these ordinary
129         unsigned vars with #defines instead of enums.
130
131 2005-05-09  Mike Stump  <mrs@apple.com>
132
133         * configure: Regenerate.
134
135 2005-04-12  Mike Stump  <mrs@apple.com>
136
137         * configure: Regenerate.
138
139 2005-04-12  Frank Ch. Eigler  <fche@redhat.com>
140
141         PR mudflap/19266
142         * testsuite/libmudflap.c++/c++frags.exp: Also test -O permutation.
143         * testsuite/libmudflap.c++/pass57-frag.cxx: New test.
144
145 2005-04-04  Alan Modra  <amodra@bigpond.net.au>
146
147         * mf-runtime.c (__mfu_unregister): Warning fix for char unsigned.
148
149 2005-03-31  Mike Stump  <mrs@apple.com>
150
151         * mf-runtime.h: Add libmudflap copyright clause.
152
153 2005-03-21  Mike Stump  <mrs@apple.com>
154
155         * mf-heuristics.c: Fix whitespace at end of line.
156         * mf-hooks1.c: Likewise.
157         * mf-hooks2.c: Likewise.
158         * mf-hooks3.c: Likewise.
159         * mf-impl.h: Likewise.
160         * mf-runtime.c: Likewise.
161         * mf-runtime.h: Likewise.
162
163 2005-03-21  Zack Weinberg  <zack@codesourcery.com>
164
165         * configure.ac: Do not invoke TL_AC_GCC_VERSION.
166         In all substitutions, expand gcc_version in Makefile.
167         * aclocal.m4, configure: Regenerate.
168         * Makefile.am: Set gcc_version.
169         * Makefile.in, testsuite/Makefile.in: Regenerate.
170
171 2005-03-17  Frank Ch. Eigler  <fche@redhat.com>
172
173         * mf-runtime.c (__mfu_check): Respect ignore_reads configuration.
174         * testsuite/libmudflap.c/{pass56,fail39}-frag.c: New tests.
175
176 2005-02-13  Frank Ch. Eigler  <fche@redhat.com>
177
178         PR mudflap/19319
179         * testsuite/libmudflap.c++/pass55-frag.c: New test.
180
181 2005-01-05  Richard Henderson  <rth@redhat.com>
182
183         * testsuite/libmudflap.c/pass32-frag.c: Fix typo.
184
185 2005-01-02  Greg McGary  <greg@mcgary.org>
186
187         * mf-impl.h (uintptr_t): Get typedef via stdint.h or define explicitly.
188         * mf-runtime.h: New file, replaces mf-runtime.h.in.
189         * configure.ac (AC_CONFIG_FILES): mf-runtime.h is no longer generated.
190         * Makefile.in: Ditto.
191         * testsuite/lib/libmudflap.exp: Add -I${srcdir}/.. to get mf-runtime.h
192         * testsuite/libmudflap.c/pass32-frag.c: s/uintptr_t/__mf_uintptr_t/
193         * testsuite/libmudflap.c/fail36-frag.c: New test.
194         * testsuite/libmudflap.c/fail37-frag.c: New test.
195         * testsuite/libmudflap.c/fail38-frag.c: New test.
196
197 2004-12-08  Kelley Cook  <kcook@gcc.gnu.org>
198
199         * Makefile.am: Add ../config to ACLOCAL_AMFLAGS.
200         * aclocal.m4, Makefile.in, testsuite/Makefile.in: Regenerate.
201
202 2004-12-02  Richard Sandiford  <rsandifo@redhat.com>
203
204         * configure.ac: Use TL_AC_GCC_VERSION to set gcc_version.
205         * aclocal.m4: Include ../config/gcc-version.m4.
206         * configure, Makefile.in, testsuite/Makefile.in: Regenerate.
207
208 2004-11-29  Kelley Cook  <kcook@gcc.gnu.org>
209
210         * Makefile.am: Define ACLOCAL_AMFLAGS.
211         * acinclude.m4: Remove.
212         * stamp-h.in: Remove superfluous stamp file.
213         * aclocal.m4, configure, Makefile.in: Regenerate.
214         * testsuite/Makefile.in: Likewise.
215
216 2004-11-24  Kelley Cook  <kcook@gcc.gnu.org>
217
218         * Makefile.am: Revert previous.
219         * acinclude.m4: Restore.
220         * aclocal.m4, configure, Makefile.in: Regenerate.
221         * testsuite/Makefile.in: Likewise.
222
223 2004-11-24  Kelley Cook  <kcook@gcc.gnu.org>
224
225         * Makefile.am: Define ACLOCAL_AMFLAGS.
226         * acinclude.m4: Remove.
227         * aclocal.m4, configure, Makefile.in: Regenerate.
228         * testsuite/Makefile.in: Likewise.
229
230 2004-11-23  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
231
232         * testsuite/lib/libmudflap.exp: Use new procs in target-libpath.exp.
233
234 2004-11-23  Kelley Cook  <kcook@gcc.gnu.org>
235
236         * Makefile.in, configure, aclocal.m4: Regenerate with automake 1.9.3.
237         * testsuite/Makefile.in: Likewise.
238
239 2004-11-01  Andreas Schwab  <schwab@suse.de>
240
241         * configure.ac: (target_alias): Default to $host_alias, not
242         $target.
243         * configure: Regenerated.
244
245 2004-10-28  Frank Ch. Eigler  <fche@redhat.com>
246
247         * testsuite/libmudflap.c/fail35-,pass53-,pass54-frag.c: New tests.
248         * testsuite/libmudflap.c/pass35-frag.c: Correct embedded warning
249         message.
250
251 2004-10-25  Eric Botcazou  <ebotcazou@libertysurf.fr>
252
253         PR other/18138
254         * testsuite/lib/libmudflap.exp: Accept more than one multilib libgcc.
255
256 2004-10-12  Frank Ch. Eigler  <fche@redhat.com>
257
258         * configure.ac: Check for more headers, functions.
259         * mf-hooks2.c (mkbuffer, unmkbuffer): New helper functions for
260         tracking overridden FILE buffers.
261         (fopen, setvbuf): New/revised hook functions for buffer overriding.
262         (setbuf,setlinebuf,fdopen,freopen,fopen64,freopen64,fclose): Ditto.
263         (fflush): Accept given NULL stream (means "all streams").
264         * mf-runtime.h.in:
265         * mf-runtime.c (__mfu_check): Accept accesses that span adjacent
266         HEAP/GUESS objects.
267         (LOOKUP_CACHE_SIZE_MAX): Raise to 64K entries tentatively.
268         (__mf_adapt_cache): Use them all.
269         * testsuite/libmudflap.c/pass35-frag.c: Update warning message.
270         * testsuite/libmudflap.c++/ctors.exp: Ditto.
271         * testsuite/libmudflap.c/{pass51,pass52}-frag.c: New tests.
272         * configure, config.h.in: Regenerated.
273
274 2004-10-05  Frank Ch. Eigler  <fche@redhat.com>
275
276         * configure.ac: Checking for sys/socket.h once is enough.
277         * configure: Regenerated.
278
279 2004-10-04  Frank Ch. Eigler  <fche@redhat.com>
280
281         * configure.ac: Look for more headers & functions.
282         * mf-hooks2.c (getmntent, inet_ntoa, getproto*): New wrapper functions.
283         * mf-runtime.h.in: Add new "#pragma redefine_extname"s for them.
284         * mf-runtime.c (options): Clean up integer signedness warnings.
285         (main): Add a declaration to fix a warning.
286         * mf-hooks3.c (pthread_exit): Add not-reached exit() to wrapper.
287         * configure, config.h.in: Regenerated.
288
289 2004-10-02  Frank Ch. Eigler  <fche@redhat.com>
290
291         * testsuite/libmudflap.c/pass50-frag.c, fail33-frag.c, fail34-frag.c:
292         New tests for proper base/limit checking for aggregates.
293
294 2004-09-15  Joseph S. Myers  <jsm@polyomino.org.uk>
295
296         * testsuite/libmudflap.c/pass35-frag.c: Update expected message.
297
298 2004-09-07  Frank Ch. Eigler  <fche@redhat.com>
299
300         * configure.ac: Look for pwd.h, grp.h, netdb.h headers and functions.
301         * mf-hooks2.c (strerror): Unregister previous string returned by
302         previous strerror.
303         (getlogin,cuserid,getpwnam,getpwuid,getgrnam,getgrgid): New wrappers.
304         (getservent,getservbyname,getservbyport,gai_strerror): Ditto.
305         * mf-runtime.h.in: Add redefine_extname pragmas for them all.
306         * mf-runtime.c (__mf_describe_object): Clarify object life status.
307         * testsuite/libmudflap.c/pass48-frag.c, pass49-frag.c, fail32-frag.c:
308         New tests.
309         * configure, config.h.in: Regenerated.
310
311 2004-08-03  Dale Johannesen  <dalej@apple.com>
312
313          * mf-runtime.c: Conditionalize POSIX_SOURCE for Darwin.
314
315 2004-08-03  Frank Ch. Eigler  <fche@redhat.com>
316
317         * mf-runtime.c (compare_uintptr_t): Remove function.  Inline
318         simplified contents in all former callers.
319
320 2004-07-27  Ulrich Weigand  <weigand@informatik.uni-erlangen.de>
321
322         * mf-runtime.c (__mf_fini): Set mudflap_mode to mode_nop in
323         the statically linked case.
324
325 2004-07-27  Frank Ch. Eigler  <fche@redhat.com>
326
327         * splay-tree.[ch]: Remove.  Merge contents into ...
328         * mf-runtime.c: ... here, renaming symbols and making all functions
329         static.  Remove unused min/max functions.
330         * Makefile.am: Forget about splay-tree.[ch].
331         * Makefile.in, testsuite/Makefile.in: Regenerated.
332
333 2004-07-21  Frank Ch. Eigler  <fche@redhat.com>
334
335         * mf-runtime.c (__mfu_check): Remove mistaken mode-nop handling.
336         (__mfu_usage): Include (C) 2004.
337         * mf-hooks3.c (__mf_find_threadinfo): Don't call tracing functions
338         here.  Include a comment explaining why.
339
340 2004-07-20  Frank Ch. Eigler  <fche@redhat.com>
341
342         * mf-impl.h (__mf_options): Add ignore_reads and timestamps fields.
343         * mf-runtime.c (options): Give them a name.
344         (__mf_set_default_options): Set them.
345         (__mf_insert_new_object, __mfu_unregister): Optionalize timestamps.
346         (__mf_violation): Warning cleanup.
347         * mf-impl.h (MF_VALIDATE_EXTENT): Support ignore_reads option.
348         * splay-tree.c (splay_tree_delete_helper): Remove obsolete decl.
349
350 2004-07-15  Frank Ch. Eigler  <fche@redhat.com>
351
352         g++/15861
353         * mf-runtime.c (__mf_init): Make it non-static.  Tolerate
354         repeated invocation.
355
356 2004-07-09  Frank Ch. Eigler  <fche@redhat.com>
357
358         Test case for g++/15861
359         * testsuite/libmudflap.c++/ctors-[12].cxx: New test case halves.
360         * testsuite/libmudflap.c++/ctors.exp: Driver.
361         * testsuite/libmudflap.c++/c++frags.exp: Elide redundant default.
362         Look only for *frag* test cases.
363
364 2004-07-08  Frank Ch. Eigler  <fche@redhat.com>
365
366         ANSI C conversion, libmudflap specialization, recursion limiting.
367         * splay-tree.h (splay_tree_{de,}allocate_fn): Remove allocation_data
368         argument and indirection function pointers, update callers.
369         (splay_tree_s): Add statistics and recursion control fields
370         num_keys, max_depth, depth, rebalance_p.
371         * splay-tree.c (splay_tree_splay_helper): Track recursion depth.
372         Back out of search if it exceeds limit.
373         (splay_tree_splay): Manage recursion limiting with rebalancing as
374         needed.
375         (splay_tree_new): More initialization.
376         (splay_tree_rebalance): New function.
377         (splay_tree_foreach): Rewrite using nonrecursive logic.
378         (splay_tree_xmalloc_allocate, splay_tree_xmalloc_deallocate):
379         Remove.  Point indirect calls to mf-runtime.c's routines.
380         (splay_tree_compare_ints, splay_tree_compare_pointers): Remove unused
381         functions.
382         (splay_tree_delete, splay_tree_delete_helper): Ditto.
383         * testsuite/heap-scalestress.c: New test based on one from
384         Eyal Lebedinsky <eyal@eyal.emu.id.au>:
385
386 2004-07-05  Matthias Klose  <doko@debian.org>
387
388         * libtool-version: New.
389         * Makefile.am (libmudflap_la_LDFLAGS, libmudflapth_la_LDFLAGS):
390         Use -version-info for soname.
391         * Makefile.in: Regenerate.
392         * configure.ac: Remove libtool_VERSION macro
393         * configure: Regenerate
394
395 2004-07-05  Zack Weinberg  <zack@codesourcery.com>
396
397         * mf-runtime.h.in: Wrap declarations of struct __mf_cache,
398         __mf_lookup_cache, __mf_lc_mask, or __mf_lc_shift in
399         #ifndef _MUDFLAP.
400
401 2004-06-29  Frank Ch. Eigler  <fche@redhat.com>
402
403         Splay tree implementation fork.
404         * splay-tree.c, splay-tree.h: Copied & modified from libiberty.
405         Use hard-coded comparison function for uintptr_t.  Remove key/value
406         deallocation logic.  Cache last splayed key for consecutive lookups.
407         * Makefile.am, Makefile.in: Use them, don't link to them.
408         * mf-runtime.c (__mf_object_tree): Adapt to simpler splay_tree_new.
409         (__mf_find_objects2): Flip successor/predecessor search sequence.
410         * ansidecl.h, libiberty.h: Removed dummy files.
411
412 2004-06-29  Nick Clifton  <nickc@redhat.com>
413
414         * configure.ac (AC_CHECK_HEADERS): Add dirent.h
415         * configure: Regenerate.
416         * mf-hooks2.c: Surround uses of dirent.h with #ifdef
417         HAVE_DIRENT_H.
418         Remove spurious inclusion of <strings.h>.
419
420 2004-06-29  Nick Clifton  <nickc@redhat.com>
421
422         * mf-runtime.c (pthread_join): Only apply the weak pragma if the
423         function actually exists.
424
425 2004-06-25  Frank Ch. Eigler  <fche@redhat.com>
426
427         * ansidecl.h, libiberty.h: New dummy files for building splay-tree.
428         * config.h.in: Regenerated.
429
430 2004-06-24  Frank Ch. Eigler  <fche@redhat.com>
431
432         Adopt splay trees for object database.
433         * Makefile.am: Copy splay-tree.* from libiberty.
434         * Makefile.in, testsuite/Makefile.in: Regenerated.
435         * mf-runtime.h.in (__mf_unregister): Add third parameter (type).
436         * mf-hooks[123].c (*): Add new third parameter to mf_unregister.
437         * mf-impl.h (BEGIN_PROTECT): Remove some trace text.
438         * mf-runtime.c: Rewrite code dealing with object database to use
439         libiberty splay trees.  Remove tree liveness aging option.
440         * testsuite/libmudflap.c/fail18-frag.c: Add volatile flag.
441
442 2004-06-15  Paolo Bonzini  <bonzini@gnu.org>
443
444         * configure.ac: New name of configure.in.  Update
445         AC_INIT, AC_CONFIG_SRCDIR, AC_CONFIG_HEADERS, AC_CONFIG_FILES,
446         AC_OUTPUT, AM_INIT_AUTOMAKE to the preferred style for
447         Autoconf 2.5x and Automake 1.7 or later.
448         * configure.in: Remove.
449         * configure: Regenerate.
450
451         * Makefile.am: Remove useless multilib rules.
452         * Makefile.in: Regenerate.
453
454 2004-06-15  Paolo Bonzini  <bonzini@gnu.org>
455
456         * .cvsignore: New file.
457
458 2004-06-10  Stephen Crowley  <stephen.crowley@sbcglobal.net>
459
460         PR libmudflap/13505
461         * mf-hooks2.c (semctl): Add cygwin porting hack.
462
463 2004-06-09  Frank Ch. Eigler  <fche@redhat.com>
464
465         ctype support.
466         * configure.in: Look for ctype header and glibc implementation.
467         * mf-hooks2.c (__ctype_{b,toupper,tolower}_loc): Sample ctype
468         array hooks for glibc 2.3.
469         * mf-runtime.h.in: Wrap them.
470         * mf-runtime.c (__mf_init): Leave marker regarding other ctype
471         implementations.
472         * testsuite/libmudflap.c/pass47-frag.c: New test.
473         * configure, config.h.in: Regenerated.
474
475 2004-06-04  Frank Ch. Eigler  <fche@redhat.com>
476
477         Portability improvements, e.g., libmudflap/15293.
478         * configure.in: Look for glibc extension functions.  Look for
479         support of -f{function,data}-sections.  Look for more headers.
480         Create testsuite/mfconfig.exp.  Correct more "test x.." thinkos.
481         * Makefile.am: Use $(SECTION_FLAGS).  Collapse piecemeal-compiled
482         mf-hooks* into usual single object per source.
483         * mf-hooks*.c: Remove all #if WRAP_foo conditionals.
484         * mf-hooks2.c: #include a bunch more system headers.  Define strnlen
485         if system doesn't provide one.
486         * mf-hooks3.c (struct pthread_info): Add stack_*_alloc fields.
487         (pthread_create): Use it to properly GC dead thread stacks.
488         * mf-runtime.c (__mf_violation): Correct snprintf type warning.
489         * testsuite/Makefile.am: Stop generating site.exp.
490         * testsuite/mfconfig.exp.in: New file.
491         * testsuite/config/default.exp: Load new mfconfig.exp.
492         * testsuite/lib/libmudflap.exp (libmudflap-init): Add extra libraries.
493         (prune_gcc_output): Add glibc static linking warnings.
494         * testsuite/libmudflap.*/*frags.exp: Enumerate needed -lmudflap* libs.
495         * testsuite/libmudflap.c/pass46-frag.c: Ditto.
496         * configure, Makefile, aclocal.m4, config.h.in, testsuite/Makefile.in:
497         Regenerated with autoconf 2.57 and automake 1.7.
498
499 2004-06-04  Per Bothner  <per@bothner.com>
500
501         * configure.in (LIBMUDFLAPTH):  Fix thinko.
502
503         * configure.in:  Check for more headers.
504         * mf-hooks2.c:  Conditionalize on HAVE_SYS_SOCKET_H etc.
505
506         * mf-runtime.c:  In two places conditionalize on SIUSR1 rather than
507         HAVE_SIGNAL as mingw has signal.h but not SIUSR1.
508
509 2004-06-01  Andreas Jaeger  <aj@suse.de>
510
511         * configure.in: Handle multilibs, support
512         --enable-version-specific-runtime-libs.
513         * Makefile.am (lib_LTLIBRARIES): Rename to ...
514         (toolexeclib_LTLIBRARIES): this for multilib support.
515         * Makefile.in: Regenerated.
516         * configure: Regenerated.
517         * aclocal.m4: Regenerated.
518         * config.h.in: Regenerated.
519         * testsuite/Makefile.in: Regenerated.
520
521 2004-06-01  Andreas Jaeger  <aj@suse.de>
522
523         * testsuite/lib/libmudflap.exp (libmudflap-init): Handle
524         multilibs, using multilib directory instead of hardcoded path.
525         Set LD_RUN_PATH.
526
527 2004-05-21  Frank Ch. Eigler  <fche@redhat.com>
528
529         * Makefile.am (AM_MAKEFLAGS): Pass RUNTESTFLAGS.
530         * Makefile.in: Ditto.
531
532 2004-05-18  Kaz Kojima  <kkojima@gcc.gnu.org>
533
534         * acinclude.m4 (lt_cv_deplibs_check_method): Use pass_all on sh*.
535         * aclocal.m4, configure: Rebuilt.
536
537 2004-05-17  Frank Ch. Eigler  <fche@redhat.com>
538
539         * lib/libmudflap.exp (libmudflap-init): For C++ test cases only,
540         import some build settings from libstdc++-v3 testsuite_flags.
541         * .../cfrags.exp, .../c++frags.exp, .../cthfrags.exp: Corresponding
542         changes to pass test language.
543
544         * mf-runtime.c (__mfu_check): Poison the cache with antidote for
545         quicker mode-nop handling.
546
547 2004-03-25  Frank Ch. Eigler  <fche@redhat.com>
548
549         * mf-impl.h: Added libgcc license header.
550
551 2004-03-20  Frank Ch. Eigler  <fche@redhat.com>
552
553         * mf-hooks[123].c, mf-runtime.c, mf-heuristics.c:
554         Added libgcc license header.
555         * mf-hooks3.c (__mf_0fn_pthread_create): Correct arg constness.
556         (pthread_create): Simplify stack allocation syntax.
557
558 2004-03-08  Loren J. Rittle  <ljrittle@acm.org>
559
560         * mf-hooks2.c: Support FreeBSD.
561         (WRAP_gets): Avoid gets().
562         * testsuite/libmudflap.c/pass-stratcliff.c: Do not
563         test unimplemented mem/str calls on FreeBSD.
564         * testsuite/libmudflap.c/pass21-frag.c: Do not include
565         <alloca.h> on FreeBSD.
566
567 2004-01-30  Frank Ch. Eigler  <fche@redhat.com>
568
569         * testsuite/libmudflap.c/pass36-frag.c: Add missing free() call.
570         * testsuite/libmudflap.c/pass46-frag.c: New test for -fmudflapir.
571         * testsuite/libmudflap.cth/cthfrags.exp: Add -DSTATIC to compiler
572         flags for static linking permutation.
573         * testsuite/libmudflap.cth/pass40-frag.c: When -DSTATIC, avoid
574         some pthreads code that croaks on linux glibc tls.
575
576 2004-01-27  Frank Ch. Eigler  <fche@redhat.com>
577
578         * testsuite/libmudflap.c/fail31-frag.c, pass45-frag.c: New tests.
579
580 2004-01-15  Frank Ch. Eigler  <fche@redhat.com>
581
582         * testsuite/libmudflap.c/pass44-frag.c: New test.
583
584 2004-01-12  Frank Ch. Eigler  <fche@redhat.com>
585
586         * testsuite/libmudflap.c/fail{28,29,30}-frag.c: New tests.
587
588 2004-01-08  Frank Ch. Eigler  <fche@redhat.com>
589
590         * testsuite/libmudflap.c/pass43-frag.c: Added missing program rc.
591
592 2003-12-11  Frank Ch. Eigler  <fche@redhat.com>
593
594         * testsuite/libmudflap.c/pass42-frag.c, pass43-frag.c: New tests.
595
596 2003-12-08  Andrew Pinski  <pinskia@physics.uc.edu>
597
598         PR libmudflap/12670
599         * configure.in: Add check for see if
600         socklen_t typedef is in sys/socket.h.
601         * mf-hooks1.c: Add define if socklen_t
602         is not typedef.
603         * mf-hooks2.c: Likewise.
604         * mf-hooks3.c: Likewise.
605         * config.h.in: Regen.
606         * configure: Regen.
607
608 2003-12-08  Frank Ch. Eigler  <fche@redhat.com>
609
610         * mf-runtime.c (__mf_watch_or_not): Tweak tracing message.
611         * testsuite/libmudflap.c/fail21-frag.c: Defeat aliasing
612         optimizations.
613         * testsuite/libmudflap.c/pass25-frag.c: Ditto.
614         * testsuite/libmudflap.c/pass26-frag.c: Tolerate non-overlapping
615         (unoptimized) allocation of stack space.
616
617 2003-12-07  Richard Henderson  <rth@redhat.com>
618
619         * testsuite/libmudflap.c/fail23-frag.c (main): Adjust addend to 11.
620         * testsuite/libmudflap.c/fail27-frag.c (foo): Mark noinline.
621
622 2003-12-06  Andrew Pinski <apinski@apple.com>
623
624         partial PR libmudflap/12670
625         * mf-hooks1.c: Respect Darwin checks.  Conditionalize POSIX_SOURCE.
626         * mf-hooks2.c: Likewise.
627         * mf-hooks3.c: Likewise.
628
629 2003-11-19  Frank Ch. Eigler  <fche@redhat.com>
630
631         libstdc++/11696
632         * mf-runtime.h.in: Switch to #pragma redefine_extname for
633         symbols interposed at compile time.
634         * testsuite/libmudflap.c++/pass41-frag.cxx: New test.
635
636         libmudflap/12939
637         * mf-hooks2.c (semctl): Tolerate FreeBSD.
638
639         * configure.in: Reorganize check for <pthread.h>.
640         * configure: Regenerated.
641
642 2003-11-04  David Edelsohn  <edelsohn@gnu.org>
643
644         * mf-runtime.c (_ALL_SOURCE): Define for AIX.
645         (_LARGE_FILE_API): Define for AIX.
646         * mf-hooks[123]: Same.
647         (_XOPEN_SOURCE_EXTENDED): Define to 1 for AIX.
648
649 2003-10-21  David Edelsohn  <edelsohn@gnu.org>
650
651         * mf-runtime.c (_XOPEN_SOURCE_EXTENDED): Define to 1 for AIX.
652
653 2003-07-29  Frank Ch. Eigler  <fche@redhat.com>
654
655         2003-07-29  Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
656
657         * configure.in: Update check for union semun.
658
659 2003-07-29  Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
660
661         PR other/11673
662         * mf-hooks2.c [WRAP_semctl]: Fix check for HAVE_UNION_SEMUN.
663
664 2003-07-29  Frank Ch. Eigler  <fche@redhat.com>
665
666         PR other/11673
667         * configure.in: Add checks for 64-bit LFS functions, struct semun
668         definition, for BSD compatibility.
669         * mf-hooks1.c: Respect BSD checks.  Conditionalize POSIX_SOURCE.
670         * mf-hooks2.c: Ditto.  Include <strings.h> for bcmp* decls.
671         * mf-hooks3.c: Ditto.
672         (pthread_create): Try MAP_ANON on platforms without the MAP_ANONYMOUS
673         mmap flag.
674         * configure, config.h.in: Regenerated.
675
676 2003-07-23  Frank Ch. Eigler  <fche@redhat.com>
677
678         Multithreading fixes:
679         * mf-runtime.c (__mf_object): Store allocating/deallocating
680         thread id.
681         (options): Support new "-thread-stack" option.
682         Rename "-heur-argv-environ" option to "-heur-stdlib".
683         Disable "-lc-mask" and "-lc-shift" options.
684         (__mf_dynamic): Add function pointers for pthread_join/_exit.
685         (__assert_fail): New self-contained function for glibc.
686         * mf-hooks3.c: Essentially rewritten, particularly related to
687         use of __mf_pthread_info array.
688         (pthread_join, _exit): New hook functions.
689         * mf-impl.h (BEGIN_PROTECT): Handle starting_p case.
690         * testsuite/libmudflap.cth/pass40-frag.c: New test.
691
692         Warning cleanups:
693         * mf-heuristics.c: Add type casts for tracing, sub calls.
694         * mf-impl.h (BEGIN_PROTECT): Redefine to omit result type.
695         Update all callers to declare explicit result holder.
696         (END_PROTECT): Removed.
697         * testsuite/*/*frags.exp: Clean up default MUDFLAP_OPTIONS.
698
699 2003-07-15  Diego Novillo  <dnovillo@redhat.com>
700
701         * testsuite/libmudflap.c/fail21-frag.c: Add volatile modifiers.
702         * testsuite/libmudflap.c/fail15-frag.c: Likewise.
703         * testsuite/libmudflap.c/fail13-frag.c: Likewise.
704
705 2003-07-04  Frank Ch. Eigler  <fche@redhat.com>
706
707         * mf-hooks1.c, 2.c, 3.c: New file, splits up content from old ...
708         * mf-hooks: Removed.
709         * mf-impl.h (MF_VALIDATE_EXTENT, BEGIN_PROTECT, END_PROTECT):
710         Move these macros from old mf-hooks.c here.
711         * Makefile.am: Adapt to split-up hook sources for faster builds.
712         * Makefile.in: Regenerated.
713
714         * mf-heuristics.c: Remove #if-0 block.
715
716         * mf-impl.h (__mf_state): Reorganize declaration and implementation.
717         (__mf_starting_p): New state only for use while dlsym bootstrapping.
718         (CALL_REAL, __mf_init): Corresponding changes.
719         (TRACE, VERBOSE_TRACE): Include thread id and "mf:" prefix.  Update
720         all callers to remove redundant "mf:" prefix.
721         * mf-runtime.h.in: #define a few reentrancy macros for libmudflapth.
722         * mf-hooks3.c: Rewrite chunks to support per-thread __mf_state value.
723         (__mf_pthread_info): Become a hash table.
724
725         * testsuite/lib/mfdg.exp: Support new "dg-timeout" and
726         "dg-repetitions" directives to control test case execution.
727         * testsuite/libmudflap.cth/pass37-frag.c: Add timeout and repeat
728         options.
729         * testsuite/libmudflap.cth/pass39-frag.c: Ditto for this new test.
730
731 2003-06-25  Frank Ch. Eigler  <fche@redhat.com>
732
733         * mf-hooks.c (alloca): Separate into stub.
734         (__mf_wrap_alloca_indirect): New function.  Use CALL_REAL
735         malloc/free for alloca blocks.
736         (pthread_create): Tolerate failing pthread_attr_get* calls.
737         * mf-runtime.c (__mf_fini): Call __mf_wrap_alloca_indirect.
738         * mf-impl.h (CALL_WRAP): Remove macro.
739         * testsuite/libmudflap.c/pass21-frag.c: Include <alloca.h>.
740         * testsuite/libmudflap.c/pass23-frag.c: Include more struct
741         padding for ia64 BIT_FIELD_REF constructs.
742
743 2003-06-19  Frank Ch. Eigler  <fche@redhat.com>
744
745         * mf-hooks.c (struct pthread_info): Add "thread_errno" field.
746         (__mf_pthread_spawner, __mf_pthread_cleanup): Use it with GUESS
747         libmudflap object type.
748         * mf-runtime.c (__mfu_unregister): Correct cemetary logic to avoid
749         crashes on unregistering STATIC objects.
750
751 2003-06-17  Frank Ch. Eigler  <fche@redhat.com>
752
753         Based on patch from Eyal Lebedinsky <eyal@eyal.emu.id.au>:
754         * mf-hooks.c (__mf_pthread_spawner): Register thread errno.
755         (time, strerror, fopen, fopen64, fclose, fread): New hooks.
756         (fwrite, fgetc, fgets, getc, gets, ungetc, fputc): New hooks.
757         (fputs, putc, puts, clearerr, feof, ferror, fileno): New hooks.
758         (printf, fprintf, sprintf, snprintf, vprintf, vfprintf): New hooks.
759         (vsprintf, vsnprintf, access, remove, fflush, fseek): New hooks.
760         (fseeko64, ftell, ftello64, rewind, fgetpos, fsetpos): New hooks.
761         (stat, stat64, fstat, lstat, mkfifo, setvbuf, setbuf): New hooks.
762         (setvbuf, opendir, closedir, readdir, recv, recvfrom): New hooks.
763         (recvmsg, send, sendto, sendmsg, setsockopt, getsockopt): New hooks.
764         (accept, bind, connect, gethostname, sethostname): New hooks.
765         (gethostbyname, wait, waitpid, popen, pclose, execve): New hooks.
766         (execv, execvp, system, dlopen, dlclose, dlerror, dlsym): New hooks.
767         (semop, semctl, shmctl, shmat, shmdt): New hooks.
768         * mf-runtime.h.in: Corresponding changes.
769         * mf-runtime.c (__mf_ini): Register stdio objects.  Use STATIC type.
770         (opts) Rename heur_argv_environ to heur_std_data.
771         (__mf_wrap_main): Use STATIC type for argv/environ strings.
772         * Makefile.am: Corresponding changes.
773         * Makefile.in: Regenerated.
774
775 2003-06-11  Frank Ch. Eigler  <fche@redhat.com>
776
777         * mf-heuristics.c (__mf_heuristic_check): Disable stack_bounds
778         heuristic for threaded case, and for non-x86-linux targets.
779         * mf-hooks.c (__mf_0fn_calloc): Provide a working dummy implementation
780         for use during pre-main() program startup.
781         (__mf_0fn_*): Make these functions non-static.
782         * mf-impl.h (DECLARE, CALL_REAL): Support calls to 0fn backup hook
783         functions.
784         * mf-runtime.c (__mf_state): Set initial state to "starting".
785         (__mf_resolve_single_dynamic): Tolerate repeated calls for same symbol.
786         (__wrap_main): New function to register argv[] and environ[] strings.
787         (__mf_ini): Call it.
788         (*): In all trace functions, use "%p" as formatter for uintptr_t.
789
790         * testsuite/libmudflap.c/pass38-frag.c: New test case.
791         * testsuite/libmudflap.cth/pass37-frag.c: Improved test.
792
793         * acinclude.m4: Add comments with aoliva's concerns about x86_64
794         pass_all.
795         * aclocal.m4, configure: Regenerated.
796
797 2003-06-04  Frank Ch. Eigler  <fche@redhat.com>
798
799         * acinclude.m4: Correct typo in AC_MSG_CHECKING.
800         * aclocal.m4, configure: Regenerated.
801
802 2003-06-03  Frank Ch. Eigler  <fche@redhat.com>
803
804         * acinclude.m4: Force "pass_all" deplibs_check_method for libtool
805         for x86_64 target.  Disable caching for this value.
806         * aclocal.m4, configure: Regenerated.
807
808 2003-06-02  Frank Ch. Eigler  <fche@redhat.com>
809
810         * testsuite/libmudflap.c/pass38-frag.c: Deleted.  -fwritable-strings
811         is about to become deprecated, and its present handling bugs are
812         unworthy of fixing.
813
814 2003-05-30  Frank Ch. Eigler  <fche@redhat.com>
815
816         * testsuite/libmudflap.c/pass38-frag.c: New test for
817         -fwritable-strings.
818
819 2003-05-23  Frank Ch. Eigler  <fche@redhat.com>
820
821         * mf-runtime.c (__mf_sigusr1_handle): Call unlocked variant of
822         __mf_report, asserting reentrant calling context.
823
824 2003-05-23  Frank Ch. Eigler  <fche@redhat.com>
825
826         * mf-hooks.c (realloc): Correct reentrancy logic.
827         * testsuite/libmudflap.c/hook-allocstuff.c: New test case.
828
829 2003-05-20  Frank Ch. Eigler  <fche@redhat.com>
830
831         * mf-hooks.c (LIBMUDFLAPTH_THREADS_MAX): New macro, replaces
832         PTHREAD_THREADS_MAX.  Update users.
833         * mf-runtime.c (__mf_usage): Print [active] instead of [default]
834         for active options.
835         * testsuite/Makefile.am (all-local): Prime dejagnu site.exp file
836         with libmudflapth presence indicator.
837         * testsuite/Makefile.in: Regenerated.
838
839 2003-05-16  Frank Ch. Eigler  <fche@redhat.com>
840
841         * Makefile.am (AM_CFLAGS): Remove "-ansi".
842         * configure.in: Remove silly no-pthreads => no-shared logic.
843         * Makefile.in, configure: Regenerated.
844         * mf-heuristics.c (__mf_heuristic_check): Remove reentrancy hacks.
845         * mf-hooks.c (BEGIN_PROTECT, END_PROTECT): Reorganize reentrancy
846         code.  Count reentrancy events.
847         (all hook functions): Don't directly manipulate __mf_state variable.
848         Add TRACE calls to hook functions without them.
849         * mf-impl.h (LOCKTH): Try to count lock contention events.
850         (VERBOSE_TRACE, TRACE): Remove reentrancy hacks.
851         * mf-runtime.c (BEGIN_RECURSION_PROTECT, END_RECURSION_PROTECT):
852         Reorganize reentrancy code.
853         (external __mf_ entry points): Use RECURSION_PROTECT mechanism to
854         identify reentrancy with mutex holding times.
855         (internal __mfu_ entry points): Remove internal reentrancy code.
856         (__mf_init): Use ordinary locked calls.
857         (__mfu_report): Print the two new counts.
858         * testsuite/lib/libmudflap.exp: Filter out junk ld/pthreads messages.
859         * testsuite/libmudfap.cth/cthfrags.exp: New test driver.
860         * testsuite/libmudflap.cth/pass37-frag.c: New pthreads test.
861         * testsuite/libmudfap.cth/cfrags.exp: Adapt to new libmudflap
862         option defaults.
863
864 2003-05-09  Frank Ch. Eigler  <fche@redhat.com>
865
866         * configure.in: Add pthread support, plus glibc and porting hacks.
867         * Makefile.am (LIBMUDFLAPTH): New conditional, to build -lmudflapth
868         from objects built into ./pth/.
869         * mf-runtime.c (__mfu_watch,register,...): Fork new unlocked
870         functions for internal entry points.  Update callers to pick
871         locked vs. unlocked variants.
872         (__mf_resolve_single_dynamic): Extend to support symbol versioning
873         info coming in from a static data structure.
874         (*): Reorder miscellaneous declarations to group data vs functions.
875         (__mf_set_default_options): Simplify.
876         (__mf_usage): Mention threading status of host executable.
877         * mf-impl.h: Move max/min decls here.  Reorganize __mf_dynamic
878         decls to match above.
879         (LOCKTH, UNLOCKTH): New macros for Big Libmudflap Lock management.
880         * mf-heuristics.c: Choose between locked/unlocked calls.  Add
881         some lock/unlock markers.  Remove some unused code.
882         * mf-hooks: Ditto.
883         (pthread_create): New hook function.
884         (__mf_pthread_cleanup, _spawner): New helper functions.
885         * configure. aclocal.m4, config.h.in, Makefile.in: Regenerated.
886
887 2003-05-02  Frank Ch. Eigler  <fche@redhat.com>
888
889         * testsuite/libmudflap.c/fail27-frag.c: Add more volatile flags.
890
891 2002-04-28  Frank Ch. Eigler  <fche@redhat.com>
892
893         * Makefile.am (HOOKOBJS): Add *time related hooks.
894         * configure.in: Look for pthreads.h header.
895         * mf-hooks.c (asctime, ctime, gmtime, localtime): New wrappers.
896         * mf-runtime.c: Begin sketching some pthreads support.
897         (__mf_usage): Check for -lpthread presence.
898         (__mf_unregister): Confirm matching unregistration base.
899         (__mf_find_objects_rec): Reduce unnecessary recursion.
900         * mf-runtime.h.in: Add "nothrow" attribute to functions.  Add
901         #defines for new hook functions.
902         * mf-impl.h: Corresponding changes.
903         * config.h.in, configure, Makefile.in: Regenerated.
904
905 2002-04-27  Diego Novillo  <dnovillo@redhat.com>
906
907         * testsuite/libmudflap.c/fail1-frag.c: Add volatile
908         modifiers to prevent being optimized away.
909         * testsuite/libmudflap.c/fail10-frag.c: Likewise.
910         * testsuite/libmudflap.c/fail13-frag.c: Likewise.
911         * testsuite/libmudflap.c/fail14-frag.c: Likewise.
912         * testsuite/libmudflap.c/fail15-frag.c: Likewise.
913         * testsuite/libmudflap.c/fail2-frag.c: Likewise.
914         * testsuite/libmudflap.c/fail20-frag.c: Likewise.
915         * testsuite/libmudflap.c/fail3-frag.c: Likewise.
916
917 2003-04-15  Frank Ch. Eigler  <fche@redhat.com>
918
919         * Makefile.am (libmudflap_la_LIBADD): Remove -ldl.
920         * configure.in: Look for uintptr_t and -ldl on target.
921         * mf-runtime.h.in: Adjust uintptr_t declaration logic.
922         * Makefile.in, aclocal.m4, configure, config.h.in: Regenerated.
923         * testsuite/Makefile.in: Regenerated.
924         * mf-runtime.c (__mf_sigusr1_respond): Tweak declaration and calls
925         for better C compliance.
926
927 2003-04-15  Frank Ch. Eigler  <fche@redhat.com>
928
929         * mf-hooks.c (MF_VALIDATE_EXTENT): Remove unnecessary reentrancy
930         prevention code.
931         * mf-runtime.c (__mf_set_default_options): Turn off
932         check-initialization.
933         (__mf_describe_object): Shorten description.
934         * testsuite/libmudflap.c/fail25-frag.c: Turn on check-initialization.
935
936 2003-04-07  Frank Ch. Eigler  <fche@redhat.com>
937
938         * mf-hooks.c (__mf_0fn_mmap): Correct return value, as per <rth>.
939
940 2003-04-02  Frank Ch. Eigler  <fche@redhat.com>
941
942         * mf-hooks.c (BEGIN_PROTECT): Handle startup-time reentrant
943         calls specially.
944         (__mf_0fn_malloc ... _munmap): New dummy backup calls.
945         * mf-impl.h (CALL_BACKUP): New macros.
946         * mf-runtime.c (__mf_init): Tweak __mf_state during startup.
947
948 2003-03-31  Frank Ch. Eigler  <fche@redhat.com>
949
950         * Makefile.am (AM_CFLAGS): Remove optimization flags.
951         (HOOKOBJS): Remove dlopen hook.
952         (libmudflap_la_LIBADD): Add -ldl.
953         * mf-hooks.c (dlopen): Remove hook.
954         * mf-impl.h (__mf_dynamic): Ditto.
955         * mf-runtime.c (__mf_resolve_dynamics): Ditto.
956         * Makefile.in: Regenerated.
957
958 2003-03-28  Frank Ch. Eigler  <fche@redhat.com>
959
960         * configure.in: Check for target gettimeofday, signal, some headers.
961         * mf-impl.h (__mf_opts): Add new "sigusr1_report" field.  Comment
962         out inop multi_threaded field.
963         * mf-runtime.c (options): Handle new "-sigusr1-report" option.
964         (__mf_set_options): Correct handling of "-help".
965         (__mf_sigusr1_respond): New function to manage SIGUSR1 response.
966         (__mf_check, __mf_register, __mf_unregister): Call it.
967         (__mf_insert_new_object, __mf_unregister): Respect HAVE_GETTIMEOFDAY.
968         (__mf_report_leaks): Make callable
969         (__mf_tree_analyze): Traverse in-order.  Accumulate address bit
970         distribution statistics.
971         (__mf_adapt_cache): Rewrite shift guessing logic based on address
972         bit distributions.
973         * config.h.in, configure: Regenerated.
974         * testsuite/libmudflap.c/fail27-frag.c: New test.
975         * testsuite/libmudflap.c/pass36-frag.c: New test.
976
977 2003-03-11  Frank Ch. Eigler  <fche@redhat.com>
978
979         * mf-runtime.h.in: Tweak.
980         * Makefile.am, configure.in: Tweak mf-runtime.h generation some more.
981         Don't use intermediate files nor AC_OUTPUT-time postprocessing.
982         * Makefile.in, testsuite/Makefile.in, configure: Regenerated.
983
984 2003-03-10  Frank Ch. Eigler  <fche@redhat.com>
985
986         * configure.in: Tweak generation of mf-runtime.h some more.  It
987         needs to work from both config.status and configure.
988         * configure: Regenerated.
989
990 2003-03-10  Frank Ch. Eigler  <fche@redhat.com>
991
992         * Makefile.am: Reorganize hook file building.  Add auto dependencies.
993         * configure.in: Tweak generation of mf-runtime.h.
994         * mf-runtime.h.in: Add new __MF_TYPE_HEAP_I.
995         * mf-hooks.c (*): Adapt to initialized-heap object type.
996         * mf-impl.h: Tweak cemetary boundaries.
997         * mf-runtime.c (__mf_check): Adapt to new initialized-heap object
998         type.
999         (__mf_insert_new_object, __mf_register, __mf_unregister): Ditto.
1000         (__mf_describe_object, __mf_report_leaks, __mf_violation): Ditto.
1001         * testsuite/lib/libmudflap.exp (includes): Include build tree.
1002         * testsuite/libmudflap.c/pass{26,5}: Further adapt to initialization
1003         checking.
1004         * testsuite/.../fail{25,26}-frag.c: New tests.
1005         * testsuite/.../pass{32,33,34,35}-frag.c: New tests.
1006         * Makefile.in, configure: Regenerated.
1007
1008 2003-03-05  Frank Ch. Eigler  <fche@redhat.com>
1009
1010         * mf-runtime.c (__mf_set_default_options): Turn on initialization
1011         checking by default.
1012         (__mf_insert_new_object): As a temporary hack, assume that new
1013         objects registered on the stack start out initialized.
1014         * testsuite/libmudflap.c/fail9,pass23,pass[6789]-*: Initialize
1015         heap objects by hand.
1016
1017 2003-03-05  Frank Ch. Eigler  <fche@redhat.com>
1018
1019         Switch to macro-style hooks for str*/mem*/b* functions.
1020         * mf-runtime.h.in (__MF_TYPE_*): Moved some internal values out.
1021         (mem*, str*, b*): Added macro-style hooks for _MUDFLAP case.
1022         * mf-runtime.c: #include config.h to enable glibc backtraces again.
1023         (__mf_set_default_options): Turn off heur_proc_map.
1024         (*): Adapt to to macro-style hook functions.
1025         (__mf_object_dead_head, __mf_object_cemetary): Correct bounds.
1026         (__mf_check, __mf_register, __mf_unregister): Tweak tracing message.
1027         (__mf_violation): Handle __MF_VIOL_WATCH.
1028         * mf-impl.h (__MF_TYPE_*): Moved these internal values here.
1029         (__mf_dynamic): Removed mem*/str*/b* functions.
1030         (TRACE, VERBOSE_TRACE): Add reentrancy locking.
1031         (WRAPPER2): New macro for macro-style hooks.
1032         * mf-hooks.c: Convert mem*/str*/b* functions to simpler
1033         macro-style hooks.
1034         (BEGIN_PROTECT): Tweak tracing vs reentrancy-lock ordering.
1035         * mf-heuristics.c: Adapt to macro-style hook functions.
1036         Correct some comments.
1037         * testsuite/lib/mfdg.exp (dg-test): Simplify result string for
1038         output pattern tests.
1039         * testsuite/libmudflap.c/fail[89]-frag.c: Elaborate output test.
1040         * testsuite/libmudflap.c++/c++frags.exp: Enable non-static tests.
1041
1042 2003-02-28  Frank Ch. Eigler  <fche@redhat.com>
1043
1044         * testsuite/libmudflap.c/fail23-frag.c, pass30-frag.c: New tests
1045         for global array registration.
1046         * testsuite/libmudflap.c++/fail24-frag.cxx, pass31-frag.cxx: Ditto.
1047         * testsuite/libmudflap.c++/c++frags.exp: Tweak -static multilib hack.
1048
1049 2003-02-27  Frank Ch. Eigler  <fche@redhat.com>
1050
1051         * Makefile.am: Add gross make bug workarounds.  Tweaked
1052         SUBDIRS and AM_CFLAGS.
1053         * Makefile.in: Regenerated.
1054
1055 2003-02-26  Frank Ch. Eigler  <fche@redhat.com>
1056
1057         Switch to dejagnu.
1058         * configure.in (AC_PROG_CXX): Don't look for C++ any more.
1059         * Makefile.am (TESTS): Remove simple automake testing.
1060         * configure, Makefile.in: Regenerated.
1061         (SUBDIRS): Include new testsuite/ directory.
1062         * tests/*: Removed all files; moved bulk under:
1063         * testsuite/*: New subdirectory tree.
1064         * testsuite/libmudflap.c/cfrags.exp: New file, C test driver.
1065         * testsuite/libmudflap.c++/c++frags.exp: New file, C++ test driver.
1066         * testsuite/lib/libmudflap.exp: New file, derived from libstdc++.
1067         * testsuite/lib/mfdg.exp: New file, derived from dejagnu.
1068         * testsuite/config/default.exp: New file.
1069         * testsuite/Makefile.am, Makefile.in: New files.
1070
1071 2003-01-29  Frank Ch. Eigler  <fche@redhat.com>
1072
1073         * Makefile.am (TESTS_ENVIRONMENT): Remove redundant "-mode-check".
1074         (TESTS): Add fail22 and pass29 tests.
1075         * mf-runtime.h.in: Change API to take void*/size_t region parameters.
1076         Add new access-type parameter for __mf_check.  Move __MF_VIOL* out.
1077         * mf-impl.h: Corresponding changes.  Update CLAMP* macros for void*
1078         values.  Move __MF_VIOL* here.
1079         * mf-runtime.c (*): Adapt to void*/size_t API in mf-runtime.h.
1080         (check_initialization): New field in __mf_opts.  Default off.
1081         (read_count,write_count): New fields in __mf_object.
1082         (__mf_check): Implement basic initialization checking.
1083         (__mf_insert_new_object): Assume STATIC|GUESS regions are initialized.
1084         (__mf_describe_object): Print new fields.
1085         (__mf_violation): Identify check/read vs. check/write in messages.
1086         * test/pass29-frag.c, test/fail22-frag.c: Basic tests for new
1087         "-check-initialized" mudflap option.
1088         * test/pass25-frag.c, test/fail21-frag.c: Adapt to API changes.
1089         * mf-hooks.c (MF_VALIDATE_EXTENT): Add new access-type parameter.
1090         Drop __FILE__/__LINE__ hack.  Update callers.
1091         (*): Adapt to new mf-runtime.h API.
1092         * Makefile.in: regenerated.
1093
1094 2003-01-24  Frank Ch. Eigler  <fche@redhat.com>
1095
1096         * configure.in: Build mf-runtime.h a more proper way.
1097         * mf-hooks.c (strdup, strndup): Correct reentrancy logic.
1098         * mf-runtime.c (verbose_violations): Turn on by default.
1099         * mf-runtime.h.in: Remove some miscellaneous stuff ...
1100         * mf-impl.h: ... and move it here.
1101         * configure: Regenerated.
1102
1103 2003-01-22  Frank Ch. Eigler  <fche@redhat.com>
1104
1105         * configure.in: Look for C++ compiler.
1106         * test/*-frag.c, mf-driver.c: Reformatted with GNU indent and
1107         fixed type warnings when built with C++.
1108         * test/pass27-frag.cxx, pass28-frag.cxx: New C++ tests.
1109         * Makefile.am (TESTS): Run them.
1110         (*) Add new rules for building and running C++ tests.
1111         (TESTFLAGS): Set new default to avoid libstdc++-v3 shlib issues.
1112         * mf-runtime.h.in: Protect with extern "C".
1113         * Makefile, configure: Regenerated.
1114
1115 2003-01-06  Frank Ch. Eigler  <fche@redhat.com>
1116
1117         Portability improvements.
1118         * configure.in: Look for glibc backtrace headers/functions.
1119         * mf-hooks.c: Don't include <execinfo.h> any more.
1120         * mf-runtime.c (__mf_set_options): Call more stdlib functions
1121         via CALL_REAL.
1122         (__mf_backtrace): Provide alternate baby implementation in
1123         absence of glibc.
1124         * test/mf-driver.c: Portability tweaks.
1125         * acinclude.m4: New file, containing top level libtool.m4.
1126         * aclocal.m4, configure, Makefile.in, config.h.in: Regenerated.
1127
1128 2002-12-19  Frank Ch. Eigler  <fche@redhat.com>
1129
1130         * mf-runtime.h.in (HAVE_UINTPTR_T): Define unconditionally.
1131
1132 2002-11-08  Frank Ch. Eigler  <fche@redhat.com>
1133
1134         * mf-runtime.c (options): Add new "wipe-heap", "wipe-stack"
1135         options.
1136         (__mf_unregister): Implement stack/heap object wiping.
1137         (__mf_set_options): Renamed from __mf_process_opts.
1138         (__mf_uncache_object): Change arg type, correct callers.
1139         * mf-impl.h: Corresponding changes.
1140         * mf-hooks.c (realloc): Save/restore heap-wiping flag.
1141         * mf-runtime.h.in (__mf_set_options): Extend public API.
1142         * test/pass26-frag.c: New test for stack wiping.
1143         * Makefile.am (TESTS): Run it.
1144         * Makefile.in: Regenerated.
1145
1146 2002-11-07  Frank Ch. Eigler  <fche@redhat.com>
1147
1148         * mf-runtime.h.in (__mf_watch, __mf_unwatch): Extend public API.
1149         * mf-runtime.c (__mf_object_t): Add watching_p field.
1150         (__mf_watch_or_not): New function to implement
1151         object watch flagging.
1152         (__mf_watch, __mf_unwatch): New wrappers for above.
1153         (__mf_check, __mf_describe_object): Handle objects with watching_p.
1154         (__mf_count_violation): Enlarge array.
1155         (__mf_uncache_object): Renamed from __mf_remove_old_object.  Don't
1156         unlink object.  Clear cache properly.
1157         (__mf_unregister): Unlink object explicitly before uncaching.
1158         * test/fail21-frag.c, pass25-frag.c: New tests.
1159         * Makefile.in, aclocal.m4: Regenerated.
1160
1161 2002-11-05  Frank Ch. Eigler  <fche@redhat.com>
1162
1163         * test/fail20-frag.c: New test for NULL pointer dereferencing.
1164         * Makefile.am (TESTS): Add it.
1165         * test/pass-stratcliff.c: Add decls of stpcpy.
1166         * configure.in: Test for <stdint.h>.  Generate mf-runtime.h in
1167         build tree from config.h and new file mf-runtime.h.in.
1168         * mf-runtime.h.in: Renamed from mf-runtime.h.  Tweak uintptr_t decl.
1169         * Makefile.in, configure, config.h.in: Regenerated.
1170         * mf-hooks.c: Add #undef for wrapped glibc str*/mem* macros.
1171         * mf-runtime.c (options, __mf_set_default_options): Support new
1172         default "abbreviate" option.
1173         (__mf_object.description_epoch): New field.
1174         (__mf_describe_object): Conditionally abbreviate objects already
1175         displayed in current epoch.  Accept NULL input to increment epoch.
1176         (__mf_fini, __mf_ini): Reset description epoch.
1177         (__mf_register, __mf_unregister, __mf_adapt_cache, __mf_init): Ensure
1178         that NULL pointer slot in lookup cache is invalidated.  Register a
1179         NOACCESS region around NULL.
1180         * mf-impl.h: Corresponding changes.
1181
1182 2002-10-16  Frank Ch. Eigler  <fche@redhat.com>
1183
1184         * test/fail19-frag.c, pass24-frag.c, pass-stratcliff.c: New tests.
1185         * Makefile.am: Run them.  Install mf-runtime.h.
1186         * Makefile.in: Regenerated.
1187         * mf-hooks.c: Add some markers for more missing functions.
1188         * mf-runtime.c (__mf_adapt_cache): Experiment with a utilization-based
1189         statistic to tune tune cache size (mask).
1190
1191 2002-10-01  Frank Ch. Eigler  <fche@redhat.com>
1192
1193         * test/pass23-frag.c: New test for bit_field_ref expressions.
1194         * Makefile.am, Makefile.in: Add new test.
1195         * mf-hooks.c (mmap, munmap): Rewrite to track individual pages.
1196         (MF_VALIDATE_EXTENT): Accept zero-size mem/str operations.
1197         * mf-runtime.c (__mf_init): Register errno global.
1198         (__mf_find_object): Removed function.
1199         (__mf_check): Rewrite logic to support accesses across some
1200         contiguous but distinctly registered objects.
1201         (__mf_remove_old_object): Tolerate cache entries that span
1202         contiguous objects.
1203
1204 2002-09-30  Frank Ch. Eigler  <fche@redhat.com>
1205
1206         * test/pass21-frag.c, pass22-frag.c: New tests: alloca, bitfields.
1207         * Makefile.am, Makefile.in: Run new tests.
1208         * mf-hooks.c (alloca): Correct stack direction logic.
1209
1210 2002-09-26  Frank Ch. Eigler  <fche@redhat.com>
1211
1212         * mf-impl.h (adapt_cache): New option.
1213         * mf-runtime.c (__mf_set_default_options): Set its default value.
1214         Tweak the tree_aging parameter down.
1215         (__mf_check): Maintain separate counter for cache-adaptation.
1216         (__mf_tree_analyze): New function to collect object tree stats.
1217         (__mf_adapt_cache): New function to automate cache parameters.
1218
1219 2002-09-24  Frank Ch. Eigler  <fche@redhat.com>
1220
1221         * mf-heuristics.c (__init_misc, __mf_heuristic_check): Add
1222         hypothetical #if-0'd argv/envp region registration.
1223         * mf-runtime.c (__mf_init): Add kludged form of above.
1224         (*) Add "heur_argv_environ" flag, default on, to govern this.
1225         * mf-impl.h: Corresponding changes.
1226
1227 2002-09-20  Frank Ch. Eigler  <fche@redhat.com>
1228
1229         * test/fail18-frag.c: New test file for NOACCESS regions.
1230         * Makefile.am (TESTS): Add new test.
1231         * Makefile.in: Regenerated.
1232
1233         * mf-heuristics.c (__mf_heuristics_check): Correct deja_vu logic.
1234         * mf-impl.h (tree_aging): Add new mudflap_option, default 1000000.
1235         (optimize_object_tree): Remove unused mudflap_option.
1236         * mf-runtime.h (__MF_TYPE_NOACCESS): New region type.  Add printing
1237         support throughout.  Use .._MAX_CEM for cemetary upper bound.
1238         * mf-runtime.c (__mf_init): Register __mf_* globals as NOACCESS
1239         regions.
1240         (__mf_object): Add new liveness field for use by tree aging.
1241         (__mf_check): Trigger tree aging when needed.
1242         (__mf_age_tree): New function to decay liveness field.
1243         (__mf_find_objects_rec): Use liveness field to rotate tree.
1244         (__mf_insert_new_object): Only provide backtrace for HEAP objects.
1245         (__mf_unregister): Ditto.
1246         (__mf_register): Tweak duplicate-static message.
1247         (__mf_violation: Tweak nearby-object counter printing.
1248
1249 2002-09-16  Frank Ch. Eigler  <fche@redhat.com>
1250
1251         * test/pass20-frag.c: New test file.
1252         * Makefile.am (TESTS): Reorganize.  Add pass20 test.
1253         * Makefile.in: Regenerated.
1254
1255         * mf-impl.h (TRACE_IN, TRACE_OUT): Remove macros.  Update callers.
1256         * mf-hooks.c (BEGIN_PROTECT): Add hook tracing here.
1257         * mf-heuristic.c (__mf_heuristic_check): Track seen /proc/self/map
1258         entries to avoid repeat registration.
1259         * mf-runtime.c (__mf_object_cemetary): Don't bother bury GUESS regions.
1260         (__mf_register, __mf_unregister): Rewrite GUESS handling logic.
1261
1262 2002-09-09  Frank Ch. Eigler  <fche@redhat.com>
1263
1264         * Makefile.am: Create test sources with #include, not cat>>.
1265         * Makefile.in: Regenerated.
1266         * test/buildtest.sh: Removed.
1267         * test/driver.c (abort_handler, main): Be quiet.
1268
1269 2002-09-06  Frank Ch. Eigler  <fche@redhat.com>
1270
1271         * test/pass18-frag.c, pass19-frag.c: New tests.
1272         * Makefile.am (check): Run them.  Rebuild test programs each time.
1273         * Makefile.in: Regenerated.
1274
1275 2002-09-06  Frank Ch. Eigler  <fche@redhat.com>
1276
1277         * mf-runtime.c (__mf_register): Correct SEGV-inducing error in
1278         overlapping object search.
1279         (__mf_violation): Likewise for nearby objects.
1280         Improve nearby-object listing.
1281
1282         cleanup:
1283         * mf-runtime.c, mf-hooks.c: Remove "{{{"/"}}}" folding marks.
1284         * mf-heuristics.c (__mf_heuristic_check): Tweak message.
1285
1286 2002-09-03  Frank Ch. Eigler  <fche@redhat.com>
1287
1288         alloca support:
1289         * Makefile.am (AM_CFLAGS): New definition of needed settings.
1290         (HOOKOBJS): Add alloca-hook.o.
1291         * mf-hooks.c (alloca): New function to implement alloca in libiberty
1292         style.
1293         * mf-runtime.c (__mf_report): Call alloca(0) to flush remaining blocks.
1294         (__mf_backtrace): Reimplement without using alloca.
1295         * Makefile.in: Regenerated.
1296
1297         cleanup:
1298         * mf-hooks.c: Use VERBOSE_TRACE throughout instead of fprintf(stderr).
1299         Correct signedness bugs in length-tracking variables.
1300         * mf-impl.h: Make options unsigned.
1301         (CALL_WRAP): New macro to parallel CALL_REAL().
1302         (DECLARE): Remove erroneous ";" at end.
1303         * mf-runtime.c, mf-hooks.c, mf-heuristics.c: Replace remaining %p
1304         formatting specs with %08lx.  Correct several compiler warnings.
1305
1306 2002-08-28  Frank Ch. Eigler  <fche@redhat.com>
1307
1308         * mf-runtime.c (__mf_violation): Try harder to locate nearby objects.
1309
1310 2002-08-27  Frank Ch. Eigler  <fche@redhat.com>
1311
1312         libmudflap hook breakup:
1313         * Makefile.am (TESTS_ENVIRONMENT): Add ../../gcc to LD_LIBRARY_PATH
1314         for libgcc_s.
1315         (TESTS): Make dependent on libmudflap.
1316         (HOOKOBJS): Break up mf-hooks.o into many little hook objects,
1317         compiled from segments of mf-hooks.c.
1318         * mf-hooks.c: Corresponding changes: wrap each function in
1319         #ifdef/#endif.
1320         * Makefile.in: Regenerated.
1321
1322         Heuristics reorganization:
1323         * mf-heuristics.c (__mf_register_ro_sections, __mf_init_heuristics):
1324         Remove these functions.  Update callers.
1325         (__mf_heuristic_check): Incorporate all the various heuristics.
1326         Encode cacheability/retry judgement into trinary return value.
1327         Separate start-end logic into a separate fallback heuristic.  Only
1328         register relevant /proc/self/map segments.
1329         * mf-impl.h: Corresponding changes.
1330         * mf-runtime.c (__mf_check): Reorganize heuristics fallback logic.
1331         (__mf_init): Don't call __mf_init_heuristics.
1332
1333         Tracing cleanup:
1334         * mf-heuristics.c, mf-runtime.c: Use new MUDFLAP_OPTION
1335         "-verbose-trace" to emit all tracing messages other than those of
1336         basic public api.  Eliminate some duplicate/excessive messages.
1337         * mf-runtime.h: Corresponding changes.
1338
1339 2002-08-27  Graydon Hoare  <graydon@redhat.com>
1340
1341         * mf-impl.h (WRAPPER): Change to create linker aliases for __wrap
1342         and __real when compiled with -DPIC.
1343         * mf-hooks.c (WRAPPER): Change all uses of WRAPPER macro slightly.
1344         * Makefile.am (AUTOMAKE_OPTIONS): Fix LD_LIBRARY_PATH for tests.
1345         * Makefile.in: Regenerate.
1346
1347 2002-08-26  Graydon Hoare  <graydon@redhat.com>
1348
1349         * mf-impl.h: New file, private implementation header.
1350         * mf-runtime.h: Reorganize a bit.
1351         (CLAMPSZ): Fix arithmetic.
1352         (__MF_CACHE_MISS_P): Fix arithmetic.
1353         * mf-runtime.c: Reorganize a bit.
1354         (__mf_dynamic): New structure.
1355         (resolve_single_dynamic): New function.
1356         (__mf_resolve_dynamics): New function.
1357         (__mf_init): Initialize dynamic wrappers.
1358         * mf-hooks.c: Macro-ize __real calls.
1359         Clamp various bits of arithmetic.
1360         Add explicit __mf_check call contexts.
1361         * Makefile.am: Add dependencies on mf-impl.h
1362         * Makefile.in: Regenerate.
1363         * configure.in: Comment out shared override.
1364         * configure: Regenerate.
1365
1366 2002-08-22  Graydon Hoare  <graydon@redhat.com>
1367
1368         * mf-runtime.c (__mf_process_opts): Sanity-check free_queue_length.
1369         (__mf_check): Re-inialize and check heuristics before violation.
1370         (__mf_register): Permit updating pure-guess regions.
1371         * mf-hooks.c (__wrap_free): Correct some free queue logic.
1372         (__wrap_dlopen): New wrapper function.
1373         (__wrap_mmap): New wrapper function.
1374         (__wrap_munmap): New wrapper function.
1375         * mf-heuristics.c (__mf_register_ro_sections): Register *all* regions
1376         which are not stack addresses.
1377         (is_stack_address): New function.
1378         (__mf_init_heuristics): Save and restore state, always initialize with
1379         "starting" state.
1380
1381 2002-08-21  Frank Ch. Eigler  <fche@redhat.com>
1382
1383         * mf-hooks.c (MF_VALIDATE_EXTENT): Rewrite to correct off-by-one
1384         error.  Pass location string.
1385         (wrap_strcpy, wrap_strncpy): Remove extra %s in trace strings.
1386         * mf-runtime.c (options): Add lc-mask, lc-shift options.
1387         (__mf_process_opts): Apply some sanity checking for lc-mask.
1388         (__mf_check, __mf_violation): Take new location-string argument.
1389         Update callers to pass NULL if necessary.
1390         (__mf_backtrace): New smart backtracer function.  Calls replace
1391         several ad-hoc blocks elsewhere.
1392         (__mf_describe_object): Remove bad reentrancy test.  Improve
1393         tracing message.
1394         * mf-runtime.h: Corresponding changes.  Public/private markup.
1395         (__MF_CACHE_MISS_P): New macro.
1396
1397 2002-08-20  Graydon Hoare  <graydon@redhat.com>
1398
1399         * mf-runtime.h: New option: stack_bound (heuristic).
1400         Move some macros out of implementation files.
1401         * mf-runtime.c: New option string: -stack-bound.
1402         Unify recursion protection with hooks.
1403         Add more logging.
1404         (__mf_check): Call __mf_heuristic_check.
1405         (__mf_process_opts): Fix "no-" processing.
1406         * mf-heuristics.c (__mf_heuristic_check): New function.
1407         * mf-hooks.c: Much off-by-one fixing, recursion protection.
1408
1409 2002-08-20  Frank Ch. Eigler  <fche@redhat.com>
1410
1411         Option parsing improvements, region splitting bug fixes:
1412         * mf-heuristics.c (__mf_register_ro_sections): Add warned casts.
1413         * mf-runtime.h (heur_proc_map): New libmudflap option.
1414         * mf-runtime.c (__mf_set_default_options): Set it.
1415         (__mf_usage): Print default values/status.
1416         (__mf_process_opts): Support general "no-" option string prefix.
1417         (__mf_init): Print __mf_usage on unknown-option error.
1418         (__mf_register): Print trace message up front.
1419         Correct region splitting logic for case where a subregion disappears.
1420         Correct memory leak.
1421         (__mf_violation): Make even basic message conditional on option.
1422
1423         Build cleanup:
1424         * Makefile.am (TESTS_ENVIRONMENT): Add -no-heur-proc-map.
1425         (clean-local): New target.
1426         (test/*x rules): Add -g CFLAGS.
1427         (CFLAGS): Add -freorder-blocks.
1428         (MFCONFIG_CFLAGS, INCLUDE): Remove unneeded settings.
1429         * Makefile.in: Regenerated.
1430         * Makefile, mf-config.h: Removed files.
1431
1432 2002-08-16  Graydon Hoare  <graydon@redhat.com>
1433
1434         * mf-runtime.c (__mf_insert_new_object): Factor out of
1435         __mf_register.
1436         (__mf_remove_old_object): Factor out of __mf_unregister.
1437         (__mf_register): Handle guessed regions, splitting
1438         guesses when new registrations arrive.
1439         (__mf_unregister): Do not unregister guesses.
1440         * mf-runtime.h: Move convenience macros around,
1441         declare new option fields. Add __MF_TYPE_GUESS.
1442         * mf-hooks.c (__wrap_*alloc): Use crumple zones.
1443         (__wrap_free): Call __real_free for deferred frees.
1444         * Makefile.am: Add more tests, fix dependency.
1445         * Makefile.in: Regenerate.
1446         * test/pass[13..17]-frag.c: New testcases.
1447         * test/fail[13..17]-frag.c: New testcases.
1448
1449 2002-08-15  Graydon Hoare  <graydon@redhat.com>
1450
1451         * mf-heuristics.c: New file.
1452         * mf-runtime.c (options): Add -trace-calls option.
1453         (__mf_init): Call __mf_init_heuristics.
1454
1455 2002-08-14  Graydon Hoare  <graydon@redhat.com>
1456
1457         * Makefile.am (TESTS): Add testsuite support.
1458         * Makefile.in: Regenerate.
1459         * test/mf-driver.c: New file.
1460         * test/buildtest.sh: New file.
1461         * test/passNN-frag.c: New testcases.
1462         * test/failNN-frag.c: New testcases.
1463
1464 2002-08-14  Graydon Hoare  <graydon@redhat.com>
1465
1466         * mf-hooks.c: Change __real_strlen() to __real_strlen()+1 when
1467         verifying non-size-limited string extents.
1468
1469 2002-08-14  Frank Ch. Eigler  <fche@redhat.com>
1470
1471         * mf-hooks.c: Make __wrap string* functions use __real_str[n]len
1472         instead of plain str[n]len for internal checks.
1473         * mf-runtime.c (__mf_violation): Print optional stack traceback.
1474
1475 2002-08-14  Frank Ch. Eigler  <fche@redhat.com>
1476
1477         * mf-hooks.c: Remove #if-0 around hooks that are now ld-wrapped.
1478
1479 2002-08-13  Graydon Hoare  <graydon@redhat.com>
1480
1481         * mf-runtime.c: Rework configuration to operate on
1482         environment variable options rather than #defines
1483         (__mf_violation): Add simple fork-a-gdb violaiton mode.
1484         (__mf_init): Set static __mf_active_p flag on startup,
1485         to inhibit mudflap wrap-based checking during crt0.s.
1486         * mf-runtime.h: Declare options structure.
1487         * mf-hooks.c: New wrappings for mem*, b*, str*
1488         libc functions (temporarily #if 0-ed out).
1489
1490 2002-08-12  Frank Ch. Eigler  <fche@redhat.com>
1491
1492         * Makefile.am, configure.in: New files.
1493         * Makefile.in, Makefile, configure, config.h.in: New generated files.
1494         * stamp-h.in, aclocal.m4: Ditto.
1495
1496 2002-08-08  Frank Ch. Eigler  <fche@redhat.com>
1497
1498         * Makefile: New file.
1499         * mf-config.h: New file: runtime configuration.
1500         * mf-hooks.c: New file: interposed libc functions.
1501         * mf-runtime.c: New file: bulk of runtime.
1502         * mf-runtime.h: New file: public functions.