Skip to content

Commit e6a7ce2

Browse files
committed
---
yaml --- r: 152531 b: refs/heads/try2 c: 9ece051 h: refs/heads/master i: 152529: 7b4ec25 152527: 8079a1b v: v3
1 parent b75c2c7 commit e6a7ce2

File tree

433 files changed

+4777
-9378
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

433 files changed

+4777
-9378
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 6d8342f5e9f7093694548e761ee7df4f55243f3f
8+
refs/heads/try2: 9ece0510b14e6baad0d2c9511dab86919a5379e1
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ install:
1212
- sudo apt-get update -qq
1313
- sudo apt-get install -qq --force-yes -y llvm-$LLVM_VERSION
1414
llvm-${LLVM_VERSION}-dev clang-$LLVM_VERSION lldb-$LLVM_VERSION
15+
libjemalloc-dev
1516

1617

1718
# All of the llvm tools are suffixed with "-$VERS" which we don't want, so
@@ -28,7 +29,7 @@ before_script:
2829
- ln -nsf /usr/bin/llc-$LLVM_VERSION local-llvm/bin/llc
2930
- ln -nsf /usr/include/llvm-$LLVM_VERSION local-llvm/include
3031
- ./configure --disable-optimize-tests --llvm-root=`pwd`/local-llvm
31-
--enable-fast-make --enable-clang
32+
--enable-fast-make --enable-clang --jemalloc-root=/usr/lib
3233

3334
# Tidy everything up first, then build a few things, and then run a few tests.
3435
# Note that this is meant to run in a "fairly small" amount of time, so this

branches/try2/configure

Lines changed: 54 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -416,6 +416,7 @@ opt mingw-cross 0 "cross-compile for win32 using mingw"
416416
opt clang 0 "prefer clang to gcc for building the runtime"
417417
opt ccache 0 "invoke gcc/clang via ccache to reuse object files between builds"
418418
opt local-rust 0 "use an installed rustc rather than downloading a snapshot"
419+
opt pax-flags 0 "apply PaX flags to rustc binaries (required for GRSecurity/PaX-patched kernels)"
419420
opt inject-std-version 1 "inject the current compiler version of libstd into programs"
420421
opt llvm-static-stdcpp 0 "statically link to libstdc++ for LLVM"
421422
opt rpath 1 "build rpaths into rustc itself"
@@ -517,6 +518,12 @@ then
517518
fi
518519
fi
519520

521+
if [ "$CFG_OSTYPE" = "unknown-linux-gnu" ]
522+
then
523+
probe CFG_PAXCTL paxctl /sbin/paxctl
524+
probe CFG_ZCAT zcat
525+
fi
526+
520527
step_msg "looking for target specific programs"
521528

522529
probe CFG_ADB adb
@@ -539,6 +546,51 @@ then
539546
fi
540547
fi
541548

549+
if [ "$CFG_OSTYPE" = "unknown-linux-gnu" ]
550+
then
551+
if [ ! -z "$CFG_ENABLE_PAX_FLAGS" -a -z "$CFG_PAXCTL" ]
552+
then
553+
err "enabled PaX markings but no paxctl binary found"
554+
fi
555+
556+
if [ -z "$CFG_DISABLE_PAX_FLAGS" ]
557+
then
558+
# GRSecurity/PaX detection. This can be very flaky.
559+
GRSEC_DETECTED=
560+
561+
# /dev/grsec only exists if CONFIG_GRKERNSEC_NO_RBAC is not set.
562+
# /proc/sys/kernel/grsecurity is not available if ÇONFIG_GRKERNSEC_SYSCTL is not set.
563+
if [ -e /dev/grsec -o -d /proc/sys/kernel/grsecurity ]
564+
then
565+
GRSEC_DETECTED=1
566+
# /proc/config.gz is normally only available to root, and only if CONFIG_IKCONFIG_PROC has been set.
567+
elif [ -r /proc/config.gz -a ! -z "$CFG_ZCAT" ]
568+
then
569+
if "$CFG_ZCAT" /proc/config.gz | grep --quiet "CONFIG_GRKERNSEC=y"
570+
then
571+
GRSEC_DETECTED=1
572+
fi
573+
# Flaky.
574+
elif grep --quiet grsec /proc/version
575+
then
576+
GRSEC_DETECTED=1
577+
fi
578+
579+
if [ ! -z "$GRSEC_DETECTED" ]
580+
then
581+
step_msg "GRSecurity: yes"
582+
if [ ! -z "$CFG_PAXCTL" ]
583+
then
584+
CFG_ENABLE_PAX_FLAGS=1
585+
else
586+
warn "GRSecurity kernel detected but no paxctl binary found: not setting CFG_ENABLE_PAX_FLAGS"
587+
fi
588+
else
589+
step_msg "GRSecurity: no"
590+
fi
591+
fi
592+
fi
593+
542594
BIN_SUF=
543595
if [ "$CFG_OSTYPE" = "pc-mingw32" ] || [ "$CFG_OSTYPE" = "w64-mingw32" ]
544596
then
@@ -890,33 +942,16 @@ then
890942
msg "git: submodule sync"
891943
"${CFG_GIT}" submodule sync
892944

