mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-05-07 21:28:01 +02:00
Merge branch 'issue420' into 'master'
dbus-message: Report OOM as OOM, not InvalidArgs Closes #420 See merge request dbus/dbus!353
This commit is contained in:
commit
c6173dfd83
2 changed files with 3 additions and 9 deletions
|
|
@ -5201,6 +5201,9 @@ dbus_message_demarshal (const char *str,
|
||||||
return msg;
|
return msg;
|
||||||
|
|
||||||
fail_corrupt:
|
fail_corrupt:
|
||||||
|
if (loader->corruption_reason == DBUS_VALIDITY_UNKNOWN_OOM_ERROR)
|
||||||
|
goto fail_oom;
|
||||||
|
|
||||||
dbus_set_error (error, DBUS_ERROR_INVALID_ARGS, "Message is corrupted (%s)",
|
dbus_set_error (error, DBUS_ERROR_INVALID_ARGS, "Message is corrupted (%s)",
|
||||||
_dbus_validity_to_error_message (loader->corruption_reason));
|
_dbus_validity_to_error_message (loader->corruption_reason));
|
||||||
_dbus_message_loader_unref (loader);
|
_dbus_message_loader_unref (loader);
|
||||||
|
|
|
||||||
|
|
@ -291,15 +291,6 @@ test_valid_message_blobs (void *message_name,
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* TODO: Validity checking sometimes returns InvalidArgs for OOM */
|
|
||||||
if (dbus_error_has_name (&e, DBUS_ERROR_INVALID_ARGS) &&
|
|
||||||
!have_memory &&
|
|
||||||
strstr (e.message, "Out of memory") != NULL)
|
|
||||||
{
|
|
||||||
g_test_message ("Out of memory (not a problem)");
|
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
|
|
||||||
g_test_message ("Parsing %s reported unexpected error %s: %s",
|
g_test_message ("Parsing %s reported unexpected error %s: %s",
|
||||||
path, e.name, e.message);
|
path, e.name, e.message);
|
||||||
g_test_fail ();
|
g_test_fail ();
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue