Eyal Lebedinsky wrote:
> This is probably an issue only with multithreaded programs.
> 
> For a long time now I found a need to apply a private patch to mf-runtime.c
> so that it does not report access to envp[] as a violation. I now built
> gcc-4.2.0 and gcc-current and found that I still need this patch for both.
> 
> The small patch simply moves the registration of standard items (environ,
> stdin, etc.) from wrap_main() to __mf_init(). I also needed to add a
> wrapper for strerror_r().
> 
> Do other people encounter this problem? How do you solve this?
> 
> patch is here:
> http://members.iinet.net.au/~eyaleb/gcc-current-libmudflap-20070518.patch.bz2

An important bit: the problem only shows up when code is executed from
a shared-object constructor.

The attached script demonstrates the problem, note the violation for stderr
when used inside dll_init().

-- 
Eyal Lebedinsky ([EMAIL PROTECTED]) <http://samba.org/eyal/>
        attach .zip as .dat

Attachment: zz40.sh
Description: application/shellscript

Reply via email to