[141404] trunk/base/src/darwintracelib1.0

cal at macports.org cal at macports.org
Sat Dec 12 01:23:19 PST 2015


Revision: 141404
          https://trac.macports.org/changeset/141404
Author:   cal at macports.org
Date:     2015-10-17 09:18:03 -0700 (Sat, 17 Oct 2015)
Log Message:
-----------
base: darwintrace: Make notes where I sometimes see crashes

I did migration to El Capitan with trace mode enabled and used the crash
generated crash reports to track down where darwintrace breaks stuff in
practice. This document these locations with a FIXME so they can be fixed some
time.

Modified Paths:
--------------
    trunk/base/src/darwintracelib1.0/darwintrace.c
    trunk/base/src/darwintracelib1.0/readdir.c

Modified: trunk/base/src/darwintracelib1.0/darwintrace.c
===================================================================
--- trunk/base/src/darwintracelib1.0/darwintrace.c	2015-10-17 15:24:41 UTC (rev 141403)
+++ trunk/base/src/darwintracelib1.0/darwintrace.c	2015-10-17 16:18:03 UTC (rev 141404)
@@ -775,6 +775,7 @@
 		char attrbuf[sizeof(uint32_t) + sizeof(attrreference_t) + (PATH_MAX + 1)];
 		/*           attrlength         attrref_t for the name     UTF-8 name up to PATH_MAX chars */
 
+		// FIXME This sometimes violates the stack canary
 		if (-1 == (getattrlist(".", &attrlist, attrbuf, sizeof(attrbuf), FSOPT_NOFOLLOW))) {
 			perror("darwintrace: getattrlist");
 			abort();

Modified: trunk/base/src/darwintracelib1.0/readdir.c
===================================================================
--- trunk/base/src/darwintracelib1.0/readdir.c	2015-10-17 15:24:41 UTC (rev 141403)
+++ trunk/base/src/darwintracelib1.0/readdir.c	2015-10-17 16:18:03 UTC (rev 141404)
@@ -71,6 +71,7 @@
 	__darwintrace_setup();
 
 	size_t sz = __getdirentries64(fd, buf, bufsize, basep);
+	// FIXME Support longer paths
 	char dirname[MAXPATHLEN];
 	size_t dnamelen;
 
@@ -91,6 +92,7 @@
 	for (offset = 0; offset < sz;) {
 		struct dirent64 *dent = (struct dirent64 *)(((char *) buf) + offset);
 		dirname[dnamelen] = '\0';
+		// FIXME This crashes sometimes
 		strcat(dirname, dent->d_name);
 		if (!__darwintrace_is_in_sandbox(dirname, DT_ALLOWDIR)) {
 			debug_printf("__getdirentries64: filtered %s\n", dirname);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20151212/38b18d47/attachment.html>


More information about the macports-changes mailing list