|
From: <sv...@va...> - 2016-04-17 10:05:38
|
Author: iraisr
Date: Sun Apr 17 11:05:29 2016
New Revision: 15856
Log:
Fix build on newer illumos distributions where struct fpchip_state
was renamed to _fpchip_state.
n-i-z
Modified:
trunk/configure.ac
trunk/include/vki/vki-solaris.h
trunk/memcheck/tests/amd64-solaris/context_sse.c
trunk/memcheck/tests/amd64-solaris/context_sse.stderr.exp
trunk/memcheck/tests/x86-solaris/context_sse.c
trunk/memcheck/tests/x86-solaris/context_sse.stderr.exp
Modified: trunk/configure.ac
==============================================================================
--- trunk/configure.ac (original)
+++ trunk/configure.ac Sun Apr 17 11:05:29 2016
@@ -3520,6 +3520,23 @@
])
AM_CONDITIONAL(SOLARIS_SYSTEM_STATS_SYSCALL, test x$solaris_system_stats_syscall = xyes)
+
+# Solaris-specific check determining if fpregset_t defines struct _fpchip_state
+# (on newer illumos) or struct fpchip_state (Solaris, older illumos).
+#
+# C-level symbol: SOLARIS_FPCHIP_STATE_TAKES_UNDERSCORE
+# Automake-level symbol: none
+#
+AC_CHECK_TYPE([struct _fpchip_state],
+ [solaris_fpchip_state_takes_underscore=yes],
+ [solaris_fpchip_state_takes_underscore=no],
+ [[#include <sys/regset.h>]])
+if test "$solaris_fpchip_state_takes_underscore" = "yes"; then
+ AC_DEFINE(SOLARIS_FPCHIP_STATE_TAKES_UNDERSCORE, 1,
+ [Define to 1 if fpregset_t defines struct _fpchip_state])
+fi
+
+
else
AM_CONDITIONAL(SOLARIS_SUN_STUDIO_AS, false)
AM_CONDITIONAL(SOLARIS_XPG_SYMBOLS_PRESENT, false)
Modified: trunk/include/vki/vki-solaris.h
==============================================================================
--- trunk/include/vki/vki-solaris.h (original)
+++ trunk/include/vki/vki-solaris.h Sun Apr 17 11:05:29 2016
@@ -1442,7 +1442,11 @@
#error "Unknown platform"
#endif
+#if defined(SOLARIS_FPCHIP_STATE_TAKES_UNDERSCORE)
+#define vki_fpchip_state _fpchip_state
+#else
#define vki_fpchip_state fpchip_state
+#endif /* SOLARIS_FPCHIP_STATE_TAKES_UNDERSCORE */
#define VKI_GETCONTEXT GETCONTEXT
#define VKI_SETCONTEXT SETCONTEXT
Modified: trunk/memcheck/tests/amd64-solaris/context_sse.c
==============================================================================
--- trunk/memcheck/tests/amd64-solaris/context_sse.c (original)
+++ trunk/memcheck/tests/amd64-solaris/context_sse.c Sun Apr 17 11:05:29 2016
@@ -10,6 +10,8 @@
#include <sys/syscall.h>
#include <sys/ucontext.h>
+#include "config.h"
+
static siginfo_t si;
static ucontext_t uc;
/* x0 is always zero, but is visible to Valgrind as uninitialised. */
@@ -31,7 +33,13 @@
pid_t pid;
upad128_t out[8];
upad128_t y0;
- struct fpchip_state *fs = &uc.uc_mcontext.fpregs.fp_reg_set.fpchip_state;
+
+#if defined(SOLARIS_FPCHIP_STATE_TAKES_UNDERSCORE)
+ struct _fpchip_state *fs;
+#else
+ struct fpchip_state *fs;
+#endif
+ fs = &uc.uc_mcontext.fpregs.fp_reg_set.fpchip_state;
/* Uninitialised, but we know px[0] is 0x0. */
upad128_t *px = malloc(sizeof(*px));
Modified: trunk/memcheck/tests/amd64-solaris/context_sse.stderr.exp
==============================================================================
--- trunk/memcheck/tests/amd64-solaris/context_sse.stderr.exp (original)
+++ trunk/memcheck/tests/amd64-solaris/context_sse.stderr.exp Sun Apr 17 11:05:29 2016
@@ -1,96 +1,96 @@
Conditional jump or move depends on uninitialised value(s)
- at 0x........: main (context_sse.c:87)
+ at 0x........: main (context_sse.c:95)
Uninitialised value was created by a heap allocation
at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: main (context_sse.c:41)
+ by 0x........: main (context_sse.c:49)
Conditional jump or move depends on uninitialised value(s)
- at 0x........: main (context_sse.c:87)
+ at 0x........: main (context_sse.c:95)
Uninitialised value was created by a heap allocation
at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: main (context_sse.c:41)
+ by 0x........: main (context_sse.c:49)
Conditional jump or move depends on uninitialised value(s)
- at 0x........: main (context_sse.c:87)
+ at 0x........: main (context_sse.c:95)
Uninitialised value was created by a heap allocation
at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: main (context_sse.c:41)
+ by 0x........: main (context_sse.c:49)
Conditional jump or move depends on uninitialised value(s)
- at 0x........: main (context_sse.c:87)
+ at 0x........: main (context_sse.c:95)
Uninitialised value was created by a heap allocation
at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: main (context_sse.c:41)
+ by 0x........: main (context_sse.c:49)
Conditional jump or move depends on uninitialised value(s)
- at 0x........: main (context_sse.c:87)
+ at 0x........: main (context_sse.c:95)
Uninitialised value was created by a heap allocation
at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: main (context_sse.c:41)
+ by 0x........: main (context_sse.c:49)
Conditional jump or move depends on uninitialised value(s)
- at 0x........: main (context_sse.c:87)
+ at 0x........: main (context_sse.c:95)
Uninitialised value was created by a heap allocation
at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: main (context_sse.c:41)
+ by 0x........: main (context_sse.c:49)
Conditional jump or move depends on uninitialised value(s)
- at 0x........: main (context_sse.c:87)
+ at 0x........: main (context_sse.c:95)
Uninitialised value was created by a heap allocation
at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: main (context_sse.c:41)
+ by 0x........: main (context_sse.c:49)
Conditional jump or move depends on uninitialised value(s)
- at 0x........: main (context_sse.c:87)
+ at 0x........: main (context_sse.c:95)
Uninitialised value was created by a heap allocation
at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: main (context_sse.c:41)
+ by 0x........: main (context_sse.c:49)
Conditional jump or move depends on uninitialised value(s)
- at 0x........: main (context_sse.c:95)
+ at 0x........: main (context_sse.c:103)
Uninitialised value was created by a heap allocation
at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: main (context_sse.c:37)
+ by 0x........: main (context_sse.c:45)
Conditional jump or move depends on uninitialised value(s)
- at 0x........: main (context_sse.c:95)
+ at 0x........: main (context_sse.c:103)
Uninitialised value was created by a heap allocation
at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: main (context_sse.c:37)
+ by 0x........: main (context_sse.c:45)
Conditional jump or move depends on uninitialised value(s)
- at 0x........: main (context_sse.c:95)
+ at 0x........: main (context_sse.c:103)
Uninitialised value was created by a heap allocation
at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: main (context_sse.c:41)
+ by 0x........: main (context_sse.c:49)
Conditional jump or move depends on uninitialised value(s)
- at 0x........: main (context_sse.c:95)
+ at 0x........: main (context_sse.c:103)
Uninitialised value was created by a heap allocation
at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: main (context_sse.c:41)
+ by 0x........: main (context_sse.c:49)
Conditional jump or move depends on uninitialised value(s)
- at 0x........: main (context_sse.c:95)
+ at 0x........: main (context_sse.c:103)
Uninitialised value was created by a heap allocation
at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: main (context_sse.c:41)
+ by 0x........: main (context_sse.c:49)
Conditional jump or move depends on uninitialised value(s)
- at 0x........: main (context_sse.c:95)
+ at 0x........: main (context_sse.c:103)
Uninitialised value was created by a heap allocation
at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: main (context_sse.c:41)
+ by 0x........: main (context_sse.c:49)
Conditional jump or move depends on uninitialised value(s)
- at 0x........: main (context_sse.c:95)
+ at 0x........: main (context_sse.c:103)
Uninitialised value was created by a heap allocation
at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: main (context_sse.c:41)
+ by 0x........: main (context_sse.c:49)
Conditional jump or move depends on uninitialised value(s)
- at 0x........: main (context_sse.c:95)
+ at 0x........: main (context_sse.c:103)
Uninitialised value was created by a heap allocation
at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: main (context_sse.c:41)
+ by 0x........: main (context_sse.c:49)
Modified: trunk/memcheck/tests/x86-solaris/context_sse.c
==============================================================================
--- trunk/memcheck/tests/x86-solaris/context_sse.c (original)
+++ trunk/memcheck/tests/x86-solaris/context_sse.c Sun Apr 17 11:05:29 2016
@@ -8,6 +8,8 @@
#include <sys/syscall.h>
#include <sys/ucontext.h>
+#include "config.h"
+
static siginfo_t si;
static ucontext_t uc;
/* x0 is always zero, but is visible to Valgrind as uninitialised. */
@@ -29,7 +31,13 @@
pid_t pid;
upad128_t out[8];
upad128_t y0;
- struct fpchip_state *fs = &uc.uc_mcontext.fpregs.fp_reg_set.fpchip_state;
+
+#if defined(SOLARIS_FPCHIP_STATE_TAKES_UNDERSCORE)
+ struct _fpchip_state *fs;
+#else
+ struct fpchip_state *fs;
+#endif
+ fs = &uc.uc_mcontext.fpregs.fp_reg_set.fpchip_state;
/* Uninitialised, but we know px[0] is 0x0. */
upad128_t *px = malloc(sizeof(*px));
Modified: trunk/memcheck/tests/x86-solaris/context_sse.stderr.exp
==============================================================================
--- trunk/memcheck/tests/x86-solaris/context_sse.stderr.exp (original)
+++ trunk/memcheck/tests/x86-solaris/context_sse.stderr.exp Sun Apr 17 11:05:29 2016
@@ -1,96 +1,96 @@
Conditional jump or move depends on uninitialised value(s)
- at 0x........: main (context_sse.c:93)
+ at 0x........: main (context_sse.c:101)
Uninitialised value was created by a heap allocation
at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: main (context_sse.c:39)
+ by 0x........: main (context_sse.c:47)
Conditional jump or move depends on uninitialised value(s)
- at 0x........: main (context_sse.c:93)
+ at 0x........: main (context_sse.c:101)
Uninitialised value was created by a heap allocation
at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: main (context_sse.c:39)
+ by 0x........: main (context_sse.c:47)
Conditional jump or move depends on uninitialised value(s)
- at 0x........: main (context_sse.c:93)
+ at 0x........: main (context_sse.c:101)
Uninitialised value was created by a heap allocation
at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: main (context_sse.c:39)
+ by 0x........: main (context_sse.c:47)
Conditional jump or move depends on uninitialised value(s)
- at 0x........: main (context_sse.c:93)
+ at 0x........: main (context_sse.c:101)
Uninitialised value was created by a heap allocation
at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: main (context_sse.c:39)
+ by 0x........: main (context_sse.c:47)
Conditional jump or move depends on uninitialised value(s)
- at 0x........: main (context_sse.c:93)
+ at 0x........: main (context_sse.c:101)
Uninitialised value was created by a heap allocation
at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: main (context_sse.c:39)
+ by 0x........: main (context_sse.c:47)
Conditional jump or move depends on uninitialised value(s)
- at 0x........: main (context_sse.c:93)
+ at 0x........: main (context_sse.c:101)
Uninitialised value was created by a heap allocation
at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: main (context_sse.c:39)
+ by 0x........: main (context_sse.c:47)
Conditional jump or move depends on uninitialised value(s)
- at 0x........: main (context_sse.c:93)
+ at 0x........: main (context_sse.c:101)
Uninitialised value was created by a heap allocation
at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: main (context_sse.c:39)
+ by 0x........: main (context_sse.c:47)
Conditional jump or move depends on uninitialised value(s)
- at 0x........: main (context_sse.c:93)
+ at 0x........: main (context_sse.c:101)
Uninitialised value was created by a heap allocation
at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: main (context_sse.c:39)
+ by 0x........: main (context_sse.c:47)
Conditional jump or move depends on uninitialised value(s)
- at 0x........: main (context_sse.c:101)
+ at 0x........: main (context_sse.c:109)
Uninitialised value was created by a heap allocation
at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: main (context_sse.c:35)
+ by 0x........: main (context_sse.c:43)
Conditional jump or move depends on uninitialised value(s)
- at 0x........: main (context_sse.c:101)
+ at 0x........: main (context_sse.c:109)
Uninitialised value was created by a heap allocation
at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: main (context_sse.c:35)
+ by 0x........: main (context_sse.c:43)
Conditional jump or move depends on uninitialised value(s)
- at 0x........: main (context_sse.c:101)
+ at 0x........: main (context_sse.c:109)
Uninitialised value was created by a heap allocation
at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: main (context_sse.c:39)
+ by 0x........: main (context_sse.c:47)
Conditional jump or move depends on uninitialised value(s)
- at 0x........: main (context_sse.c:101)
+ at 0x........: main (context_sse.c:109)
Uninitialised value was created by a heap allocation
at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: main (context_sse.c:39)
+ by 0x........: main (context_sse.c:47)
Conditional jump or move depends on uninitialised value(s)
- at 0x........: main (context_sse.c:101)
+ at 0x........: main (context_sse.c:109)
Uninitialised value was created by a heap allocation
at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: main (context_sse.c:39)
+ by 0x........: main (context_sse.c:47)
Conditional jump or move depends on uninitialised value(s)
- at 0x........: main (context_sse.c:101)
+ at 0x........: main (context_sse.c:109)
Uninitialised value was created by a heap allocation
at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: main (context_sse.c:39)
+ by 0x........: main (context_sse.c:47)
Conditional jump or move depends on uninitialised value(s)
- at 0x........: main (context_sse.c:101)
+ at 0x........: main (context_sse.c:109)
Uninitialised value was created by a heap allocation
at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: main (context_sse.c:39)
+ by 0x........: main (context_sse.c:47)
Conditional jump or move depends on uninitialised value(s)
- at 0x........: main (context_sse.c:101)
+ at 0x........: main (context_sse.c:109)
Uninitialised value was created by a heap allocation
at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: main (context_sse.c:39)
+ by 0x........: main (context_sse.c:47)
|