We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cbc396f commit 326b772Copy full SHA for 326b772
compiler/rustc_mir/src/transform/inline.rs
@@ -251,9 +251,12 @@ impl Inliner<'tcx> {
251
return false;
252
}
253
254
- // Avoid inlining functions marked as no_sanitize if sanitizer is enabled,
255
- // since instrumentation might be enabled and performed on the caller.
256
- if self.tcx.sess.opts.debugging_opts.sanitizer.intersects(codegen_fn_attrs.no_sanitize) {
+ let self_no_sanitize =
+ self.codegen_fn_attrs.no_sanitize & self.tcx.sess.opts.debugging_opts.sanitizer;
+ let callee_no_sanitize =
257
+ codegen_fn_attrs.no_sanitize & self.tcx.sess.opts.debugging_opts.sanitizer;
258
+ if self_no_sanitize != callee_no_sanitize {
259
+ debug!("`callee has incompatible no_sanitize attribute - not inlining");
260
261
262
0 commit comments