GNU bug report logs -
#18116
24.3.92; url-http calls CALLBACK recursively with malformed CBARGS if the former calls `delete-process'
Previous Next
Reported by: Dmitry <dgutov <at> yandex.ru>
Date: Sun, 27 Jul 2014 03:14:02 UTC
Severity: minor
Found in version 24.3.92
Fixed in version 24.3.93.4
Done: Dmitry Gutov <dgutov <at> yandex.ru>
Bug is archived. No further changes may be made.
Full log
Message #20 received at 18116 <at> debbugs.gnu.org (full text, mbox):
>> The problem is that calling `delete-process' may run the sentinel (and
>> since this is code run from the sentinel, it may end up calling the
>> sentinel recursively).
> I can observe a definite change in behavior, which I cannot reason about
I think there is indeed a change of behavior in that the sentinel used
to be nil'd while running it.
[ This was changed because it prevented the sentinel from modifying itself. ]
> Indeed. Looks like my misunderstanding stemmed from Tern not handling this
> value exactly right: it expected STATUS to have a certain length in case of
> an error, and when called recursively, the callback received STATUS of
> different length, prepended with new history.
Right, it should use (cons nil <cbdata>) instead of (list <cbdata>),
since the `car' is used to carry the "historical events" of the request.
> I guess there's no bug there, then. Sorry.
Maybe not code-wise, but docstring-wise I think there's at least "room
for improvement".
> Guess so. And both `url-http' and `url-retrieve-internal' are pretty
> confusing when it comes to describing the arguments that will be passed
> to CALLBACK.
> To me, "When retrieval is completed, execute the function CALLBACK, using
> the arguments listed in CBARGS." means that it will be called exactly with
> the value of CBARGS passed to `url-http', whereas instead the list gets
> prepended with stuff before it's passed to CALLBACK.
Can you improve those docstrings, to avoid such confusion in the future?
Stefan
This bug report was last modified 10 years and 327 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.