OSDN Git Service

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