Re: Segmentation fault with latest git (070c57df)
- From
Jeff King <peff@peff.net>
- Date
- Jan 31, 2013, 07:35 UTC
- Message-ID
- <20130131073543.GA5342@sigill.intra.peff.net>
- In-Reply-To
- <CALWbr2y8veWYRwEGrbGq-PhxZjXbBF5HMgQXrRr=1JzGQ9Y-tQ@mail.gmail.com>
On Thu, Jan 31, 2013 at 08:02:06AM +0100, Antoine Pelisse wrote:
Show 5 quoted lines
> In "clean.c" we have a "string_list" created on the stack with > "STRING_LIST_INIT_NODUP" (there are probably others, I stopped at the > first occurrence). > But, "STRING_LIST_INIT_NODUP" doesn't init the "list->cmp" pointer > which can thus be random.
I don't think that is the problem. Extra struct members that are not mentioned by an initializer will get set to 0 or NULL.
A code path that tried to initialize each member individually would run into problems, but I could not find any such code path (all of them either use an initializer, are static, or memset the struct to all-zeroes).
-Peff