-
Tomasz Grabiec authored
This code seems obviously broken to me: tls_data().size there is no tls_data function, it is a struct. So this is creating temporary uninitialized struct and reads size field from it. What it meant instead is probably the TLS size, which is calculated by tls() function and returned in a tls_data structure. I am not able to actually test this change because I don't have any DSO which has R_X86_64_TPOFF64 relocations. Any idea how to test it? tls() is also broken, because it initializes file_size field instead of the size field. The file_size field was added at some point but this place wasn't updated. As it appears that tls() is not actually used anywhere, this patch gets rid of it. Signed-off-by:
Tomasz Grabiec <tgrabiec@cloudius-systems.com> Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
Tomasz Grabiec authoredThis code seems obviously broken to me: tls_data().size there is no tls_data function, it is a struct. So this is creating temporary uninitialized struct and reads size field from it. What it meant instead is probably the TLS size, which is calculated by tls() function and returned in a tls_data structure. I am not able to actually test this change because I don't have any DSO which has R_X86_64_TPOFF64 relocations. Any idea how to test it? tls() is also broken, because it initializes file_size field instead of the size field. The file_size field was added at some point but this place wasn't updated. As it appears that tls() is not actually used anywhere, this patch gets rid of it. Signed-off-by:
Tomasz Grabiec <tgrabiec@cloudius-systems.com> Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>