]> git.lizzy.rs Git - rust.git/commit
Fix (and extend) src/test/run-pass/foreign-call-no-runtime.rs
authorFelix S. Klock II <pnkfelix@pnkfx.org>
Thu, 20 Aug 2015 11:28:11 +0000 (13:28 +0200)
committerFelix S. Klock II <pnkfelix@pnkfx.org>
Thu, 20 Aug 2015 11:28:11 +0000 (13:28 +0200)
commit2ac5cc4863171c1eb456d4f750690e0b955221f1
tree115ee6514fb0e6c30c8e1e8844973fd0f4f8905a
parenta91f19f35662f83cdb20ae8445c941aaff33fc18
Fix (and extend) src/test/run-pass/foreign-call-no-runtime.rs

While going over various problems signaled by valgrind when running
`make check` on a build configured with `--enable-valgrind`, I
discovered a bug in this test case.

Namely, the test case was previously creating an `i32` (originally an
`int` aka `isize` but then we changed the name and the fallback
rules), and then reading from a `*const isize`. Valgrind rightly
complains about this, since we are reading an 8 byte value on 64-bit
systems, but in principle only 4 bytes have been initialized.

(I wish this was the only valgrind unclean test, but unfortunately
there are a bunch more. This was just the easiest/first one that I
dissected.)
src/test/run-pass/foreign-call-no-runtime.rs