sedf/build: Fix build when using -fno-inline
I found this issue while trying to debug on a separate issue. It certainly affects unstable thru 4.1, and probably earlier, so should be take for backport.
Signature · 2 lines
Andrew Cooper - Dom0 Kernel Engineer, Citrix XenServer T: +44 (0)1223 225 900, http://www.citrix.com
# HG changeset patch
# Parent 5fbdbf585f5f2ee9a3e3c75a8a9f9f2cc6eda65c
build: Fix build when using -fno-inline
struct task_slice.migrated is not initialised by this function, and subsequently returned by value, leading to the error:
sched_sedf.c: In function ‘sedf_do_extra_schedule’:
sched_sedf.c:711: error: ‘ret.migrated’ may be used uninitialised in this function
for both gcc 4.1.2 and 4.4.3 (which are the two I have easily to hand) when combined with the -fno-inline compile option.
Signed-off-by Andrew Cooper <[email protected]>
--
This is compile tested only, but given that the sole caller of sedf_do_extra_schedule() unconditionally sets migrated to 0, I am fairly confident of the correctness of the fix.
xen/common/sched_sedf.c +1 -1
@@ -667,7 +667,7 @@ static void desched_extra_dom(s_time_t nstatic struct task_slice sedf_do_extra_schedule (s_time_t now,s_time_t end_xt,struct list_head *extraq[],int cpu) { -struct task_slice ret; +struct task_slice ret = {0 };struct sedf_vcpu_info *runinf;ASSERT (end_xt > now);
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 4 lines · Andrew Cooper
I found this issue while trying to debug on a separate issue. It certainly affects unstable thru 4.1, and probably earlier, so should be take for backport.
Apologies - try this patch which has less Unicode in the commit message.
Signature · 2 lines
Andrew Cooper - Dom0 Kernel Engineer, Citrix XenServer T: +44 (0)1223 225 900, http://www.citrix.com
# HG changeset patch
# Parent 5fbdbf585f5f2ee9a3e3c75a8a9f9f2cc6eda65c
sedf/build: Fix build when using -fno-inline
struct task_slice.migrated is not initialised by this function, and subsequently returned by value, leading to the error:
sched_sedf.c: In function 'sedf_do_extra_schedule':
sched_sedf.c:711: error: 'ret.migrated' may be used uninitialised in this function
for both gcc 4.1.2 and 4.4.3 (which are the two I have easily to hand) when combined with the -fno-inline compile option.
Signed-off-by Andrew Cooper <[email protected]>
--
This is compile tested only, but given that the sole caller of sedf_do_extra_schedule() unconditionally sets migrated to 0, I am fairly confident of the correctness of the fix.
Changes since v1:
- Fix unicode issue in comment.
xen/common/sched_sedf.c +1 -1
@@ -667,7 +667,7 @@ static void desched_extra_dom(s_time_t nstatic struct task_slice sedf_do_extra_schedule (s_time_t now,s_time_t end_xt,struct list_head *extraq[],int cpu) { -struct task_slice ret; +struct task_slice ret = {0 };struct sedf_vcpu_info *runinf;ASSERT (end_xt > now);
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 8 lines
Quoted 1 line
Quoted 1 line
Andrew Cooper <[email protected]> 10/03/12 2:38 PM >>>
Quoted 4 lines · Andrew Cooper
I found this issue while trying to debug on a separate issue. It certainly affects unstable thru 4.1, and probably earlier, so should be take for backport.
Apologies - try this patch which has less Unicode in the commit message.
I certainly agree to the change for -unstable, but what's the rationale for the backport request (given that there's no -fno-inline anywhere in the tree)? Is this actively causing problems in any non-debugging environment?
Jan
Quoted 6 lines · Jan Beulich
Quoted 6 lines
Quoted 1 line
Quoted 1 line
Andrew Cooper <[email protected]> 10/03/12 2:38 PM >>>
Quoted 4 lines · Andrew Cooper
I found this issue while trying to debug on a separate issue. It certainly affects unstable thru 4.1, and probably earlier, so should be take for backport.
Quoted 7 lines
Quoted 1 line
Apologies - try this patch which has less Unicode in the commit message.
I certainly agree to the change for -unstable, but what's the rationale for the backport request (given that there's no -fno-inline anywhere in the tree)? Is this actively causing problems in any non-debugging environment?
Jan
Not as far as I am aware. Backporting it will make no difference to the older trees in general, but will prevent people who are debugging older trees from needing to fix the build every time they actually need to invoke -fno-inline. (I have been working on this issue for 4 straight days now, debugging on 4.1 and was quite taken aback when the build broke).
I would argue that the benefits (for developers) do outweigh the bascially-0 cost, even if it isn't strictly a functional bugfix.
Signature · 2 lines
Andrew Cooper - Dom0 Kernel Engineer, Citrix XenServer T: +44 (0)1223 225 900, http://www.citrix.com
Dario Faggioli
Acked-byQuoted 7 lines · Andrew Cooper
# HG changeset patch
# Parent5fbdbf585f5f2ee9a3e3c75a8a9f9f2cc6eda65c
sedf/build: Fix build when using -fno-inlinestruct task_slice.migrated is not initialised by this function, and subsequently returned by value, leading to the error:
Quoted 9 lines
sched_sedf.c: In function 'sedf_do_extra_schedule':
sched_sedf.c:711: error: 'ret.migrated' may be used uninitialised in this functionfor both gcc 4.1.2 and 4.4.3 (which are the two I have easily to hand) when combined with the -fno-inline compile option.
Signed-off-by Andrew Cooper <[email protected]>
Quoted 6 lines
--
This is compile tested only, but given that the sole caller ofsedf_do_extra_schedule()unconditionally sets migrated to 0, I am fairly
confident of the correctness of the fix.
Agreed, sedf does not include any task migration mechanism, so 0 is all you can have there. :-)
Thanks and Regards,
Dario
Signature · 4 lines
<<This happens because I choose it to happen!>> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://retis.sssup.it/people/faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel