Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/amd64/amd64 Avoid VLA to appease stack-protector
details: https://anonhg.NetBSD.org/src/rev/66ccc96382b8
branches: trunk
changeset: 459625:66ccc96382b8
user: kamil <kamil%NetBSD.org@localhost>
date: Wed Sep 18 20:18:27 2019 +0000
description:
Avoid VLA to appease stack-protector
This has been reproduced with -O0 and -fsanitize=undefined.
diffstat:
sys/arch/amd64/amd64/trap.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r 765ed71d80ae -r 66ccc96382b8 sys/arch/amd64/amd64/trap.c
--- a/sys/arch/amd64/amd64/trap.c Wed Sep 18 20:17:46 2019 +0000
+++ b/sys/arch/amd64/amd64/trap.c Wed Sep 18 20:18:27 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: trap.c,v 1.123 2019/08/21 17:14:05 maxv Exp $ */
+/* $NetBSD: trap.c,v 1.124 2019/09/18 20:18:27 kamil Exp $ */
/*
* Copyright (c) 1998, 2000, 2017 The NetBSD Foundation, Inc.
@@ -64,7 +64,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.123 2019/08/21 17:14:05 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.124 2019/09/18 20:18:27 kamil Exp $");
#include "opt_ddb.h"
#include "opt_kgdb.h"
@@ -351,7 +351,7 @@
{
static const char lcall[7] = { 0x9a, 0, 0, 0, 0, 7, 0 };
const size_t sz = sizeof(lcall);
- char tmp[sz];
+ char tmp[sizeof(lcall) /* Avoids VLA */];
/* Check for the oosyscall lcall instruction. */
if (p->p_emul == &emul_netbsd32 &&
Home |
Main Index |
Thread Index |
Old Index