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