Segmentation fault on EventHttpRequest->free()

Issue #3 resolved
Former user created an issue

Got Segmentation fault (double free or corruption (!prev):) trying to free http request object if both http client and http server run on the same machine. Does not matter if server and client running in single process or different.

After some debugging and googling found So I guess httpRequest object in sever and client internally use the same memory segments, and if server free httpRequest early then client, client try to unset already destructed object. But this is just my guess. If client does not free httpRequest we get uncontrolled memory usage. To show this, run test script.

Comments (5)

  1. Ruslan Osmanov repo owner

    Thanks for your report.

    I've just pushed a fix. Please check it out.

    Honestly, I doubt if the fix is correct. I've merely dropped the evhttp_request_free() call in the EventHttpRequest::free() method. It so happens that Libevent handles memory all right.

    I'll wait for your reply.

  2. Log in to comment