Tomáš Ebenlendr wrote:
>> Error stack is statically allocated and it is protected so that it
>> cannot overflow. Error stack is defined as being static to file
>> kern/err.c so there is no direct access possible to error stack.
>>
>> Error stack is emptied in grub_print_error function. (And this is
Joel Buckley wrote:
> There is a second bug though...
>
> A possible stack memory-leak is possible. Replace the
> first line with the following to avoid the memory leak:
>
>if (grub_errno != GRUB_ERR_NONE) {
> grub_error_push();
>}
>
> Otherwise, a useless push is done.
Then you
> Error stack is statically allocated and it is protected so that it
> cannot overflow. Error stack is defined as being static to file
> kern/err.c so there is no direct access possible to error stack.
>
> Error stack is emptied in grub_print_error function. (And this is called
> before prompt is p
There is a second bug though...
A possible stack memory-leak is possible. Replace the
first line with the following to avoid the memory leak:
if (grub_errno != GRUB_ERR_NONE) {
grub_error_push();
}
Otherwise, a useless push is done.
leoJ.
Vesa Jääskeläinen wrote:
Tomáš Ebenlen
Tomáš Ebenlendr wrote:
> I think there is a 'bug' in the example. Or maybe I'm missing something.
Nope, it was intentional. :)
> On 17 Prosinec 2005, 18:40, Vesa Jääskeläinen napsal(a):
>
>> ---
>> /* Save possible old error message. */
>> grub_error_push ();
>>
>> /* Do your stuff here. *
I think there is a 'bug' in the example. Or maybe I'm missing something.
On 17 Prosinec 2005, 18:40, Vesa Jääskeläinen napsal(a):
> ---
> /* Save possible old error message. */
> grub_error_push ();
>
> /* Do your stuff here. */
> call_possibly_failing_function ();
>
> if (grub_errno != GRU
I made a test implementation of the proposal. I also made some tests
with video subsystem and it eliminated problem I was having.
In case there is a similar case that I had, so it is necessary to reset
error state but not to discard the actual error message here is some
idea how it should be used:
Yoshinori K. Okuji wrote:
> On Saturday 10 December 2005 11:05 am, Vesa Jääskeläinen wrote:
>> Changing coding guide of using grub_errno we could probably get this
>> issue "working". But then there is still problem with lost error
>> messages if subsequent code fails with real error.
>>
>> If we j
On Saturday 10 December 2005 11:05 am, Vesa Jääskeläinen wrote:
> Changing coding guide of using grub_errno we could probably get this
> issue "working". But then there is still problem with lost error
> messages if subsequent code fails with real error.
>
> If we just zero out grub_errno in code b
Marco Gerards wrote:
> Vesa Jääskeläinen <[EMAIL PROTECTED]> writes:
>
>> Some folks might have overlooked my earlier post as I wrote it to video
>> subsystem thread. As this problem needs some kind of resolution and it
>> affects larger area of code than just video subsystem it needs to be
>> dis
Vesa Jääskeläinen <[EMAIL PROTECTED]> writes:
> Some folks might have overlooked my earlier post as I wrote it to video
> subsystem thread. As this problem needs some kind of resolution and it
> affects larger area of code than just video subsystem it needs to be
> discussed first.
>
> Problem is
11 matches
Mail list logo