Comment 17 for bug 367545

Andrew Bennetts (spiv) wrote :

Thanks very much for that gdb trace.


0x00007ffff22f2af9 in pack_delta_index (hash=0x7ffcef822010, hsize=33554432, num_entries=115046781, old_index=0x7ffddaf1e010) at bzrlib/diff-delta.c:344

Those are very big numbers for hsize and num_entries. On a 64-bit system I think that would need about 6 GB of memory.

As Martin pointed out earlier, the memsize variable is "unsigned int", but should be size_t. Does "unsigned int" end up as only holding 32 bits on a 64-bit system? If so, it would probably try allocating a mere 2GB or so, possibly succeed, and then (probably) segfault when trying to populate that memory. Fixing memsize to be a size_t would perhaps help cause a more sensible failure, but it would still fail.

I wonder why the hsize and num_entries are so huge in the first place?