summaryrefslogtreecommitdiff
path: root/tools/standalone_miri/value.cpp
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2018-02-11 22:18:59 +0800
committerJohn Hodge <tpg@mutabah.net>2018-02-11 22:18:59 +0800
commit0f051ed545656f36c866549b943f2d5ef03a5b18 (patch)
tree74356f1f58f821c58b49f0b8808226f381bd2bd1 /tools/standalone_miri/value.cpp
parenta45a1f378f1bb2f4bbab4480a1cb80bf04724ec1 (diff)
downloadmrust-0f051ed545656f36c866549b943f2d5ef03a5b18.tar.gz
Standalone MIRI - Working borrow (for now)
Diffstat (limited to 'tools/standalone_miri/value.cpp')
-rw-r--r--tools/standalone_miri/value.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/tools/standalone_miri/value.cpp b/tools/standalone_miri/value.cpp
index 59b68ea0..db8ec085 100644
--- a/tools/standalone_miri/value.cpp
+++ b/tools/standalone_miri/value.cpp
@@ -238,12 +238,18 @@ void Value::write_bytes(size_t ofs, const void* src, size_t count)
{
if( this->allocation )
{
- if(ofs >= this->meta.indirect_meta.size )
+ if(ofs >= this->meta.indirect_meta.size ) {
+ ::std::cerr << "Value::write_bytes - Out of bounds write, " << ofs << " >= " << this->meta.indirect_meta.size << ::std::endl;
throw "ERROR";
- if(count > this->meta.indirect_meta.size )
+ }
+ if(count > this->meta.indirect_meta.size ) {
+ ::std::cerr << "Value::write_bytes - Out of bounds write, count " << count << " > size " << this->meta.indirect_meta.size << ::std::endl;
throw "ERROR";
- if(ofs+count > this->meta.indirect_meta.size )
+ }
+ if(ofs+count > this->meta.indirect_meta.size ) {
+ ::std::cerr << "Value::write_bytes - Out of bounds write, " << ofs << "+" << count << " > size " << this->meta.indirect_meta.size << ::std::endl;
throw "ERROR";
+ }
}
else
{