mrustc: Fails to build under x86 (32bit): Excessive memory usage

Opening this so we have a place to track remaining issues for x86 support.

Building 42bdc18 with GCC 5.5 fails as below:

[...]
BUILDING core from core v0.0.0 with features []
output/libcore.hir.o.c: In function ‘_ZRI$aLusize$aR9max_value’:
output/libcore.hir.o.c:54780:7: warning: large integer implicitly truncated to unsigned type [-Woverflow]
  rv = 0xffffffffffffffffull; // Return = Constant(18446744073709551615 usize)
       ^
output/libcore.hir.o.c: In function ‘_ZRI$aLusize$aR14saturating_add’:
output/libcore.hir.o.c:55084:9: warning: large integer implicitly truncated to unsigned type [-Woverflow]
  var1 = 0xffffffffffffffffull; // Local(1) = Constant(18446744073709551615 usize)
         ^
output/libcore.hir.o.c: In function ‘_ZRI$aLusize$aR14saturating_mul’:
output/libcore.hir.o.c:55105:68: warning: large integer implicitly truncated to unsigned type [-Woverflow]
  rv = _ZRI$aL_ZN4core6option6Option$aLusize$aR$aR9unwrap_or( var0, 0xffffffffffffffffull );
                                                                    ^
output/libcore.hir.o.c: In function ‘_ZRI$aL_ZN4core4cell12BorrowRefMut$aR3new’:
output/libcore.hir.o.c:67942:60: warning: large integer implicitly truncated to unsigned type [-Woverflow]
  var2 = _ZRI$aL_ZN4core4cell4Cell$aLusize$aR$aR3set( arg0, 0xffffffffffffffffull );
                                                            ^
output/libcore.hir.o.c: In function ‘_ZRI$aL_ZN4core3str7pattern14TwoWaySearcher$aR3new’:
output/libcore.hir.o.c:79087:13: warning: large integer implicitly truncated to unsigned type [-Woverflow]
  var14._6 = 0xffffffffffffffffull;
             ^
output/libcore.hir.o.c:79088:13: warning: large integer implicitly truncated to unsigned type [-Woverflow]
  var14._7 = 0xffffffffffffffffull; // Local(14) = Struct(::"core"::str::pattern::TwoWaySearcher, {Local(18), Local(21), Local(22), Lo
             ^
output/libcore.hir.o.c: In function ‘_ZRK$aLusize_as__ZN4core7convert7TryFrom$aLusize$aR$aR8try_from’:
output/libcore.hir.o.c:84805:9: warning: large integer implicitly truncated to unsigned type [-Woverflow]
  var2 = 0xffffffffffffffffull; // Local(2) = Constant(18446744073709551615 usize)
         ^
output/libcore.hir.o.c: In function ‘_ZRK$aLusize_as__ZN4core7convert7TryFrom$aLisize$aR$aR8try_from’:
output/libcore.hir.o.c:84849:9: warning: large integer implicitly truncated to unsigned type [-Woverflow]
  var1 = 0xffffffffffffffffull; // Local(1) = Constant(18446744073709551615 usize)
         ^
output/libcore.hir.o.c: In function ‘_ZRK$aLusize_as__ZN4core7convert7TryFrom$aLu8$aR$aR8try_from’:
output/libcore.hir.o.c:84896:9: warning: large integer implicitly truncated to unsigned type [-Woverflow]
  var2 = 0xffffffffffffffffull; // Local(2) = Constant(18446744073709551615 usize)
         ^
output/libcore.hir.o.c: In function ‘_ZRK$aLusize_as__ZN4core7convert7TryFrom$aLi8$aR$aR8try_from’:
output/libcore.hir.o.c:84941:9: warning: large integer implicitly truncated to unsigned type [-Woverflow]
  var1 = 0xffffffffffffffffull; // Local(1) = Constant(18446744073709551615 usize)
         ^
output/libcore.hir.o.c: In function ‘_ZRK$aLusize_as__ZN4core7convert7TryFrom$aLu16$aR$aR8try_from’:
output/libcore.hir.o.c:84988:9: warning: large integer implicitly truncated to unsigned type [-Woverflow]
  var2 = 0xffffffffffffffffull; // Local(2) = Constant(18446744073709551615 usize)
         ^
