OSDN Git Service

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