BIND 10 #1008: missing initLogger() should be caught more explicitly

BIND 10 Development do-not-reply at isc.org
Fri Jun 17 11:13:37 UTC 2011


#1008: missing initLogger() should be caught more explicitly
-------------------------------------+-------------------------------------
                   Reporter:         |                 Owner:  stephen
  jinmei                             |                Status:  reviewing
                       Type:         |             Milestone:
  defect                             |  Sprint-20110628
                   Priority:  major  |            Resolution:
                  Component:         |             Sensitive:  0
  logging                            |           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 vorner):

 * owner:  vorner => stephen


Comment:

 Hello

 Well, my original proposal was not to store the messages but simply to
 drop them. Anyway, about the current code.

 {{{#!c++
 /// regardless of whether is is statically or automatically declared -
 will
 /// cause an exception to be thrown.
 }}}

 It might be worth noting which exception.

 {{{#!c++
 // Flag to hold logging initialization state.  This is held inside a
 function
 // to ensure that it is correctly initialized even when referenced during
 // program initialization (thus avoiding the "static initialization
 fiasco").
 }}}

 This seems we are really panicking about the static initialization fiasco.
 The bool is basic data type without a constructor or any code to
 initialize it, therefore there can be no problem with ordering of the
 code. Simple variables are just present somewhere in read-write section of
 the binary with their default value set. And, to note, simple static
 variables inside functions are handled the same way as module-level ones.
 The difference is only with when the initialization code (which doesn't
 exist for them) is called.

 {{{#!c++
 // Logger Run-Time Initialization.  This function is present for
 historical
 // reasons.
 }}}

 We have historical reasons already? The logging is quite new, isn't it.
 Isn't it easier to just change whatever uses it, than dragging a
 historical function from almost the first snapshot release the logging is
 in?

 Thanks

-- 
Ticket URL: <http://bind10.isc.org/ticket/1008#comment:8>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development


More information about the bind10-tickets mailing list