- Notifications
You must be signed in to change notification settings - Fork5
Commitd9476b8
committed
Dodge portability issue (apparent compiler bug) in new tablesample code.
Some of the older OS X critters in the buildfarm are failing regression,with symptoms showing that a request for 100% sampling in BERNOULLI orSYSTEM methods actually gets only around 50% of the table. gdb revealedthat the computation of the "cutoff" number was producing 0x7FFFFFFFrather than the expected 0x100000000. Inspecting the assembly code,it looks like gcc is trying to use lrint() instead of rint() and thenfumbling the conversion from long double to uint64. This seems like aclear compiler bug, but assigning the intermediate result into a plaindouble variable works around it, so let's just do that. (Another ideawould be to give up one bit of hash width so that we don't need to usea uint64 cutoff, but let's see if this is enough.)1 parentcaef94d commitd9476b8
2 files changed
+6
-2
lines changedLines changed: 3 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
144 | 144 |
| |
145 | 145 |
| |
146 | 146 |
| |
| 147 | + | |
147 | 148 |
| |
148 | 149 |
| |
149 | 150 |
| |
| |||
155 | 156 |
| |
156 | 157 |
| |
157 | 158 |
| |
158 |
| - | |
| 159 | + | |
| 160 | + | |
159 | 161 |
| |
160 | 162 |
| |
161 | 163 |
| |
|
Lines changed: 3 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
148 | 148 |
| |
149 | 149 |
| |
150 | 150 |
| |
| 151 | + | |
151 | 152 |
| |
152 | 153 |
| |
153 | 154 |
| |
| |||
159 | 160 |
| |
160 | 161 |
| |
161 | 162 |
| |
162 |
| - | |
| 163 | + | |
| 164 | + | |
163 | 165 |
| |
164 | 166 |
| |
165 | 167 |
| |
|
0 commit comments
Comments
(0)