Module Name: src Committed By: phx Date: Wed Sep 13 09:55:35 UTC 2017
Modified Files: src/sys/arch/m68k/include: fenv.h Log Message: The __fgetenv() macro operates on a fenv_t, not on a fenv_t *. Fixes a segfault in fegetenv() and feholdexcept(). To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/m68k/include/fenv.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/m68k/include/fenv.h diff -u src/sys/arch/m68k/include/fenv.h:1.6 src/sys/arch/m68k/include/fenv.h:1.7 --- src/sys/arch/m68k/include/fenv.h:1.6 Wed Mar 22 23:11:09 2017 +++ src/sys/arch/m68k/include/fenv.h Wed Sep 13 09:55:35 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: fenv.h,v 1.6 2017/03/22 23:11:09 chs Exp $ */ +/* $NetBSD: fenv.h,v 1.7 2017/09/13 09:55:35 phx Exp $ */ /*- * Copyright (c) 2015 The NetBSD Foundation, Inc. @@ -210,7 +210,7 @@ fesetround(int __round) __fenv_static inline int fegetenv(fenv_t *__envp) { - __fgetenv(__envp); + __fgetenv(*__envp); return 0; } @@ -220,7 +220,7 @@ feholdexcept(fenv_t *__envp) { fexcept_t __fpcr, __fpsr; - __fgetenv(__envp); + __fgetenv(*__envp); __fpsr = __envp->fpsr & ~FE_ALL_EXCEPT; __set_fpsr(__fpsr); /* clear all */ __fpcr = __envp->fpcr & ~(FE_ALL_EXCEPT << 6);