On Wed, Jan 30, 2013 at 8:11 AM, Jan Nijtmans <[email protected]>wrote:
> 2013/1/30 Sergei Gavrikov <[email protected]>: > > [FYI] > > > > An optimized (-O2) default build with entered substitution > > -Dstrcmp=fossil_strcmp fails (SIGSEG) on i686 GNU/Linux > ... > > Program received signal SIGSEGV, Segmentation fault. > ... > > Thanks! That's fully explainable: When setting -Dstrcmp=fossil_strcmp > before including <string.h>, and strcmp has a decoration that its > arguments are non-null, that is used by the optimizer to remove > the two first if's from the fossil_strcmp function: if its arguments > cannot be NULL, that's a valid optimization.... > > Should be fixed now, by #undef'fing fossil_strcmp in printf.c > I'm uncomfortable with this change. If we need to use fossil_strcmp() everywhere (which surprises me, since strcmp() should *not* be subject to localization) then we should do so explicitly, and not depend on preprocessor magic, as the preprocessor magic will likely cause maintenance headaches down the road, and/or introduce subtle bugs such as the above. > > Many Thanks!!!!! > > Regards, > Jan Nijtmans > _______________________________________________ > fossil-users mailing list > [email protected] > http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users > -- D. Richard Hipp [email protected]
_______________________________________________ fossil-users mailing list [email protected] http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

