OSDN Git Service

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