Bug 235720 - devel/valgrind: unimplemented syscall 555 (statfs)
Summary: devel/valgrind: unimplemented syscall 555 (statfs)
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Niclas Zeising
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-02-13 21:43 UTC by Michael Buch
Modified: 2020-07-30 11:41 UTC (History)
3 users (show)

See Also:
bugzilla: maintainer-feedback? (bdrewery)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Buch 2019-02-13 21:43:07 UTC
Just a matter of adding a statfs wrapper for the valgrind port. 
Happy to code this up if nobody has any objections.

Error occurred as follows:

(568)|thinkpad|gardei|~/valgrind-debug|
$>>freebsd-version
12.0-RELEASE
(569)|thinkpad|gardei|~/valgrind-debug|
$>>cat disk.c
#include <sys/statvfs.h>

int main() {
        struct statvfs fs;

        return statvfs("/", &fs);
}
(570)|thinkpad|gardei|~/valgrind-debug|
$>>valgrind ./a.out
==12810== Memcheck, a memory error detector
==12810== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==12810== Using Valgrind-3.10.1 and LibVEX; rerun with -h for copyright info
==12810== Command: ./a.out
==12810==
--12810-- WARNING: unhandled syscall: 555
--12810-- You may be able to write your own handler.
--12810-- Read the file README_MISSING_SYSCALL_OR_IOCTL.
--12810-- Nevertheless we consider this a bug.  Please report
--12810-- it at http://valgrind.org/support/bug_reports.html.
==12810==
==12810== HEAP SUMMARY:
==12810==     in use at exit: 0 bytes in 0 blocks
==12810==   total heap usage: 0 allocs, 0 frees, 0 bytes allocated
==12810==
==12810== All heap blocks were freed -- no leaks are possible
==12810==
==12810== For counts of detected and suppressed errors, rerun with: -v
==12810== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
Comment 1 Michael Buch 2019-02-14 18:12:43 UTC
Seems to be related to https://bugs.freebsd.or/bugzilla/show_bug.cgi?id=219715

A patch is already provided there, although it does not handle syscalls with following ids:
fhstat 553
statfs 555
fhstatfs 558
Comment 2 Walter Schwarzenfeld freebsd_triage 2019-03-09 08:41:37 UTC
Maintainership dropped ports r495096.
Comment 3 Walter Schwarzenfeld freebsd_triage 2019-03-10 11:43:43 UTC
Assign to new maintainer.
Comment 4 Paul Floyd 2020-03-27 19:44:51 UTC
(In reply to Michael Buch from comment #0)

With my github repo (https://github.com/paulfloyd/freebsd_valgrind) I get

paulf> ../../../vg-in-place ./statvfs
==26238== Memcheck, a memory error detector
==26238== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==26238== Using Valgrind-3.16.0.GIT and LibVEX; rerun with -h for copyright info
==26238== Command: ./statvfs
==26238== 
==26238== 
==26238== HEAP SUMMARY:
==26238==     in use at exit: 0 bytes in 0 blocks
==26238==   total heap usage: 0 allocs, 0 frees, 0 bytes allocated
==26238== 
==26238== All heap blocks were freed -- no leaks are possible
==26238== 
==26238== For lists of detected and suppressed errors, rerun with: -s
==26238== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
Comment 5 Paul Floyd 2020-07-30 11:41:29 UTC
This should now be fixed in devel/valgrind-devel and this item can be closed.