Skip to main content
Post Undeleted by Gordon Lai
added 1286 characters in body
Source Link
Making./vg-in-place allyes
==30798== inMemcheck, coregrinda memory error detector
==30798== Copyright (cdC) m_mach2002-2017, &&and migGNU GPL'd, by Julian Seward et al.
==30798== Using Valgrind-I/Library/Developer/CommandLineTools/SDKs/MacOSX3.sdk/usr/include18.0.GIT-lbmacos /Library/Developerand LibVEX; rerun with -h for copyright info
==30798== Command: yes
==30798== 
==30798== Invalid read of size 8
==30798==    at 0x100017126: cerror_nocancel (in /CommandLineToolsusr/SDKslib/MacOSX.sdkdyld)
==30798==    by 0x1000156E8: kdebug_is_enabled (in /usr/include/machlib/mach_vm.defsdyld)
==30798== /Library/Developer   by 0x10004215B: dyld3::kdebug_trace_dyld_marker(unsigned int, dyld3::kt_arg, dyld3::kt_arg, dyld3::kt_arg, dyld3::kt_arg) (in /CommandLineToolsusr/SDKslib/MacOSX.sdkdyld)
==30798==    by 0x100019375: (below main) (in /usr/include/machlib/task.defsdyld)
==30798== /Library/Developer Address 0x8 is not stack'd, malloc'd or (recently) free'd
==30798== 
==30798== 
==30798== Process terminating with default action of signal 11 (SIGSEGV)
==30798==  Access not within mapped region at address 0x8
==30798==    at 0x100017126: cerror_nocancel (in /CommandLineToolsusr/SDKslib/MacOSX.sdkdyld)
==30798==    by 0x1000156E8: kdebug_is_enabled (in /usr/include/machlib/thread_act.defsdyld)
==30798== /Library/Developer   by 0x10004215B: dyld3::kdebug_trace_dyld_marker(unsigned int, dyld3::kt_arg, dyld3::kt_arg, dyld3::kt_arg, dyld3::kt_arg) (in /CommandLineToolsusr/SDKslib/MacOSX.sdkdyld)
==30798==    by 0x100019375: (below main) (in /usr/include/machlib/vm_map.defsdyld)
gcc==30798== -I.. If you believe this happened as a result of a stack
==30798==  overflow in your program's main thread (unlikely but
==30798==  possible), you can try to increase the size of the
==30798==  main thread stack using the -I.-main-stacksize= flag.
==30798== -g -WallThe -omain fixup_macho_loadcmdsthread fixup_macho_loadcmdsstack size used in this run was 8388608.c
fixup_macho_loadcmds.c:128:4:==30798== error
==30798== HEAP SUMMARY:
==30798== "Unknown DARWIN_VERS value.  Thisin fileuse onlyat compilesexit: on0 Darwin."bytes in 0 blocks
#==30798==  error "Unknowntotal DARWIN_VERSheap value.usage: 0 Thisallocs, file0 onlyfrees, compiles0 onbytes Darwin."allocated
==30798== 
==30798== All ^heap blocks were freed -- no leaks are possible
1==30798== error
==30798== generated.For lists of detected and suppressed errors, rerun with: -s
make[2]==30798== ERROR SUMMARY: ***1 [fixup_macho_loadcmds]errors Errorfrom 1
make[1] contexts (suppressed: ***0 [allfrom 0)
./vg-recursive]in-place: Errorline 1
make31: ***30798 [all]Segmentation Errorfault: 211  VALGRIND_LIB="$vgbasedir/.in_place" VALGRIND_LIB_INNER="$vgbasedir/.in_place" "$vgbasedir/coregrind/valgrind" "$@"
Making all in coregrind
(cd m_mach && mig -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/mach_vm.defs /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/task.defs /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/thread_act.defs /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/vm_map.defs)
gcc -I.. -I.. -g -Wall -o fixup_macho_loadcmds fixup_macho_loadcmds.c
fixup_macho_loadcmds.c:128:4: error: "Unknown DARWIN_VERS value.  This file only compiles on Darwin."
#  error "Unknown DARWIN_VERS value.  This file only compiles on Darwin."
   ^
1 error generated.
make[2]: *** [fixup_macho_loadcmds] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
./vg-in-place yes
==30798== Memcheck, a memory error detector
==30798== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==30798== Using Valgrind-3.18.0.GIT-lbmacos and LibVEX; rerun with -h for copyright info
==30798== Command: yes
==30798== 
==30798== Invalid read of size 8
==30798==    at 0x100017126: cerror_nocancel (in /usr/lib/dyld)
==30798==    by 0x1000156E8: kdebug_is_enabled (in /usr/lib/dyld)
==30798==    by 0x10004215B: dyld3::kdebug_trace_dyld_marker(unsigned int, dyld3::kt_arg, dyld3::kt_arg, dyld3::kt_arg, dyld3::kt_arg) (in /usr/lib/dyld)
==30798==    by 0x100019375: (below main) (in /usr/lib/dyld)
==30798==  Address 0x8 is not stack'd, malloc'd or (recently) free'd
==30798== 
==30798== 
==30798== Process terminating with default action of signal 11 (SIGSEGV)
==30798==  Access not within mapped region at address 0x8
==30798==    at 0x100017126: cerror_nocancel (in /usr/lib/dyld)
==30798==    by 0x1000156E8: kdebug_is_enabled (in /usr/lib/dyld)
==30798==    by 0x10004215B: dyld3::kdebug_trace_dyld_marker(unsigned int, dyld3::kt_arg, dyld3::kt_arg, dyld3::kt_arg, dyld3::kt_arg) (in /usr/lib/dyld)
==30798==    by 0x100019375: (below main) (in /usr/lib/dyld)
==30798==  If you believe this happened as a result of a stack
==30798==  overflow in your program's main thread (unlikely but
==30798==  possible), you can try to increase the size of the
==30798==  main thread stack using the --main-stacksize= flag.
==30798==  The main thread stack size used in this run was 8388608.
==30798== 
==30798== HEAP SUMMARY:
==30798==     in use at exit: 0 bytes in 0 blocks
==30798==   total heap usage: 0 allocs, 0 frees, 0 bytes allocated
==30798== 
==30798== All heap blocks were freed -- no leaks are possible
==30798== 
==30798== For lists of detected and suppressed errors, rerun with: -s
==30798== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
./vg-in-place: line 31: 30798 Segmentation fault: 11  VALGRIND_LIB="$vgbasedir/.in_place" VALGRIND_LIB_INNER="$vgbasedir/.in_place" "$vgbasedir/coregrind/valgrind" "$@"
Post Deleted by Gordon Lai
Source Link

I don't have enough reputation to comment on Paul's post. After I made the changes he stated, I got the following error. I am currently on Monterey 12.1 Beta (21C5021h) with Intel i7.

Making all in coregrind
(cd m_mach && mig -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/mach_vm.defs /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/task.defs /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/thread_act.defs /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/vm_map.defs)
gcc -I.. -I.. -g -Wall -o fixup_macho_loadcmds fixup_macho_loadcmds.c
fixup_macho_loadcmds.c:128:4: error: "Unknown DARWIN_VERS value.  This file only compiles on Darwin."
#  error "Unknown DARWIN_VERS value.  This file only compiles on Darwin."
   ^
1 error generated.
make[2]: *** [fixup_macho_loadcmds] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2