OSDN Git Service

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