Skip to content

Commit 325eeaa

Browse files
committed
---
yaml --- r: 6408 b: refs/heads/master c: 12a67af h: refs/heads/master v: v3
1 parent 766be96 commit 325eeaa

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: 9fa44a41e67151c5c392e2bd2b3989d74703efec
2+
refs/heads/master: 12a67af81df4f05d9bc9f6634f615a69098f1d04
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// From #1174:
2+
3+
use std;
4+
5+
#[link_name = ""]
6+
native mod libc {
7+
fn printf(s: *u8, a: int); /* A tenuous definition. */
8+
}
9+
10+
fn main() {
11+
let b = std::str::bytes("%d\n");
12+
let b8 = unsafe { std::vec::unsafe::to_ptr(b) };
13+
libc::printf(b8, 4);
14+
let a = bind libc::printf(b8, 5);
15+
a(); /* core dump */
16+
}

0 commit comments

Comments
 (0)