Make TLS keys actually take up space
If the TLS key is 0-sized, then the linux linker is apparently smart enough to put everything at the same pointer. OSX on the other hand, will reserve some space for all of them. To get around this, the TLS key now actuall consumes space to ensure that it gets a unique pointer
This commit is contained in:
@@ -695,7 +695,7 @@ pub fn new_sctable_internal() -> SCTable {
|
||||
// fetch the SCTable from TLS, create one if it doesn't yet exist.
|
||||
pub fn get_sctable() -> @mut SCTable {
|
||||
#[cfg(not(stage0))]
|
||||
static sctable_key: local_data::Key<@@mut SCTable> = &[];
|
||||
static sctable_key: local_data::Key<@@mut SCTable> = &local_data::Key;
|
||||
#[cfg(stage0)]
|
||||
fn sctable_key(_: @@mut SCTable) {}
|
||||
match local_data::get(sctable_key, |k| k.map(|&k| *k)) {
|
||||
|
||||
Reference in New Issue
Block a user