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