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