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