Uh oh!
There was an error while loading. Please reload this page.
CFI: Append debug location to CFI blocks - #132702
Conversation
rustbot
commented
Nov 6, 2024
rustbot
commented
Nov 6, 2024
Some changes occurred in tests/codegen/sanitizer cc @rust-lang/project-exploit-mitigations, @rcvalle Some changes occurred in compiler/rustc_codegen_gcc |
Uh oh!
There was an error while loading. Please reload this page.
r? @rcvalle |
rcvalle
commented
Nov 6, 2024
Thank you for your time and for working on this, @1c3t3a ! Much appreciated. Alternatively, this could be implemented by passing back/returning the blocks created by CFI to rustc_codegen_ssa if any, but I'm OK with this implementation. I think invoke and call need some refactoring (and possibly being consolidated into one) anyway, and from past conversations with @bjorn3 seemed to agree, and might be interested in providing feedback here. Otherwise; LGTM (FYI @cuviper). |
Another alternative would be to get the current debug information before appending the CFI blocks, remember it and append it to all inserted blocks. This would need to call LLVMGetCurrentDebugLocation2, which is currently not used by rustc. It would have the benefit that it doesn't need to change |
rcvalle
commented
Nov 7, 2024
I think that would be preferred if you don't mind. You can add |
9ea79fe to
b5e4f5aCompare1c3t3a
commented
Nov 8, 2024
Oke great! I updated the implementation accordingly :) |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
rcvalle
commented
Nov 8, 2024
rcvalle
commented
Nov 12, 2024
@bors r+ |
bors
commented
Nov 12, 2024
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#132702 (CFI: Append debug location to CFI blocks) - rust-lang#132851 (Update the doc comment of `ASCII_CASE_MASK`) - rust-lang#132948 (stabilize const_unicode_case_lookup) - rust-lang#132950 (Use GNU ld on m68k-unknown-linux-gnu) - rust-lang#132962 (triagebot: add codegen reviewers) - rust-lang#132966 (stabilize const_option_ext) - rust-lang#132970 (Add tracking issue number to unsigned_nonzero_div_ceil feature) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#132702 - 1c3t3a:issue-132615, r=rcvalle CFI: Append debug location to CFI blocks Currently we're not appending debug locations to the inserted CFI blocks. This shows up in rust-lang#132615 and rust-lang#100783. This change fixes that by passing down the debug location to the CFI type-test generation and appending it to the blocks. Credits also belong to `@jakos-sec` who worked with me on this.
CFI: Append debug location to CFI blocks Currently we're not appending debug locations to the inserted CFI blocks. This shows up in rust-lang#132615 and rust-lang#100783. This change fixes that by passing down the debug location to the CFI type-test generation and appending it to the blocks. Credits also belong to `@jakos-sec` who worked with me on this.
Currently we're not appending debug locations to the inserted CFI blocks. This shows up in #132615 and #100783. This change fixes that by passing down the debug location to the CFI type-test generation and appending it to the blocks.
Credits also belong to @jakos-sec who worked with me on this.