Defect Report #449

Previous Defect Report < - > Next Defect Report


Submitter: Douglas Walls
Submission Date: 2013-08-24
Source: WG 14
Reference Document: N1744
Version: 1.1
Date: April 2014
Subject:What is the value of TSS_DTOR_ITERATIONS for implementations with no maximum?

Summary

Suggested Technical Corrigendum


Oct 2013 meeting

Committee Discussion

Apr 2014 meeting

Committee Discussion

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