File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -64,6 +64,8 @@ This project adheres to [Semantic Versioning](http://semver.org/).
64
64
([ #397 ] ( https://github.com/nix-rust/nix/pull/397 ) )
65
65
- Fixed an off-by-one bug in ` UnixAddr::new_abstract ` in ` ::nix::sys::socket ` .
66
66
([ #429 ] ( https://github.com/nix-rust/nix/pull/429 ) )
67
+ - Fixed clone passing a potentially unaligned stack.
68
+ ([ #490 ] ( https://github.com/nix-rust/nix/pull/490 ) )
67
69
68
70
## [ 0.7.0] 2016-09-09
69
71
Original file line number Diff line number Diff line change @@ -114,8 +114,9 @@ pub fn clone(mut cb: CloneCb,
114
114
let res = unsafe {
115
115
let combined = flags. bits ( ) | signal. unwrap_or ( 0 ) ;
116
116
let ptr = stack. as_mut_ptr ( ) . offset ( stack. len ( ) as isize ) ;
117
+ let ptr_aligned = ptr. offset ( ( ptr as usize % 16 ) as isize * -1 ) ;
117
118
ffi:: clone ( mem:: transmute ( callback as extern "C" fn ( * mut Box < :: std:: ops:: FnMut ( ) -> isize > ) -> i32 ) ,
118
- ptr as * mut c_void ,
119
+ ptr_aligned as * mut c_void ,
119
120
combined,
120
121
& mut cb)
121
122
} ;
You can’t perform that action at this time.
0 commit comments