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