Skip to contentSkip to conversation

console: Abort on property access errors

PATCH Kirill Batuzov 2 participants 2 messages May 8, 2014 – May 21, 2014 2 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw
Quoted 10 lines · Kirill Batuzov

All defined properties of QemuConsole are mandatory and no access to them should fail. Nevertheless not checking returned errors is bad because in case of unexpected failure it will hide the bug and cause a memory leak.

Abort in case of unexpected property access errors. This change exposed a bug where an attempt was made to write to a read-only property "head".

Set "head" property's value at creation time and do not attempt to change it later. This fixes the bug mentioned above.

Quoted 9 lines
---
 ui/console.c |   30 +++++++++++++-----------------
 1 file changed, 13 insertions(+), 17 deletions(-)

v1 -> v2:
Use &error_abort instead of silently ignoring errors. Properly initialize property "head".

Ping?
The other patches of the series have been applied already. This is the only one remaining.

Signature · 1 line
Kirill
#3 lore raw
In reply to a message not in the archive
Quoted 9 lines · Kirill Batuzov

All defined properties of QemuConsole are mandatory and no access to them should fail. Nevertheless not checking returned errors is bad because in case of unexpected failure it will hide the bug and cause a memory leak.

Abort in case of unexpected property access errors. This change exposed a bug where an attempt was made to write to a read-only property "head".

Set "head" property's value at creation time and do not attempt to change it later. This fixes the bug mentioned above.

Picked into my console branch.

thanks,
Gerd