893-
msg "git: submodule init"
894-
"${CFG_GIT}" submodule init
895-
896-
# Disable submodules that we're not using
897-
if [ ! -z "${CFG_LLVM_ROOT}" ]; then
898-
msg "git: submodule deinit src/llvm"
899-
"${CFG_GIT}" submodule deinit src/llvm
900-
fi
901-
if [ ! -z "${CFG_JEMALLOC_ROOT}" ]; then
902-
msg "git: submodule deinit src/jemalloc"
903-
"${CFG_GIT}" submodule deinit src/jemalloc
904-
fi
905-
if [ ! -z "${CFG_LIBUV_ROOT}" ]; then
906-
msg "git: submodule deinit src/libuv"
907-
"${CFG_GIT}" submodule deinit src/libuv
908-
fi
909-
910945
msg "git: submodule update"
911-
"${CFG_GIT}" submodule update
946+
"${CFG_GIT}" submodule update --init
912947
need_ok "git failed"
913948

914949
msg "git: submodule foreach sync"
915950
"${CFG_GIT}" submodule foreach --recursive 'if test -e .gitmodules; then git submodule sync; fi'
916951
need_ok "git failed"
917952

918953
msg "git: submodule foreach update"
919-
"${CFG_GIT}" submodule update --recursive
954+
"${CFG_GIT}" submodule update --init --recursive
920955
need_ok "git failed"
921956

922957
# NB: this is just for the sake of getting the submodule SHA1 values

branches/try2/mk/stage0.mk

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ ifdef CFG_ENABLE_LOCAL_RUST
1818
$(Q)$(S)src/etc/local_stage0.sh $(CFG_BUILD) $(CFG_LOCAL_RUST_ROOT) rustlib
1919
else
2020
$(Q)$(CFG_PYTHON) $(S)src/etc/get-snapshot.py $(CFG_BUILD) $(SNAPSHOT_FILE)
21+
ifdef CFG_ENABLE_PAX_FLAGS
22+
@$(call E, apply PaX flags: $@)
23+
@"$(CFG_PAXCTL)" -cm "$@"
24+
endif
2125
endif
2226
$(Q)touch $@
2327

branches/try2/src/compiler-rt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Subproject commit ed112ca1e4275e1c5707a898f2bf6164707ba378
1+
Subproject commit c10fb8630963e858513fbebe86db3648a2246d73

branches/try2/src/compiletest/compiletest.rs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,14 @@ extern crate test;
2020
extern crate getopts;
2121
extern crate green;
2222
extern crate rustuv;
23-
#[phase(plugin, link)] extern crate log;
23+
24+
#[cfg(stage0)]
25+
#[phase(syntax, link)]
26+
extern crate log;
27+
28+
#[cfg(not(stage0))]
29+
#[phase(plugin, link)]
30+
extern crate log;
2431

2532
extern crate regex;
2633

