Adhemerval Zanella
dad55c2218
[ARM] [ELF] Fix ARMMaterializeGV for Indirect calls
...
Recent shouldAssumeDSOLocal changes (introduced by 961f31d8ad )
do not take in consideration the relocation model anymore. The ARM
fast-isel pass uses the function return to set whether a global symbol
is loaded indirectly or not, and without the expected information
llvm now generates an extra load for following code:
```
$ cat test.ll
@__asan_option_detect_stack_use_after_return = external global i32
define dso_local i32 @main(i32 %argc, i8** %argv) #0 {
entry:
%0 = load i32, i32* @__asan_option_detect_stack_use_after_return,
align 4
%1 = icmp ne i32 %0, 0
br i1 %1, label %2, label %3
2:
ret i32 0
3:
ret i32 1
}
attributes #0 = { noinline optnone }
$ lcc test.ll -o -
[...]
main:
.fnstart
[...]
movw r0, :lower16:__asan_option_detect_stack_use_after_return
movt r0, :upper16:__asan_option_detect_stack_use_after_return
ldr r0, [r0]
ldr r0, [r0]
cmp r0, #0
[...]
```
And without 'optnone' it produces:
```
[...]
main:
.fnstart
[...]
movw r0, :lower16:__asan_option_detect_stack_use_after_return
movt r0, :upper16:__asan_option_detect_stack_use_after_return
ldr r0, [r0]
clz r0, r0
lsr r0, r0, #5
bx lr
[...]
```
This triggered a lot of invalid memory access in sanitizers for
arm-linux-gnueabihf. I checked this patch both a stage1 built with
gcc and a stage2 bootstrap and it fixes all the Linux sanitizers
issues.
Reviewed By: MaskRay
Differential Revision: https://reviews.llvm.org/D95379
2021-01-26 15:57:55 -03:00
..
2021-01-15 09:37:01 +00:00
2021-01-18 16:36:00 +00:00
2020-09-30 10:35:25 -04:00
2020-11-20 14:00:46 -05:00
2020-11-20 17:58:26 -05:00
2020-11-20 17:58:26 -05:00
2020-11-20 17:58:26 -05:00
2020-11-20 17:58:26 -05:00
2020-11-20 17:58:26 -05:00
2020-11-20 17:58:26 -05:00
2020-09-30 10:35:25 -04:00
2020-07-20 10:39:04 +01:00
2020-07-20 10:39:04 +01:00
2021-01-02 01:01:19 +03:00
2020-11-20 14:00:46 -05:00
2020-11-20 14:00:46 -05:00
2020-08-17 20:44:33 +02:00
2020-11-20 20:08:43 -05:00
2020-11-20 14:00:46 -05:00
2020-11-20 14:00:46 -05:00
2020-11-20 14:00:46 -05:00
2020-11-20 14:00:46 -05:00
2020-11-20 14:00:46 -05:00
2020-11-20 14:00:46 -05:00
2020-11-20 14:00:46 -05:00
2020-11-20 14:00:46 -05:00
2020-08-27 07:10:20 +01:00
2020-11-20 14:00:46 -05:00
2020-11-20 14:00:46 -05:00
2020-11-20 14:00:46 -05:00
2020-11-20 14:00:46 -05:00
2021-01-02 01:01:19 +03:00
2020-11-14 15:37:53 +00:00
2020-12-30 15:23:21 -08:00
2020-11-20 14:00:46 -05:00
2020-11-20 17:58:26 -05:00
2020-11-20 14:00:46 -05:00
2020-06-29 09:22:15 +00:00
2020-11-09 12:53:36 +00:00
2020-08-27 18:43:16 +01:00
2020-06-24 09:36:26 +01:00
2020-07-09 11:38:49 -07:00
2020-04-24 15:54:06 +01:00
2020-08-27 07:10:20 +01:00
2021-01-08 14:54:16 +00:00
2020-09-11 13:56:57 +01:00
2021-01-02 01:01:19 +03:00
2020-08-27 07:10:20 +01:00
2020-06-23 14:27:05 +00:00
2020-06-19 12:52:40 +00:00
2020-06-19 12:52:40 +00:00
2020-06-19 14:02:35 +00:00
2020-06-18 17:26:24 +01:00
2020-11-03 20:44:40 -05:00
2020-11-14 15:37:53 +00:00
2020-07-20 10:39:04 +01:00
2020-05-22 05:36:15 -06:00
2020-11-20 14:00:46 -05:00
2020-11-20 14:00:46 -05:00
2020-08-27 07:10:20 +01:00
2020-07-05 16:23:24 +01:00
2020-08-27 07:10:20 +01:00
2020-09-30 10:35:25 -04:00
2020-09-30 10:35:25 -04:00
2020-08-27 07:10:20 +01:00
2020-05-14 16:46:16 +01:00
2020-05-14 16:46:16 +01:00
2020-09-21 11:10:47 +01:00
2020-05-14 16:46:16 +01:00
2020-05-14 16:46:16 +01:00
2020-05-14 16:46:16 +01:00
2020-05-14 16:46:16 +01:00
2020-11-20 17:58:26 -05:00
2020-05-14 16:46:16 +01:00
2020-06-23 16:04:23 +01:00
2020-06-23 16:04:23 +01:00
2020-11-14 15:37:53 +00:00
2020-11-20 17:58:26 -05:00
2020-08-27 07:10:20 +01:00
2020-08-27 07:10:20 +01:00
2020-07-22 10:12:41 +01:00
2020-09-14 08:52:59 +01:00
2020-08-27 07:10:20 +01:00
2020-06-08 08:13:08 +01:00
2020-11-20 14:00:46 -05:00
2020-12-30 15:23:21 -08:00
2020-12-04 22:10:36 +03:00
2020-12-30 15:23:21 -08:00
2020-12-30 15:23:21 -08:00
2020-05-22 21:26:46 +02:00
2020-09-30 10:35:25 -04:00
2020-08-27 07:10:20 +01:00
2020-07-17 10:27:43 +01:00
2020-09-30 10:35:25 -04:00
2021-01-02 01:01:19 +03:00
2021-01-02 01:01:19 +03:00
2020-04-27 14:57:29 -07:00
2020-08-14 00:09:15 +01:00
2021-01-11 09:32:49 -08:00
2021-01-26 15:57:55 -03:00
2021-01-11 08:32:36 -08:00
2021-01-11 08:32:36 -08:00
2020-12-30 15:23:21 -08:00
2021-01-11 09:32:49 -08:00
2021-01-11 09:32:49 -08:00
2021-01-11 08:32:36 -08:00
2020-10-07 09:24:38 +01:00
2020-05-22 05:36:15 -06:00
2020-09-14 19:59:33 +02:00
2020-04-22 17:03:39 -07:00
2020-12-08 11:54:39 +00:00
2020-04-22 17:03:39 -07:00
2020-08-27 17:01:10 +01:00
2020-09-21 11:10:47 +01:00
2020-07-05 16:23:24 +01:00
2020-11-23 10:09:20 -08:00
2020-06-26 10:24:06 +01:00
2020-07-05 16:23:24 +01:00
2020-07-16 11:25:53 +01:00
2020-08-27 17:01:10 +01:00
2020-06-18 13:15:13 +01:00
2020-12-18 11:09:41 +01:00
2020-10-09 19:19:47 +01:00
2020-10-12 14:11:02 +01:00
2020-12-30 15:23:21 -08:00
2020-09-18 14:31:01 -07:00
2020-12-30 15:23:21 -08:00
2020-12-30 15:23:21 -08:00
2021-01-02 01:01:19 +03:00
2020-12-05 15:52:33 -08:00
2020-11-14 15:37:53 +00:00
2020-11-14 15:37:53 +00:00
2020-05-28 10:52:43 +01:00
2020-05-07 18:17:07 -04:00
2020-12-23 22:47:36 +07:00
2020-07-20 10:43:28 -07:00
2020-07-01 12:51:50 -04:00
2020-07-20 10:43:28 -07:00
2020-08-10 14:59:53 +01:00
2020-08-07 12:55:47 +01:00
2020-11-14 15:37:53 +00:00
2021-01-08 14:54:16 +00:00
2020-11-20 20:08:43 -05:00
2020-12-30 15:23:21 -08:00
2020-09-30 10:35:25 -04:00
2020-09-30 10:35:25 -04:00
2020-11-14 15:37:53 +00:00
2021-01-21 13:01:34 +00:00
2020-10-14 16:09:18 +03:00
2020-08-17 20:44:33 +02:00
2020-08-17 20:44:33 +02:00
2020-12-17 16:08:23 +01:00
2020-11-09 15:26:18 +00:00
2020-11-09 15:26:18 +00:00
2020-11-09 15:26:18 +00:00
2021-01-19 10:59:09 +01:00
2020-08-20 09:25:33 +02:00
2021-01-19 10:59:09 +01:00
2020-11-05 19:26:51 +00:00
2020-11-02 16:47:22 +00:00
2020-11-02 16:47:22 +00:00
2021-01-19 10:59:09 +01:00
2021-01-19 10:59:09 +01:00
2020-12-17 16:08:23 +01:00
2020-08-27 08:02:56 +01:00
2020-08-27 08:02:56 +01:00
2020-11-10 15:57:58 +00:00
2020-05-15 08:44:23 +02:00
2020-08-27 07:10:20 +01:00
2020-07-20 10:39:04 +01:00
2020-07-29 16:21:01 +01:00
2020-09-07 13:22:09 +01:00
2020-06-09 11:33:03 +01:00
2020-07-05 16:23:24 +01:00
2020-05-16 00:36:34 +01:00
2020-05-29 12:31:06 -07:00
2021-01-13 17:23:00 +00:00
2020-09-12 11:42:18 -07:00
2020-08-27 07:10:20 +01:00
2020-11-10 13:38:11 -08:00
2020-12-30 15:23:21 -08:00
2020-09-07 15:11:10 +01:00
2020-09-30 10:35:25 -04:00
2020-11-14 15:37:53 +00:00
2020-08-27 07:10:20 +01:00
2020-04-27 10:13:29 +01:00
2020-11-14 15:37:53 +00:00
2020-12-06 11:52:10 -05:00
2020-07-29 13:29:17 +01:00
2021-01-02 01:01:19 +03:00
2020-06-08 16:37:29 -07:00
2020-10-04 11:31:57 -04:00
2021-01-11 12:32:18 -08:00
2020-10-02 09:28:35 +00:00
2020-09-28 14:50:19 +00:00
2021-01-22 14:07:48 +00:00
2020-11-20 14:00:46 -05:00
2020-09-30 10:35:25 -04:00
2020-07-17 08:56:44 +01:00
2020-11-20 14:00:46 -05:00
2020-11-20 14:00:46 -05:00
2020-11-20 14:00:46 -05:00
2020-12-23 22:47:36 +07:00
2020-11-14 15:37:53 +00:00
2021-01-11 09:32:49 -08:00
2020-11-20 20:08:43 -05:00
2020-07-02 09:19:38 +01:00
2020-05-04 12:34:14 -07:00
2020-07-20 10:43:28 -07:00
2020-07-20 10:43:28 -07:00
2020-07-28 13:31:17 +01:00
2020-09-30 10:35:25 -04:00
2020-12-30 15:23:21 -08:00
2020-08-14 23:11:01 +08:00
2020-11-14 15:37:53 +00:00
2020-09-28 14:50:19 +00:00
2021-01-22 14:07:48 +00:00
2020-11-14 15:37:53 +00:00
2020-11-14 15:37:53 +00:00
2020-12-08 11:54:39 +00:00
2020-12-23 22:47:36 +07:00
2020-06-12 13:53:08 -04:00
2021-01-06 11:26:39 +00:00
2020-07-16 11:25:53 +01:00
2020-07-16 11:25:53 +01:00
2020-11-14 15:37:53 +00:00
2020-07-05 16:23:24 +01:00
2020-10-29 21:26:14 +01:00
2020-10-29 21:26:14 +01:00
2020-10-07 10:36:44 -07:00
2020-10-07 10:36:44 -07:00
2020-11-04 14:20:31 -06:00
2020-11-04 14:20:31 -06:00
2020-11-20 17:58:26 -05:00
2020-10-07 11:47:03 +01:00
2020-06-23 16:04:23 +01:00
2020-12-08 11:54:39 +00:00
2021-01-06 10:51:12 +00:00
2021-01-06 10:51:12 +00:00
2020-11-20 17:58:26 -05:00
2021-01-06 10:51:12 +00:00
2020-07-16 11:25:53 +01:00
2021-01-06 11:26:39 +00:00
2020-12-07 09:35:12 +02:00
2020-04-24 08:35:43 -07:00