Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Valgrind: Conditional jump or move depends on uninitialised value(s) #3

Open
philippjbauer opened this issue Mar 14, 2021 · 1 comment

Comments

@philippjbauer
Copy link
Owner

Investigate issue of conditional jump or move on uninitialized values.

valgrind ./build/dev/bin/PhotinoApp 
==92990== Memcheck, a memory error detector
==92990== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==92990== Using Valgrind-3.17.0.GIT-lbmacos and LibVEX; rerun with -h for copyright info
==92990== Command: ./build/dev/bin/PhotinoApp
==92990== 
==92990== Warning: set address range perms: large range [0x7fff202bc000, 0x8000200bc000) (defined)
==92990== Warning: set address range perms: large range [0x7fff3c792000, 0x7fff7ff74000) (defined)
==92990== Warning: set address range perms: large range [0x7fff8e228000, 0x7fffc02bc000) (noaccess)
==92990== Warning: set address range perms: large range [0x7fffc02bc000, 0x7fffe254c000) (defined)
==92990== Warning: set address range perms: large range [0x7fffe254c000, 0x7fffffe00000) (noaccess)
==92990== Conditional jump or move depends on uninitialised value(s)
==92990==    at 0x7FFF2060F99A: ??? (in /dev/ttys010)
==92990==    by 0x7FFF204DBFFA: ??? (in /dev/ttys010)
==92990==    by 0x7FFF204DC394: ??? (in /dev/ttys010)
==92990==    by 0x100005AA8: std::__1::basic_streambuf<char, std::__1::char_traits<char> >::sputn(char const*, long) (streambuf:229)
==92990==    by 0x1000058EF: std::__1::ostreambuf_iterator<char, std::__1::char_traits<char> > std::__1::__pad_and_output<char, std::__1::char_traits<char> >(std::__1::ostreambuf_iterator<char, std::__1::char_traits<char> >, char const*, char const*, char const*, std::__1::ios_base&, char) (locale:1411)
==92990==    by 0x100005615: std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::__put_character_sequence<char, std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*, unsigned long) (ostream:730)
==92990==    by 0x100021480: std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::operator<< <char, std::__1::char_traits<char>, std::__1::allocator<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) (ostream:1052)
==92990==    by 0x10002141E: PhotinoShared::Log::WriteLine(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) (Log.cpp:7)
==92990==    by 0x1000298CB: main (main.mm:9)
==92990== 
Starting execution
--92990-- UNKNOWN mach_msg unhandled MACH_SEND_TRAILER option
--92990-- UNKNOWN mach_msg unhandled MACH_SEND_TRAILER option (repeated 2 times)
UNKNOWN workq_ops option 1024
--92990-- UNKNOWN mach_msg unhandled MACH_SEND_TRAILER option (repeated 4 times)
--92990-- UNKNOWN mach_msg unhandled MACH_SEND_TRAILER option (repeated 8 times)
--92990-- WARNING: unhandled amd64-darwin syscall: unix:228
--92990-- You may be able to write your own handler.
--92990-- Read the file README_MISSING_SYSCALL_OR_IOCTL.
--92990-- Nevertheless we consider this a bug.  Please report
--92990-- it at http://valgrind.org/support/bug_reports.html.
==92990== Thread 2:
==92990== Invalid write of size 8
==92990==    at 0x7FFF20431F67: ??? (in /dev/ttys010)
==92990==    by 0x7FFF205CA452: ??? (in /dev/ttys010)
==92990==    by 0x7FFF205C9466: ??? (in /dev/ttys010)
==92990==  Address 0x20 is not stack'd, malloc'd or (recently) free'd
==92990== 
==92990== 
==92990== Process terminating with default action of signal 11 (SIGSEGV)
==92990==  Access not within mapped region at address 0x20
==92990==    at 0x7FFF20431F67: ??? (in /dev/ttys010)
==92990==    by 0x7FFF205CA452: ??? (in /dev/ttys010)
==92990==    by 0x7FFF205C9466: ??? (in /dev/ttys010)
==92990==  If you believe this happened as a result of a stack
==92990==  overflow in your program's main thread (unlikely but
==92990==  possible), you can try to increase the size of the
==92990==  main thread stack using the --main-stacksize= flag.
==92990==  The main thread stack size used in this run was 8388608.
--92990:0:schedule VG_(sema_down): read returned -4
==92990== 
==92990== HEAP SUMMARY:
==92990==     in use at exit: 0 bytes in 0 blocks
==92990==   total heap usage: 0 allocs, 0 frees, 0 bytes allocated
==92990== 
==92990== All heap blocks were freed -- no leaks are possible
==92990== 
==92990== Use --track-origins=yes to see where uninitialised values come from
==92990== For lists of detected and suppressed errors, rerun with: -s
==92990== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)
[1]    92990 segmentation fault  valgrind ./build/dev/bin/PhotinoApp
@philippjbauer
Copy link
Owner Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant