Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 69a0c64

Browse files
fix the naked-asan test
we get these declarations ``` ; opt level 0 declare x86_intrcc void @page_fault_handler(ptr byval([8 x i8]) align 8, i64) unnamed_addr #1 ; opt level > 0 declare x86_intrcc void @page_fault_handler(ptr noalias nocapture noundef byval([8 x i8]) align 8 dereferenceable(8), i64 noundef) unnamed_addr #1 ``` The space after `i64` in the original regex made the regex not match for opt level 0. Removing the space fixes the issue. ``` declare x86_intrcc void @page_fault_handler(ptr {{.*}}, i64 {{.*}}){{.*}}#[[ATTRS:[0-9]+]] ```
1 parent bd8f8e0 commit 69a0c64

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

‎tests/codegen/naked-asan.rs‎

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,11 @@ pub fn caller() {
1212
page_fault_handler(1, 2);
1313
}
1414

15-
// CHECK: declare x86_intrcc void @page_fault_handler(ptr {{.*}}, i64 {{.*}}){{.*}}#[[ATTRS:[0-9]+]]
16-
// CHECK-NOT: memcpy
15+
// CHECK: declare x86_intrcc void @page_fault_handler(ptr {{.*}}, i64{{.*}}){{.*}}#[[ATTRS:[0-9]+]]
1716
#[naked]
1817
#[no_mangle]
1918
pub extern "x86-interrupt" fn page_fault_handler(_: u64, _: u64) {
20-
unsafe {
21-
core::arch::naked_asm!("ud2");
22-
}
19+
unsafe { core::arch::naked_asm!("ud2") };
2320
}
2421

2522
// CHECK: #[[ATTRS]] =

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /