This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH][PR python/21460] Avoid segfault during Python cleanup
- From: Sergio Durigan Junior <sergiodj at redhat dot com>
- To: Simon Marchi <simon dot marchi at polymtl dot ca>
- Cc: paul cannon <paul at thepaul dot org>, gdb-patches at sourceware dot org
- Date: Thu, 15 Jun 2017 16:30:08 -0400
- Subject: Re: [PATCH][PR python/21460] Avoid segfault during Python cleanup
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=sergiodj at redhat dot com
- Dkim-filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 1FF9E6413E
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 1FF9E6413E
- References: <20170525162612.GA10119@turing> <69e1e2d6b7054702d39a081238590633@polymtl.ca>
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/