This bug was my fault, from the introduction of target_read_alloc.
ktab_size is a size_t, and thus unsigned; it was being assigned (LONGEST)-1
and then tested. Eventually this led to a NULL dereference.
Tested on ia64-linux and committed.
Just a reminder: the best thing you can do for any GDB port is test it
regularly! Until recently I had no convenient system on which I could test
ia64-linux GDB. I do now, but the results are dismal even after this patch.
powerpc64-linux is in pretty awful shape too.