History

String constructor now permits length of 0 with non-null - This was useful when using static buffers that don't have content. Ensure the syscall error message buffer is properly initialized.

arr committed 9 years ago

Commit 058335e1 parent 0643d043 files · +9 −4Browse files

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

Unified · Split

src/vm/vm.cpp+3−1
@@ -91,7 +91,8 @@ vm_config_t::vm_config_t(vm_config_t &&other) · 90 unmodified lines
9191 { }
9292
9393 vm_t::vm_t()
94− : _last_syscall_error_message_lock{ ATOMIC_FLAG_INIT }
94+ : _last_syscall_error_message{}
95+ , _last_syscall_error_message_lock{ ATOMIC_FLAG_INIT }
9596 {
9697 // Initialize built-in modules.
9798 builtin::initialize_builtin_modules();
@@ -102,6 +103,7 @@ vm_t::vm_t() · 4 unmodified lines
102103 }
103104
104105 vm_t::vm_t(vm_config_t config)
106+ : _last_syscall_error_message{}
105107 {
106108 // Initialize built-in modules.
107109 builtin::initialize_builtin_modules();