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


-- 
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20120619221131.GA27346@leaf

Reply via email to