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: [RFA] Ensure result of make_cleanup is never NULL.


>>>>> "Pedro" == Pedro Alves <palves@redhat.com> writes:

Pedro> Well, aren't all places using the sentinel, using it throught the macro?
Pedro> What does this make more robust?

If you initialize the object it can end up in a read-only section, so
writes to it will SEGV.

In this particular case I don't see that this would help a lot, since
the object is just a sentinel.  But, it wouldn't hurt and maybe it would
catch some really unusual bug.

Tom


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