Module Name:    src
Committed By:   kamil
Date:           Sat Feb 23 12:03:07 UTC 2019

Modified Files:
        src/sys/kern: subr_kcov.c

Log Message:
Fix subr_kcov build on NetBSD/i386

Cast the pointer returned from __builtin_return_address() to intptr_t
before converting it to uint64_t.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/kern/subr_kcov.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/kern/subr_kcov.c
diff -u src/sys/kern/subr_kcov.c:1.1 src/sys/kern/subr_kcov.c:1.2
--- src/sys/kern/subr_kcov.c:1.1	Sat Feb 23 03:10:06 2019
+++ src/sys/kern/subr_kcov.c	Sat Feb 23 12:03:07 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: subr_kcov.c,v 1.1 2019/02/23 03:10:06 kamil Exp $	*/
+/*	$NetBSD: subr_kcov.c,v 1.2 2019/02/23 12:03:07 kamil Exp $	*/
 
 /*
  * Copyright (c) 2019 The NetBSD Foundation, Inc.
@@ -292,7 +292,7 @@ __sanitizer_cov_trace_pc(void)
 
 	idx = kd->buf[0];
 	if (idx < kd->bufnent) {
-		kd->buf[idx+1] = (kcov_int_t)__builtin_return_address(0);
+		kd->buf[idx+1] = (intptr_t)__builtin_return_address(0);
 		kd->buf[0]++;
 	}
 }

Reply via email to