{"action":"created","issue":{"url":"https://api.github.com/repos/maxmind/geoip-api-c/issues/64","labels_url":"https://api.github.com/repos/maxmind/geoip-api-c/issues/64/labels{/name}","comments_url":"https://api.github.com/repos/maxmind/geoip-api-c/issues/64/comments","events_url":"https://api.github.com/repos/maxmind/geoip-api-c/issues/64/events","html_url":"https://github.com/maxmind/geoip-api-c/issues/64","id":97995993,"number":64,"title":"MSVC parser stack overflow","user":{"login":"gvanem","id":945271,"avatar_url":"https://avatars.githubusercontent.com/u/945271?v=3","gravatar_id":"","url":"https://api.github.com/users/gvanem","html_url":"https://github.com/gvanem","followers_url":"https://api.github.com/users/gvanem/followers","following_url":"https://api.github.com/users/gvanem/following{/other_user}","gists_url":"https://api.github.com/users/gvanem/gists{/gist_id}","starred_url":"https://api.github.com/users/gvanem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gvanem/subscriptions","organizations_url":"https://api.github.com/users/gvanem/orgs","repos_url":"https://api.github.com/users/gvanem/repos","events_url":"https://api.github.com/users/gvanem/events{/privacy}","received_events_url":"https://api.github.com/users/gvanem/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-07-29T18:07:24Z","updated_at":"2015-08-13T17:55:38Z","closed_at":null,"body":"Trying to compile `regionName.c`  consistently reports:\r\n```\r\n  libGeoIP/regionName.c(7596): fatal error C1026: parser stack overflow,\r\n  program too complex \r\n```\r\n\r\nThis happens even on the latest **MSVC v19.00.23026 for x86** (on Win-8.1). I've not tried X64, but the `parser stack overflow` (i.e. *internal compiler error*) also happens in **MSVC v18.x.y**. I've tried several variations of `CFLAGS` and optimize settings w/o ant cure. \r\n\r\nIMHO the `regionName.c` should be written using table-lookup. But I'll let you decide if I shall make a `diff` for this. Funny this has gone unnoticed for so long.... \r\n"},"comment":{"url":"https://api.github.com/repos/maxmind/geoip-api-c/issues/comments/130780012","html_url":"https://github.com/maxmind/geoip-api-c/issues/64#issuecomment-130780012","issue_url":"https://api.github.com/repos/maxmind/geoip-api-c/issues/64","id":130780012,"user":{"login":"oschwald","id":278835,"avatar_url":"https://avatars.githubusercontent.com/u/278835?v=3","gravatar_id":"","url":"https://api.github.com/users/oschwald","html_url":"https://github.com/oschwald","followers_url":"https://api.github.com/users/oschwald/followers","following_url":"https://api.github.com/users/oschwald/following{/other_user}","gists_url":"https://api.github.com/users/oschwald/gists{/gist_id}","starred_url":"https://api.github.com/users/oschwald/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oschwald/subscriptions","organizations_url":"https://api.github.com/users/oschwald/orgs","repos_url":"https://api.github.com/users/oschwald/repos","events_url":"https://api.github.com/users/oschwald/events{/privacy}","received_events_url":"https://api.github.com/users/oschwald/received_events","type":"User","site_admin":false},"created_at":"2015-08-13T17:55:38Z","updated_at":"2015-08-13T17:55:38Z","body":"I haven't looked at the generated code closely yet, but I wrote a script to test it through the Geo::IP Perl API:\r\n\r\n```\r\nuse Geo::IP;\r\nuse Test::More;\r\n\r\nmy $gi = Geo::IP->new(GEOIP_MEMORY_CACHE);\r\n\r\n<>;\r\n\r\nfor (<>) {\r\n    chomp;\r\n    my ($country, $region, $timezone) = split /\\t/;\r\n\r\n    is( $gi->time_zone($country, $region), $timezone);\r\n}\r\n\r\ndone_testing();\r\n```\r\n\r\nUnfortunately this fails with errors and eventually a segfault:\r\n\r\n```\r\nok 1\r\nok 2\r\nok 3\r\nok 4\r\nok 5\r\nok 6\r\nok 7\r\nok 8\r\nok 9\r\nok 10\r\nok 11\r\nok 12\r\nok 13\r\nok 14\r\nok 15\r\nok 16\r\nok 17\r\nok 18\r\nok 19\r\nok 20\r\nok 21\r\nok 22\r\nok 23\r\nok 24\r\nok 25\r\nok 26\r\nnot ok 27\r\n#   Failed test at test.pl line 12.\r\n#          got: undef\r\n#     expected: 'America/Denver'\r\nnot ok 28\r\n#   Failed test at test.pl line 12.\r\n#          got: undef\r\n#     expected: 'America/Chicago'\r\nnot ok 29\r\n#   Failed test at test.pl line 12.\r\n#          got: undef\r\n#     expected: 'America/Los_Angeles'\r\nnot ok 30\r\n#   Failed test at test.pl line 12.\r\n#          got: undef\r\n#     expected: 'America/New_York'\r\nnot ok 31\r\n#   Failed test at test.pl line 12.\r\n#          got: undef\r\n#     expected: 'America/New_York'\r\nnot ok 32\r\n#   Failed test at test.pl line 12.\r\n#          got: undef\r\n#     expected: 'America/Denver'\r\nnot ok 33\r\n#   Failed test at test.pl line 12.\r\n#          got: undef\r\n#     expected: 'America/New_York'\r\nnot ok 34\r\n#   Failed test at test.pl line 12.\r\n#          got: undef\r\n#     expected: 'America/New_York'\r\nnot ok 35\r\n#   Failed test at test.pl line 12.\r\n#          got: undef\r\n#     expected: 'America/Chicago'\r\nnot ok 36\r\n#   Failed test at test.pl line 12.\r\n#          got: undef\r\n#     expected: 'America/New_York'\r\nnot ok 37\r\n#   Failed test at test.pl line 12.\r\n#          got: undef\r\n#     expected: 'America/Chicago'\r\nnot ok 38\r\n#   Failed test at test.pl line 12.\r\n#          got: undef\r\n#     expected: 'America/Los_Angeles'\r\nnot ok 39\r\n#   Failed test at test.pl line 12.\r\n#          got: undef\r\n#     expected: 'America/New_York'\r\nnot ok 40\r\n#   Failed test at test.pl line 12.\r\n#          got: undef\r\n#     expected: 'America/New_York'\r\nnot ok 41\r\n#   Failed test at test.pl line 12.\r\n#          got: undef\r\n#     expected: 'America/New_York'\r\nnot ok 42\r\n#   Failed test at test.pl line 12.\r\n#          got: undef\r\n#     expected: 'America/Chicago'\r\nnot ok 43\r\n#   Failed test at test.pl line 12.\r\n#          got: undef\r\n#     expected: 'America/Chicago'\r\nnot ok 44\r\n#   Failed test at test.pl line 12.\r\n#          got: undef\r\n#     expected: 'America/Chicago'\r\nnot ok 45\r\n#   Failed test at test.pl line 12.\r\n#          got: undef\r\n#     expected: 'America/Denver'\r\nnot ok 46\r\n#   Failed test at test.pl line 12.\r\n#          got: undef\r\n#     expected: 'America/New_York'\r\nnot ok 47\r\n#   Failed test at test.pl line 12.\r\n#          got: undef\r\n#     expected: 'America/New_York'\r\nnot ok 48\r\n#   Failed test at test.pl line 12.\r\n#          got: undef\r\n#     expected: 'America/Los_Angeles'\r\nnot ok 49\r\n#   Failed test at test.pl line 12.\r\n#          got: undef\r\n#     expected: 'America/New_York'\r\nnot ok 50\r\n#   Failed test at test.pl line 12.\r\n#          got: undef\r\n#     expected: 'America/Chicago'\r\nnot ok 51\r\n#   Failed test at test.pl line 12.\r\n#          got: undef\r\n#     expected: 'America/Denver'\r\nok 52\r\nok 53\r\nok 54\r\nok 55\r\nok 56\r\nok 57\r\nok 58\r\nnot ok 59\r\n#   Failed test at test.pl line 12.\r\n#          got: undef\r\n#     expected: 'America/Rankin_Inlet'\r\nnot ok 60\r\n#   Failed test at test.pl line 12.\r\n#          got: undef\r\n#     expected: 'America/Toronto'\r\nnot ok 61\r\n#   Failed test at test.pl line 12.\r\n#          got: undef\r\n#     expected: 'America/Halifax'\r\nnot ok 62\r\n#   Failed test at test.pl line 12.\r\n#          got: undef\r\n#     expected: 'America/Toronto'\r\nnot ok 63\r\n#   Failed test at test.pl line 12.\r\n#          got: undef\r\n#     expected: 'America/Regina'\r\nnot ok 64\r\n#   Failed test at test.pl line 12.\r\n#          got: undef\r\n#     expected: 'America/Whitehorse'\r\nok 65\r\nok 66\r\nok 67\r\nok 68\r\nnot ok 69\r\n#   Failed test at test.pl line 12.\r\n#          got: undef\r\n#     expected: 'Australia/Adelaide'\r\nnot ok 70\r\n#   Failed test at test.pl line 12.\r\n#          got: undef\r\n#     expected: 'Australia/Hobart'\r\nnot ok 71\r\n#   Failed test at test.pl line 12.\r\n#          got: undef\r\n#     expected: 'Australia/Melbourne'\r\nnot ok 72\r\n#   Failed test at test.pl line 12.\r\n#          got: undef\r\n#     expected: 'Australia/Perth'\r\nSegmentation fault (core dumped)\r\n```\r\n\r\nIt runs fine on the old version."}}