@@ -103,7 +110,7 @@ pub fn parse_config(args: Vec<String> ) -> Config {
103110
let matches =
104111
&match getopts::getopts(args_.as_slice(), groups.as_slice()) {
105112
Ok(m) => m,
106-
Err(f) => fail!("{}", f)
113+
Err(f) => fail!("{}", f.to_err_msg())
107114
};
108115

109116
if matches.opt_present("h") || matches.opt_present("help") {

branches/try2/src/doc/guide-lifetimes.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -275,10 +275,8 @@ invalidate the pointer `owner_age`.
275275

276276
# Borrowing and enums
277277

278-
The previous example showed that the type system forbids any mutations
279-
of owned boxed values while they are being borrowed. In general, the type
280-
system also forbids borrowing a value as mutable if it is already being
281-
borrowed - either as a mutable reference or an immutable one. This restriction
278+
The previous example showed that the type system forbids any borrowing
279+
of owned boxes found in aliasable, mutable memory. This restriction
282280
prevents pointers from pointing into freed memory. There is one other
283281
case where the compiler must be very careful to ensure that pointers
284282
remain valid: pointers into the interior of an `enum`.

branches/try2/src/jemalloc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Subproject commit 6a96910f2eaea6d2c705bb12379b23576b30d7d5
1+
Subproject commit 024c67ad651e1a3ca228936c4cfb13a37329baf2

branches/try2/src/liballoc/lib.rs

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,16 +70,25 @@
7070
#![no_std]
7171
#![feature(phase)]
7272

73+
#[cfg(stage0)]
74+
#[phase(syntax, link)]
75+
extern crate core;
76+
77+
#[cfg(not(stage0))]
7378
#[phase(plugin, link)]
7479
extern crate core;
80+
7581
extern crate libc;
7682

83+
7784
// Allow testing this library
7885

7986
#[cfg(test)] extern crate debug;
8087
#[cfg(test)] extern crate native;
81-
#[cfg(test)] #[phase(plugin, link)] extern crate std;
82-
#[cfg(test)] #[phase(plugin, link)] extern crate log;
88+
#[cfg(test, stage0)] #[phase(syntax, link)] extern crate std;
89+
#[cfg(test, stage0)] #[phase(syntax, link)] extern crate log;
90+
#[cfg(test, not(stage0))] #[phase(plugin, link)] extern crate std;
91+
#[cfg(test, not(stage0))] #[phase(plugin, link)] extern crate log;
8392

8493
// Heaps provided for low-level allocation strategies
8594

branches/try2/src/libarena/lib.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -406,8 +406,7 @@ impl<T> TypedArenaChunk<T> {
406406
None => {}
407407
Some(mut next) => {
408408
// We assume that the next chunk is completely filled.
409-
let capacity = next.capacity;
410-
next.destroy(capacity)
409+
next.destroy(next.capacity)
411410
}
412411
}
413412
}

branches/try2/src/libcollections/bitv.rs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -842,7 +842,6 @@ impl cmp::PartialEq for BitvSet {
842842
}
843843

844844
impl fmt::Show for BitvSet {
845-
#[cfg(stage0)]
846845
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
847846
try!(write!(fmt, r"\{"));
848847
let mut first = true;
@@ -855,19 +854,6 @@ impl fmt::Show for BitvSet {
855854
}
856855
write!(fmt, r"\}")
857856
}
858-
#[cfg(not(stage0))]
859-
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
860-
try!(write!(fmt, "{{"));
861-
let mut first = true;
862-
for n in self.iter() {
863-
if !first {
864-
try!(write!(fmt, ", "));
865-
}
866-
try!(write!(fmt, "{}", n));
867-
first = false;
868-
}
869-
write!(fmt, "}}")
870-
}
871857
}
872858

