Imported Debian patch 1:4.4.0-2
Daniel Kobras authored 18 years ago
Graham Inggs committed 10 years ago
|
0 |
dx (1:4.4.0-2) unstable; urgency=low
|
|
1 |
|
|
2 |
* Added patches:
|
|
3 |
+ [10_invert3_aliasing_fix] New.
|
|
4 |
Fix violation of strict aliasing rules that caused incorrect bounding
|
|
5 |
boxes when data passed through the Collect module. Closes: #350524
|
|
6 |
|
|
7 |
-- Daniel Kobras <kobras@debian.org> Sat, 11 Mar 2006 00:36:05 +0100
|
|
8 |
|
0 | 9 |
dx (1:4.4.0-1) unstable; urgency=low
|
1 | 10 |
|
2 | 11 |
* New upstream version.
|
0 | 0 |
10_fix_man_section
|
|
1 |
10_invert3_aliasing_fix
|
1 | 2 |
10_invoke_man
|
2 | 3 |
10_64bit_pointer_fixes
|
3 | 4 |
90_usr_local_cleanup
|
|
0 |
#! /bin/sh /usr/share/dpatch/dpatch-run
|
|
1 |
## 10_invert3_aliasing_fix.dpatch by Daniel Kobras <kobras@debian.org>
|
|
2 |
##
|
|
3 |
## All lines beginning with `## DP:' are a description of the patch.
|
|
4 |
## DP: Do not cast from array of floats to struct of floats. Breaks
|
|
5 |
## DP: strict aliasing rules and therefore miscompiles with gcc 4.0.
|
|
6 |
## DP: Leads to incorrect bounding boxes when using the Collect module,
|
|
7 |
## DP: and possibly others (cf. #350524).
|
|
8 |
|
|
9 |
@DPATCH@
|
|
10 |
diff -urNad dx~/src/exec/libdx/v3.c dx/src/exec/libdx/v3.c
|
|
11 |
--- dx~/src/exec/libdx/v3.c 2000-06-12 07:45:40.000000000 +0200
|
|
12 |
+++ dx/src/exec/libdx/v3.c 2006-03-11 00:32:25.000000000 +0100
|
|
13 |
@@ -178,6 +178,7 @@
|
|
14 |
#ifdef Invert3
|
|
15 |
STATIC Matrix3 Invert3(Matrix3 t)
|
|
16 |
{
|
|
17 |
+ Point3 p;
|
|
18 |
Matrix3 s;
|
|
19 |
double inv;
|
|
20 |
|
|
21 |
@@ -195,7 +196,9 @@
|
|
22 |
s.A[2][2] = COF(0,1,0,1) * inv;
|
|
23 |
|
|
24 |
s.b[0] = s.b[1] = s.b[2] = 0;
|
|
25 |
- *(Point3*)s.b = Apply3(Neg3(*(Point3*)t.b), s);
|
|
26 |
+ p.c1 = -t.b[0]; p.c2 = -t.b[1]; p.c3 = -t.b[2];
|
|
27 |
+ p = Apply3(p, s);
|
|
28 |
+ s.b[0] = p.c1; s.b[1] = p.c2; s.b[2] = p.c3;
|
|
29 |
|
|
30 |
return s;
|
|
31 |
}
|