[cfe-dev] idea: feature to force cleanup of freed stack/heap - useful enough?
Dennis Luehring
dl.soluz at gmx.net
Thu Oct 31 00:37:27 PDT 2013
Am 31.10.2013 07:09, schrieb Kostya Serebryany:
> >> For heap, you need to change the malloc implementation, not clang/llvm.
> >> In fact, many malloc implementation do this already in debug mode.
> >>
> >> For stack, yes, you can to this.
> >> It will be rather expensive -- in some cases more expensive than what asan
> >> does (!!).
> >> Consider you have a function with a large stack frame, e.g. 8K, which is
> >> called very frequently.
> >> Your proposal means we need to memset 8K of stack on every call.
> >> While asan only memsets 1K of shadow on every call.
> >>
> >
> > so it would be better to extend AddressSanitizer to detect such cases
> >
>
> This sounds similar to
> https://code.google.com/p/address-sanitizer/issues/detail?id=73
>
sounds also similar
https://code.google.com/p/address-sanitizer/issues/detail?id=83
More information about the cfe-dev
mailing list