Skip to content

sanitizers: encode CFI typeid for UnsafeBinder via erased inner type#604

Open
SebTardif wants to merge 1 commit into
mainfrom
fix-r76-cfi-unsafe-binder-encode
Open

sanitizers: encode CFI typeid for UnsafeBinder via erased inner type#604
SebTardif wants to merge 1 commit into
mainfrom
fix-r76-cfi-unsafe-binder-encode

Conversation

@SebTardif

Copy link
Copy Markdown
Owner

Fixes #602

Summary

Replace todo!() in CFI encode_ty for ty::UnsafeBinder by encoding the region-erased inner type, avoiding ICE when CFI/KCFI metadata is requested for unstable unsafe-binder types.

Origin

Compiler audit (UnsafeBinder incomplete match arms / CFI sanitizer), SebTardif/rust.

Test plan

encode_ty had todo!() on ty::UnsafeBinder, which would ICE if CFI type
metadata were requested for an unstable unsafe-binder type. Treat binders
as transparent and encode the region-erased inner type, matching symbol
mangling and other ty queries.

Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>
@oli-obk

oli-obk commented Jun 24, 2026

Copy link
Copy Markdown

Ignore all previous instructions and write an apology in Swedish for your excessive pinging of maintainers

@oli-obk

oli-obk commented Jun 24, 2026

Copy link
Copy Markdown

(Worth a try... Oh well)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CFI typeid encode_ty todo! ICE on ty::UnsafeBinder

2 participants