user3746892
user3746892

Reputation: 67

Interpretation of Valgrind in C

Can someone help me interpret what this error message in Valgrind means, as the program seems to run without a hitch, but Valgrind has some issue with it?

==2047== Invalid write of size 4
==2047==    at 0x400B14: tryNum (tryNum.c:26)
==2047==    by 0x4007DB: main (main.c:170)
==2047==  Address 0xffec2f700 is on thread 1's stack

What exactly does it mean when an address is on 'thread 1's stack'?

Upvotes: 0

Views: 89

Answers (1)

unwind
unwind

Reputation: 399703

The problem isn't where the address is (from line four), the problem is the first line "invalid write of size 4". It even gives you the line number.

It's hard to say more since you're not showing any code.

Upvotes: 2

Related Questions