{"action":"created","issue":{"url":"https://api.github.com/repos/libuv/libuv/issues/529","labels_url":"https://api.github.com/repos/libuv/libuv/issues/529/labels{/name}","comments_url":"https://api.github.com/repos/libuv/libuv/issues/529/comments","events_url":"https://api.github.com/repos/libuv/libuv/issues/529/events","html_url":"https://github.com/libuv/libuv/issues/529","id":107034341,"number":529,"title":"Assert in Windows tests","user":{"login":"davencsas","id":14334536,"avatar_url":"https://avatars.githubusercontent.com/u/14334536?v=3","gravatar_id":"","url":"https://api.github.com/users/davencsas","html_url":"https://github.com/davencsas","followers_url":"https://api.github.com/users/davencsas/followers","following_url":"https://api.github.com/users/davencsas/following{/other_user}","gists_url":"https://api.github.com/users/davencsas/gists{/gist_id}","starred_url":"https://api.github.com/users/davencsas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davencsas/subscriptions","organizations_url":"https://api.github.com/users/davencsas/orgs","repos_url":"https://api.github.com/users/davencsas/repos","events_url":"https://api.github.com/users/davencsas/events{/privacy}","received_events_url":"https://api.github.com/users/davencsas/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/libuv/libuv/labels/windows","name":"windows","color":"bfd4f2"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-09-17T17:33:07Z","updated_at":"2015-10-22T19:46:21Z","closed_at":null,"body":"I am seeing an assertion failure when running the benchmark tests on Windows at this location:\r\n\r\nhttps://github.com/libuv/libuv/blob/v1.x/test/test-pipe-getsockname.c#L233\r\n\r\nWith release builds (64-bit) created with VS2015, the returned length from the preceding function call is 0 so the assert is actually checking 1 byte ahead of the buffer. Memory is zero whenever I execute the test with release builds so the assert fails. When I run with debug builds, this memory is filled with garbage so the assert passes even though it is actually checking outside the buffer.\r\n\r\nHere is the specific test that fails and the output:\r\n\r\nrun-tests.exe pipe_getsockname_blocking pipe_getsockname_blocking\r\n\r\nAssertion failed in test\\test-pipe-getsockname.c on line 233: buf1[len1 - 1] != 0\r\n\r\n*Note* - I disabled 'Whole Program Optimization' and 'Link Time Code Generation' in the release builds since our code will be built outside of Visual Studio and therefore cannot really leverage these features. Also, the VS2015 compiler was doing some strange things in this part of the test code when those options were enabled which is unnecessarily for debugging this issue. Disabling these options simplifies debugging and the assert fails in either case.\r\n\r\n  -Dave"},"comment":{"url":"https://api.github.com/repos/libuv/libuv/issues/comments/150335747","html_url":"https://github.com/libuv/libuv/issues/529#issuecomment-150335747","issue_url":"https://api.github.com/repos/libuv/libuv/issues/529","id":150335747,"user":{"login":"whitlockjc","id":98899,"avatar_url":"https://avatars.githubusercontent.com/u/98899?v=3","gravatar_id":"","url":"https://api.github.com/users/whitlockjc","html_url":"https://github.com/whitlockjc","followers_url":"https://api.github.com/users/whitlockjc/followers","following_url":"https://api.github.com/users/whitlockjc/following{/other_user}","gists_url":"https://api.github.com/users/whitlockjc/gists{/gist_id}","starred_url":"https://api.github.com/users/whitlockjc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whitlockjc/subscriptions","organizations_url":"https://api.github.com/users/whitlockjc/orgs","repos_url":"https://api.github.com/users/whitlockjc/repos","events_url":"https://api.github.com/users/whitlockjc/events{/privacy}","received_events_url":"https://api.github.com/users/whitlockjc/received_events","type":"User","site_admin":false},"created_at":"2015-10-22T19:46:21Z","updated_at":"2015-10-22T19:46:21Z","body":"I cannot reproduce this with VS2013.  In my attempt to test using VS2015, my Windows VM borked and now I don't have an environment for testing.  I'm afraid I'm unable to help until I get Windows back installed and setup."}}