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