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