https://bugs.kde.org/show_bug.cgi?id=446823

            Bug ID: 446823
           Summary: FreeBSD - missing syscalls when using libzm4
           Product: valgrind
           Version: 3.19 GIT
          Platform: Other
                OS: FreeBSD
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

Issue reported by Shawn Webb:

Hey Paul,

I have a HardenedBSD 13-STABLE/amd64 system on which I'm doing
application development. HardenedBSD is a "spork" of FreeBSD that
maintains 100% syscall compat (HardenedBSD doesn't change, remove, or
add any new syscalls.)

In the application, I'm making use of libzmq4. It appears:

1. Valgrind requires COMPAT_FREEBSD10. What kind of effort would be
   needed to remove that requirement?
2. Valgrind aborts due to not being able to handle one or more
   syscalls that libzm4 uses. What kind of effort would be needed to
   handle those syscalls upstream in Valgrind?

Here's Valgrind's log:

==== BEGIN LOG ====
==12446== Memcheck, a memory error detector
==12446== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==12446== Using Valgrind-3.18.1 and LibVEX; rerun with -h for copyright info
==12446== Command: obj/[redacted].full
==12446== 
--12446-- WARNING: unhandled amd64-freebsd syscall: 574
--12446-- You may be able to write your own handler.
--12446-- Read the file README_MISSING_SYSCALL_OR_IOCTL.
--12446-- Nevertheless we consider this a bug.  Please report
--12446-- it at http://valgrind.org/support/bug_reports.html.
--12446-- WARNING: unhandled amd64-freebsd syscall: 574
--12446-- You may be able to write your own handler.
--12446-- Read the file README_MISSING_SYSCALL_OR_IOCTL.
--12446-- Nevertheless we consider this a bug.  Please report
--12446-- it at http://valgrind.org/support/bug_reports.html.
--12446-- WARNING: unhandled amd64-freebsd syscall: 577
--12446-- You may be able to write your own handler.
--12446-- Read the file README_MISSING_SYSCALL_OR_IOCTL.
--12446-- Nevertheless we consider this a bug.  Please report
--12446-- it at http://valgrind.org/support/bug_reports.html.
Function not implemented (src/ip.cpp:563)
==12446== 
==12446== Process terminating with default action of signal 6 (SIGABRT):
dumping core
==12446==    at 0x4A97A2A: thr_kill (in /lib/libc.so.7)
==12446==    by 0x4A0896B: raise (in /lib/libc.so.7)
==12446==    by 0x4AC3746: abort (in /lib/libc.so.7)
==12446==    by 0x48C3DE8: ??? (in /usr/local/lib/libzmq.so.5.2.4)
==12446==    by 0x48C63A7: ??? (in /usr/local/lib/libzmq.so.5.2.4)
==12446==    by 0x48F2907: ??? (in /usr/local/lib/libzmq.so.5.2.4)
==12446==    by 0x48CA8DE: ??? (in /usr/local/lib/libzmq.so.5.2.4)
==12446==    by 0x48B443B: ??? (in /usr/local/lib/libzmq.so.5.2.4)
==12446==    by 0x4916D42: zmq_ctx_new (in /usr/local/lib/libzmq.so.5.2.4)
==12446==    by 0x203AAE: UnknownInlinedFun (src/orchestrator.c:45)
==12446==    by 0x203AAE: _[redacted]_ctx_init (src/[redacted].c:173)
==12446==    by 0x203AAE: main (src/[redacted].c:73)
==12446== 
==12446== HEAP SUMMARY:
==12446==     in use at exit: 175,344 bytes in 526 blocks
==12446==   total heap usage: 703 allocs, 177 frees, 201,353 bytes allocated
==12446== 
==12446== LEAK SUMMARY:
==12446==    definitely lost: 192 bytes in 3 blocks
==12446==    indirectly lost: 9,954 bytes in 250 blocks
==12446==      possibly lost: 0 bytes in 0 blocks
==12446==    still reachable: 165,198 bytes in 273 blocks
==12446==         suppressed: 0 bytes in 0 blocks
==12446== Rerun with --leak-check=full to see details of leaked memory
==12446== 
==12446== For lists of detected and suppressed errors, rerun with: -s
==12446== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
[1]    12347 abort      sudo valgrind obj/[redacted].full
==== END LOG ====

I've redacted some sensitive info.

Thanks,

-- 
Shawn Webb
Cofounder / Security Engineer
HardenedBSD

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to