Re: [OpenWrt-Devel] [PATCH uci 2/2] build: Add -Wclobbered to detect problems with longjmp

2019-11-07 Thread Petr Štetiar
Hauke Mehrtens [2019-11-07 23:51:50]: Hi, > How do we want to go forward with these patches? as noone provided better fix for those warnings(or proved them wrong) yet, then I would simply move forward. Your changes pass all unit tests and CI compile tests so: Acked-by: Petr Štetiar -- ynez

Re: [OpenWrt-Devel] [PATCH uci 2/2] build: Add -Wclobbered to detect problems with longjmp

2019-11-07 Thread Hauke Mehrtens
On 11/7/19 9:51 AM, Petr Štetiar wrote: > Hauke Mehrtens [2019-11-07 00:26:23]: > > Hi, > >>> I didn't looked deeper, but GCC 6,7,8,9 on x86/64 reports following: >>> >>> list.c:626:21: error: variable ‘prev’ might be clobbered by ‘longjmp’ or >>> ‘vfork’ [-Werror=clobbered] >>> 626 | struc

Re: [OpenWrt-Devel] [PATCH uci 2/2] build: Add -Wclobbered to detect problems with longjmp

2019-11-07 Thread Petr Štetiar
Hauke Mehrtens [2019-11-07 00:26:23]: Hi, > > I didn't looked deeper, but GCC 6,7,8,9 on x86/64 reports following: > > > > list.c:626:21: error: variable ‘prev’ might be clobbered by ‘longjmp’ or > > ‘vfork’ [-Werror=clobbered] > > 626 | struct uci_option *prev = NULL; > > |

Re: [OpenWrt-Devel] [PATCH uci 2/2] build: Add -Wclobbered to detect problems with longjmp

2019-11-06 Thread Hauke Mehrtens
On 11/5/19 1:27 AM, Petr Štetiar wrote: > Hi, > > Hauke Mehrtens [2019-11-01 17:06:34]: > >> +ADD_DEFINITIONS(-Os -Wall -Werror -Wclobbered --std=gnu99 -g3 -I. >> -DUCI_PREFIX="${CMAKE_INSTALL_PREFIX}") > > is there any reason to not use -Wextra directly? I was looking on how we could prevent

Re: [OpenWrt-Devel] [PATCH uci 2/2] build: Add -Wclobbered to detect problems with longjmp

2019-11-04 Thread Petr Štetiar
Hi, Hauke Mehrtens [2019-11-01 17:06:34]: > +ADD_DEFINITIONS(-Os -Wall -Werror -Wclobbered --std=gnu99 -g3 -I. > -DUCI_PREFIX="${CMAKE_INSTALL_PREFIX}") is there any reason to not use -Wextra directly? list.c:140:11: error: comparison between signed and unsigned integer expressions [-Werror

Re: [OpenWrt-Devel] [PATCH uci 2/2] build: Add -Wclobbered to detect problems with longjmp

2019-11-04 Thread Hauke Mehrtens
On 11/4/19 4:29 AM, Yousong Zhou wrote: > Hi Hauke > > On Sat, 2 Nov 2019 at 00:07, Hauke Mehrtens wrote: >> >> When we jump back to a save point in UCI_THROW() with longjmp all the >> registers will be reset to the old values when we called UCI_TRAP_SAVE() >> last time, but the memory is not res

Re: [OpenWrt-Devel] [PATCH uci 2/2] build: Add -Wclobbered to detect problems with longjmp

2019-11-03 Thread Yousong Zhou
Hi Hauke On Sat, 2 Nov 2019 at 00:07, Hauke Mehrtens wrote: > > When we jump back to a save point in UCI_THROW() with longjmp all the > registers will be reset to the old values when we called UCI_TRAP_SAVE() > last time, but the memory is not restored. This will revert all the > variables which

[OpenWrt-Devel] [PATCH uci 2/2] build: Add -Wclobbered to detect problems with longjmp

2019-11-01 Thread Hauke Mehrtens
When we jump back to a save point in UCI_THROW() with longjmp all the registers will be reset to the old values when we called UCI_TRAP_SAVE() last time, but the memory is not restored. This will revert all the variables which are stored in registers, but not the variables stored on the stack. Mar