BIND 10 #957: IntervalTimerTest.destructIntervalTimer segfaults
BIND 10 Development
do-not-reply at isc.org
Fri Jun 3 01:40:08 UTC 2011
#957: IntervalTimerTest.destructIntervalTimer segfaults
-------------------------------------+-------------------------------------
Reporter: | Owner: jinmei
y-aharen | Status: reviewing
Type: | Milestone:
defect | Sprint-20110614
Priority: major | Resolution:
Component: | Sensitive: 0
Unclassified | Sub-Project: Core
Keywords: | Estimated Difficulty: 0.0
Defect Severity: N/A | Total Hours: 0
Feature Depending on Ticket: |
Add Hours to Ticket: 0 |
Internal?: 0 |
-------------------------------------+-------------------------------------
Changes (by y-aharen):
* owner: y-aharen => jinmei
Comment:
Replying to [comment:7 jinmei]:
> Normally we should first add a test case that could trigger the bug
> without the proposed fix, fix the problem in the main code, and then
> confirm the fix actually solves the problem with the previously added
> test.
>
> Isn't it possible in this case?
The segfaults will occur when !IntervalTimer is destructed while the timer
has been expired and the invocation of the callback function is pending. I
couldn't make such circumstances continually in unittest.
I'd like to fix this to correctly manage the lifetime of an instance of
!IntervalTimer by using boost::shared_ptr and shared_from_this(), which
seems to be best practice.
--
Ticket URL: <http://bind10.isc.org/ticket/957#comment:9>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development
More information about the bind10-tickets
mailing list