Thread (7 messages) 7 messages, 2 authors, 2013-07-26

Re: [Suggestion] powerpc: xmon: about 'longjmp' related warning.

From: Chen Gang <hidden>
Date: 2013-07-24 00:39:21

On 07/23/2013 09:58 PM, Michael Ellerman wrote:
On Mon, Jul 22, 2013 at 03:02:53PM +0800, Chen Gang wrote:
quoted
Hello Maintainers:

With allmodconfig and EXTRA_CFLAGS=-W", it reports warnings below:
quoted
arch/powerpc/xmon/xmon.c:3027:6: warning: variable ‘i’ might be clobbered by ‘longjmp’ or ‘vfork’ [-Wclobbered]
arch/powerpc/xmon/xmon.c:3068:6: warning: variable ‘i’ might be clobbered by ‘longjmp’ or ‘vfork’ [-Wclobbered]
In both these cases we are inside the body of a for loop and we do a
if (setjmp) / else block. Although looking at the source the value of i
is not modified by the setjmp, I guess it's possible that the compiler
might reorder the increment of i inside the setjmp and loose the value
when we longjmp.
I should continue to confirm the details based on your valuable
information, thanks.

quoted
arch/powerpc/xmon/xmon.c:352:48: warning: argument ‘fromipi’ might be clobbered by ‘longjmp’ or ‘vfork’ [-Wclobbered]
This one I can't see, but I assume it's a similar case.
OK, I should continue for it.

quoted
Excuse me, I am not quite sure about it whether can cause issue or not.
I've never seen it get stuck in those loops or anything, but I guess
it's possible.
OK, I should make the confirmation.
The first thing to do would be to analyse the generated assembler code
to determine if there really is any possiblity of the value being
clobbered, or if it's just a theoretical bug.
Thank you for your valuable information again.

Excuse me, I have to do another things within this month, so I should
provide the confirmation within next month (2013-08-31), is it OK (no
reply means OK).

Welcome any suggestions or completions.


Thanks.
-- 
Chen Gang
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help