Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 Oct 2005 21:17:15 -0400 (EDT)
From:      Craig Rodrigues <rodrigc@crodrigues.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        dfr@nlsystems.com, barner@FreeBSD.org
Subject:   ports/87697: devel/valgrind-snapshot does not support FreeBSD uuidgen() syscall
Message-ID:  <200510200117.j9K1HFMK023776@c-24-147-19-135.hsd1.ma.comcast.net>
Resent-Message-ID: <200510200120.j9K1KHBN011807@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         87697
>Category:       ports
>Synopsis:       devel/valgrind-snapshot does not support FreeBSD uuidgen() syscall
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Oct 20 01:20:17 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Craig Rodrigues
>Release:        FreeBSD 7.0-CURRENT i386
>Organization:
>Environment:
System: FreeBSD dibbler.crodrigues.org 7.0-CURRENT FreeBSD 7.0-CURRENT #14: Sun Oct 16 23:18:15 EDT 2005 root@dibbler.crodrigues.org:/usr/obj/usr/src/sys/MYKERNEL1 i386


	
>Description:
Recently I needed to use devel/valgrind-snapshot to test some code on FreeBSD
which calls the uuidgen() system call.  valgrind complains
that it does not support syscall 392, which is uuidgen.

If something like the attached patch could be added to the FreeBSD
version of valgrind, that would be very helpful!

>How-To-Repeat:
Try running valgrind on code like this:

#include <sys/types.h>
#include <sys/uuid.h>
int main(int argc, char *argv[]) { struct uuid blah; uuidgen(&blah, 1); }

>Fix:

--- vg_syscalls.c.orig	Fri Jul 16 13:21:08 2004
+++ vg_syscalls.c	Wed Oct 19 21:04:27 2005
+#if __FreeBSD__ >= 5
+PRE(uuidgen)
+{
+   /* int uuidgen(struct uuid *store, int count); */
+   MAYBE_PRINTF("uuidgen ( %p, %d )\n", arg1, arg2);
+   SYSCALL_TRACK( pre_mem_write, tid, "uuidgen(store, count)", arg1, arg2);
+}
+
+POST(uuidgen)
+{
+   VG_TRACK( post_mem_write, arg1, arg2 );
+}
+
+#endif
+
 #endif
 
 PRE(setresgid)
@@ -6827,6 +6882,9 @@
    SYSBA(kldstat,		False),
    SYSB_(kldfirstmod,		False),
    SYSBA(__getcwd,		False),
+#if __FreeBSD__ >= 5
+   SYSBA(uuidgen,		False),
+#endif
 };
 #define MAX_SYS_INFO		(sizeof(sys_info)/sizeof(sys_info[0]))
 
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200510200117.j9K1HFMK023776>