Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Weird behavior that comment matters what's happening. #240

Closed
ILyoan opened this issue Jun 25, 2015 · 3 comments
Closed

Weird behavior that comment matters what's happening. #240

ILyoan opened this issue Jun 25, 2015 · 3 comments
Labels
bug Undesired behaviour

Comments

@ILyoan
Copy link
Contributor

ILyoan commented Jun 25, 2015

I encountered a weird situation that I could not figure out what's going on that running a program ends with unexpected result runs good when added comments.

You may reproduce it by:

  1. checkout iotjs/fs_readfile
  2. build
    • $ ./tools/build.py
  3. goto test directory
    • $ cd test/run_pass
  4. run the program
    • $ ../../build/x86_64-linux/debug/iotjs/iotjs test_net.js

If you see this:

uncaughtException: TypeError
uncaughtException: AssertionError: { actual: 1, expected: 0, operator: == }

It is the unexpected result.

If you change the program "test_net.js" slightly by adding comment like this:

process.on('exit', function(code) {
  // comment meaning nothing.
  assert.equal(code, 0);
  assert.equal(msg, "Hello IoT.js");
});

The program will end good.

@ILyoan ILyoan added the bug Undesired behaviour label Jun 25, 2015
@ILyoan
Copy link
Contributor Author

ILyoan commented Jun 25, 2015

Got

ICE: Assertion 'compressed_pointer != MEM_CP_NULL' failed at /home/ilyoan/project/harmony/iotjs/deps/jerry/jerry-core/mem/mem-allocator.cpp(mem_decompress_pointer):124.
Error: ERR_FAILED_INTERNAL_ASSERTION

with

...

process.on('exit', function(code) {
  // comment
  assert.equal(code, 0);
  assert.equal(msg, "Hello IoT.js");
});

@ILyoan
Copy link
Contributor Author

ILyoan commented Jun 29, 2015

Look like it was due to accessing after gc. jerryscript-project/iotjs#106 might fix this.

@ILyoan
Copy link
Contributor Author

ILyoan commented Jun 29, 2015

The problem has gone away after jerryscript-project/iotjs#106. Closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Undesired behaviour
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant