Bug 247510 - [OS X 10.6] Memcheck reports unaddressable bytes passed to [f]chmod_extended
Summary: [OS X 10.6] Memcheck reports unaddressable bytes passed to [f]chmod_extended
Status: RESOLVED FIXED
Alias: None
Product: valgrind
Classification: Developer tools
Component: memcheck (show other bugs)
Version: 3.6 SVN
Platform: Unlisted Binaries macOS
: NOR normal
Target Milestone: ---
Assignee: Julian Seward
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-12 13:58 UTC by Alexander Potapenko
Modified: 2010-10-07 17:38 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Potapenko 2010-08-12 13:58:38 UTC
$ cat copyfile.c
#include <copyfile.h>
#include <stdlib.h>

int main(int argc, char* argv[]) {
  copyfile(argv[0], "copy", NULL, COPYFILE_ALL);
  return 0;
}

  $ gcc copyfile.c -o copyfile
  $ valgrind ./copyfile

==57776== 
--57776-- /Users/glider/src/chmod/copyfile:
--57776-- dSYM directory is missing; consider using --dsymutil=yes
==57776== Syscall param chmod_extended(xsecurity) points to unaddressable byte(s)
==57776==    at 0x1000B158E: __chmod_extended (in /usr/lib/libSystem.B.dylib)
==57776==    by 0x1000B1308: chmodx_np (in /usr/lib/libSystem.B.dylib)
==57776==    by 0x1000B0871: copyfile (in /usr/lib/libSystem.B.dylib)
==57776==    by 0x100000F1F: main (in /Users/glider/src/chmod/copyfile)
==57776==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
==57776== 
==57776== Syscall param fchmod_extended(xsecurity) points to unaddressable byte(s)
==57776==    at 0x1000B243A: __fchmod_extended (in /usr/lib/libSystem.B.dylib)
==57776==    by 0x1000B241F: fchmodx_np (in /usr/lib/libSystem.B.dylib)
==57776==    by 0x1000B21E4: copyfile_internal (in /usr/lib/libSystem.B.dylib)
==57776==    by 0x1000B10F8: copyfile (in /usr/lib/libSystem.B.dylib)
==57776==    by 0x100000F1F: main (in /Users/glider/src/chmod/copyfile)
==57776==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
==57776==
Comment 1 Julian Seward 2010-10-07 17:38:23 UTC
Fixed, r11412.