Commit 19e3dc4
committed
[minicern] Move address computation to 64 bit.
kernlib was using the LOCF function to compute distances between common
blocks. It shifts the numbers, but in 32 bits. On 64 bit architectures,
this can lead to unreasonable values, and when taking the difference,
it's either correct or wraps around to very large numbers. Due to aslr,
the common blocks move around, which can crash the program at init time
when the blocks are on different sides of the "wrap around" addresss.
Here, the LOCF function is changed to use 64 bit integers for the
address, which makes the distance computation independent of where the
kernel places the common blocks.1 parent 40ae624 commit 19e3dc4
1 file changed
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
90 | 93 | | |
91 | 94 | | |
92 | 95 | | |
| |||
0 commit comments