Additional debugging library
Rob Landley
rob at landley.net
Fri Feb 27 00:31:43 UTC 2009
On Friday 20 February 2009 17:42:37 Cristian Ionescu-Idbohrn wrote:
> On Fri, 20 Feb 2009, Bernhard Reutner-Fischer wrote:
> > On Fri, Feb 20, 2009 at 09:20:15PM +0100, Cristian Ionescu-Idbohrn wrote:
> > >There are 2 CONFIG options available:
> > >
> > > DMALLOC and EFENCE
> > >
> > >I don't seem to be able to get any one of them do what I expect them to
> > > :( Is anyone using one or both and willing to share the magic?
> >
> > Not much of help i fear but I think that both worked in the 1.2.x era.
> > What does not work?
>
> Let's take electric-fence. CONFIG instructions are:
>
> Electric-fence support:
> -----------------------
> This enables compiling with Electric-fence support. Electric
> fence is another very useful malloc debugging library which uses
> your computer's virtual memory hardware to detect illegal memory
> accesses.
1) -fmudflap has been built into gcc for years now, and even tinycc had its
own built-in array bounds checking.
2) This is either CFLAGS or LDFLAGS. A quick grep shows that support for
CONFIG_EFENCE boils down to three lines in the Makefile:
ifeq ($(CONFIG_EFENCE),y)
LDLIBS += efence
endif
So what the user really needs to do is set the appropriate LDFLAG. Our config
help text for SELINUX specifies how to do this for that library, I dunno why
EFENCE would be special.
> After enabling that CONFIG and building a standalone ash, I see:
>
> LINK busybox_unstripped
> Trying libraries: crypt efence m
> Library crypt is not needed, excluding it
> Library efence is not needed, excluding it
> Library m is not needed, excluding it
> Final link with: <none>
I have no idea why the busybox makefile reimplements the --as-needed flag.
> There's duma too:
>
> Package: duma
> Version: 2.5.14-2
> Depends: libc6 (>= 2.7-1), libgcc1 (>= 1:4.1.1), libstdc++6 (>= 4.1.1)
> Description: library to detect buffer overruns and under-runs in C and C++
> programs
> Open-source library to detect buffer overruns and under-runs
> in C and C++ programs.
> .
> This library is a fork of Bruce Perens Electric Fence library and adds
> some new features to it.
>
> Did anyone play with it?
Do we really want an explicit config option for every potential third party
debugging or profiling library? The build accepts environmental CFLAGS and
LDFLAGS for a reason...
Rob
More information about the busybox
mailing list