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