* f95-lang.c (gfc_init_builtin_functions): Use vold_list_node.
[official-gcc.git] / libmudflap / ChangeLog
blob6aba70ad5b37b3f084e3c1746304f8410b38b5de
1 2004-05-18  Kaz Kojima  <kkojima@gcc.gnu.org>
3         * acinclude.m4 (lt_cv_deplibs_check_method): Use pass_all on sh*.
4         * aclocal.m4, configure: Rebuilt.
6 2004-05-17  Frank Ch. Eigler  <fche@redhat.com>
8         * lib/libmudflap.exp (libmudflap-init): For C++ test cases only,
9         import some build settings from libstdc++-v3 testsuite_flags.
10         * .../cfrags.exp, .../c++frags.exp, .../cthfrags.exp: Corresponding
11         changes to pass test language.
13         * mf-runtime.c (__mfu_check): Poison the cache with antidote for
14         quicker mode-nop handling.
16 2004-03-25  Frank Ch. Eigler  <fche@redhat.com>
18         * mf-impl.h: Added libgcc license header.
20 2004-03-20  Frank Ch. Eigler  <fche@redhat.com>
22         * mf-hooks[123].c, mf-runtime.c, mf-heuristics.c:
23         Added libgcc license header.
24         * mf-hooks3.c (__mf_0fn_pthread_create): Correct arg constness.
25         (pthread_create): Simplify stack allocation syntax.
27 2004-03-08  Loren J. Rittle  <ljrittle@acm.org>
29         * mf-hooks2.c: Support FreeBSD.
30         (WRAP_gets): Avoid gets().
31         * testsuite/libmudflap.c/pass-stratcliff.c: Do not
32         test unimplemented mem/str calls on FreeBSD.
33         * testsuite/libmudflap.c/pass21-frag.c: Do not include
34         <alloca.h> on FreeBSD.
36 2004-01-30  Frank Ch. Eigler  <fche@redhat.com>
38         * testsuite/libmudflap.c/pass36-frag.c: Add missing free() call.
39         * testsuite/libmudflap.c/pass46-frag.c: New test for -fmudflapir.
40         * testsuite/libmudflap.cth/cthfrags.exp: Add -DSTATIC to compiler
41         flags for static linking permutation.
42         * testsuite/libmudflap.cth/pass40-frag.c: When -DSTATIC, avoid
43         some pthreads code that croaks on linux glibc tls.
45 2004-01-27  Frank Ch. Eigler  <fche@redhat.com>
47         * testsuite/libmudflap.c/fail31-frag.c, pass45-frag.c: New tests.
49 2004-01-15  Frank Ch. Eigler  <fche@redhat.com>
51         * testsuite/libmudflap.c/pass44-frag.c: New test.
53 2004-01-12  Frank Ch. Eigler  <fche@redhat.com>
55         * testsuite/libmudflap.c/fail{28,29,30}-frag.c: New tests.
57 2004-01-08  Frank Ch. Eigler  <fche@redhat.com>
59         * testsuite/libmudflap.c/pass43-frag.c: Added missing program rc.
61 2003-12-11  Frank Ch. Eigler  <fche@redhat.com>
63         * testsuite/libmudflap.c/pass42-frag.c, pass43-frag.c: New tests.
65 2003-12-08  Andrew Pinski  <pinskia@physics.uc.edu>
67         PR libmudflap/12670
68         * configure.in: Add check for see if
69         socklen_t typedef is in sys/socket.h.
70         * mf-hooks1.c: Add define if socklen_t
71         is not typedef.
72         * mf-hooks2.c: Likewise.
73         * mf-hooks3.c: Likewise.
74         * config.h.in: Regen.
75         * configure: Regen.
77 2003-12-08  Frank Ch. Eigler  <fche@redhat.com>
79         * mf-runtime.c (__mf_watch_or_not): Tweak tracing message.
80         * testsuite/libmudflap.c/fail21-frag.c: Defeat aliasing
81         optimizations.
82         * testsuite/libmudflap.c/pass25-frag.c: Ditto.
83         * testsuite/libmudflap.c/pass26-frag.c: Tolerate non-overlapping
84         (unoptimized) allocation of stack space.
86 2003-12-07  Richard Henderson  <rth@redhat.com>
88         * testsuite/libmudflap.c/fail23-frag.c (main): Adjust addend to 11.
89         * testsuite/libmudflap.c/fail27-frag.c (foo): Mark noinline.
91 2003-12-06  Andrew Pinski <apinski@apple.com>
93         partial PR libmudflap/12670
94         * mf-hooks1.c: Respect Darwin checks.  Conditionalize POSIX_SOURCE.
95         * mf-hooks2.c: Likewise.
96         * mf-hooks3.c: Likewise.
98 2003-11-19  Frank Ch. Eigler  <fche@redhat.com>
100         libstdc++/11696
101         * mf-runtime.h.in: Switch to #pragma redefine_extname for
102         symbols interposed at compile time.
103         * testsuite/libmudflap.c++/pass41-frag.cxx: New test.
105         libmudflap/12939
106         * mf-hooks2.c (semctl): Tolerate FreeBSD.
108         * configure.in: Reorganize check for <pthread.h>.
109         * configure: Regenerated.
110         
111 2003-11-04  David Edelsohn  <edelsohn@gnu.org>
113         * mf-runtime.c (_ALL_SOURCE): Define for AIX.
114         (_LARGE_FILE_API): Define for AIX.
115         * mf-hooks[123]: Same.
116         (_XOPEN_SOURCE_EXTENDED): Define to 1 for AIX.
118 2003-10-21  David Edelsohn  <edelsohn@gnu.org>
120         * mf-runtime.c (_XOPEN_SOURCE_EXTENDED): Define to 1 for AIX.
122 2003-07-29  Frank Ch. Eigler  <fche@redhat.com>
124         2003-07-29  Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
126         * configure.in: Update check for union semun.
128 2003-07-29  Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
130         PR other/11673
131         * mf-hooks2.c [WRAP_semctl]: Fix check for HAVE_UNION_SEMUN.
133 2003-07-29  Frank Ch. Eigler  <fche@redhat.com>
135         PR other/11673
136         * configure.in: Add checks for 64-bit LFS functions, struct semun
137         definition, for BSD compatibility.
138         * mf-hooks1.c: Respect BSD checks.  Conditionalize POSIX_SOURCE.
139         * mf-hooks2.c: Ditto.  Include <strings.h> for bcmp* decls.
140         * mf-hooks3.c: Ditto.
141         (pthread_create): Try MAP_ANON on platforms without the MAP_ANONYMOUS
142         mmap flag.
143         * configure, config.h.in: Regenerated.
145 2003-07-23  Frank Ch. Eigler  <fche@redhat.com>
147         Multithreading fixes:
148         * mf-runtime.c (__mf_object): Store allocating/deallocating
149         thread id.
150         (options): Support new "-thread-stack" option.
151         Rename "-heur-argv-environ" option to "-heur-stdlib".
152         Disable "-lc-mask" and "-lc-shift" options.
153         (__mf_dynamic): Add function pointers for pthread_join/_exit.
154         (__assert_fail): New self-contained function for glibc.
155         * mf-hooks3.c: Essentially rewritten, particularly related to
156         use of __mf_pthread_info array.
157         (pthread_join, _exit): New hook functions.
158         * mf-impl.h (BEGIN_PROTECT): Handle starting_p case.
159         * testsuite/libmudflap.cth/pass40-frag.c: New test.
161         Warning cleanups:
162         * mf-heuristics.c: Add type casts for tracing, sub calls.
163         * mf-impl.h (BEGIN_PROTECT): Redefine to omit result type.
164         Update all callers to declare explicit result holder.
165         (END_PROTECT): Removed.
166         * testsuite/*/*frags.exp: Clean up default MUDFLAP_OPTIONS.
168 2003-07-15  Diego Novillo  <dnovillo@redhat.com>
170         * testsuite/libmudflap.c/fail21-frag.c: Add volatile modifiers.
171         * testsuite/libmudflap.c/fail15-frag.c: Likewise.
172         * testsuite/libmudflap.c/fail13-frag.c: Likewise.
174 2003-07-04  Frank Ch. Eigler  <fche@redhat.com>
176         * mf-hooks1.c, 2.c, 3.c: New file, splits up content from old ...
177         * mf-hooks: Removed.
178         * mf-impl.h (MF_VALIDATE_EXTENT, BEGIN_PROTECT, END_PROTECT):
179         Move these macros from old mf-hooks.c here.
180         * Makefile.am: Adapt to split-up hook sources for faster builds.
181         * Makefile.in: Regenerated.
183         * mf-heuristics.c: Remove #if-0 block.
185         * mf-impl.h (__mf_state): Reorganize declaration and implementation.
186         (__mf_starting_p): New state only for use while dlsym bootstrapping.
187         (CALL_REAL, __mf_init): Corresponding changes.
188         (TRACE, VERBOSE_TRACE): Include thread id and "mf:" prefix.  Update
189         all callers to remove redundant "mf:" prefix.
190         * mf-runtime.h.in: #define a few reentrancy macros for libmudflapth.
191         * mf-hooks3.c: Rewrite chunks to support per-thread __mf_state value.
192         (__mf_pthread_info): Become a hash table.
194         * testsuite/lib/mfdg.exp: Support new "dg-timeout" and
195         "dg-repetitions" directives to control test case execution.
196         * testsuite/libmudflap.cth/pass37-frag.c: Add timeout and repeat
197         options.
198         * testsuite/libmudflap.cth/pass39-frag.c: Ditto for this new test.
200 2003-06-25  Frank Ch. Eigler  <fche@redhat.com>
202         * mf-hooks.c (alloca): Separate into stub.
203         (__mf_wrap_alloca_indirect): New function.  Use CALL_REAL
204         malloc/free for alloca blocks.
205         (pthread_create): Tolerate failing pthread_attr_get* calls.
206         * mf-runtime.c (__mf_fini): Call __mf_wrap_alloca_indirect.
207         * mf-impl.h (CALL_WRAP): Remove macro.
208         * testsuite/libmudflap.c/pass21-frag.c: Include <alloca.h>.
209         * testsuite/libmudflap.c/pass23-frag.c: Include more struct
210         padding for ia64 BIT_FIELD_REF constructs.
212 2003-06-19  Frank Ch. Eigler  <fche@redhat.com>
214         * mf-hooks.c (struct pthread_info): Add "thread_errno" field.
215         (__mf_pthread_spawner, __mf_pthread_cleanup): Use it with GUESS 
216         libmudflap object type.
217         * mf-runtime.c (__mfu_unregister): Correct cemetary logic to avoid
218         crashes on unregistering STATIC objects.
220 2003-06-17  Frank Ch. Eigler  <fche@redhat.com>
222         Based on patch from Eyal Lebedinsky <eyal@eyal.emu.id.au>:
223         * mf-hooks.c (__mf_pthread_spawner): Register thread errno.
224         (time, strerror, fopen, fopen64, fclose, fread): New hooks.
225         (fwrite, fgetc, fgets, getc, gets, ungetc, fputc): New hooks.
226         (fputs, putc, puts, clearerr, feof, ferror, fileno): New hooks.
227         (printf, fprintf, sprintf, snprintf, vprintf, vfprintf): New hooks.
228         (vsprintf, vsnprintf, access, remove, fflush, fseek): New hooks.
229         (fseeko64, ftell, ftello64, rewind, fgetpos, fsetpos): New hooks.
230         (stat, stat64, fstat, lstat, mkfifo, setvbuf, setbuf): New hooks.
231         (setvbuf, opendir, closedir, readdir, recv, recvfrom): New hooks.
232         (recvmsg, send, sendto, sendmsg, setsockopt, getsockopt): New hooks.
233         (accept, bind, connect, gethostname, sethostname): New hooks.
234         (gethostbyname, wait, waitpid, popen, pclose, execve): New hooks.
235         (execv, execvp, system, dlopen, dlclose, dlerror, dlsym): New hooks.
236         (semop, semctl, shmctl, shmat, shmdt): New hooks.
237         * mf-runtime.h.in: Corresponding changes.
238         * mf-runtime.c (__mf_ini): Register stdio objects.  Use STATIC type.
239         (opts) Rename heur_argv_environ to heur_std_data.
240         (__mf_wrap_main): Use STATIC type for argv/environ strings.
241         * Makefile.am: Corresponding changes.
242         * Makefile.in: Regenerated.
244 2003-06-11  Frank Ch. Eigler  <fche@redhat.com>
246         * mf-heuristics.c (__mf_heuristic_check): Disable stack_bounds 
247         heuristic for threaded case, and for non-x86-linux targets.
248         * mf-hooks.c (__mf_0fn_calloc): Provide a working dummy implementation
249         for use during pre-main() program startup.
250         (__mf_0fn_*): Make these functions non-static.
251         * mf-impl.h (DECLARE, CALL_REAL): Support calls to 0fn backup hook 
252         functions.
253         * mf-runtime.c (__mf_state): Set initial state to "starting".
254         (__mf_resolve_single_dynamic): Tolerate repeated calls for same symbol.
255         (__wrap_main): New function to register argv[] and environ[] strings.
256         (__mf_ini): Call it.
257         (*): In all trace functions, use "%p" as formatter for uintptr_t.
259         * testsuite/libmudflap.c/pass38-frag.c: New test case.
260         * testsuite/libmudflap.cth/pass37-frag.c: Improved test.
261         
262         * acinclude.m4: Add comments with aoliva's concerns about x86_64 
263         pass_all.
264         * aclocal.m4, configure: Regenerated.
266 2003-06-04  Frank Ch. Eigler  <fche@redhat.com>
268         * acinclude.m4: Correct typo in AC_MSG_CHECKING.
269         * aclocal.m4, configure: Regenerated.
271 2003-06-03  Frank Ch. Eigler  <fche@redhat.com>
273         * acinclude.m4: Force "pass_all" deplibs_check_method for libtool
274         for x86_64 target.  Disable caching for this value.
275         * aclocal.m4, configure: Regenerated.
277 2003-06-02  Frank Ch. Eigler  <fche@redhat.com>
279         * testsuite/libmudflap.c/pass38-frag.c: Deleted.  -fwritable-strings
280         is about to become deprecated, and its present handling bugs are
281         unworthy of fixing.
283 2003-05-30  Frank Ch. Eigler  <fche@redhat.com>
285         * testsuite/libmudflap.c/pass38-frag.c: New test for
286         -fwritable-strings.
288 2003-05-23  Frank Ch. Eigler  <fche@redhat.com>
290         * mf-runtime.c (__mf_sigusr1_handle): Call unlocked variant of
291         __mf_report, asserting reentrant calling context.
293 2003-05-23  Frank Ch. Eigler  <fche@redhat.com>
295         * mf-hooks.c (realloc): Correct reentrancy logic.
296         * testsuite/libmudflap.c/hook-allocstuff.c: New test case.
298 2003-05-20  Frank Ch. Eigler  <fche@redhat.com>
300         * mf-hooks.c (LIBMUDFLAPTH_THREADS_MAX): New macro, replaces
301         PTHREAD_THREADS_MAX.  Update users.
302         * mf-runtime.c (__mf_usage): Print [active] instead of [default]
303         for active options.
304         * testsuite/Makefile.am (all-local): Prime dejagnu site.exp file
305         with libmudflapth presence indicator.
306         * testsuite/Makefile.in: Regenerated.
308 2003-05-16  Frank Ch. Eigler  <fche@redhat.com>
310         * Makefile.am (AM_CFLAGS): Remove "-ansi".
311         * configure.in: Remove silly no-pthreads => no-shared logic.
312         * Makefile.in, configure: Regenerated.
313         * mf-heuristics.c (__mf_heuristic_check): Remove reentrancy hacks.
314         * mf-hooks.c (BEGIN_PROTECT, END_PROTECT): Reorganize reentrancy
315         code.  Count reentrancy events.
316         (all hook functions): Don't directly manipulate __mf_state variable.
317         Add TRACE calls to hook functions without them.
318         * mf-impl.h (LOCKTH): Try to count lock contention events.
319         (VERBOSE_TRACE, TRACE): Remove reentrancy hacks.
320         * mf-runtime.c (BEGIN_RECURSION_PROTECT, END_RECURSION_PROTECT):
321         Reorganize reentrancy code.
322         (external __mf_ entry points): Use RECURSION_PROTECT mechanism to
323         identify reentrancy with mutex holding times.
324         (internal __mfu_ entry points): Remove internal reentrancy code.
325         (__mf_init): Use ordinary locked calls.
326         (__mfu_report): Print the two new counts.
327         * testsuite/lib/libmudflap.exp: Filter out junk ld/pthreads messages.
328         * testsuite/libmudfap.cth/cthfrags.exp: New test driver.
329         * testsuite/libmudflap.cth/pass37-frag.c: New pthreads test. 
330         * testsuite/libmudfap.cth/cfrags.exp: Adapt to new libmudflap
331         option defaults.
333 2003-05-09  Frank Ch. Eigler  <fche@redhat.com>
335         * configure.in: Add pthread support, plus glibc and porting hacks.
336         * Makefile.am (LIBMUDFLAPTH): New conditional, to build -lmudflapth
337         from objects built into ./pth/.
338         * mf-runtime.c (__mfu_watch,register,...): Fork new unlocked
339         functions for internal entry points.  Update callers to pick
340         locked vs. unlocked variants.
341         (__mf_resolve_single_dynamic): Extend to support symbol versioning
342         info coming in from a static data structure.
343         (*): Reorder miscellaneous declarations to group data vs functions.
344         (__mf_set_default_options): Simplify.
345         (__mf_usage): Mention threading status of host executable.
346         * mf-impl.h: Move max/min decls here.  Reorganize __mf_dynamic
347         decls to match above.
348         (LOCKTH, UNLOCKTH): New macros for Big Libmudflap Lock management.
349         * mf-heuristics.c: Choose between locked/unlocked calls.  Add
350         some lock/unlock markers.  Remove some unused code.
351         * mf-hooks: Ditto.
352         (pthread_create): New hook function.
353         (__mf_pthread_cleanup, _spawner): New helper functions.
354         * configure. aclocal.m4, config.h.in, Makefile.in: Regenerated.
356 2003-05-02  Frank Ch. Eigler  <fche@redhat.com>
358         * testsuite/libmudflap.c/fail27-frag.c: Add more volatile flags.
360 2002-04-28  Frank Ch. Eigler  <fche@redhat.com>
362         * Makefile.am (HOOKOBJS): Add *time related hooks.
363         * configure.in: Look for pthreads.h header.
364         * mf-hooks.c (asctime, ctime, gmtime, localtime): New wrappers.
365         * mf-runtime.c: Begin sketching some pthreads support.
366         (__mf_usage): Check for -lpthread presence.
367         (__mf_unregister): Confirm matching unregistration base.
368         (__mf_find_objects_rec): Reduce unnecessary recursion.
369         * mf-runtime.h.in: Add "nothrow" attribute to functions.  Add 
370         #defines for new hook functions.
371         * mf-impl.h: Corresponding changes.
372         * config.h.in, configure, Makefile.in: Regenerated.
374 2002-04-27  Diego Novillo  <dnovillo@redhat.com>
376         * testsuite/libmudflap.c/fail1-frag.c: Add volatile
377         modifiers to prevent being optimized away.
378         * testsuite/libmudflap.c/fail10-frag.c: Likewise.
379         * testsuite/libmudflap.c/fail13-frag.c: Likewise.
380         * testsuite/libmudflap.c/fail14-frag.c: Likewise.
381         * testsuite/libmudflap.c/fail15-frag.c: Likewise.
382         * testsuite/libmudflap.c/fail2-frag.c: Likewise.
383         * testsuite/libmudflap.c/fail20-frag.c: Likewise.
384         * testsuite/libmudflap.c/fail3-frag.c: Likewise.
386 2003-04-15  Frank Ch. Eigler  <fche@redhat.com>
388         * Makefile.am (libmudflap_la_LIBADD): Remove -ldl.
389         * configure.in: Look for uintptr_t and -ldl on target.
390         * mf-runtime.h.in: Adjust uintptr_t declaration logic.
391         * Makefile.in, aclocal.m4, configure, config.h.in: Regenerated.
392         * testsuite/Makefile.in: Regenerated.
393         * mf-runtime.c (__mf_sigusr1_respond): Tweak declaration and calls
394         for better C compliance.
396 2003-04-15  Frank Ch. Eigler  <fche@redhat.com>
398         * mf-hooks.c (MF_VALIDATE_EXTENT): Remove unnecessary reentrancy
399         prevention code.
400         * mf-runtime.c (__mf_set_default_options): Turn off
401         check-initialization.
402         (__mf_describe_object): Shorten description.
403         * testsuite/libmudflap.c/fail25-frag.c: Turn on check-initialization.
405 2003-04-07  Frank Ch. Eigler  <fche@redhat.com>
407         * mf-hooks.c (__mf_0fn_mmap): Correct return value, as per <rth>.
409 2003-04-02  Frank Ch. Eigler  <fche@redhat.com>
411         * mf-hooks.c (BEGIN_PROTECT): Handle startup-time reentrant
412         calls specially.
413         (__mf_0fn_malloc ... _munmap): New dummy backup calls.
414         * mf-impl.h (CALL_BACKUP): New macros.
415         * mf-runtime.c (__mf_init): Tweak __mf_state during startup.
417 2003-03-31  Frank Ch. Eigler  <fche@redhat.com>
419         * Makefile.am (AM_CFLAGS): Remove optimization flags.
420         (HOOKOBJS): Remove dlopen hook.
421         (libmudflap_la_LIBADD): Add -ldl.
422         * mf-hooks.c (dlopen): Remove hook.
423         * mf-impl.h (__mf_dynamic): Ditto.
424         * mf-runtime.c (__mf_resolve_dynamics): Ditto.
425         * Makefile.in: Regenerated.
427 2003-03-28  Frank Ch. Eigler  <fche@redhat.com>
429         * configure.in: Check for target gettimeofday, signal, some headers.
430         * mf-impl.h (__mf_opts): Add new "sigusr1_report" field.  Comment
431         out inop multi_threaded field.
432         * mf-runtime.c (options): Handle new "-sigusr1-report" option.
433         (__mf_set_options): Correct handling of "-help".
434         (__mf_sigusr1_respond): New function to manage SIGUSR1 response.
435         (__mf_check, __mf_register, __mf_unregister): Call it.
436         (__mf_insert_new_object, __mf_unregister): Respect HAVE_GETTIMEOFDAY.
437         (__mf_report_leaks): Make callable
438         (__mf_tree_analyze): Traverse in-order.  Accumulate address bit
439         distribution statistics.
440         (__mf_adapt_cache): Rewrite shift guessing logic based on address
441         bit distributions.
442         * config.h.in, configure: Regenerated.
443         * testsuite/libmudflap.c/fail27-frag.c: New test.
444         * testsuite/libmudflap.c/pass36-frag.c: New test.
446 2003-03-11  Frank Ch. Eigler  <fche@redhat.com>
448         * mf-runtime.h.in: Tweak.
449         * Makefile.am, configure.in: Tweak mf-runtime.h generation some more.
450         Don't use intermediate files nor AC_OUTPUT-time postprocessing.
451         * Makefile.in, testsuite/Makefile.in, configure: Regenerated.
453 2003-03-10  Frank Ch. Eigler  <fche@redhat.com>
455         * configure.in: Tweak generation of mf-runtime.h some more.  It
456         needs to work from both config.status and configure.
457         * configure: Regenerated.
459 2003-03-10  Frank Ch. Eigler  <fche@redhat.com>
461         * Makefile.am: Reorganize hook file building.  Add auto dependencies.
462         * configure.in: Tweak generation of mf-runtime.h.
463         * mf-runtime.h.in: Add new __MF_TYPE_HEAP_I.
464         * mf-hooks.c (*): Adapt to initialized-heap object type.
465         * mf-impl.h: Tweak cemetary boundaries.
466         * mf-runtime.c (__mf_check): Adapt to new initialized-heap object
467         type.
468         (__mf_insert_new_object, __mf_register, __mf_unregister): Ditto.
469         (__mf_describe_object, __mf_report_leaks, __mf_violation): Ditto.
470         * testsuite/lib/libmudflap.exp (includes): Include build tree.
471         * testsuite/libmudflap.c/pass{26,5}: Further adapt to initialization
472         checking.
473         * testsuite/.../fail{25,26}-frag.c: New tests.
474         * testsuite/.../pass{32,33,34,35}-frag.c: New tests.
475         * Makefile.in, configure: Regenerated.
477 2003-03-05  Frank Ch. Eigler  <fche@redhat.com>
479         * mf-runtime.c (__mf_set_default_options): Turn on initialization
480         checking by default.
481         (__mf_insert_new_object): As a temporary hack, assume that new
482         objects registered on the stack start out initialized.
483         * testsuite/libmudflap.c/fail9,pass23,pass[6789]-*: Initialize
484         heap objects by hand.
486 2003-03-05  Frank Ch. Eigler  <fche@redhat.com>
488         Switch to macro-style hooks for str*/mem*/b* functions.
489         * mf-runtime.h.in (__MF_TYPE_*): Moved some internal values out.
490         (mem*, str*, b*): Added macro-style hooks for _MUDFLAP case.
491         * mf-runtime.c: #include config.h to enable glibc backtraces again.
492         (__mf_set_default_options): Turn off heur_proc_map.
493         (*): Adapt to to macro-style hook functions.
494         (__mf_object_dead_head, __mf_object_cemetary): Correct bounds.
495         (__mf_check, __mf_register, __mf_unregister): Tweak tracing message.
496         (__mf_violation): Handle __MF_VIOL_WATCH.
497         * mf-impl.h (__MF_TYPE_*): Moved these internal values here.
498         (__mf_dynamic): Removed mem*/str*/b* functions.
499         (TRACE, VERBOSE_TRACE): Add reentrancy locking.
500         (WRAPPER2): New macro for macro-style hooks.
501         * mf-hooks.c: Convert mem*/str*/b* functions to simpler
502         macro-style hooks.
503         (BEGIN_PROTECT): Tweak tracing vs reentrancy-lock ordering.
504         * mf-heuristics.c: Adapt to macro-style hook functions.
505         Correct some comments.
506         * testsuite/lib/mfdg.exp (dg-test): Simplify result string for
507         output pattern tests.
508         * testsuite/libmudflap.c/fail[89]-frag.c: Elaborate output test.
509         * testsuite/libmudflap.c++/c++frags.exp: Enable non-static tests.
511 2003-02-28  Frank Ch. Eigler  <fche@redhat.com>
513         * testsuite/libmudflap.c/fail23-frag.c, pass30-frag.c: New tests
514         for global array registration.
515         * testsuite/libmudflap.c++/fail24-frag.cxx, pass31-frag.cxx: Ditto.
516         * testsuite/libmudflap.c++/c++frags.exp: Tweak -static multilib hack.
518 2003-02-27  Frank Ch. Eigler  <fche@redhat.com>
520         * Makefile.am: Add gross make bug workarounds.  Tweaked
521         SUBDIRS and AM_CFLAGS.
522         * Makefile.in: Regenerated.
524 2003-02-26  Frank Ch. Eigler  <fche@redhat.com>
526         Switch to dejagnu.
527         * configure.in (AC_PROG_CXX): Don't look for C++ any more.
528         * Makefile.am (TESTS): Remove simple automake testing.
529         * configure, Makefile.in: Regenerated.
530         (SUBDIRS): Include new testsuite/ directory.
531         * tests/*: Removed all files; moved bulk under:
532         * testsuite/*: New subdirectory tree.
533         * testsuite/libmudflap.c/cfrags.exp: New file, C test driver.
534         * testsuite/libmudflap.c++/c++frags.exp: New file, C++ test driver.
535         * testsuite/lib/libmudflap.exp: New file, derived from libstdc++.
536         * testsuite/lib/mfdg.exp: New file, derived from dejagnu.
537         * testsuite/config/default.exp: New file.
538         * testsuite/Makefile.am, Makefile.in: New files.
540 2003-01-29  Frank Ch. Eigler  <fche@redhat.com>
542         * Makefile.am (TESTS_ENVIRONMENT): Remove redundant "-mode-check".
543         (TESTS): Add fail22 and pass29 tests.
544         * mf-runtime.h.in: Change API to take void*/size_t region parameters.
545         Add new access-type parameter for __mf_check.  Move __MF_VIOL* out.
546         * mf-impl.h: Corresponding changes.  Update CLAMP* macros for void*
547         values.  Move __MF_VIOL* here.
548         * mf-runtime.c (*): Adapt to void*/size_t API in mf-runtime.h.
549         (check_initialization): New field in __mf_opts.  Default off.
550         (read_count,write_count): New fields in __mf_object.
551         (__mf_check): Implement basic initialization checking.
552         (__mf_insert_new_object): Assume STATIC|GUESS regions are initialized.
553         (__mf_describe_object): Print new fields.
554         (__mf_violation): Identify check/read vs. check/write in messages.
555         * test/pass29-frag.c, test/fail22-frag.c: Basic tests for new
556         "-check-initialized" mudflap option.
557         * test/pass25-frag.c, test/fail21-frag.c: Adapt to API changes.
558         * mf-hooks.c (MF_VALIDATE_EXTENT): Add new access-type parameter.
559         Drop __FILE__/__LINE__ hack.  Update callers.
560         (*): Adapt to new mf-runtime.h API.
561         * Makefile.in: regenerated.
563 2003-01-24  Frank Ch. Eigler  <fche@redhat.com>
565         * configure.in: Build mf-runtime.h a more proper way.
566         * mf-hooks.c (strdup, strndup): Correct reentrancy logic.
567         * mf-runtime.c (verbose_violations): Turn on by default.
568         * mf-runtime.h.in: Remove some miscellaneous stuff ...
569         * mf-impl.h: ... and move it here.
570         * configure: Regenerated.
572 2003-01-22  Frank Ch. Eigler  <fche@redhat.com>
574         * configure.in: Look for C++ compiler.
575         * test/*-frag.c, mf-driver.c: Reformatted with GNU indent and
576         fixed type warnings when built with C++.
577         * test/pass27-frag.cxx, pass28-frag.cxx: New C++ tests.
578         * Makefile.am (TESTS): Run them.
579         (*) Add new rules for building and running C++ tests.
580         (TESTFLAGS): Set new default to avoid libstdc++-v3 shlib issues.
581         * mf-runtime.h.in: Protect with extern "C".
582         * Makefile, configure: Regenerated.
584 2003-01-06  Frank Ch. Eigler  <fche@redhat.com>
586         Portability improvements.
587         * configure.in: Look for glibc backtrace headers/functions.
588         * mf-hooks.c: Don't include <execinfo.h> any more.
589         * mf-runtime.c (__mf_set_options): Call more stdlib functions
590         via CALL_REAL.
591         (__mf_backtrace): Provide alternate baby implementation in 
592         absence of glibc.
593         * test/mf-driver.c: Portability tweaks.
594         * acinclude.m4: New file, containing top level libtool.m4.
595         * aclocal.m4, configure, Makefile.in, config.h.in: Regenerated.
597 2002-12-19  Frank Ch. Eigler  <fche@redhat.com>
599         * mf-runtime.h.in (HAVE_UINTPTR_T): Define unconditionally.
601 2002-11-08  Frank Ch. Eigler  <fche@redhat.com>
602         
603         * mf-runtime.c (options): Add new "wipe-heap", "wipe-stack"
604         options.
605         (__mf_unregister): Implement stack/heap object wiping.
606         (__mf_set_options): Renamed from __mf_process_opts.
607         (__mf_uncache_object): Change arg type, correct callers. 
608         * mf-impl.h: Corresponding changes.
609         * mf-hooks.c (realloc): Save/restore heap-wiping flag.
610         * mf-runtime.h.in (__mf_set_options): Extend public API.
611         * test/pass26-frag.c: New test for stack wiping.
612         * Makefile.am (TESTS): Run it.
613         * Makefile.in: Regenerated.
614         
615 2002-11-07  Frank Ch. Eigler  <fche@redhat.com>
617         * mf-runtime.h.in (__mf_watch, __mf_unwatch): Extend public API.
618         * mf-runtime.c (__mf_object_t): Add watching_p field.
619         (__mf_watch_or_not): New function to implement
620         object watch flagging.
621         (__mf_watch, __mf_unwatch): New wrappers for above.
622         (__mf_check, __mf_describe_object): Handle objects with watching_p.
623         (__mf_count_violation): Enlarge array.
624         (__mf_uncache_object): Renamed from __mf_remove_old_object.  Don't
625         unlink object.  Clear cache properly.
626         (__mf_unregister): Unlink object explicitly before uncaching.
627         * test/fail21-frag.c, pass25-frag.c: New tests.
628         * Makefile.in, aclocal.m4: Regenerated.
629         
630 2002-11-05  Frank Ch. Eigler  <fche@redhat.com>
632         * test/fail20-frag.c: New test for NULL pointer dereferencing.
633         * Makefile.am (TESTS): Add it.
634         * test/pass-stratcliff.c: Add decls of stpcpy.
635         * configure.in: Test for <stdint.h>.  Generate mf-runtime.h in
636         build tree from config.h and new file mf-runtime.h.in.
637         * mf-runtime.h.in: Renamed from mf-runtime.h.  Tweak uintptr_t decl.
638         * Makefile.in, configure, config.h.in: Regenerated.
639         * mf-hooks.c: Add #undef for wrapped glibc str*/mem* macros.    
640         * mf-runtime.c (options, __mf_set_default_options): Support new 
641         default "abbreviate" option.
642         (__mf_object.description_epoch): New field.
643         (__mf_describe_object): Conditionally abbreviate objects already
644         displayed in current epoch.  Accept NULL input to increment epoch.
645         (__mf_fini, __mf_ini): Reset description epoch.
646         (__mf_register, __mf_unregister, __mf_adapt_cache, __mf_init): Ensure
647         that NULL pointer slot in lookup cache is invalidated.  Register a
648         NOACCESS region around NULL.
649         * mf-impl.h: Corresponding changes.
651 2002-10-16  Frank Ch. Eigler  <fche@redhat.com>
653         * test/fail19-frag.c, pass24-frag.c, pass-stratcliff.c: New tests.
654         * Makefile.am: Run them.  Install mf-runtime.h.
655         * Makefile.in: Regenerated.
656         * mf-hooks.c: Add some markers for more missing functions.
657         * mf-runtime.c (__mf_adapt_cache): Experiment with a utilization-based
658         statistic to tune tune cache size (mask).
660 2002-10-01  Frank Ch. Eigler  <fche@redhat.com>
662         * test/pass23-frag.c: New test for bit_field_ref expressions.
663         * Makefile.am, Makefile.in: Add new test.
664         * mf-hooks.c (mmap, munmap): Rewrite to track individual pages.
665         (MF_VALIDATE_EXTENT): Accept zero-size mem/str operations.
666         * mf-runtime.c (__mf_init): Register errno global.
667         (__mf_find_object): Removed function.
668         (__mf_check): Rewrite logic to support accesses across some
669         contiguous but distinctly registered objects.
670         (__mf_remove_old_object): Tolerate cache entries that span
671         contiguous objects.
673 2002-09-30  Frank Ch. Eigler  <fche@redhat.com>
675         * test/pass21-frag.c, pass22-frag.c: New tests: alloca, bitfields.
676         * Makefile.am, Makefile.in: Run new tests.
677         * mf-hooks.c (alloca): Correct stack direction logic.
679 2002-09-26  Frank Ch. Eigler  <fche@redhat.com>
681         * mf-impl.h (adapt_cache): New option.
682         * mf-runtime.c (__mf_set_default_options): Set its default value.
683         Tweak the tree_aging parameter down.
684         (__mf_check): Maintain separate counter for cache-adaptation.
685         (__mf_tree_analyze): New function to collect object tree stats.
686         (__mf_adapt_cache): New function to automate cache parameters.
688 2002-09-24  Frank Ch. Eigler  <fche@redhat.com>
690         * mf-heuristics.c (__init_misc, __mf_heuristic_check): Add
691         hypothetical #if-0'd argv/envp region registration.
692         * mf-runtime.c (__mf_init): Add kludged form of above.
693         (*) Add "heur_argv_environ" flag, default on, to govern this.
694         * mf-impl.h: Corresponding changes.
696 2002-09-20  Frank Ch. Eigler  <fche@redhat.com>
698         * test/fail18-frag.c: New test file for NOACCESS regions.
699         * Makefile.am (TESTS): Add new test.
700         * Makefile.in: Regenerated.
702         * mf-heuristics.c (__mf_heuristics_check): Correct deja_vu logic.
703         * mf-impl.h (tree_aging): Add new mudflap_option, default 1000000.
704         (optimize_object_tree): Remove unused mudflap_option.
705         * mf-runtime.h (__MF_TYPE_NOACCESS): New region type.  Add printing
706         support throughout.  Use .._MAX_CEM for cemetary upper bound.
707         * mf-runtime.c (__mf_init): Register __mf_* globals as NOACCESS
708         regions.
709         (__mf_object): Add new liveness field for use by tree aging.
710         (__mf_check): Trigger tree aging when needed.
711         (__mf_age_tree): New function to decay liveness field.
712         (__mf_find_objects_rec): Use liveness field to rotate tree.
713         (__mf_insert_new_object): Only provide backtrace for HEAP objects.
714         (__mf_unregister): Ditto.
715         (__mf_register): Tweak duplicate-static message.
716         (__mf_violation: Tweak nearby-object counter printing.
718 2002-09-16  Frank Ch. Eigler  <fche@redhat.com>
720         * test/pass20-frag.c: New test file.
721         * Makefile.am (TESTS): Reorganize.  Add pass20 test.
722         * Makefile.in: Regenerated.
724         * mf-impl.h (TRACE_IN, TRACE_OUT): Remove macros.  Update callers.
725         * mf-hooks.c (BEGIN_PROTECT): Add hook tracing here.
726         * mf-heuristic.c (__mf_heuristic_check): Track seen /proc/self/map
727         entries to avoid repeat registration.
728         * mf-runtime.c (__mf_object_cemetary): Don't bother bury GUESS regions.
729         (__mf_register, __mf_unregister): Rewrite GUESS handling logic.
730         
731 2002-09-09  Frank Ch. Eigler  <fche@redhat.com>
733         * Makefile.am: Create test sources with #include, not cat>>.
734         * Makefile.in: Regenerated.
735         * test/buildtest.sh: Removed.
736         * test/driver.c (abort_handler, main): Be quiet.
738 2002-09-06  Frank Ch. Eigler  <fche@redhat.com>
740         * test/pass18-frag.c, pass19-frag.c: New tests.
741         * Makefile.am (check): Run them.  Rebuild test programs each time.
742         * Makefile.in: Regenerated.
744 2002-09-06  Frank Ch. Eigler  <fche@redhat.com>
746         * mf-runtime.c (__mf_register): Correct SEGV-inducing error in
747         overlapping object search.
748         (__mf_violation): Likewise for nearby objects.
749         Improve nearby-object listing.
750         
751         cleanup:
752         * mf-runtime.c, mf-hooks.c: Remove "{{{"/"}}}" folding marks.
753         * mf-heuristics.c (__mf_heuristic_check): Tweak message.
755 2002-09-03  Frank Ch. Eigler  <fche@redhat.com>
757         alloca support:
758         * Makefile.am (AM_CFLAGS): New definition of needed settings.
759         (HOOKOBJS): Add alloca-hook.o.
760         * mf-hooks.c (alloca): New function to implement alloca in libiberty
761         style.
762         * mf-runtime.c (__mf_report): Call alloca(0) to flush remaining blocks.
763         (__mf_backtrace): Reimplement without using alloca.
764         * Makefile.in: Regenerated.
766         cleanup:
767         * mf-hooks.c: Use VERBOSE_TRACE throughout instead of fprintf(stderr).
768         Correct signedness bugs in length-tracking variables.
769         * mf-impl.h: Make options unsigned.
770         (CALL_WRAP): New macro to parallel CALL_REAL().
771         (DECLARE): Remove erroneous ";" at end.
772         * mf-runtime.c, mf-hooks.c, mf-heuristics.c: Replace remaining %p
773         formatting specs with %08lx.  Correct several compiler warnings.
775 2002-08-28  Frank Ch. Eigler  <fche@redhat.com>
777         * mf-runtime.c (__mf_violation): Try harder to locate nearby objects.
779 2002-08-27  Frank Ch. Eigler  <fche@redhat.com>
781         libmudflap hook breakup:
782         * Makefile.am (TESTS_ENVIRONMENT): Add ../../gcc to LD_LIBRARY_PATH
783         for libgcc_s.
784         (TESTS): Make dependent on libmudflap.
785         (HOOKOBJS): Break up mf-hooks.o into many little hook objects,
786         compiled from segments of mf-hooks.c.
787         * mf-hooks.c: Corresponding changes: wrap each function in
788         #ifdef/#endif.
789         * Makefile.in: Regenerated.
791         Heuristics reorganization:
792         * mf-heuristics.c (__mf_register_ro_sections, __mf_init_heuristics): 
793         Remove these functions.  Update callers.
794         (__mf_heuristic_check): Incorporate all the various heuristics.
795         Encode cacheability/retry judgement into trinary return value.
796         Separate start-end logic into a separate fallback heuristic.  Only
797         register relevant /proc/self/map segments.
798         * mf-impl.h: Corresponding changes.
799         * mf-runtime.c (__mf_check): Reorganize heuristics fallback logic.
800         (__mf_init): Don't call __mf_init_heuristics.
802         Tracing cleanup:
803         * mf-heuristics.c, mf-runtime.c: Use new MUDFLAP_OPTION
804         "-verbose-trace" to emit all tracing messages other than those of
805         basic public api.  Eliminate some duplicate/excessive messages.
806         * mf-runtime.h: Corresponding changes.
808 2002-08-27  Graydon Hoare  <graydon@redhat.com>
810         * mf-impl.h (WRAPPER): Change to create linker aliases for __wrap
811         and __real when compiled with -DPIC.
812         * mf-hooks.c (WRAPPER): Change all uses of WRAPPER macro slightly.
813         * Makefile.am (AUTOMAKE_OPTIONS): Fix LD_LIBRARY_PATH for tests.
814         * Makefile.in: Regenerate.
816 2002-08-26  Graydon Hoare  <graydon@redhat.com>
818         * mf-impl.h: New file, private implementation header.
819         * mf-runtime.h: Reorganize a bit.
820         (CLAMPSZ): Fix arithmetic.
821         (__MF_CACHE_MISS_P): Fix arithmetic.
822         * mf-runtime.c: Reorganize a bit.
823         (__mf_dynamic): New structure.
824         (resolve_single_dynamic): New function.
825         (__mf_resolve_dynamics): New function.
826         (__mf_init): Initialize dynamic wrappers.
827         * mf-hooks.c: Macro-ize __real calls.
828         Clamp various bits of arithmetic.
829         Add explicit __mf_check call contexts.
830         * Makefile.am: Add dependencies on mf-impl.h
831         * Makefile.in: Regenerate.
832         * configure.in: Comment out shared override.
833         * configure: Regenerate.
835 2002-08-22  Graydon Hoare  <graydon@redhat.com>
837         * mf-runtime.c (__mf_process_opts): Sanity-check free_queue_length.
838         (__mf_check): Re-inialize and check heuristics before violation.
839         (__mf_register): Permit updating pure-guess regions.
840         * mf-hooks.c (__wrap_free): Correct some free queue logic.
841         (__wrap_dlopen): New wrapper function.
842         (__wrap_mmap): New wrapper function.
843         (__wrap_munmap): New wrapper function.
844         * mf-heuristics.c (__mf_register_ro_sections): Register *all* regions
845         which are not stack addresses.
846         (is_stack_address): New function.
847         (__mf_init_heuristics): Save and restore state, always initialize with
848         "starting" state.
850 2002-08-21  Frank Ch. Eigler  <fche@redhat.com>
852         * mf-hooks.c (MF_VALIDATE_EXTENT): Rewrite to correct off-by-one
853         error.  Pass location string.
854         (wrap_strcpy, wrap_strncpy): Remove extra %s in trace strings.
855         * mf-runtime.c (options): Add lc-mask, lc-shift options.
856         (__mf_process_opts): Apply some sanity checking for lc-mask.
857         (__mf_check, __mf_violation): Take new location-string argument.
858         Update callers to pass NULL if necessary.
859         (__mf_backtrace): New smart backtracer function.  Calls replace
860         several ad-hoc blocks elsewhere.
861         (__mf_describe_object): Remove bad reentrancy test.  Improve
862         tracing message.
863         * mf-runtime.h: Corresponding changes.  Public/private markup.
864         (__MF_CACHE_MISS_P): New macro.
866 2002-08-20  Graydon Hoare  <graydon@redhat.com>
868         * mf-runtime.h: New option: stack_bound (heuristic). 
869         Move some macros out of implementation files.
870         * mf-runtime.c: New option string: -stack-bound.
871         Unify recursion protection with hooks. 
872         Add more logging.
873         (__mf_check): Call __mf_heuristic_check.
874         (__mf_process_opts): Fix "no-" processing.
875         * mf-heuristics.c (__mf_heuristic_check): New function.
876         * mf-hooks.c: Much off-by-one fixing, recursion protection.
878 2002-08-20  Frank Ch. Eigler  <fche@redhat.com>
880         Option parsing improvements, region splitting bug fixes:
881         * mf-heuristics.c (__mf_register_ro_sections): Add warned casts.
882         * mf-runtime.h (heur_proc_map): New libmudflap option.
883         * mf-runtime.c (__mf_set_default_options): Set it.
884         (__mf_usage): Print default values/status.
885         (__mf_process_opts): Support general "no-" option string prefix.
886         (__mf_init): Print __mf_usage on unknown-option error.
887         (__mf_register): Print trace message up front.
888         Correct region splitting logic for case where a subregion disappears.
889         Correct memory leak.
890         (__mf_violation): Make even basic message conditional on option.
892         Build cleanup:
893         * Makefile.am (TESTS_ENVIRONMENT): Add -no-heur-proc-map.
894         (clean-local): New target.
895         (test/*x rules): Add -g CFLAGS.
896         (CFLAGS): Add -freorder-blocks.
897         (MFCONFIG_CFLAGS, INCLUDE): Remove unneeded settings.
898         * Makefile.in: Regenerated.
899         * Makefile, mf-config.h: Removed files.
901 2002-08-16  Graydon Hoare  <graydon@redhat.com>
903         * mf-runtime.c (__mf_insert_new_object): Factor out of
904         __mf_register.
905         (__mf_remove_old_object): Factor out of __mf_unregister.
906         (__mf_register): Handle guessed regions, splitting
907         guesses when new registrations arrive.
908         (__mf_unregister): Do not unregister guesses.
909         * mf-runtime.h: Move convenience macros around, 
910         declare new option fields. Add __MF_TYPE_GUESS.
911         * mf-hooks.c (__wrap_*alloc): Use crumple zones.
912         (__wrap_free): Call __real_free for deferred frees.
913         * Makefile.am: Add more tests, fix dependency.
914         * Makefile.in: Regenerate.
915         * test/pass[13..17]-frag.c: New testcases.
916         * test/fail[13..17]-frag.c: New testcases.
918 2002-08-15  Graydon Hoare  <graydon@redhat.com>
920         * mf-heuristics.c: New file.
921         * mf-runtime.c (options): Add -trace-calls option.
922         (__mf_init): Call __mf_init_heuristics.
924 2002-08-14  Graydon Hoare  <graydon@redhat.com>
926         * Makefile.am (TESTS): Add testsuite support.
927         * Makefile.in: Regenerate.
928         * test/mf-driver.c: New file.
929         * test/buildtest.sh: New file.
930         * test/passNN-frag.c: New testcases.
931         * test/failNN-frag.c: New testcases.
933 2002-08-14  Graydon Hoare  <graydon@redhat.com>
935         * mf-hooks.c: Change __real_strlen() to __real_strlen()+1 when
936         verifying non-size-limited string extents.
938 2002-08-14  Frank Ch. Eigler  <fche@redhat.com>
940         * mf-hooks.c: Make __wrap string* functions use __real_str[n]len
941         instead of plain str[n]len for internal checks.
942         * mf-runtime.c (__mf_violation): Print optional stack traceback.
944 2002-08-14  Frank Ch. Eigler  <fche@redhat.com>
946         * mf-hooks.c: Remove #if-0 around hooks that are now ld-wrapped.
948 2002-08-13  Graydon Hoare  <graydon@redhat.com>
950         * mf-runtime.c: Rework configuration to operate on
951         environment variable options rather than #defines
952         (__mf_violation): Add simple fork-a-gdb violaiton mode.
953         (__mf_init): Set static __mf_active_p flag on startup,
954         to inhibit mudflap wrap-based checking during crt0.s.
955         * mf-runtime.h: Declare options structure.
956         * mf-hooks.c: New wrappings for mem*, b*, str*
957         libc functions (temporarily #if 0-ed out).
959 2002-08-12  Frank Ch. Eigler  <fche@redhat.com>
961         * Makefile.am, configure.in: New files.
962         * Makefile.in, Makefile, configure, config.h.in: New generated files.
963         * stamp-h.in, aclocal.m4: Ditto.
965 2002-08-08  Frank Ch. Eigler  <fche@redhat.com>
967         * Makefile: New file.
968         * mf-config.h: New file: runtime configuration.
969         * mf-hooks.c: New file: interposed libc functions.
970         * mf-runtime.c: New file: bulk of runtime.
971         * mf-runtime.h: New file: public functions.