help-bison
[Top][All Lists]
Advanced

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

Re: Exception safety of generated C++ parser


From: Oleksii Taran
Subject: Re: Exception safety of generated C++ parser
Date: Fri, 28 Sep 2012 23:38:22 +0300
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:15.0) Gecko/20120907 Thunderbird/15.0.1

24.09.12 17:55, Akim Demaille wrote:
>
>> I've noticed some strange
>> leaks, but they are really small, and I can't trace the reason of it. I
>> will test it for some time now. Anyway, good job!
> I would really like to have some more information about these leaks.
> Note that if there are some types that require a %destructor, but
> you don't provide one, then there is nothing that Bison can do to
> release them.
>
> The more I think about it, the more I believe that I took the wrong
> path, and exception safety should be addressed at the yyparse level:
> put the whole function into a try/catch block.  That way, we are
> also protected from errors in %printer, %destructor, %initial-action,
> yyerror, and maybe other places I didn't think about.  I will provide
> another patch in the near future.
>
> Thanks!
>

Hi

I have done some further testing, and it looks pretty good to me. I
couldn't trace down that strange leaks, but I extracted some minimal
test case, and that leaks vanished. It seems that it has been caused by
my project-specific code that produced that leaks, I guess.
Anyway, maint-exception-safety seems to correctly handle exception
issues, good work!

-- 
Best regards,
Oleksii Taran




reply via email to

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