{"action":"created","issue":{"url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/issues/1403","repository_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools","labels_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/issues/1403/labels{/name}","comments_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/issues/1403/comments","events_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/issues/1403/events","html_url":"https://github.com/KhronosGroup/SPIRV-Tools/issues/1403","id":304365624,"number":1403,"title":"spirv-val gives false positive on spec constant array sizes","user":{"login":"HansKristian-ARM","id":17786731,"avatar_url":"https://avatars2.githubusercontent.com/u/17786731?v=4","gravatar_id":"","url":"https://api.github.com/users/HansKristian-ARM","html_url":"https://github.com/HansKristian-ARM","followers_url":"https://api.github.com/users/HansKristian-ARM/followers","following_url":"https://api.github.com/users/HansKristian-ARM/following{/other_user}","gists_url":"https://api.github.com/users/HansKristian-ARM/gists{/gist_id}","starred_url":"https://api.github.com/users/HansKristian-ARM/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HansKristian-ARM/subscriptions","organizations_url":"https://api.github.com/users/HansKristian-ARM/orgs","repos_url":"https://api.github.com/users/HansKristian-ARM/repos","events_url":"https://api.github.com/users/HansKristian-ARM/events{/privacy}","received_events_url":"https://api.github.com/users/HansKristian-ARM/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-03-12T13:12:38Z","updated_at":"2018-03-13T19:08:46Z","closed_at":null,"author_association":"NONE","body":"[array-size-spec-constant.asm.txt](https://github.com/KhronosGroup/SPIRV-Tools/files/1802843/array-size-spec-constant.asm.txt)\r\n\r\nGetting validation error:\r\n```\r\nerror: 72: CompositeExtract: array access is out of bounds, array size is 0, but access index is 0\r\n```"},"comment":{"url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/issues/comments/372783726","html_url":"https://github.com/KhronosGroup/SPIRV-Tools/issues/1403#issuecomment-372783726","issue_url":"https://api.github.com/repos/KhronosGroup/SPIRV-Tools/issues/1403","id":372783726,"user":{"login":"dneto0","id":13054574,"avatar_url":"https://avatars0.githubusercontent.com/u/13054574?v=4","gravatar_id":"","url":"https://api.github.com/users/dneto0","html_url":"https://github.com/dneto0","followers_url":"https://api.github.com/users/dneto0/followers","following_url":"https://api.github.com/users/dneto0/following{/other_user}","gists_url":"https://api.github.com/users/dneto0/gists{/gist_id}","starred_url":"https://api.github.com/users/dneto0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dneto0/subscriptions","organizations_url":"https://api.github.com/users/dneto0/orgs","repos_url":"https://api.github.com/users/dneto0/repos","events_url":"https://api.github.com/users/dneto0/events{/privacy}","received_events_url":"https://api.github.com/users/dneto0/received_events","type":"User","site_admin":false},"created_at":"2018-03-13T19:08:46Z","updated_at":"2018-03-13T19:08:46Z","author_association":"CONTRIBUTOR","body":"Agreed.\r\n\r\nI think the interesting segment is:\r\n```\r\n      %int_3 = OpConstant %int 3\r\n         %12 = OpSpecConstantOp %int IAdd %c %int_3   ;;;;; The array size we fail to decode\r\n%_arr__arr_float_uint_8_12 = OpTypeArray %_arr_float_uint_8 %12 ;;;;;;;  The array type\r\n      %int_2 = OpConstant %int 2\r\n         %15 = OpSpecConstantOp %int IAdd %c %int_2\r\n%_arr_float_15 = OpTypeArray %float %15\r\n         %18 = OpSpecConstantOp %int IAdd %d %int_2\r\n%_arr_float_18 = OpTypeArray %float %18\r\n        %Foo = OpTypeStruct %_arr_float_18\r\n%_ptr_Function_Foo = OpTypePointer Function %Foo\r\n         %39 = OpUndef %_arr__arr_float_uint_8_12  ;;;;;; The value we extract from\r\n         %40 = OpUndef %_arr_float_15\r\n       %main = OpFunction %void None %23\r\n         %41 = OpLabel\r\n        %foo = OpVariable %_ptr_Function_Foo Function\r\n         %10 = OpFAdd %float %a %b\r\n         %11 = OpCompositeConstruct %v4float %10 %10 %10 %10\r\n         %42 = OpCompositeExtract %float %39 0 0  ;;;;;;;;;;;;; This is being examined\r\n\r\n```"}}
{"actor":{"display_login":"dneto0"}}