libmicrohttpd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libmicrohttpd] Advise about upgrade "facility"


From: José Bollo
Subject: [libmicrohttpd] Advise about upgrade "facility"
Date: Fri, 16 Mar 2018 15:40:00 +0100

Hi all,

I searched last two days a "double free" bug that appeared using latest
master for my implementation of websockets using MHD upgrade "facility".

After bisecting, it appears that the commit 

>> commit 0ebdff94d461abd4328cf45a6281c15139a045eb
>> Author: Christian Grothoff <address@hidden>
>> Date:   Fri Mar 2 21:45:17 2018 +0100
>> 
>>     fix test_upgrade transient failures (#5189)

introduces the change.

Before it, I had to free manually the resource attached to the
connection. After it, freeing it in the MHD_OPTION_NOTIFY_COMPLETED
callback "as usual" works (didn't work before). This lead in my code to
a dual free of resources.

For me using the callback of MHD_OPTION_NOTIFY_COMPLETED in all cases
(after upgrade or not) is produce the lightest code.

2 questions:

 - is it possible to increase the version to 0x00095901 for testing the
   case and adapt my code?

#define MHD_VERSION   0x00095901

 - in my case, the resource is not used and was released in the upgrade
   callback. Is there a way to force the con_cls of a connection? If
   yes I can release the resources earlier.

Best regards
José Bollo






reply via email to

[Prev in Thread] Current Thread [Next in Thread]