Skip to content

Backport !3045 “gproxyresolver: lookup_finish() should better parallel lookup_async()” to glib-2-74

In g_proxy_resolver_lookup_async() we have some error validation that detects invalid URIs and directly returns an error, bypassing the interface's lookup_async() function. This is great, but when the interface's lookup_finish() function gets called later, it may assert that the source tag of the GTask matches the interface's lookup_async() function, which will not be the case.

As suggested by Philip, we need to check for this situation in g_proxy_resolver_lookup_finish() and avoid calling into the interface here if we did the same in g_proxy_resolver_lookup_async(). This can be done by checking the source tag.

I added a few new tests to check the invalid URI "asdf" used in the issue report. The final case, using async GProxyResolver directly, checks for this bug.

Fixes #2799 (closed)


Trivial backport of !3045 (merged) to glib-2-74.

Merge request reports