is currently not supported. That is because from the opened file descriptor
itself it is not possible to reverse map the intended pathname.
Examples are fexecve(3C) and isaexec(3C).
+- Program headers PT_SUNW_SYSSTAT and PT_SUNW_SYSSTAT_ZONE are not supported.
+ That is, programs linked with mapfile directive RESERVE_SEGMENT and atribute
+ TYPE equal to SYSSTAT or SYSSTAT_ZONE will cause Valgrind exit. It is not
+ possible for Valgrind to arrange mapping of a kernel shared page at the
+ address specified in the mapfile for the guest application. There is currently
+ no such mechanism in Solaris.
- When a thread has no stack then all system calls will result in Valgrind
crash, even though such system calls use just parameters passed in registers.
This should happen only in pathological situations when a thread is created
AC_DEFINE_UNQUOTED([SOLARIS_REPCACHE_PROTOCOL_VERSION], [$version],
[Version number of the repository door cache protocol.])
+
+# Solaris-specific check determining if "sysstat" segment reservation type
+# is available.
+#
+# New "sysstat" segment reservation (available on Solaris 12):
+# - program header type: PT_SUNW_SYSSTAT
+# - auxiliary vector entry: AT_SUN_SYSSTAT_ADDR
+#
+# C-level symbol: SOLARIS_RESERVE_SYSSTAT_ADDR
+# Automake-level symbol: SOLARIS_RESERVE_SYSSTAT_ADDR
+#
+AC_MSG_CHECKING([for the new `sysstat' segment reservation (Solaris-specific)])
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include <sys/auxv.h>
+]], [[
+ return !AT_SUN_SYSSTAT_ADDR;
+]])], [
+solaris_reserve_sysstat_addr=yes
+AC_MSG_RESULT([yes])
+AC_DEFINE([SOLARIS_RESERVE_SYSSTAT_ADDR], 1,
+ [Define to 1 if you have the new `sysstat' segment reservation.])
+], [
+solaris_reserve_sysstat_addr=no
+AC_MSG_RESULT([no])
+])
+AM_CONDITIONAL(SOLARIS_RESERVE_SYSSTAT_ADDR, test x$solaris_reserve_sysstat_addr = xyes)
+
+
+# Solaris-specific check determining if "sysstat_zone" segment reservation type
+# is available.
+#
+# New "sysstat_zone" segment reservation (available on Solaris 12):
+# - program header type: PT_SUNW_SYSSTAT_ZONE
+# - auxiliary vector entry: AT_SUN_SYSSTAT_ZONE_ADDR
+#
+# C-level symbol: SOLARIS_RESERVE_SYSSTAT_ZONE_ADDR
+# Automake-level symbol: SOLARIS_RESERVE_SYSSTAT_ZONE_ADDR
+#
+AC_MSG_CHECKING([for the new `sysstat_zone' segment reservation (Solaris-specific)])
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include <sys/auxv.h>
+]], [[
+ return !AT_SUN_SYSSTAT_ZONE_ADDR;
+]])], [
+solaris_reserve_sysstat_zone_addr=yes
+AC_MSG_RESULT([yes])
+AC_DEFINE([SOLARIS_RESERVE_SYSSTAT_ZONE_ADDR], 1,
+ [Define to 1 if you have the new `sysstat_zone' segment reservation.])
+], [
+solaris_reserve_sysstat_zone_addr=no
+AC_MSG_RESULT([no])
+])
+AM_CONDITIONAL(SOLARIS_RESERVE_SYSSTAT_ZONE_ADDR, test x$solaris_reserve_sysstat_zone_addr = xyes)
+
else
AM_CONDITIONAL(SOLARIS_SUN_STUDIO_AS, false)
AM_CONDITIONAL(SOLARIS_XPG_SYMBOLS_PRESENT, false)
AM_CONDITIONAL(SOLARIS_GETHRT_FASTTRAP, false)
AM_CONDITIONAL(SOLARIS_GETZONEOFFSET_FASTTRAP, false)
AM_CONDITIONAL(SOLARIS_EXECVE_SYSCALL_TAKES_FLAGS, false)
+AM_CONDITIONAL(SOLARIS_RESERVE_SYSSTAT_ADDR, false)
+AM_CONDITIONAL(SOLARIS_RESERVE_SYSSTAT_ZONE_ADDR, false)
fi # test "$VGCONF_OS" = "solaris"
break;
# endif
+# if defined(PT_SUNW_SYSSTAT)
+ /* Solaris-specific program header which requires link-time support. */
+ case PT_SUNW_SYSSTAT:
+ VG_(unimplemented)("Support for program header PT_SUNW_SYSSTAT.");
+ break;
+# endif
+# if defined(PT_SUNW_SYSSTAT_ZONE)
+ /* Solaris-specific program header which requires link-time support. */
+ case PT_SUNW_SYSSTAT_ZONE:
+ VG_(unimplemented)("Support for program header PT_SUNW_SYSSTAT_ZONE.");
+ break;
+# endif
+
default:
// do nothing
break;
proc_psinfo.stderr.exp proc_psinfo.stdout.exp proc_psinfo.vgtest \
posix_spawn.stderr.exp posix_spawn.stdout.exp posix_spawn.vgtest \
pthread-stack.stderr.exp pthread-stack.vgtest \
+ reserve_sysstat_addr.map reserve_sysstat_addr.stderr.exp reserve_sysstat_addr.vgtest \
+ reserve_sysstat_zone_addr.map reserve_sysstat_zone_addr.stderr.exp reserve_sysstat_zone_addr.vgtest \
resolv.stdout.exp resolv.stderr.exp resolv.vgtest \
sigresend.stderr.exp sigresend.stdout.exp sigresend.vgtest \
stack-overflow.stderr.exp stack-overflow.vgtest \
resolv_LDADD = -lresolv
stack_prot_LDFLAGS = -Wl,-M,/usr/lib/ld/map.noexstk
threads_exitall_LDADD = -lpthread
+
+if SOLARIS_RESERVE_SYSSTAT_ADDR
+check_PROGRAMS += reserve_sysstat_addr
+reserve_sysstat_addr_LDFLAGS = -Wl,-M,reserve_sysstat_addr.map
+endif
+
+if SOLARIS_RESERVE_SYSSTAT_ZONE_ADDR
+check_PROGRAMS += reserve_sysstat_zone_addr
+reserve_sysstat_zone_addr_LDFLAGS = -Wl,-M,reserve_sysstat_zone_addr.map
+endif
--- /dev/null
+int main(void) {
+ return 0;
+}
--- /dev/null
+$mapfile_version 2
+
+RESERVE_SEGMENT reserve_sysstat {
+ TYPE = SYSSTAT;
+ SIZE = 4096;
+ VADDR = 0x9002000;
+};
--- /dev/null
+
+Valgrind detected that your program requires
+the following unimplemented functionality:
+ Support for program header PT_SUNW_SYSSTAT.
+This may be because the functionality is hard to implement,
+or because no reasonable program would behave this way,
+or because nobody has yet needed it. In any case, let us know at
+www.valgrind.org and/or try to work around the problem, if you can.
+
+Valgrind has to exit now. Sorry. Bye!
+
+
+sched status:
+ running_tid=0
--- /dev/null
+prereq: test -e reserve_sysstat_addr
+prog: reserve_sysstat_addr
+vgopts: -q
--- /dev/null
+int main(void) {
+ return 0;
+}
--- /dev/null
+$mapfile_version 2
+
+RESERVE_SEGMENT reserve_sysstat_zone {
+ TYPE = SYSSTAT_ZONE;
+ SIZE = 4096;
+ VADDR = 0x9004000;
+};
--- /dev/null
+
+Valgrind detected that your program requires
+the following unimplemented functionality:
+ Support for program header PT_SUNW_SYSSTAT_ZONE.
+This may be because the functionality is hard to implement,
+or because no reasonable program would behave this way,
+or because nobody has yet needed it. In any case, let us know at
+www.valgrind.org and/or try to work around the problem, if you can.
+
+Valgrind has to exit now. Sorry. Bye!
+
+
+sched status:
+ running_tid=0
--- /dev/null
+prereq: test -e reserve_sysstat_zone_addr
+prog: reserve_sysstat_zone_addr
+vgopts: -q