Submitter: Douglas Walls
Submission Date: 2013-08-24
Source: WG 14
Reference Document: N1744
Date: April 2014
Subject:What is the value of TSS_DTOR_ITERATIONS for implementations with no maximum?
Suggested Technical Corrigendum
Oct 2013 meeting
The question posed should be answered.
Proposed Committee Response
The standard intentionally does not define a value of TSS_DTOR_ITERATIONS for implementations with no maximum.
The TSS_DTOR_ITERATIONS macro is used to limit recursion at thread termination. The issue is that existing practice allows the creation of new tss bindings during the destructor call, and one destructor might reincarnate the original, thus forming an infinite recursive destructor loop. This loop may appear non-deterministically and is difficult to detect. The purpose of TSS_DTOR_ITERATIONS is as a bound to such recursion.
It is possible monitor the recursion depth with careful defensive programming and in those cases the value of TSS_DTOR_ITERATIONS is useful as that bound.
Previous Defect Report < - > Next Defect Report