[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [TESTDAY] xl cpupool-create segfaults if given invalid configuration
On Thu, 2012-08-30 at 17:49 +0100, Ian Jackson wrote: > Ian Jackson writes ("Re: [Xen-devel] [TESTDAY] xl cpupool-create segfaults if > given invalid configuration"): > > I don't think this is correct. It may happen to work with this > > version of bison but I don't think you're allowed to assign to $3. > > I think this fixes it. It works for me. > > Ian. > > From: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> > Subject: [PATCH] libxl: fix double free on some config parser errors > > If libxlu_cfg_y.y encountered a config file error, the code generated > by bison would sometimes _both_ run the %destructor _and_ call > xlu__cfg_set_store for the same XLU_ConfigSetting* semantic value. > The result would be a double free. > > This appears to be because of the use of a mid-rule action. There is > some discussion of the problems with destructors and mid-rule action > error handling in "(bison)Mid-Rule Actions". This area is complex and > best avoided. > > So fix the bug by abolishing the use of a mid-rule action, which was > in any case not necessary here. > > Also while we are there rename the nonterminal rule "setting" to > "assignment", to avoid confusion with the token type "setting", which > had an identically name in a different namespace. This was especially > confusing because the nonterminal "setting" did not have "setting" as > the type of its semantic value! (In fact the nonterminal, now called > "assignment", does not have a value so it does not have a value type.) > > Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx> I shall apply in a moment, thanks. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |