Paul Brook wrote:

    s = (ptimer_state *)qemu_mallocz(sizeof(ptimer_state));
+    if (!s)
+        return NULL;

None of the callers bother to check the return value, And even if they did I don't think there's any point trying to gracefully handle OOM. Just abort and be done with it.
I am in the process of fixing the sparc ptimer caller to gracefully handle OOM.
We currently don't check the return value in the init function where the new
timer is created but do check it wherever it is used which is backwards and
wasteful.

You would prefer that qemu just segfaults rather than die gracefully?



Reply via email to