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