873859
impl<S: hash::Writer> hash::Hash<S> for BitvSet {

branches/try2/src/libcollections/lib.rs

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,24 @@
2323
#![feature(macro_rules, managed_boxes, default_type_params, phase, globs)]
2424
#![no_std]
2525

26-
#[phase(plugin, link)] extern crate core;
2726
extern crate alloc;
2827

28+
#[cfg(stage0)]
29+
#[phase(syntax, link)]
30+
extern crate core;
31+
32+
#[cfg(not(stage0))]
33+
#[phase(plugin, link)]
34+
extern crate core;
35+
2936
#[cfg(test)] extern crate native;
3037
#[cfg(test)] extern crate test;
3138
#[cfg(test)] extern crate debug;
3239

33-
#[cfg(test)] #[phase(plugin, link)] extern crate std;
34-
#[cfg(test)] #[phase(plugin, link)] extern crate log;
40+
#[cfg(test, stage0)] #[phase(syntax, link)] extern crate std;
41+
#[cfg(test, stage0)] #[phase(syntax, link)] extern crate log;
42+
#[cfg(test, not(stage0))] #[phase(plugin, link)] extern crate std;
43+
#[cfg(test, not(stage0))] #[phase(plugin, link)] extern crate log;
3544

3645
use core::prelude::*;
3746

branches/try2/src/libcollections/ringbuf.rs

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,7 @@ impl<T> Deque<T> for RingBuf<T> {
6666

6767
/// Return a mutable reference to the last element in the RingBuf
6868
fn back_mut<'a>(&'a mut self) -> Option<&'a mut T> {
69-
let nelts = self.nelts;
70-
if nelts > 0 { Some(self.get_mut(nelts - 1)) } else { None }
69+
if self.nelts > 0 { Some(self.get_mut(self.nelts - 1)) } else { None }
7170
}
7271

7372
/// Remove and return the first element in the RingBuf, or None if it is empty
@@ -419,7 +418,6 @@ impl<T: fmt::Show> fmt::Show for RingBuf<T> {
419418
mod tests {
420419
use std::fmt::Show;
421420
use std::prelude::*;
422-
use std::gc::{GC, Gc};
423421
use test::Bencher;
424422
use test;
425423

@@ -474,10 +472,10 @@ mod tests {
474472

475473
#[test]
476474
fn test_boxes() {
477-
let a: Gc<int> = box(GC) 5;
478-
let b: Gc<int> = box(GC) 72;
479-
let c: Gc<int> = box(GC) 64;
480-
let d: Gc<int> = box(GC) 175;
475+
let a: @int = @5;
476+
let b: @int = @72;
477+
let c: @int = @64;
478+
let d: @int = @175;
481479

482480
let mut deq = RingBuf::new();
483481
assert_eq!(deq.len(), 0);
@@ -622,8 +620,7 @@ mod tests {
622620

623621
#[test]
624622
fn test_param_at_int() {
625-
test_parameterized::<Gc<int>>(box(GC) 5, box(GC) 72,
626-
box(GC) 64, box(GC) 175);
623+
test_parameterized::<@int>(@5, @72, @64, @175);
627624
}
628625

629626
#[test]

branches/try2/src/libcollections/slice.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2034,16 +2034,6 @@ mod tests {
20342034
assert!(xs == [1,2,0,4,3,0,0,6,5,0]);
20352035
}
20362036

2037-
#[test]
2038-
fn test_get_mut() {
2039-
let mut v = [0,1,2];
2040-
assert_eq!(v.get_mut(3), None);
2041-
v.get_mut(1).map(|e| *e = 7);
2042-
assert_eq!(v[1], 7);
2043-
let mut x = 2;
2044-
assert_eq!(v.get_mut(2), Some(&mut x));
2045-
}
2046-
20472037
#[test]
20482038
fn test_mut_chunks() {
20492039
let mut v = [0u8, 1, 2, 3, 4, 5, 6];

branches/try2/src/libcollections/smallintmap.rs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,6 @@ impl<V:Clone> SmallIntMap<V> {
185185
}
186186

187187
impl<V: fmt::Show> fmt::Show for SmallIntMap<V> {
188-
#[cfg(stage0)]
189188
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
190189
try!(write!(f, r"\{"));
191190

@@ -196,17 +195,6 @@ impl<V: fmt::Show> fmt::Show for SmallIntMap<V> {
196195

197196
write!(f, r"\}")
198197
}
199-
#[cfg(not(stage0))]
200-
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
201-
try!(write!(f, "{{"));
202-
203-
for (i, (k, v)) in self.iter().enumerate() {
204-
if i != 0 { try!(write!(f, ", ")); }
205-
try!(write!(f, "{}: {}", k, *v));
206-
}
207-
208-
write!(f, "}}")
209-
}
210198
}
211199

212200
macro_rules! iterator {

0 commit comments

Comments
 (0)