This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Fix crash on NULL rl_prompt


>>>>> "Jan" == Jan Kratochvil <jan.kratochvil@redhat.com> writes:

Pedro> But, how did rl_prompt end up NULL in the first place?

Jan> I do not know.

Yeah, it is not great that we don't know how to reproduce it.

But, given that part of the readline contract is that rl_prompt==NULL is
a valid state, I think tui_prep_terminal ought to cope with that as
well.  Maybe there is also some other bug somewhere else, but that
doesn't affect the correctness of this particular patch.

Pedro> That's what I meant by masking out a bug.

Jan> An existing bug a user cannot notice is ... no longer a bug, isn't it?

I'm sympathetic to this, but I would assume that however the user got
gdb into this weird state could also hypothetically reveal other latent
bugs.  I still think your fix is ok, but without a reproducer we can't
really be sure we've fixed the problem.

Tom


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]