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

[JS] Joining nil strings crashes #9644

Closed
yglukhov opened this issue Nov 7, 2018 · 1 comment
Closed

[JS] Joining nil strings crashes #9644

yglukhov opened this issue Nov 7, 2018 · 1 comment

Comments

@yglukhov
Copy link
Member

yglukhov commented Nov 7, 2018

var s: string
echo s & "hi"
nim js -r ~/test.nim
/home/yglukhov/nimcache/test.js:86
rawEcho((s_26003[0]).concat(makeNimstrLit("hi")));
                     ^

TypeError: Cannot read property 'concat' of null
    at Object.<anonymous> (/home/yglukhov/nimcache/test.js:86:22)
    at Module._compile (module.js:635:30)
    at Object.Module._extensions..js (module.js:646:10)
    at Module.load (module.js:554:32)
    at tryModuleLoad (module.js:497:12)
    at Function.Module._load (module.js:489:3)
    at Function.Module.runMain (module.js:676:10)
    at startup (bootstrap_node.js:187:16)
    at bootstrap_node.js:608:3
Error: execution of an external program failed: '/home/yglukhov/.nvm/versions/node/v8.9.1/bin/node /home/yglukhov/nimcache/test.js '
recloser added a commit to recloser/Nim that referenced this issue Nov 11, 2018
Araq pushed a commit that referenced this issue Dec 4, 2018
…ackport]

* Add a test for issue #9389

* Fixes #9389.

* Make object contructors copy objects properly by checking whether the expressions passed to them don't need to be copied.
* Make mArrToSeq implementation actually check if a copy needs to be made.

* Avoid unnecessary copy in mChr impl

* Assume set constructor elements need no copy

* Add a test for issue #9410

* Add a test

* fix passing fat pointers (#9410)

* Enhance tests

* More tests and fixes

* Add more (failing) tests [ci skip]

* Added equality operator for fat pointers, more tests and fixes

* Fix printing uninitialized strings

* Fix mInc, mDec double eval, add more tests

* Tests

* Refactored, fixed multiple evals, revamped the tests, added missing ops

* Fix ups

* Fix #9643 and #9644

* add pointer normalization
@recloser
Copy link
Contributor

This was fixed by #9411

@Araq Araq closed this as completed Dec 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants