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