Bug 234631 - devel/valgrind: Fixes for FreeBSD 12.x support
Summary: devel/valgrind: Fixes for FreeBSD 12.x support
Status: Open
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: needs-patch, needs-qa
Depends on:
Blocks:
 
Reported: 2019-01-05 08:16 UTC by Julien Nadeau
Modified: 2019-07-02 15:46 UTC (History)
6 users (show)

See Also:
bugzilla: maintainer-feedback? (zeising)
koobs: merge-quarterly?


Attachments
Patch (37.77 KB, patch)
2019-01-05 08:16 UTC, Julien Nadeau
no flags Details | Diff
pipe() -> pipe2(,0) (603 bytes, patch)
2019-03-16 18:30 UTC, rozhuk.im
no flags Details | Diff
update patch (43.36 KB, patch)
2019-03-17 22:02 UTC, rozhuk.im
rozhuk.im: maintainer-approval?
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Julien Nadeau 2019-01-05 08:16:39 UTC
Created attachment 200787 [details]
Patch

Add 12.x kevent, minherit, getrandom syscalls.
Add 12.x struct stat.

Suggest consolidating EXTRA_PATCHES so that 'update-patches' can work normally.
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2019-01-05 10:19:59 UTC
-PORTEPOCH=	1
+PORTEPOCH=	2

Should be a PORTREVISION bump
Comment 2 w.schwarzenfeld freebsd_triage 2019-03-10 11:48:04 UTC
Assign to new maintainer.
Comment 3 rozhuk.im 2019-03-16 18:04:14 UTC
There is one thing that not done: this will not work if kernel build without COMPAT_FREEBSD10 - wich remove pipe().
For all other soft this handled by libc (IMHO, not sure), it convert it to pipe2(,0), but valgring try to call directly via syscall and fail.
Almost same thing with COMPAT_FREEBSD11.
I try to make patch to fix it and add it here.
Comment 4 rozhuk.im 2019-03-16 18:30:22 UTC
Created attachment 202919 [details]
pipe() -> pipe2(,0)
Comment 5 rozhuk.im 2019-03-16 19:21:52 UTC
Also on FreeBSD 12 rquired:
CFLAGS+=	-mstack-alignment=8

looks like defaults now 16 and this brokes valgrind.
Comment 6 rozhuk.im 2019-03-16 19:32:54 UTC
Can you also integrate my patch: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=234045 ?
Comment 7 rozhuk.im 2019-03-17 22:02:50 UTC
Created attachment 202943 [details]
update patch

- pipe() -> pipe2(,0) for 11.0
- add getfsstat() for 12.0
- add statfs() for 12.0
- add sigwait()
- use -mstack-alignment=8 to avoid crash
Comment 8 Egil Hasting 2019-07-02 15:46:06 UTC
(In reply to rozhuk.im from comment #7)
Tested the patch on: FreeBSD 12.0-RELEASE-p3 FreeBSD 12.0-RELEASE-p3 GENERIC  amd64

Works as expected, thanks!