Commit ed52c81
authored
Fix xrt_hip.so static initialization order fiasco (Xilinx#9667)
Initialize global `device_cache` in same TU that uses it during
static global initialiation of hip devices.
Bug exposed in Debian upstreamed packages, compiled with `-flto=auto
and -ffat-lto-objects`.
This is likely not the final fix, complex initiaziation during static
global initialization is not correct. Initialization of devices can
throw, throw during static global initialiation is not kosher.
Signed-off-by: Soren Soe <2106410+stsoe@users.noreply.github.com>1 parent fefe649 commit ed52c81
2 files changed
Lines changed: 6 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
22 | 26 | | |
23 | 27 | | |
24 | 28 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | 7 | | |
11 | 8 | | |
12 | 9 | | |
| |||
0 commit comments