Re: Build environment bug: 675125
Andrew Shadura wrote:
> By the way, it might be a good idea to fill .bss section with random
> values intentionally for debug builds to detect non-properly-initialised
> things more effectively :)
Variables in the .bss section will by definition get initialized to 0.
For example, a C variable defined as "static typename varname;" must get
initialized to 0, and the compiler and linker will stick it in the .bss
section expecting that it will end up with a value of 0 at runtime.
That represents a defined property of the standard, not an
implementation quirk. So, the .bss section must get initialized to 0,
not to random values, whether in a debug build or not.
- Josh Triplett
Reply to: