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