output/libcore.hir.o.c: In function ‘_ZRK$aLusize_as__ZN4core7convert7TryFrom$aLi16$aR$aR8try_from’:
output/libcore.hir.o.c:85033:9: warning: large integer implicitly truncated to unsigned type [-Woverflow]
  var1 = 0xffffffffffffffffull; // Local(1) = Constant(18446744073709551615 usize)
         ^
output/libcore.hir.o.c: In function ‘_ZRK$aLusize_as__ZN4core7convert7TryFrom$aLu32$aR$aR8try_from’:
output/libcore.hir.o.c:85080:9: warning: large integer implicitly truncated to unsigned type [-Woverflow]
  var2 = 0xffffffffffffffffull; // Local(2) = Constant(18446744073709551615 usize)
         ^
output/libcore.hir.o.c: In function ‘_ZRK$aLusize_as__ZN4core7convert7TryFrom$aLi32$aR$aR8try_from’:
output/libcore.hir.o.c:85125:9: warning: large integer implicitly truncated to unsigned type [-Woverflow]
  var1 = 0xffffffffffffffffull; // Local(1) = Constant(18446744073709551615 usize)
         ^
output/libcore.hir.o.c: In function ‘_ZRK$aLusize_as__ZN4core7convert7TryFrom$aLu64$aR$aR8try_from’:
output/libcore.hir.o.c:85172:9: warning: large integer implicitly truncated to unsigned type [-Woverflow]
  var2 = 0xffffffffffffffffull; // Local(2) = Constant(18446744073709551615 usize)
         ^
output/libcore.hir.o.c: In function ‘_ZRK$aLusize_as__ZN4core7convert7TryFrom$aLi64$aR$aR8try_from’:
output/libcore.hir.o.c:85217:9: warning: large integer implicitly truncated to unsigned type [-Woverflow]
  var1 = 0xffffffffffffffffull; // Local(1) = Constant(18446744073709551615 usize)
         ^
output/libcore.hir.o.c: In function ‘_ZRK$aLusize_as__ZN4core7convert7TryFrom$aLu128$aR$aR8try_from’:
output/libcore.hir.o.c:85263:9: warning: large integer implicitly truncated to unsigned type [-Woverflow]
  var2 = 0xffffffffffffffffull; // Local(2) = Constant(18446744073709551615 usize)
         ^
output/libcore.hir.o.c: In function ‘_ZRK$aLusize_as__ZN4core7convert7TryFrom$aLi128$aR$aR8try_from’:
output/libcore.hir.o.c:85306:9: warning: large integer implicitly truncated to unsigned type [-Woverflow]
  var1 = 0xffffffffffffffffull; // Local(1) = Constant(18446744073709551615 usize)
         ^
output/libcore.hir.o.c: In function ‘_ZRK$aLusize_as__ZN4core3num18FromStrRadixHelper$aR9max_value’:
output/libcore.hir.o.c:85938:7: warning: large integer implicitly truncated to unsigned type [-Woverflow]
  rv = 0xffffffffffffffffull; // Return = Constant(18446744073709551615 usize)
       ^
BUILDING rand from rand v0.0.0 with features []
BUILDING compiler_builtins from compiler_builtins v0.0.0 with features []
Macro:why_are_abi_strings_checked_by_parser:0: BUG:src/hir/from_ast.cpp:901: TODO: LowerHIR_Struct - Handle struct repr 'simd'
rustc-1.19.0-src/src/libcompiler_builtins/lib.rs:719: note: From here
BUILD FAILED
minicargo.mk:63: recipe for target 'output/libstd.hir' failed
make: *** [output/libstd.hir] Error 1

About this issue

  • Original URL
  • State: open
  • Created 6 years ago
  • Comments: 35 (25 by maintainers)

Commits related to this issue

Most upvoted comments

Reading the generated code, adding printf statements, and checking that each value was sane - until finding the source of the bad value.