On Jan 1 2007 22:40, Ingo Oeser wrote:
>On Monday, 1. January 2007 17:25, Andreas Schwab wrote:
>> Ingo Oeser <[EMAIL PROTECTED]> writes:
>> > Then this works, because the side effect (+20) is evaluated only once.
>>
>> It's not a side effect, it's a non-lvalue, and you can't take the address
>>
On Monday, 1. January 2007 17:25, Andreas Schwab wrote:
> Ingo Oeser <[EMAIL PROTECTED]> writes:
> > Then this works, because the side effect (+20) is evaluated only once.
>
> It's not a side effect, it's a non-lvalue, and you can't take the address
> of a non-lvalue.
Just verified this. So If w
Hi!
> > I decided to keep it simple. If someone is calling kfree_nullify() with
> > anything other than a
> > simple variable, then they should call kfree().
>
> kfree_nullify() has to replace kfree() to be of any use one day. So this is
> not an option.
>
Doing kfree() that writes to its arg
Ingo Oeser <[EMAIL PROTECTED]> writes:
> Hi,
>
> On Monday, 1. January 2007 07:37, Amit Choudhary wrote:
>> --- Ingo Oeser <[EMAIL PROTECTED]> wrote:
>> > #define kfree_nullify(x) do { \
>> >if (__builtin_constant_p(x)) { \
>> >kfree(x); \
>> >} else { \
>> >typeof(
Hi,
On Monday, 1. January 2007 07:37, Amit Choudhary wrote:
> --- Ingo Oeser <[EMAIL PROTECTED]> wrote:
> > #define kfree_nullify(x) do { \
> > if (__builtin_constant_p(x)) { \
> > kfree(x); \
> > } else { \
> > typeof(x) *__addr_x = &x; \
Ok, I should change that
--- Ingo Oeser <[EMAIL PROTECTED]> wrote:
> On Sunday, 31. December 2006 14:38, Bernd Petrovitsch wrote:
> > That depends on the decision/definition if (so called) "double free" is
> > an error or not (and "free(NULL)" must work in POSIX-compliant
> > environments).
>
> A double free of non-NULL
In article <[EMAIL PROTECTED]> (at Mon, 1 Jan 2007 01:43:00 +0100), Ingo Oeser
<[EMAIL PROTECTED]> says:
> On Sunday, 31. December 2006 14:38, Bernd Petrovitsch wrote:
> > That depends on the decision/definition if (so called) "double free" is
> > an error or not (and "free(NULL)" must work in PO
On Sunday, 31. December 2006 14:38, Bernd Petrovitsch wrote:
> That depends on the decision/definition if (so called) "double free" is
> an error or not (and "free(NULL)" must work in POSIX-compliant
> environments).
A double free of non-NULL is certainly an error.
So the idea of setting it to NUL
On Thu, 2006-12-28 at 09:54 +0100, Jan Engelhardt wrote:
> On Dec 27 2006 17:10, Pavel Machek wrote:
>
> >> Was just wondering if the _var_ in kfree(_var_) could be set to
> >> NULL after its freed. It may solve the problem of accessing some
> >> freed memory as the kernel will crash since _var_ w
On Dec 27 2006 17:10, Pavel Machek wrote:
>> Was just wondering if the _var_ in kfree(_var_) could be set to
>> NULL after its freed. It may solve the problem of accessing some
>> freed memory as the kernel will crash since _var_ was set to NULL.
>>
>> Does this make sense? If yes, then how abou
Hi!
> Was just wondering if the _var_ in kfree(_var_) could be set to NULL after
> its freed. It may solve
> the problem of accessing some freed memory as the kernel will crash since
> _var_ was set to NULL.
>
> Does this make sense? If yes, then how about renaming kfree to something else
> an
Hi,
Was just wondering if the _var_ in kfree(_var_) could be set to NULL after its
freed. It may solve
the problem of accessing some freed memory as the kernel will crash since _var_
was set to NULL.
Does this make sense? If yes, then how about renaming kfree to something else
and providing a
12 matches
Mail list logo