Bug 202315 - unhandled syscall: 332 (inotify_init1)
Summary: unhandled syscall: 332 (inotify_init1)
Status: RESOLVED FIXED
Alias: None
Product: valgrind
Classification: Developer tools
Component: general (show other bugs)
Version: 3.4.1
Platform: Ubuntu Linux
: NOR normal
Target Milestone: wanted3.5.1
Assignee: Julian Seward
URL:
Keywords:
: 230407 231076 232793 241903 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-08-02 17:03 UTC by Pace Willisson
Modified: 2010-06-16 13:24 UTC (History)
8 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Wrap inotify_init1 syscall (3.31 KB, patch)
2009-10-05 13:59 UTC, Dodji Seketeli
Details
valgrind-3.5.0-inotify-init1-ppc.patch (1.35 KB, patch)
2009-10-12 16:19 UTC, Jakub Jelinek
Details
valgrind-3.5.0-inotify-init1.patch (4.78 KB, patch)
2009-10-13 22:15 UTC, Jakub Jelinek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pace Willisson 2009-08-02 17:03:00 UTC
Version:           3.4.1 (using KDE 4.2.2)
Compiler:          gcc 4.3.3 
OS:                Linux
Installed from:    Ubuntu Packages

valgrind does not handle the inotify_init1 system call

compile the program below (no compiler flags needed), run as:

$ valgrind ./a.out

in the output you'll find:

--8641-- WARNING: unhandled syscall: 332
--8641-- You may be able to write your own handler.
--8641-- Read the file README_MISSING_SYSCALL_OR_IOCTL.
--8641-- Nevertheless we consider this a bug.  Please report
--8641-- it at http://valgrind.org/support/bug_reports.html.
inotify_init1: Function not implemented



#include <stdio.h>
#include <stdlib.h>
#include <sys/inotify.h>

int
main (int argc, char **argv)
{
	int fd;

	if ((fd = inotify_init1 (0)) < 0) {
		perror ("inotify_init1");
		exit (1);
	}

	printf ("ok\n");

	return (0);
}
Comment 1 Dodji Seketeli 2009-10-05 11:45:35 UTC
On x86_64 systems, this syscall number is 294. The same is needed there.
Comment 2 Dodji Seketeli 2009-10-05 13:59:40 UTC
Created attachment 37381 [details]
Wrap inotify_init1 syscall

This patch wraps the inotify_init1 syscall for linux x86_32 and amd64.
Tested on amd64.
Comment 3 Jakub Jelinek 2009-10-12 16:19:34 UTC
Created attachment 37536 [details]
valgrind-3.5.0-inotify-init1-ppc.patch

No reason to leave ppc32/ppc64 out...
Comment 4 Jakub Jelinek 2009-10-13 22:15:56 UTC
Created attachment 37564 [details]
valgrind-3.5.0-inotify-init1.patch

Updated patch, Dodji's original patch had a typo on x86 (LINKX_ instead of LINX_).
This one covers all arches.
Comment 5 Tom Hughes 2009-10-27 15:17:56 UTC
Fixed in r10909.
Comment 6 Jakub Jelinek 2009-10-27 22:29:18 UTC
On ppc32-linux the syscall isn't wired yet though.
Comment 7 Tom Hughes 2009-10-27 22:44:17 UTC
Not sure how I missed that... Fixed in r10912.
Comment 8 Tom Hughes 2010-03-12 10:55:09 UTC
*** Bug 230407 has been marked as a duplicate of this bug. ***
Comment 9 Tom Hughes 2010-03-17 10:55:59 UTC
*** Bug 231076 has been marked as a duplicate of this bug. ***
Comment 10 Tom Hughes 2010-03-31 09:24:28 UTC
*** Bug 232793 has been marked as a duplicate of this bug. ***
Comment 11 Tom Hughes 2010-06-16 13:24:33 UTC
*** Bug 241903 has been marked as a duplicate of this bug. ***