{"action":"created","issue":{"url":"https://api.github.com/repos/dotnet/corert/issues/6330","repository_url":"https://api.github.com/repos/dotnet/corert","labels_url":"https://api.github.com/repos/dotnet/corert/issues/6330/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/corert/issues/6330/comments","events_url":"https://api.github.com/repos/dotnet/corert/issues/6330/events","html_url":"https://github.com/dotnet/corert/issues/6330","id":360485105,"node_id":"MDU6SXNzdWUzNjA0ODUxMDU=","number":6330,"title":"wasm: cannot access passed object of type List<string> to a method that declares the parameter as IList<string>","user":{"login":"yowl","id":2720041,"node_id":"MDQ6VXNlcjI3MjAwNDE=","avatar_url":"https://avatars3.githubusercontent.com/u/2720041?v=4","gravatar_id":"","url":"https://api.github.com/users/yowl","html_url":"https://github.com/yowl","followers_url":"https://api.github.com/users/yowl/followers","following_url":"https://api.github.com/users/yowl/following{/other_user}","gists_url":"https://api.github.com/users/yowl/gists{/gist_id}","starred_url":"https://api.github.com/users/yowl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yowl/subscriptions","organizations_url":"https://api.github.com/users/yowl/orgs","repos_url":"https://api.github.com/users/yowl/repos","events_url":"https://api.github.com/users/yowl/events{/privacy}","received_events_url":"https://api.github.com/users/yowl/received_events","type":"User","site_admin":false},"labels":[{"id":689794855,"node_id":"MDU6TGFiZWw2ODk3OTQ4NTU=","url":"https://api.github.com/repos/dotnet/corert/labels/arch-wasm","name":"arch-wasm","color":"eb6420","default":false}],"state":"open","locked":false,"assignee":{"login":"morganbr","id":11641665,"node_id":"MDQ6VXNlcjExNjQxNjY1","avatar_url":"https://avatars1.githubusercontent.com/u/11641665?v=4","gravatar_id":"","url":"https://api.github.com/users/morganbr","html_url":"https://github.com/morganbr","followers_url":"https://api.github.com/users/morganbr/followers","following_url":"https://api.github.com/users/morganbr/following{/other_user}","gists_url":"https://api.github.com/users/morganbr/gists{/gist_id}","starred_url":"https://api.github.com/users/morganbr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/morganbr/subscriptions","organizations_url":"https://api.github.com/users/morganbr/orgs","repos_url":"https://api.github.com/users/morganbr/repos","events_url":"https://api.github.com/users/morganbr/events{/privacy}","received_events_url":"https://api.github.com/users/morganbr/received_events","type":"User","site_admin":false},"assignees":[{"login":"morganbr","id":11641665,"node_id":"MDQ6VXNlcjExNjQxNjY1","avatar_url":"https://avatars1.githubusercontent.com/u/11641665?v=4","gravatar_id":"","url":"https://api.github.com/users/morganbr","html_url":"https://github.com/morganbr","followers_url":"https://api.github.com/users/morganbr/followers","following_url":"https://api.github.com/users/morganbr/following{/other_user}","gists_url":"https://api.github.com/users/morganbr/gists{/gist_id}","starred_url":"https://api.github.com/users/morganbr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/morganbr/subscriptions","organizations_url":"https://api.github.com/users/morganbr/orgs","repos_url":"https://api.github.com/users/morganbr/repos","events_url":"https://api.github.com/users/morganbr/events{/privacy}","received_events_url":"https://api.github.com/users/morganbr/received_events","type":"User","site_admin":false}],"milestone":null,"comments":12,"created_at":"2018-09-14T23:44:54Z","updated_at":"2018-09-24T21:46:08Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"In HelloWasm/Program.cs\r\n\r\nAdd this class:\r\n```\r\n    public class TestMethodWithConcreteInterfaceParameter\r\n    {\r\n        public void Iterate(IList<string> list)\r\n        {\r\n            foreach (var s in list)\r\n            {\r\n                PrintLine(s);\r\n            }\r\n        }\r\n    }\r\n```\r\nThen in Main add:\r\n```\r\n        var l = new List<string>();\r\n        new TestMethodWithConcreteInterfaceParameter().Iterate(l);\r\n```\r\nAnd it fails with stack:\r\n```\r\nRunning test HelloWasm\r\nExecuting C:\\Program Files (x86)\\Mozilla Firefox/firefox.exe -headless http://localhost:6931/HelloWasm.html -no-remote -profile c:/users/scottw~1/appdata/local/temp/temp_emrun_firefox_profile_dc89fe\r\nInvalid function pointer called with signature 'vii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)\r\nStarting\r\nCalling stub instead of signal()\r\nBuild with ASSERTIONS=2 for more info.\r\n19\r\n19\r\nexception thrown: abort(19) at jsStackTrace@http://localhost:6931/HelloWasm.js:1040:13\r\nstackTrace@http://localhost:6931/HelloWasm.js:1057:12\r\nabort@http://localhost:6931/HelloWasm.js:7119:44\r\nnullFunc_vii@http://localhost:6931/HelloWasm.js:6160:436\r\nb19@http://localhost:6931/HelloWasm.wasm:wasm-function[15071]:0x815f22\r\n_HelloWasm_Program_TestMethodWithConcreteInterfaceParameter__Iterate@http://localhost:6931/HelloWasm.wasm:wasm-function[609]:0x6846a\r\n_HelloWasm_Program__Main@http://localhost:6931/HelloWasm.wasm:wasm-function[339]:0x44424\r\n_HelloWasm__Module___MainMethodWrapper@http://localhost:6931/HelloWasm.wasm:wasm-function[333]:0x43cd0\r\n_StartupCodeMain@http://localhost:6931/HelloWasm.wasm:wasm-function[322]:0x43861\r\n___managed__Main@http://localhost:6931/HelloWasm.wasm:wasm-function[12978]:0x6ffa75\r\n_main@http://localhost:6931/HelloWasm.wasm:wasm-function[14837]:0x801def\r\nModule._main@http://localhost:6931/HelloWasm.js:6691:10\r\ncallMain@http://localhost:6931/HelloWasm.js:6992:15\r\ndoRun@http://localhost:6931/HelloWasm.js:7050:42\r\nrun/<@http://localhost:6931/HelloWasm.js:7061:7\r\n```\r\nI think this is blocking #5842 "},"comment":{"url":"https://api.github.com/repos/dotnet/corert/issues/comments/424136578","html_url":"https://github.com/dotnet/corert/issues/6330#issuecomment-424136578","issue_url":"https://api.github.com/repos/dotnet/corert/issues/6330","id":424136578,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNDEzNjU3OA==","user":{"login":"morganbr","id":11641665,"node_id":"MDQ6VXNlcjExNjQxNjY1","avatar_url":"https://avatars1.githubusercontent.com/u/11641665?v=4","gravatar_id":"","url":"https://api.github.com/users/morganbr","html_url":"https://github.com/morganbr","followers_url":"https://api.github.com/users/morganbr/followers","following_url":"https://api.github.com/users/morganbr/following{/other_user}","gists_url":"https://api.github.com/users/morganbr/gists{/gist_id}","starred_url":"https://api.github.com/users/morganbr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/morganbr/subscriptions","organizations_url":"https://api.github.com/users/morganbr/orgs","repos_url":"https://api.github.com/users/morganbr/repos","events_url":"https://api.github.com/users/morganbr/events{/privacy}","received_events_url":"https://api.github.com/users/morganbr/received_events","type":"User","site_admin":false},"created_at":"2018-09-24T21:46:08Z","updated_at":"2018-09-24T21:46:08Z","author_association":"CONTRIBUTOR","body":"@yowl, your idea on moving LLVMFunctionForMethod sounds likely to be a real bug since LLVMFunctionForMethod triggers function calls, so if we're setting up the shadow stack for one call and then overwrite it with a different call, that would trigger corruption. \r\n\r\n_entryCount does look wrong. You can check what it's supposed to be in the HelloWasm.txt file in the obj directory.\r\n\r\nRuntimeImports get handled like P/Invokes into the runtime, so that one calls into this: https://github.com/dotnet/corert/blob/635cf21aca11265ded9d78d216424bd609c052f5/src/Native/Runtime/MiscHelpers.cpp#L291\r\n\r\nAs a general hunch, I'm also wondering if something might be wrong with uint16 handling since the members of DispatchMapEntry are all ushorts.\r\n\r\nOne other debugging technique I'm finding helpful is that the hash of an eetype is stored 16 bytes after the start and it's also visible in HelloWasm.txt, so I can find out what type I'm working with that way with a debugger expression like HEAP32[($LdArg0_49 + 16) >> 2] (where $LdArg0_49 contains the eetype pointer)."}}
{"actor":{"display_login":"morganbr"}}