#12699: Various crashes in BHttpRequest's crypto
--------------------------------+----------------------------
Reporter: ttcoder | Owner: axeld
Type: bug | Status: new
Priority: normal | Milestone: R1
Component: Kits/Network Kit | Version: R1/Development
Resolution: | Keywords:
Blocked By: | Blocking:
Has a Patch: 0 | Platform: All
--------------------------------+----------------------------
Comment (by ttcoder):
A bit of 'closure' (AFAIConcerned) on this..
Not much to report from my leak_check.sh run (attached them anyway in case
there's interest). The net code does not seem to leak much -- in fact the
hundreds of bytes mentionned might even not be a recurring leak but a
"static" one, since some of them mention "_res", which IIRC is a static
The relevant info though is this: if my code had done a double-free or
some such, it would have popped up the debugger at runtime, but my program
always runs "clean", so no heap corruption I guess
***
A small request while we're on the subject -- UrlRequest.h:31 triggers
'''an "unused variable 'timeout' " gcc warning''' (yes I enable hardline
error reporting :-)
The thing is... In much of my source files this is the /only/ warning
there is, and thus it pops up the Pe warning window unnecessarily.. Would
be nice if the method signature was changed from "bigtime_t timeout" to
just "bigtime_t" :-) The rest of the Haiku headers never trigger this
warning, so makes sense to be consistent :-)
***
Regarding Stop(),
Checked the source of the class I use and Stop() is in fact automatically
called in the dtor:
http://code.metager.de/source/xref/haiku/src/kits/network/libnetapi/HttpRequest.cpp#145
So I assume it would not help if I call Stop() by hand just before
deleting the object
***
I do not deal with BCertificate directly at all.. Just the top level
classes:
A quick outline of my code just in case:
{{{
class RetrieverFSM
{
........
BUrlContext context;
BHttpAuthentication authentication;
BUrl url;
BHttpRequest httpReq;
};
void RetrieverFSM::SetFromSettings()
{
authentication.SetUserName( .... );
authentication.SetPassword( .... );
...
}
void RetrieverFSM::DownloadNextFile()
{
...
url.SetUrlString( fullpath );
httpReq.SetUrl( url );
listener.Reset();
httpReq.SetListener( &listener );
context.AddAuthentication( url, authentication );
httpReq.SetContext( &context );
httpReq.Run();
}
}}}
***
Anyway..
I'm leaning toward a "race condition" of some sort, maybe in my code, so
Dane will have to provide more info or reproducible steps, so that I have
a chance to extract a reproducible case from my 2'000 lines updater :-)
Ball's in his court now
--
Ticket URL: <https://dev.haiku-os.org/ticket/12699#comment:4>
Haiku <https://dev.haiku-os.org>
Haiku - the operating system.