{"action":"created","issue":{"url":"https://api.github.com/repos/nim-lang/Nim/issues/3299","labels_url":"https://api.github.com/repos/nim-lang/Nim/issues/3299/labels{/name}","comments_url":"https://api.github.com/repos/nim-lang/Nim/issues/3299/comments","events_url":"https://api.github.com/repos/nim-lang/Nim/issues/3299/events","html_url":"https://github.com/nim-lang/Nim/issues/3299","id":105243491,"number":3299,"title":"Issues with C++ back end and async/jester","user":{"login":"onionhammer","id":969938,"avatar_url":"https://avatars.githubusercontent.com/u/969938?v=3","gravatar_id":"","url":"https://api.github.com/users/onionhammer","html_url":"https://github.com/onionhammer","followers_url":"https://api.github.com/users/onionhammer/followers","following_url":"https://api.github.com/users/onionhammer/following{/other_user}","gists_url":"https://api.github.com/users/onionhammer/gists{/gist_id}","starred_url":"https://api.github.com/users/onionhammer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/onionhammer/subscriptions","organizations_url":"https://api.github.com/users/onionhammer/orgs","repos_url":"https://api.github.com/users/onionhammer/repos","events_url":"https://api.github.com/users/onionhammer/events{/privacy}","received_events_url":"https://api.github.com/users/onionhammer/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/nim-lang/Nim/labels/C++%20codegen","name":"C++ codegen","color":"d4c5f9"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-09-07T16:24:28Z","updated_at":"2015-10-15T03:36:28Z","closed_at":null,"body":"I'm having issues running this minimal example on Linux (debian ARMHF), with latest devel branch. Tried both clang and gcc. Nim crashes during compilation with SIGSEGV.\r\n\r\n```nim\r\nimport jester\r\nimport asyncdispatch, asyncnet\r\n\r\necho \"Hello, world!\"\r\n```\r\n\r\nWith Jester, I get\r\n\r\n```\r\nHint: cgi [Processing]\r\nlib/pure/asyncdispatch.nim(1423, 7) Hint: Processing statusContent as an async proc. [User]\r\nSIGSEGV: Illegal storage access. (Attempt to read from nil?)\r\n```\r\n\r\nCommenting out `import jester`, I get\r\n\r\n```\r\n/home/usr/projects/test/nimcache/stdlib_rawsockets.cpp:370:8: error: assigning to 'NCSTRING' (aka 'char *') from incompatible type 'const char *'\r\n                LOC6 = gai_strerror(gairesult);\r\n                     ^ ~~~~~~~~~~~~~~~~~~~~~~~\r\n/home/usr/projects/test/nimcache/stdlib_rawsockets.cpp:514:8: error: assigning to 'NCSTRING' (aka 'char *') from incompatible type 'const char *'\r\n                LOC5 = hstrerror(h_errno);\r\n                     ^ ~~~~~~~~~~~~~~~~~~\r\n/home/usr/projects/test/nimcache/stdlib_rawsockets.cpp:667:8: error: assigning to 'NCSTRING' (aka 'char *') from incompatible type 'const char *'\r\n                LOC9 = inet_ntop(AF_INET6, ((void*) (addr6)), result->data, ((NI32) ((result ? result->len : 0))));\r\n                     ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n3 errors generated.\r\n\r\n```\r\n\r\nExecuting\r\n\r\n```\r\nnim cpp test.nim\r\n```\r\n\r\nYields these errors\r\n\r\n```\r\nnim c test.nim\r\n```\r\n\r\ndoes not."},"comment":{"url":"https://api.github.com/repos/nim-lang/Nim/issues/comments/148272604","html_url":"https://github.com/nim-lang/Nim/issues/3299#issuecomment-148272604","issue_url":"https://api.github.com/repos/nim-lang/Nim/issues/3299","id":148272604,"user":{"login":"onionhammer","id":969938,"avatar_url":"https://avatars.githubusercontent.com/u/969938?v=3","gravatar_id":"","url":"https://api.github.com/users/onionhammer","html_url":"https://github.com/onionhammer","followers_url":"https://api.github.com/users/onionhammer/followers","following_url":"https://api.github.com/users/onionhammer/following{/other_user}","gists_url":"https://api.github.com/users/onionhammer/gists{/gist_id}","starred_url":"https://api.github.com/users/onionhammer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/onionhammer/subscriptions","organizations_url":"https://api.github.com/users/onionhammer/orgs","repos_url":"https://api.github.com/users/onionhammer/repos","events_url":"https://api.github.com/users/onionhammer/events{/privacy}","received_events_url":"https://api.github.com/users/onionhammer/received_events","type":"User","site_admin":false},"created_at":"2015-10-15T03:36:28Z","updated_at":"2015-10-15T03:36:28Z","body":"@tmm1 this is a compiler error, not a library error."}}