authorgravatar for 19855629+SuperAuguste@users.noreply.github.comSuperAuguste <19855629+SuperAuguste@users.noreply.github.com> 2025-04-06 20:45:48-04:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-04-07 07:53:42+02:00
log36b9e56753dbb8f4a982ab012af420b0e63cf92d
tree4102b89a3ffd7bd2bf1ed1f8cb8ef1c1c365c864
parent45a54ef4fa68d0909f15efac2284f5b2efd54ade

Remove overzealous LLVM anti-instrumentation attributes


1 files changed, 4 insertions(+), 2 deletions(-)

src/codegen/llvm.zig+4-2
...@@ -1174,8 +1174,10 @@ pub const Object = struct {...@@ -1174,8 +1174,10 @@ pub const Object = struct {
1174 _ = try attributes.removeFnAttr(.sanitize_thread);1174 _ = try attributes.removeFnAttr(.sanitize_thread);
1175 }1175 }
1176 const is_naked = fn_info.cc == .naked;1176 const is_naked = fn_info.cc == .naked;
1177 if (owner_mod.fuzz and !func_analysis.disable_instrumentation and !is_naked) {1177 if (!func_analysis.disable_instrumentation and !is_naked) {
1178 try attributes.addFnAttr(.optforfuzzing, &o.builder);1178 if (owner_mod.fuzz) {
1179 try attributes.addFnAttr(.optforfuzzing, &o.builder);
1180 }
1179 _ = try attributes.removeFnAttr(.skipprofile);1181 _ = try attributes.removeFnAttr(.skipprofile);
1180 _ = try attributes.removeFnAttr(.nosanitize_coverage);1182 _ = try attributes.removeFnAttr(.nosanitize_coverage);
1181 } else {1183 } else {