History

Basic implementation of Sys module functions - Sys.create, Sys.open, Sys.read, Sys.write - Sys.tokenize

Code analysis violations Bug in scheduler - race during with worker thread shutdown.

arr committed 10 years ago

Commit 992a33f1 parent 6d77c2d18 files · +695 −243Browse files

Showing the changes to src/vm/module_reader.cpp (1 of 18 files). Show all

Unified · Split

src/vm/module_reader.cpp+4−4
@@ -392,8 +392,8 @@ namespace · 391 unmodified lines
392 auto base = reinterpret_cast<byte_t *>(modobj.original_mp->get_allocation());392 auto base = reinterpret_cast<byte_t *>(modobj.original_mp->get_allocation());
393 for (;;)393 for (;;)
394 {394 {
395 auto bytesRead = reader.get_next_bytes(sizeof(code), &code);395 auto bytes_read = reader.get_next_bytes(sizeof(code), &code);
396 if (bytesRead != sizeof(code)) throw module_reader_exception{ "Failed to read data item code" };396 if (bytes_read != sizeof(code)) throw module_reader_exception{ "Failed to read data item code" };
397 if (code == 0)397 if (code == 0)
398 break;398 break;
399 399
@@ -444,8 +444,8 @@ namespace · 44 unmodified lines
444 case datum_type_t::utf_string:444 case datum_type_t::utf_string:
445 {445 {
446 auto str_buffer = std::vector<uint8_t>(count);446 auto str_buffer = std::vector<uint8_t>(count);
447 auto bytesRead = reader.get_next_bytes(count, str_buffer.data());447 auto str_bytes = reader.get_next_bytes(count, str_buffer.data());
448 if (bytesRead != count)448 if (str_bytes != count)
449 throw module_reader_exception{ "Failed to read string data" };449 throw module_reader_exception{ "Failed to read string data" };
450 450
451 auto new_string = new vm_string_t(str_buffer.size(), str_buffer.data());451 auto new_string = new vm_string_t(str_buffer.size(), str_buffer.data());