[Issue 10673] memory corruption in interpret.c

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Jul 19 04:42:43 PDT 2013


http://d.puremagic.com/issues/show_bug.cgi?id=10673



--- Comment #1 from Martin Nowak <code at dawg.eu> 2013-07-19 04:42:42 PDT ---
valgrind ../dmd/src/dmd -I../druntime/import  -w -d -property -m32 -fPIC -g
-debug -shared -unittest -ofgenerated/linux/debug/32/unittest/libphobos2-ut.so
crc32.d std/algorithm.d std/array.d std/ascii.d std/container.d std/conv.d
std/cstream.d std/csv.d std/datetime.d std/demangle.d std/encoding.d
std/exception.d std/file.d std/format.d std/functional.d std/getopt.d std/md5.d
std/metastrings.d std/mmfile.d std/regex.d
../druntime/lib/libdruntime-linux32so.a -defaultlib= -debuglib=                 
==4040== Memcheck, a memory error detector
==4040== Copyright (C) 2002-2012, and GNU GPL'd, by Julian Seward et al.
==4040== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info
==4040== Command: ../dmd/src/dmd -I../druntime/import -w -d -property -m32
-fPIC -g -debug -shared -unittest
-ofgenerated/linux/debug/32/unittest/libphobos2-ut.so crc32.d std/algorithm.d
std/array.d std/ascii.d std/container.d std/conv.d std/cstream.d std/csv.d
std/datetime.d std/demangle.d std/encoding.d std/exception.d std/file.d
std/format.d std/functional.d std/getopt.d std/md5.d std/metastrings.d
std/mmfile.d std/regex.d ../druntime/lib/libdruntime-linux32so.a -defaultlib=
-debuglib=
==4040== 
The 'crc32' module has been scheduled for deprecation. Please use
'std.digest.crc' instead.
std.md5 is scheduled for deprecation. Please use std.digest.md instead
==4040== Conditional jump or move depends on uninitialised value(s)
==4040==    at 0x51D30A: BreakStatement::interpret(InterState*)
(interpret.c:1391)
==4040==    by 0x51C740: CompoundStatement::interpret(InterState*)
(interpret.c:1071)
==4040==    by 0x51C740: CompoundStatement::interpret(InterState*)
(interpret.c:1071)
==4040==    by 0x51D9B0: SwitchStatement::interpret(InterState*)
(interpret.c:1635)
==4040==    by 0x51D69E: ForStatement::interpret(InterState*)
(interpret.c:1533)
==4040==    by 0x51C740: CompoundStatement::interpret(InterState*)
(interpret.c:1071)
==4040==    by 0x51D69E: ForStatement::interpret(InterState*)
(interpret.c:1533)
==4040==    by 0x51C740: CompoundStatement::interpret(InterState*)
(interpret.c:1071)
==4040==    by 0x51C740: CompoundStatement::interpret(InterState*)
(interpret.c:1071)
==4040==    by 0x51C740: CompoundStatement::interpret(InterState*)
(interpret.c:1071)
==4040==    by 0x5238F5: FuncDeclaration::interpret(InterState*,
Array<Expression>*, Expression*) (interpret.c:954)
==4040==    by 0x52553D: CallExp::interpret(InterState*, CtfeGoal)
(interpret.c:4713)
==4040== 
==4040== Conditional jump or move depends on uninitialised value(s)
==4040==    at 0x51D30A: BreakStatement::interpret(InterState*)
(interpret.c:1391)
==4040==    by 0x51C740: CompoundStatement::interpret(InterState*)
(interpret.c:1071)
==4040==    by 0x51C740: CompoundStatement::interpret(InterState*)
(interpret.c:1071)
==4040==    by 0x51C7CF: UnrolledLoopStatement::interpret(InterState*)
(interpret.c:1096)
==4040==    by 0x51C740: CompoundStatement::interpret(InterState*)
(interpret.c:1071)
==4040==    by 0x51D9B0: SwitchStatement::interpret(InterState*)
(interpret.c:1635)
==4040==    by 0x51C740: CompoundStatement::interpret(InterState*)
(interpret.c:1071)
==4040==    by 0x51D69E: ForStatement::interpret(InterState*)
(interpret.c:1533)
==4040==    by 0x51C740: CompoundStatement::interpret(InterState*)
(interpret.c:1071)
==4040==    by 0x51C740: CompoundStatement::interpret(InterState*)
(interpret.c:1071)
==4040==    by 0x5238F5: FuncDeclaration::interpret(InterState*,
Array<Expression>*, Expression*) (interpret.c:954)
==4040==    by 0x52553D: CallExp::interpret(InterState*, CtfeGoal)
(interpret.c:4713)
==4040== 
==4040== Conditional jump or move depends on uninitialised value(s)
==4040==    at 0x51C81F: UnrolledLoopStatement::interpret(InterState*)
(interpret.c:1109)
==4040==    by 0x51C740: CompoundStatement::interpret(InterState*)
(interpret.c:1071)
==4040==    by 0x51D9B0: SwitchStatement::interpret(InterState*)
(interpret.c:1635)
==4040==    by 0x51C740: CompoundStatement::interpret(InterState*)
(interpret.c:1071)
==4040==    by 0x51D69E: ForStatement::interpret(InterState*)
(interpret.c:1533)
==4040==    by 0x51C740: CompoundStatement::interpret(InterState*)
(interpret.c:1071)
==4040==    by 0x51C740: CompoundStatement::interpret(InterState*)
(interpret.c:1071)
==4040==    by 0x5238F5: FuncDeclaration::interpret(InterState*,
Array<Expression>*, Expression*) (interpret.c:954)
==4040==    by 0x52553D: CallExp::interpret(InterState*, CtfeGoal)
(interpret.c:4713)
==4040==    by 0x51C6C0: ExpStatement::interpret(InterState*)
(interpret.c:1044)
==4040==    by 0x51C740: CompoundStatement::interpret(InterState*)
(interpret.c:1071)
==4040==    by 0x51C740: CompoundStatement::interpret(InterState*)
(interpret.c:1071)
==4040== 
==4040== Conditional jump or move depends on uninitialised value(s)
==4040==    at 0x51C824: UnrolledLoopStatement::interpret(InterState*)
(interpret.c:1109)
==4040==    by 0x51C740: CompoundStatement::interpret(InterState*)
(interpret.c:1071)
==4040==    by 0x51D9B0: SwitchStatement::interpret(InterState*)
(interpret.c:1635)
==4040==    by 0x51C740: CompoundStatement::interpret(InterState*)
(interpret.c:1071)
==4040==    by 0x51D69E: ForStatement::interpret(InterState*)
(interpret.c:1533)
==4040==    by 0x51C740: CompoundStatement::interpret(InterState*)
(interpret.c:1071)
==4040==    by 0x51C740: CompoundStatement::interpret(InterState*)
(interpret.c:1071)
==4040==    by 0x5238F5: FuncDeclaration::interpret(InterState*,
Array<Expression>*, Expression*) (interpret.c:954)
==4040==    by 0x52553D: CallExp::interpret(InterState*, CtfeGoal)
(interpret.c:4713)
==4040==    by 0x51C6C0: ExpStatement::interpret(InterState*)
(interpret.c:1044)
==4040==    by 0x51C740: CompoundStatement::interpret(InterState*)
(interpret.c:1071)
==4040==    by 0x51C740: CompoundStatement::interpret(InterState*)
(interpret.c:1071)
==4040== 
==4040== Conditional jump or move depends on uninitialised value(s)
==4040==    at 0x51D8CF: SwitchStatement::interpret(InterState*)
(interpret.c:1639)
==4040==    by 0x51C740: CompoundStatement::interpret(InterState*)
(interpret.c:1071)
==4040==    by 0x51D69E: ForStatement::interpret(InterState*)
(interpret.c:1533)
==4040==    by 0x51C740: CompoundStatement::interpret(InterState*)
(interpret.c:1071)
==4040==    by 0x51C740: CompoundStatement::interpret(InterState*)
(interpret.c:1071)
==4040==    by 0x5238F5: FuncDeclaration::interpret(InterState*,
Array<Expression>*, Expression*) (interpret.c:954)
==4040==    by 0x52553D: CallExp::interpret(InterState*, CtfeGoal)
(interpret.c:4713)
==4040==    by 0x51C6C0: ExpStatement::interpret(InterState*)
(interpret.c:1044)
==4040==    by 0x51C740: CompoundStatement::interpret(InterState*)
(interpret.c:1071)
==4040==    by 0x51C740: CompoundStatement::interpret(InterState*)
(interpret.c:1071)
==4040==    by 0x51C740: CompoundStatement::interpret(InterState*)
(interpret.c:1071)
==4040==    by 0x5238F5: FuncDeclaration::interpret(InterState*,
Array<Expression>*, Expression*) (interpret.c:954)
==4040== 
==4040== Conditional jump or move depends on uninitialised value(s)
==4040==    at 0x51D8D4: SwitchStatement::interpret(InterState*)
(interpret.c:1639)
==4040==    by 0x51C740: CompoundStatement::interpret(InterState*)
(interpret.c:1071)
==4040==    by 0x51D69E: ForStatement::interpret(InterState*)
(interpret.c:1533)
==4040==    by 0x51C740: CompoundStatement::interpret(InterState*)
(interpret.c:1071)
==4040==    by 0x51C740: CompoundStatement::interpret(InterState*)
(interpret.c:1071)
==4040==    by 0x5238F5: FuncDeclaration::interpret(InterState*,
Array<Expression>*, Expression*) (interpret.c:954)
==4040==    by 0x52553D: CallExp::interpret(InterState*, CtfeGoal)
(interpret.c:4713)
==4040==    by 0x51C6C0: ExpStatement::interpret(InterState*)
(interpret.c:1044)
==4040==    by 0x51C740: CompoundStatement::interpret(InterState*)
(interpret.c:1071)
==4040==    by 0x51C740: CompoundStatement::interpret(InterState*)
(interpret.c:1071)
==4040==    by 0x51C740: CompoundStatement::interpret(InterState*)
(interpret.c:1071)
==4040==    by 0x5238F5: FuncDeclaration::interpret(InterState*,
Array<Expression>*, Expression*) (interpret.c:954)
==4040== 
==4040== Conditional jump or move depends on uninitialised value(s)
==4040==    at 0x51D78F: ForStatement::interpret(InterState*)
(interpret.c:1541)
==4040==    by 0x51C740: CompoundStatement::interpret(InterState*)
(interpret.c:1071)
==4040==    by 0x51C740: CompoundStatement::interpret(InterState*)
(interpret.c:1071)
==4040==    by 0x5238F5: FuncDeclaration::interpret(InterState*,
Array<Expression>*, Expression*) (interpret.c:954)
==4040==    by 0x52553D: CallExp::interpret(InterState*, CtfeGoal)
(interpret.c:4713)
==4040==    by 0x51C6C0: ExpStatement::interpret(InterState*)
(interpret.c:1044)
==4040==    by 0x51C740: CompoundStatement::interpret(InterState*)
(interpret.c:1071)
==4040==    by 0x51C740: CompoundStatement::interpret(InterState*)
(interpret.c:1071)
==4040==    by 0x51C740: CompoundStatement::interpret(InterState*)
(interpret.c:1071)
==4040==    by 0x5238F5: FuncDeclaration::interpret(InterState*,
Array<Expression>*, Expression*) (interpret.c:954)
==4040==    by 0x52553D: CallExp::interpret(InterState*, CtfeGoal)
(interpret.c:4713)
==4040==    by 0x526BE3: CommaExp::interpret(InterState*, CtfeGoal)
(interpret.c:4787)
==4040== 
==4040== Conditional jump or move depends on uninitialised value(s)
==4040==    at 0x51D794: ForStatement::interpret(InterState*)
(interpret.c:1541)
==4040==    by 0x51C740: CompoundStatement::interpret(InterState*)
(interpret.c:1071)
==4040==    by 0x51C740: CompoundStatement::interpret(InterState*)
(interpret.c:1071)
==4040==    by 0x5238F5: FuncDeclaration::interpret(InterState*,
Array<Expression>*, Expression*) (interpret.c:954)
==4040==    by 0x52553D: CallExp::interpret(InterState*, CtfeGoal)
(interpret.c:4713)
==4040==    by 0x51C6C0: ExpStatement::interpret(InterState*)
(interpret.c:1044)
==4040==    by 0x51C740: CompoundStatement::interpret(InterState*)
(interpret.c:1071)
==4040==    by 0x51C740: CompoundStatement::interpret(InterState*)
(interpret.c:1071)
==4040==    by 0x51C740: CompoundStatement::interpret(InterState*)
(interpret.c:1071)
==4040==    by 0x5238F5: FuncDeclaration::interpret(InterState*,
Array<Expression>*, Expression*) (interpret.c:954)
==4040==    by 0x52553D: CallExp::interpret(InterState*, CtfeGoal)
(interpret.c:4713)
==4040==    by 0x526BE3: CommaExp::interpret(InterState*, CtfeGoal)
(interpret.c:4787)
==4040== 
dmd: interpret.c:976: Expression* FuncDeclaration::interpret(InterState*,
Expressions*, Expression*): Assertion `e != EXP_CONTINUE_INTERPRET && e !=
EXP_BREAK_INTERPRET' failed.
==4040== 
==4040== HEAP SUMMARY:
==4040==     in use at exit: 3,864,184,382 bytes in 8,707,602 blocks
==4040==   total heap usage: 11,232,324 allocs, 2,524,722 frees, 7,045,249,464
bytes allocated
==4040== 
==4040== LEAK SUMMARY:
==4040==    definitely lost: 319,193,003 bytes in 3,779,713 blocks
==4040==    indirectly lost: 42,443,969 bytes in 596,896 blocks
==4040==      possibly lost: 3,472,644,660 bytes in 4,150,273 blocks
==4040==    still reachable: 29,902,750 bytes in 180,720 blocks
==4040==         suppressed: 0 bytes in 0 blocks
==4040== Rerun with --leak-check=full to see details of leaked memory
==4040== 
==4040== For counts of detected and suppressed errors, rerun with: -v
==4040== Use --track-origins=yes to see where uninitialised values come from
==4040== ERROR SUMMARY: 10 errors from 8 contexts (suppressed: 2 from 2)

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list