Skip to content

Commit 5bc35b1

Browse files
committed
filling-drop: switch DTOR_NEEDED and DTOR_DONE to non-trivial values.
1 parent 7c671e5 commit 5bc35b1

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/libcore/mem.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ macro_rules! repeat_u8_as_u64 {
334334
// But having the sign bit set is a pain, so 0x1d is probably better.
335335
//
336336
// And of course, 0x00 brings back the old world of zero'ing on drop.
337-
#[cfg(not(stage0))] pub const POST_DROP_U8: u8 = 0x0;
337+
#[cfg(not(stage0))] pub const POST_DROP_U8: u8 = 0x1d;
338338
#[cfg(not(stage0))] pub const POST_DROP_U32: u32 = repeat_u8_as_u32!(POST_DROP_U8);
339339
#[cfg(not(stage0))] pub const POST_DROP_U64: u64 = repeat_u8_as_u64!(POST_DROP_U8);
340340

src/librustc_trans/trans/adt.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ macro_rules! repeat_u8_as_u64 {
166166
(repeat_u8_as_u32!($name) as u64)) }
167167
}
168168

169-
pub const DTOR_NEEDED: u8 = 0x1;
169+
pub const DTOR_NEEDED: u8 = 0xd4;
170170
pub const DTOR_NEEDED_U32: u32 = repeat_u8_as_u32!(DTOR_NEEDED);
171171
pub const DTOR_NEEDED_U64: u64 = repeat_u8_as_u64!(DTOR_NEEDED);
172172
#[allow(dead_code)]
@@ -178,7 +178,7 @@ pub fn dtor_needed_usize(ccx: &CrateContext) -> usize {
178178
}
179179
}
180180

181-
pub const DTOR_DONE: u8 = 0x0;
181+
pub const DTOR_DONE: u8 = 0x1d;
182182
pub const DTOR_DONE_U32: u32 = repeat_u8_as_u32!(DTOR_DONE);
183183
pub const DTOR_DONE_U64: u64 = repeat_u8_as_u64!(DTOR_DONE);
184184
#[allow(dead_code)]

0 commit comments

Comments
 (0)