Merge lp:~laurynas-biveinis/percona-server/bug902472 into lp:percona-server/5.1

Proposed by Laurynas Biveinis
Status: Merged
Approved by: Stewart Smith
Approved revision: 474
Merged at revision: 476
Proposed branch: lp:~laurynas-biveinis/percona-server/bug902472
Merge into: lp:percona-server/5.1
Diff against target: 42 lines (+16/-16)
1 file modified
Percona-Server/config/ac-macros/misc.m4 (+16/-16)
To merge this branch: bzr merge lp:~laurynas-biveinis/percona-server/bug902472
Reviewer Review Type Date Requested Status
Stewart Smith (community) Approve
Review via email: mp+121307@code.launchpad.net

Description of the change

Fix bug 902472 (main.subselect_notembedded fails on Ubuntu Oneiric in
Jenkins) and upstream bug http://bugs.mysql.com/bug.php?id=62856.

The issue is the Autoconf stack direction test, which relies on
the undefined behaviour and compilers not optimizing the test too
much. Adjust the test to work with GCC 4.6 by taking the contributed
patch from the upstream bug, which in turn is the 5.5 test backported
from CMake to Autoconf.

Jenkins: http://jenkins.percona.com/job/percona-server-5.1-param/389/

5.5 already contains the correct test, thus should be null-merged to 5.5

To post a comment you must log in.
Revision history for this message
Stewart Smith (stewart) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Percona-Server/config/ac-macros/misc.m4'
2--- Percona-Server/config/ac-macros/misc.m4 2009-11-04 23:08:21 +0000
3+++ Percona-Server/config/ac-macros/misc.m4 2012-08-25 10:32:21 +0000
4@@ -460,22 +460,22 @@
5 #if defined(__HP_cc) || defined (__HP_aCC) || defined (__hpux)
6 #pragma noinline
7 #endif
8- int find_stack_direction ()
9- {
10- static char *addr = 0;
11- auto char dummy;
12- if (addr == 0)
13- {
14- addr = &dummy;
15- return find_stack_direction ();
16- }
17- else
18- return (&dummy > addr) ? 1 : -1;
19- }
20- int main ()
21- {
22- exit (find_stack_direction() < 0);
23- }], ac_cv_c_stack_direction=1, ac_cv_c_stack_direction=-1,
24+/* Check stack direction (0-down, 1-up) */
25+int f(int *a)
26+{
27+ int b;
28+ return(&b > a)?1:-1;
29+}
30+/*
31+ Prevent compiler optimizations by calling function
32+ through pointer.
33+*/
34+volatile int (*ptr_f)(int *) = f;
35+int main()
36+{
37+ int a;
38+ exit(ptr_f(&a) < 0);
39+}], ac_cv_c_stack_direction=1, ac_cv_c_stack_direction=-1,
40 ac_cv_c_stack_direction=)])
41 AC_DEFINE_UNQUOTED(STACK_DIRECTION, $ac_cv_c_stack_direction)
42 ])dnl

Subscribers

People subscribed via source and target branches