Skip to content

Conversation

@akosthekiss
Copy link
Member

I've run iotjs through valgrind with its own "pass tests". It has reported some memory issues which are fixed in this PR's patches.

Depends on #332

@LaszloLango
Copy link
Contributor

LGTM

@zherczeg
Copy link
Member

LGTM

Executed iotjs through valgrind with its own "pass tests". It
has reported some memory issues which are fixed in this patch.

* Fixed new[] / delete mismatch in iotjs::Environment

  ParseCommandLineArgument allocates _argv with new[], so
  ~Environment should deallocate it with delete[].

* Ensured that Buffer.prototype.write did not cause an invalid
  read in iotjs::BufferWrap::Copy

  iotjs::___Write_native simply passes its arguments on to
  iotjs::BufferWrap::Copy, including length. Length is already
  clamped to the size of the buffer to avoid overflow when writing.
  However, to ensure that Copy also avoids reading past the end of
  the string, length must be clamped to the size of the string as
  well. (All these sanity checks happen at js side.)

IoT.js-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
@akosthekiss akosthekiss merged commit 8f35110 into jerryscript-project:master Mar 25, 2016
@akosthekiss akosthekiss deleted the memcheck branch March 25, 2016 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants