{"thread":{"id":"32786","subject":"Segmentation fault with latest git (070c57df)","startedAt":"2013-01-31T01:35:21Z","lastAt":"2013-01-31T07:35:43Z","messageCount":4,"participants":["Jongman Heo","Jeff King","Antoine Pelisse"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"208325","messageId":"28799936.346521359596121253.JavaMail.weblogic@epmltmp3","threadId":"32786","inReplyTo":null,"subject":"Segmentation fault with latest git (070c57df)","fromName":"Jongman Heo","fromEmail":"jongman.heo@samsung.com","sentAt":"2013-01-31T01:35:21Z","receivedAt":"2013-01-31T01:35:21Z","isPatch":false,"sender":{"key":"jongman.heo@samsung.com","avatar":null},"body":"\nHi all,\n\nLooks like following commit causes a segmentation fault in my machine (when running git pull or git fetch);\n\ncommit 8dd5afc926acb9829ebf56e9b78826a5242cd638\nAuthor: Junio C Hamano <gitster@pobox.com>\nDate:   Mon Jan 7 12:24:55 2013 -0800\n\n    string-list: allow case-insensitive string list\n\n\nIn my case, list->cmp (at get_entry_index() function) has an invalid address, obviously not an address of string comparision function, instead it points to 1.\n\n\nRegards,\nJongman Heo."},{"id":"208341","messageId":"20130131064921.GB24660@sigill.intra.peff.net","threadId":"32786","inReplyTo":"28799936.346521359596121253.JavaMail.weblogic@epmltmp3","subject":"Re: Segmentation fault with latest git (070c57df)","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2013-01-31T06:49:21Z","receivedAt":"2013-01-31T06:49:21Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Thu, Jan 31, 2013 at 01:35:21AM +0000, Jongman Heo wrote:\n\n> Looks like following commit causes a segmentation fault in my machine\n> (when running git pull or git fetch);\n> \n> commit 8dd5afc926acb9829ebf56e9b78826a5242cd638\n> Author: Junio C Hamano <gitster@pobox.com>\n> Date:   Mon Jan 7 12:24:55 2013 -0800\n> \n>     string-list: allow case-insensitive string list\n> \n> \n> In my case, list->cmp (at get_entry_index() function) has an invalid\n> address, obviously not an address of string comparision function,\n> instead it points to 1.\n\nCan you show us a stack trace? The string-list functions are generic and\nget called in a lot of places. It would be useful to know which list is\ncausing the problem.\n\n-Peff\n"},{"id":"208343","messageId":"CALWbr2y8veWYRwEGrbGq-PhxZjXbBF5HMgQXrRr=1JzGQ9Y-tQ@mail.gmail.com","threadId":"32786","inReplyTo":"20130131064921.GB24660@sigill.intra.peff.net","subject":"Re: Segmentation fault with latest git (070c57df)","fromName":"Antoine Pelisse","fromEmail":"apelisse@gmail.com","sentAt":"2013-01-31T07:02:06Z","receivedAt":"2013-01-31T07:02:06Z","isPatch":false,"sender":{"key":"apelisse@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1929644?v=4"},"body":"In \"clean.c\" we have a \"string_list\" created on the stack with\n\"STRING_LIST_INIT_NODUP\" (there are probably others, I stopped at the\nfirst occurrence).\nBut, \"STRING_LIST_INIT_NODUP\" doesn't init the \"list->cmp\" pointer\nwhich can thus be random.\n\nI don't have much time to provide a patch right now (have to go to\nwork), but will tonight if still needed.\n\nAntoine,\n\n\n\nOn Thu, Jan 31, 2013 at 7:49 AM, Jeff King <peff@peff.net> wrote:\n> On Thu, Jan 31, 2013 at 01:35:21AM +0000, Jongman Heo wrote:\n>\n>> Looks like following commit causes a segmentation fault in my machine\n>> (when running git pull or git fetch);\n>>\n>> commit 8dd5afc926acb9829ebf56e9b78826a5242cd638\n>> Author: Junio C Hamano <gitster@pobox.com>\n>> Date:   Mon Jan 7 12:24:55 2013 -0800\n>>\n>>     string-list: allow case-insensitive string list\n>>\n>>\n>> In my case, list->cmp (at get_entry_index() function) has an invalid\n>> address, obviously not an address of string comparision function,\n>> instead it points to 1.\n>\n> Can you show us a stack trace? The string-list functions are generic and\n> get called in a lot of places. It would be useful to know which list is\n> causing the problem.\n>\n> -Peff\n> --\n> To unsubscribe from this list: send the line \"unsubscribe git\" in\n> the body of a message to majordomo@vger.kernel.org\n> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n"},{"id":"208345","messageId":"20130131073543.GA5342@sigill.intra.peff.net","threadId":"32786","inReplyTo":"CALWbr2y8veWYRwEGrbGq-PhxZjXbBF5HMgQXrRr=1JzGQ9Y-tQ@mail.gmail.com","subject":"Re: Segmentation fault with latest git (070c57df)","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2013-01-31T07:35:43Z","receivedAt":"2013-01-31T07:35:43Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Thu, Jan 31, 2013 at 08:02:06AM +0100, Antoine Pelisse wrote:\n\n> In \"clean.c\" we have a \"string_list\" created on the stack with\n> \"STRING_LIST_INIT_NODUP\" (there are probably others, I stopped at the\n> first occurrence).\n> But, \"STRING_LIST_INIT_NODUP\" doesn't init the \"list->cmp\" pointer\n> which can thus be random.\n\nI don't think that is the problem. Extra struct members that are not\nmentioned by an initializer will get set to 0 or NULL.\n\nA code path that tried to initialize each member individually would run\ninto problems, but I could not find any such code path (all of them\neither use an initializer, are static, or memset the struct to\nall-zeroes).\n\n-Peff\n"}]}