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][PR python/21460] Avoid segfault during Python cleanup


On Sunday, June 11 2017, Simon Marchi wrote:

>>
>> 	python/21460
>> 	* python.c (gdbpy_set_quit_flag) Check Py_IsInitialized() before
>> calling PyErr_SetInterrupt(), as Python may be shutting down already.
>
> The ChangeLog should only contain "what" changed and not "why".  So
> just the first part:
>
>   Check Py_IsInitialized() before calling PyErr_SetInterrupt().
>
> is sufficient.  However, the why should be contained in the commit
> message.  You did a good job at explaining the problem in the bug you
> filed, so I think you could just take that and put it in the commit
> log (and massage it a bit if needed).

Also, I think it's worth mentioning that the ChangeLog lines shouldn't
exceed 76 chars (soft limit).  And the file 'python.c' is inside the
python/ directory.  So a good example would be:

yyyy-mm-dd  Name  <email>

	PR python/21460
	* python/python.c: Check Py_IsInitialized() before calling
	PyErr_SetInterrupt().

Cheers,

-- 
Sergio
GPG key ID: 237A 54B1 0287 28BF 00EF  31F4 D0EB 7628 65FC 5E36
Please send encrypted e-mail if possible
http://sergiodj.net/


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