Commit 376c28e
committed
[ubsan] PR34266: When sanitizing the 'this' value for a member function that happens to be a lambda call operator, use the lambda's 'this' pointer, not the captured enclosing 'this' pointer (if any).
Do not sanitize the 'this' pointer of a member call operator for a lambda with
no capture-default, since that call operator can legitimately be called with a
null this pointer from the static invoker function. Any actual call with a null
this pointer should still be caught in the caller (if it is being sanitized).
This reinstates r311589 (reverted in r311680) with the above fix.
llvm-svn: 3116951 parent 6810765 commit 376c28e
File tree
3 files changed
+54
-3
lines changed- clang
- include/clang/AST
- lib/CodeGen
- test/CodeGenCXX
3 files changed
+54
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2027 | 2027 | | |
2028 | 2028 | | |
2029 | 2029 | | |
2030 | | - | |
| 2030 | + | |
| 2031 | + | |
| 2032 | + | |
| 2033 | + | |
2031 | 2034 | | |
2032 | 2035 | | |
2033 | 2036 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
1014 | 1015 | | |
1015 | 1016 | | |
1016 | 1017 | | |
1017 | | - | |
| 1018 | + | |
1018 | 1019 | | |
1019 | 1020 | | |
1020 | 1021 | | |
1021 | | - | |
| 1022 | + | |
| 1023 | + | |
| 1024 | + | |
| 1025 | + | |
| 1026 | + | |
| 1027 | + | |
| 1028 | + | |
| 1029 | + | |
| 1030 | + | |
| 1031 | + | |
| 1032 | + | |
| 1033 | + | |
1022 | 1034 | | |
1023 | 1035 | | |
1024 | 1036 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
449 | 449 | | |
450 | 450 | | |
451 | 451 | | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
452 | 474 | | |
453 | 475 | | |
454 | 476 | | |
| |||
532 | 554 | | |
533 | 555 | | |
534 | 556 | | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
535 | 571 | | |
0 commit comments