Valgrind and GC

Artem Tarasov lomereiter at gmail.com
Mon Oct 21 03:36:12 PDT 2013


There seems to be some serious issue with the GC, yet almost no attention
is paid to that.
(See e.g. this thread:
http://forum.dlang.org/thread/anhitkodvlstehwxasld@forum.dlang.org)

I did a simple test: `void main { new ubyte[65536]; }`. This doesn't pass
memcheck!
Valgrind tells about using uninitialized values in
core.thread.callWithStackShell called by gc.gcx.Gcx.mark.

Can anybody look into that?

==3595== Conditional jump or move depends on uninitialised value(s)
==3595==    at 0x41E605: _D2gc3gcx3Gcx4markMFPvPviZv (in
/home/lomereiter/test)
==3595==    by 0x41E5B7: _D2gc3gcx3Gcx4markMFPvPvZv (in
/home/lomereiter/test)
==3595==    by 0x425520:
_D4core6thread14thread_scanAllUMDFPvPvZvZv45__T10__lambda69TE4core6thread8ScanTypeTPvTPvZ10__lambda69MFE4core6thread8ScanTypePvPvZv
(in /home/lomereiter/test)
==3595==    by 0x4291DA:
_D4core6thread15scanAllTypeImplFMDFE4core6thread8ScanTypePvPvZvPvZv (in
/home/lomereiter/test)
==3595==    by 0x429140:
_D4core6thread18thread_scanAllTypeUMDFE4core6thread8ScanTypePvPvZvZv19__T10__lambda62TPvZ10__lambda62MFPvZv
(in /home/lomereiter/test)
==3595==    by 0x42900F: _D4core6thread18callWithStackShellFMDFPvZvZv (in
/home/lomereiter/test)
==3595==    by 0x429118: thread_scanAllType (in /home/lomereiter/test)
==3595==    by 0x4254F8: thread_scanAll (in /home/lomereiter/test)
==3595==    by 0x41EAA5: _D2gc3gcx3Gcx11fullcollectMFZm (in
/home/lomereiter/test)
==3595==    by 0x41E05C: _D2gc3gcx3Gcx8bigAllocMFmPPS2gc3gcx4PoolPmZPv (in
/home/lomereiter/test)
==3595==    by 0x41B983: _D2gc3gcx2GC12mallocNoSyncMFmkPmZPv (in
/home/lomereiter/test)
==3595==    by 0x41B7B6: _D2gc3gcx2GC6mallocMFmkPmZPv (in
/home/lomereiter/test)
==3595==  Uninitialised value was created by a stack allocation
==3595==    at 0x428FE0: _D4core6thread18callWithStackShellFMDFPvZvZv (in
/home/lomereiter/test)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20131021/13f4a8d0/attachment.html>


More information about the Digitalmars-d mailing list