OSDN Git Service

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