RTS: Fix restrictive cast

Commit e75a9afd added an `unsigned` cast
to account for OSes that have signed `rlim_t` signed. Unfortunately,
the `unsigned` cast has the unintended effect of narrowing `rlim_t` to
only 4 bytes. This leads to some spurious out of memory crashes
(in particular: Haddock crashes with OOM whenn building docs of
`ghc`-the-library).

In this case, `W_` is a better type to cast to: we know it will be
unsigned too and it has the same type as `*len` (so we don't suffer from
accidental narrowing).
18 jobs for !1022 with wip/backport-ecc9366a0e0db107c286935130837b2222e2dd82 in 287 minutes and 33 seconds (queued for 2 seconds)
latest detached
Status Job ID Name Coverage
  Lint
failed #90850
lint allowed to fail
ghc-linters

00:01:33

passed #90851
lint
lint-submods-mr

00:01:27

 
  Build
failed #90854
x86_64-linux allowed to fail
release-x86_64-linux-deb9-dwarf

00:02:17

passed #90852
x86_64-linux
validate-x86_64-linux-deb8-hadrian

01:45:50

passed #90853
x86_64-linux
validate-x86_64-linux-deb9-debug

00:42:13

 
  Full Build
failed #90856
aarch64-linux allowed to fail
validate-aarch64-linux-deb9

00:00:00

passed #90857
x86_64-linux
validate-i386-linux-deb9

01:19:44

passed #90855
x86_64-darwin
validate-x86_64-darwin

01:19:45

passed #90858
x86_64-linux
validate-x86_64-linux-deb9

00:57:40

failed #90860
x86_64-linux allowed to fail
validate-x86_64-linux-deb9-integer-simple

00:39:51

failed #90859
x86_64-linux allowed to fail
validate-x86_64-linux-deb9-llvm

02:14:26

passed #90861
x86_64-linux
validate-x86_64-linux-deb9-unreg

02:36:40

passed #90862
x86_64-linux
validate-x86_64-linux-fedora27

01:35:01

failed #90864
x86_64-windows allowed to fail
validate-x86_64-windows

02:35:54

failed #90863
x86_64-windows allowed to fail
validate-x86_64-windows-hadrian

00:13:00

 
  Cleanup
passed #90866
x86_64-darwin
cleanup-darwin

00:00:04

passed #90865
x86_64-windows
cleanup-windows

00:00:48

 
  Hackage
manual #90867
x86_64-linux allowed to fail manual
hackage
 
Name Stage Failure
failed
ghc-linters Lint
Submodule path 'utils/hsc2hs': checked out 'efb556cc2689cae42abadae87d778ae20fbc0a14'
$ git checkout .gitmodules
$ git fetch https://gitlab.haskell.org/ghc/ghc-performance-notes.git refs/notes/perf:refs/notes/perf || true
warning: no common commits
From https://gitlab.haskell.org/ghc/ghc-performance-notes
* [new ref] refs/notes/perf -> refs/notes/perf
$ git fetch origin $CI_MERGE_REQUEST_TARGET_BRANCH_NAME
fatal: Couldn't find remote ref ghc-8.8
ERROR: Job failed: exit code 1
failed
validate-x86_64-linux-deb9-llvm Full Build
make[1]: Leaving directory '/builds/RyanGlScott/ghc/testsuite/tests'
Makefile:224: recipe for target 'test' failed
make: *** [test] Error 2
Running after script...
$ cp -Rf $HOME/.cabal cabal-cache
Uploading artifacts...
junit.xml: found 1 matching files
Uploading artifacts to coordinator... ok
id=90859 responseStatus=201 Created token=J5bGo_y4
ERROR: Job failed: exit code 1
failed
validate-x86_64-windows-hadrian Full Build
   Speed :            23086535 Bytes/sec.
Speed : 1321.022 MegaBytes/min.
Ended : Tuesday, June 4, 2019 5:56:00 AM

Uploading artifacts...
Runtime platform arch=amd64 os=windows pid=6584 revision=1f513601 version=11.10.1
WARNING: ghc.tar.xz: no matching files
ERROR: No files to upload
ERROR: Job failed: exit status 1
failed
release-x86_64-linux-deb9-dwarf Build
$ cp -Rf $HOME/.cabal cabal-cache
Uploading artifacts...
WARNING: ghc-*.tar.xz: no matching files
WARNING: junit.xml: no matching files
ERROR: No files to upload
Uploading artifacts...
WARNING: junit.xml: no matching files
ERROR: No files to upload
ERROR: Job failed: exit code 1
failed
validate-aarch64-linux-deb9 Full Build
Running with gitlab-runner 11.12.0~beta.1460.g3aac76a8 (3aac76a8)
on centriq.haskell.org 3bed8b97
Using Docker executor with image registry.gitlab.haskell.org/ghc/ci-images/aarch64-linux-deb9:cefaee3c742af193e0f7783f87edb0d35374515c ...
Pulling docker image gitlab/gitlab-runner-helper:arm-3aac76a8 ...
ERROR: Job failed: Error response from daemon: manifest for gitlab/gitlab-runner-helper:arm-3aac76a8 not found (executor_docker.go:173:0s)
failed
validate-x86_64-windows Full Build
junit.xml: found 1 matching files                  
WARNING: Failed to load system CertPool:crypto/x509: system root pool is not available on Windows
Uploading artifacts to coordinator... ok
id=90864 responseStatus=201 Created token=iD3sD-SJ
Uploading artifacts...
Runtime platform
arch=amd64 os=windows pid=6752 revision=1f513601 version=11.10.1
junit.xml: found 1 matching files

WARNING: Failed to load system CertPool:crypto/x509: system root pool is not available on Windows
Uploading artifacts to coordinator... ok
id=90864 responseStatus=201 Created token=iD3sD-SJ
ERROR: Job failed: exit status 2
failed
validate-x86_64-linux-deb9-integer-simple Full Build
libraries/text/ghc.mk:4: recipe for target 'libraries/text/dist-install/build/Data/Text/Lazy/Builder/Int.o' failed
make: *** [all] Error 2
Makefile:123: recipe for target 'all' failed
Running after script...
$ cp -Rf $HOME/.cabal cabal-cache
Uploading artifacts...
WARNING: junit.xml: no matching files
ERROR: No files to upload
ERROR: Job failed: exit code 1