Commit 2974093a authored by Sergei Golubchik's avatar Sergei Golubchik

workaround for gcc 4.3.2 bug on lenny-x86 at -O3

The following piece of code in trnman.c:

345   trn->min_read_from=  active_list_min.next->trid;
  ...
351   active_list_max.prev= trn->prev->next= trn;
352   trid_min_read_from= active_list_min.next->min_read_from;

on 345 gcc stores active_list_min.next in %ebx
(and trn->min_read_from=[%ebx]->trid)
and on 352 it does trid_min_read_from= [%ebx]->min_read_from;
BUT active_list_min.next was changed on the line 351.
gcc doesn't notice it and continues to use the cached value.
parent 4bb48f92
......@@ -29,6 +29,9 @@
uint trnman_active_transactions, trnman_committed_transactions,
trnman_allocated_transactions;
#ifdef WORKAROUND_GCC_4_3_2_BUG
volatile
#endif
/* list of active transactions in the trid order */
static TRN active_list_min, active_list_max;
/* list of committed transactions in the trid order */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment