OSDN Git Service

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