Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
302 views
in Technique[技术] by (71.8m points)

c - Valgrind: Conditional jump or move depends on uninitialised value / Uninitialised value was created by a stack allocation

Trying to debug my C program with valgrind and for some reason it doesn't/can't tell me where the problem is and I have no idea what /dev/ttys00 is.

==25773==    at 0x7FFF2037495F: ??? (in /dev/ttys000)
==25773==    by 0x7FFF20240FFA: ??? (in /dev/ttys000)
==25773==    by 0x7FFF20249CF0: ??? (in /dev/ttys000)
==25773==    by 0x7FFF2026E8B8: ??? (in /dev/ttys000)
==25773==    by 0x7FFF20246EF5: ??? (in /dev/ttys000)
==25773==    by 0x7FFF20245061: ??? (in /dev/ttys000)
==25773==    by 0x100003719: print_node
==25773==    by 0x100003769: find_and_print
==25773==    by 0x10000391A: interface
==25773==    by 0x100003A9D: main
==25773==  Uninitialised value was created by a stack allocation
==25773==    at 0x7FFF20246FDF: ??? (in /dev/ttys000)
question from:https://stackoverflow.com/questions/65875252/valgrind-conditional-jump-or-move-depends-on-uninitialised-value-uninitialise

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

the first 5 problems are in the device driver /dev/ttys000

This is a sure sign that your source code has a problem.

Please post your source code.

BTW: do you actually have a device named: ttys000?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...