Re: [Qemu-devel] [PATCH] cpu-exec: Fix compiler warning (-Werror=clobbered)

2013-10-29 Thread Jan Kiszka
On 2013-10-28 20:18, Stefan Weil wrote: Am 18.09.2013 09:48, schrieb Jan Kiszka: On 2013-09-18 09:26, Peter Maydell wrote: [...] And gcc's documentation of the 'noreturn' attribute specifically says it does not affect the exceptional path where the function returns via longjmp. OK, that is

Re: [Qemu-devel] [PATCH] cpu-exec: Fix compiler warning (-Werror=clobbered)

2013-10-28 Thread Stefan Weil
Am 18.09.2013 09:48, schrieb Jan Kiszka: On 2013-09-18 09:26, Peter Maydell wrote: [...] And gcc's documentation of the 'noreturn' attribute specifically says it does not affect the exceptional path where the function returns via longjmp. OK, that is the clarifying bit of information. Now

Re: [Qemu-devel] [PATCH] cpu-exec: Fix compiler warning (-Werror=clobbered)

2013-09-18 Thread Jan Kiszka
On 2013-09-17 23:24, Peter Maydell wrote: On 17 September 2013 18:03, Stefan Weil s...@weilnetz.de wrote: could you please review this patch which removes code added by you earlier? I have run tests with the old code and assertions to see whether the values were really smashed. They never

Re: [Qemu-devel] [PATCH] cpu-exec: Fix compiler warning (-Werror=clobbered)

2013-09-18 Thread Peter Maydell
On 18 September 2013 08:06, Jan Kiszka jan.kis...@web.de wrote: On 2013-09-17 23:24, Peter Maydell wrote: On 17 September 2013 18:03, Stefan Weil s...@weilnetz.de wrote: could you please review this patch which removes code added by you earlier? I have run tests with the old code and

Re: [Qemu-devel] [PATCH] cpu-exec: Fix compiler warning (-Werror=clobbered)

2013-09-18 Thread Jan Kiszka
On 2013-09-18 09:26, Peter Maydell wrote: On 18 September 2013 08:06, Jan Kiszka jan.kis...@web.de wrote: On 2013-09-17 23:24, Peter Maydell wrote: On 17 September 2013 18:03, Stefan Weil s...@weilnetz.de wrote: could you please review this patch which removes code added by you earlier? I

[Qemu-devel] [PATCH] cpu-exec: Fix compiler warning (-Werror=clobbered)

2013-09-17 Thread Stefan Weil
'cpu' and 'env' are not modified after sigsetjmp. Therefore they will still have their last value after longjmp restored the stack context. The code which should reload both variables causes a compiler warning: cpu-exec.c:204:15: error: variable ‘cpu’ might be clobbered by ‘longjmp’ or ‘vfork’

Re: [Qemu-devel] [PATCH] cpu-exec: Fix compiler warning (-Werror=clobbered)

2013-09-17 Thread Jan Kiszka
On 2013-09-17 19:03, Stefan Weil wrote: 'cpu' and 'env' are not modified after sigsetjmp. Therefore they will still have their last value after longjmp restored the stack context. The code which should reload both variables causes a compiler warning: cpu-exec.c:204:15: error: variable

Re: [Qemu-devel] [PATCH] cpu-exec: Fix compiler warning (-Werror=clobbered)

2013-09-17 Thread Stefan Weil
Am 17.09.2013 19:17, schrieb Jan Kiszka: On 2013-09-17 19:03, Stefan Weil wrote: 'cpu' and 'env' are not modified after sigsetjmp. Therefore they will still have their last value after longjmp restored the stack context. The code which should reload both variables causes a compiler warning:

Re: [Qemu-devel] [PATCH] cpu-exec: Fix compiler warning (-Werror=clobbered)

2013-09-17 Thread Peter Maydell
On 17 September 2013 18:03, Stefan Weil s...@weilnetz.de wrote: could you please review this patch which removes code added by you earlier? I have run tests with the old code and assertions to see whether the values were really smashed. They never were, and from the documentation of setjmp I'd