{"action":"created","issue":{"url":"https://api.github.com/repos/byzhang/rapidjson/issues/104","labels_url":"https://api.github.com/repos/byzhang/rapidjson/issues/104/labels{/name}","comments_url":"https://api.github.com/repos/byzhang/rapidjson/issues/104/comments","events_url":"https://api.github.com/repos/byzhang/rapidjson/issues/104/events","html_url":"https://github.com/byzhang/rapidjson/issues/104","id":59729900,"number":104,"title":"SIMD instruction can cause seg-fault/UMR","user":{"login":"GoogleCodeExporter","id":9614759,"avatar_url":"https://avatars.githubusercontent.com/u/9614759?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCodeExporter","html_url":"https://github.com/GoogleCodeExporter","followers_url":"https://api.github.com/users/GoogleCodeExporter/followers","following_url":"https://api.github.com/users/GoogleCodeExporter/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCodeExporter/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCodeExporter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCodeExporter/subscriptions","organizations_url":"https://api.github.com/users/GoogleCodeExporter/orgs","repos_url":"https://api.github.com/users/GoogleCodeExporter/repos","events_url":"https://api.github.com/users/GoogleCodeExporter/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCodeExporter/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/byzhang/rapidjson/labels/auto-migrated","name":"auto-migrated","color":"ededed"},{"url":"https://api.github.com/repos/byzhang/rapidjson/labels/Priority-Medium","name":"Priority-Medium","color":"ededed"},{"url":"https://api.github.com/repos/byzhang/rapidjson/labels/Type-Defect","name":"Type-Defect","color":"ededed"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-03-04T00:14:44Z","updated_at":"2015-03-04T00:14:45Z","closed_at":"2015-03-04T00:14:44Z","body":"```\nThe usage of rapidjson::SkipWhitespace_SIMD(char const*) reads 16 bytes \n(correct me if I'm wrong) at a time. It can cause uninitialized memory read on \nthe following condition:\nIf rapidjson::SkipWhitespace_SIMD(char const*) is called at close to the end of \nstring buffer which has less than 16 bytes of allocated space, the function \nwill read beyond the memory it owns.\n\n\nWhat steps will reproduce the problem?\nNon-deterministic. However, you can get the error message just by running the \nsimple test driver with valgrind.\n\nWhat is the expected output? What do you see instead?\nCan cause seg-fault. \n\nWhat version of the product are you using? On what operating system?\nrhel5_x86-64, rhel6_x86-64\n\n\n```\n\nOriginal issue reported on code.google.com by `lib...@gmail.com` on 18 Mar 2014 at 10:57"},"comment":{"url":"https://api.github.com/repos/byzhang/rapidjson/issues/comments/77069998","html_url":"https://github.com/byzhang/rapidjson/issues/104#issuecomment-77069998","issue_url":"https://api.github.com/repos/byzhang/rapidjson/issues/104","id":77069998,"user":{"login":"GoogleCodeExporter","id":9614759,"avatar_url":"https://avatars.githubusercontent.com/u/9614759?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCodeExporter","html_url":"https://github.com/GoogleCodeExporter","followers_url":"https://api.github.com/users/GoogleCodeExporter/followers","following_url":"https://api.github.com/users/GoogleCodeExporter/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCodeExporter/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCodeExporter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCodeExporter/subscriptions","organizations_url":"https://api.github.com/users/GoogleCodeExporter/orgs","repos_url":"https://api.github.com/users/GoogleCodeExporter/repos","events_url":"https://api.github.com/users/GoogleCodeExporter/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCodeExporter/received_events","type":"User","site_admin":false},"created_at":"2015-03-04T00:14:45Z","updated_at":"2015-03-04T00:14:45Z","body":"```\nThat is the same workaround we use in our code. We had some ideas to fix it\n(like take an extra string length argument) and conclude that it is too\nmuch work comparing to just allocate 15 bytes more. I think it is fair to\ndo the workaround with proper warnings.\nIn our use case, we parse around 50 million JSON files/buffers per day and\nwe got hit by the bug around 100 times per day on average before the\nworkaround.\n```\n\nOriginal comment by `lib...@gmail.com` on 24 Jun 2014 at 6:40"}}