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